[ipxe-devel] Supporting multiple Memory BARs

Michael Brown mcb30 at ipxe.org
Tue Dec 5 00:14:04 UTC 2017


On 01/12/17 21:33, Deema B wrote:
> Is there any ongoing work to support more than one Memory BAR?
> 
>  From what I can tell, current implementation picks the first Memory 
> BAR, and uses it via pci_device.membase

That field exists merely as a convenience for drivers, since it's a 
common pattern that drivers use only the first memory BAR.

Other BARs can easily be accessed via pci_bar_start().  For example, in 
drivers/net/vmxnet3.c:

     vmxnet->pt = ioremap ( pci_bar_start ( pci, VMXNET3_PT_BAR ),
                            VMXNET3_PT_LEN );

Michael



More information about the ipxe-devel mailing list