[SeaBIOS] [PATCH 3/6] pci: align 64bit pci regions to 1G
Gerd Hoffmann
kraxel at redhat.com
Tue Nov 26 13:24:11 CET 2013
So they are hugepage aligned.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
src/fw/pciinit.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index 1d5e919..1fd02f0 100644
--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -787,10 +787,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);
--
1.8.3.1
More information about the SeaBIOS
mailing list