diff options
author | Michael Walle <michael@walle.cc> | 2020-05-17 12:29:19 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-05-17 21:59:53 +0200 |
commit | 714497e327e7304a2b67d5f780f415c6e1c300d0 (patch) | |
tree | d6182ed8caa040cc042b4f86a4abfaab65f68ff8 /arch/x86/lib | |
parent | 515f613253cf0a892c3a321770ab927fa3d925cf (diff) | |
download | u-boot-714497e327e7304a2b67d5f780f415c6e1c300d0.tar.gz u-boot-714497e327e7304a2b67d5f780f415c6e1c300d0.tar.xz u-boot-714497e327e7304a2b67d5f780f415c6e1c300d0.zip |
efi_loader: round the memory area in efi_add_memory_map()
Virtually all callers of this function do the rounding on their own.
Some do it right, some don't. Instead of doing this in each caller,
do the rounding in efi_add_memory_map(). Change the size parameter
to bytes instead of pages and remove aligning and size calculation in
all callers.
There is no more need to make the original efi_add_memory_map() (which
takes pages as size) available outside the module. Thus rename it to
efi_add_memory_map_pg() and make it static to prevent further misuse
outside the module.
Signed-off-by: Michael Walle <michael@walle.cc>
Add missing comma in sunxi_display.c.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/e820.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c index 26da4d2f27..1f20c5c8c6 100644 --- a/arch/x86/lib/e820.c +++ b/arch/x86/lib/e820.c @@ -41,7 +41,7 @@ void efi_add_known_memory(void) { struct e820_entry e820[E820MAX]; unsigned int i, num; - u64 start, pages, ram_top; + u64 start, ram_top; int type; num = install_e820_map(ARRAY_SIZE(e820), e820); @@ -77,9 +77,7 @@ void efi_add_known_memory(void) start + e820[i].size, ram_top); } else { - pages = ALIGN(e820[i].size, EFI_PAGE_SIZE) - >> EFI_PAGE_SHIFT; - efi_add_memory_map(start, pages, type, false); + efi_add_memory_map(start, e820[i].size, type); } } } |