summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_pci.c
diff options
context:
space:
mode:
authorSimon Rettberg2021-07-22 14:36:35 +0200
committerSimon Rettberg2021-07-22 14:36:35 +0200
commitfc21afb08c7b827b3cd4a77618f36a7abdc13494 (patch)
treef7909726a1d49cb834bfa9647621b29cb15caea4 /src/interface/efi/efi_pci.c
parentMerge branch 'master' into openslx (diff)
parent[cloud] Retry DHCP aggressively in AWS EC2 (diff)
downloadipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.gz
ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.xz
ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.zip
Merge branch 'master' into openslx
Diffstat (limited to 'src/interface/efi/efi_pci.c')
-rw-r--r--src/interface/efi/efi_pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c
index 4adee0fd8..fda4aba0e 100644
--- a/src/interface/efi/efi_pci.c
+++ b/src/interface/efi/efi_pci.c
@@ -337,6 +337,9 @@ void * efipci_ioremap ( struct pci_device *pci, unsigned long bus_addr,
offset = le64_to_cpu ( u.res->qword.offset );
start = ( offset + le64_to_cpu ( u.res->qword.min ) );
end = ( start + le64_to_cpu ( u.res->qword.len ) );
+ DBGC2 ( pci, "EFIPCI " PCI_FMT " found range [%08llx,%08llx) "
+ "-> [%08llx,%08llx)\n", PCI_ARGS ( pci ), start, end,
+ ( start - offset ), ( end - offset ) );
if ( ( bus_addr < start ) || ( ( bus_addr + len ) > end ) )
continue;
@@ -523,7 +526,8 @@ static void * efipci_dma_alloc ( struct dma_device *dma,
/* Map buffer */
if ( ( rc = efipci_dma_map ( dma, map, virt_to_phys ( addr ),
- len, DMA_BI ) ) != 0 )
+ ( pages * EFI_PAGE_SIZE ),
+ DMA_BI ) ) != 0 )
goto err_map;
/* Increment allocation count (for debugging) */