<p>The PCI device address may not be same as host address (CPU view address)<br>
To read/write directly to PCI device's BARs (without using<br>
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Read() and<br>
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Write()) we need to convert PCI<br>
device address to host address.</p>
<p>The UEFI specifications 2.7 provide a method to translate the PCI device<br>
address to host address and vice versa.</p>
<p>device address = host address + translation offset</p>
<p>EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Configuration() method can provide us with<br>
the translation offset and host address range.</p>
<p>Using this we can convert the PCI device address to host address.</p>
<p>Signed-off-by: Pankaj Bansal <a href="mailto:pankaj.bansal@nxp.com">pankaj.bansal@nxp.com</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/ipxe/ipxe/pull/117'>https://github.com/ipxe/ipxe/pull/117</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>implement api to convert pci address to host address</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/117/files#diff-b698222cc8da5efa40ccb24b0de1643b">src/include/ipxe/pci_io.h</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/117/files#diff-94dd97dbb64da253dc574ecb2918d364">src/interface/efi/efi_pci.c</a>
    (60)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/ipxe/ipxe/pull/117.patch'>https://github.com/ipxe/ipxe/pull/117.patch</a></li>
  <li><a href='https://github.com/ipxe/ipxe/pull/117.diff'>https://github.com/ipxe/ipxe/pull/117.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ipxe/ipxe/pull/117">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFNGVHCD6HPOJ37WVHZFR3RZIHXLANCNFSM4OMNYE7A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAFNGVHL4EFAYBPHRR2FYI3RZIHXLA5CNFSM4OMNYE7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JVES2EA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ipxe/ipxe/pull/117",
"url": "https://github.com/ipxe/ipxe/pull/117",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>