[ipxe-devel] [ipxe/ipxe] implement api to convert pci address to host address (#117)

Pankaj Bansal notifications at github.com
Tue Jun 30 16:33:57 UTC 2020


The PCI device address may not be same as host address (CPU view address)
To read/write directly to PCI device's BARs (without using
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Read() and
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Write()) we need to convert PCI
device address to host address.

The UEFI specifications 2.7 provide a method to translate the PCI device
address to host address and vice versa.

device address = host address + translation offset

EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Configuration() method can provide us with
the translation offset and host address range.

Using this we can convert the PCI device address to host address.

Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
You can view, comment on, or merge this pull request online at:

  https://github.com/ipxe/ipxe/pull/117

-- Commit Summary --

  * implement api to convert pci address to host address

-- File Changes --

    M src/include/ipxe/pci_io.h (10)
    M src/interface/efi/efi_pci.c (60)

-- Patch Links --

https://github.com/ipxe/ipxe/pull/117.patch
https://github.com/ipxe/ipxe/pull/117.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/117
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20200630/dc6690be/attachment.htm>


More information about the ipxe-devel mailing list