[SeaBIOS] [PATCH v4 1/2] pciinit: refactor mem init code

Kevin O'Connor kevin at koconnor.net
Thu Aug 8 03:59:09 CEST 2013


On Mon, Jul 29, 2013 at 12:33:46PM +0300, Michael S. Tsirkin wrote:
> Refactor memory initialization code:
> - split window initialization from other setup
> - pass all window data around by pointer
> 
> This is in preparation for getting window data
> from qemu.

I'm struggling to understand this patch.  Why does it setup the ranges
in 'struct pci_mem mem' and then pass 'mem' around to a bunch of
functions, when it ultimately populates the four global pcimem*
variables anyway?  It seems the patch would be simpler if it just
populated the globals at the start and used the global variables
everywhere.  (The subsequent "load memory window" patch can read
etc/pci-info and populate the globals as well.)

-Kevin



More information about the SeaBIOS mailing list