From f21c0066df641c2d0e383254bb69a42a60c0616c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 26 Nov 2013 11:08:17 +0100 Subject: pci: align 64bit pci regions to 1G So they are hugepage aligned. Signed-off-by: Gerd Hoffmann --- src/fw/pciinit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/fw/pciinit.c') diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index c40375b7..87b562ee 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -783,10 +783,15 @@ static void pci_bios_map_devices(struct pci_bus *busses) u64 align_mem = pci_region_align(&r64_mem); u64 align_pref = pci_region_align(&r64_pref); - r64_mem.base = ALIGN(0x100000000LL + RamSizeOver4G, align_mem); - r64_pref.base = ALIGN(r64_mem.base + sum_mem, align_pref); + r64_mem.base = 0x100000000LL + RamSizeOver4G; + r64_mem.base = ALIGN(r64_mem.base, align_mem); + r64_mem.base = ALIGN(r64_mem.base, (1LL<<30)); // 1G hugepage + r64_pref.base = r64_mem.base + sum_mem; + r64_pref.base = ALIGN(r64_pref.base, align_pref); + r64_pref.base = ALIGN(r64_pref.base, (1LL<<30)); // 1G hugepage pcimem64_start = r64_mem.base; pcimem64_end = r64_pref.base + sum_pref; + pcimem64_end = ALIGN(pcimem64_end, (1LL<<30)); // 1G hugepage pci_region_map_entries(busses, &r64_mem); pci_region_map_entries(busses, &r64_pref); -- cgit