diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-11-26 11:08:17 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-11-29 09:34:14 +0100 |
commit | f21c0066df641c2d0e383254bb69a42a60c0616c (patch) | |
tree | 7893bc753e535458b5c2ae8f4df16886250fe547 /src/fw/pciinit.c | |
parent | a247e678039817acbf830ee09b2ee31294e12311 (diff) | |
download | seabios-f21c0066df641c2d0e383254bb69a42a60c0616c.tar.gz |
pci: align 64bit pci regions to 1G
So they are hugepage aligned.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src/fw/pciinit.c')
-rw-r--r-- | src/fw/pciinit.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); |