diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-14 08:21:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-14 17:30:20 -0500 |
commit | 3223f59f9cd9d69a4344eeac8b16a262c5f373f1 (patch) | |
tree | c3e254bc48f50fb389555e3d80f014419d27af8c /arch | |
parent | cae30f8270005940902c5807146fbaa36875e6e9 (diff) |
x86: EFI set_memory_x()/set_memory_uc() fixes
The EFI-runtime mapping code changed a larger memory area than it
should have, due to a pages/bytes parameter mixup.
noticed by Andi Kleen.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/efi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index cbdf9bacc575..0c0eeb163d90 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c | |||
@@ -391,7 +391,7 @@ static void __init runtime_code_page_mkexec(void) | |||
391 | if (md->type != EFI_RUNTIME_SERVICES_CODE) | 391 | if (md->type != EFI_RUNTIME_SERVICES_CODE) |
392 | continue; | 392 | continue; |
393 | 393 | ||
394 | set_memory_x(md->virt_addr, md->num_pages << EFI_PAGE_SHIFT); | 394 | set_memory_x(md->virt_addr, md->num_pages); |
395 | } | 395 | } |
396 | } | 396 | } |
397 | 397 | ||
@@ -434,7 +434,7 @@ void __init efi_enter_virtual_mode(void) | |||
434 | } | 434 | } |
435 | 435 | ||
436 | if (!(md->attribute & EFI_MEMORY_WB)) | 436 | if (!(md->attribute & EFI_MEMORY_WB)) |
437 | set_memory_uc(md->virt_addr, size); | 437 | set_memory_uc(md->virt_addr, md->num_pages); |
438 | 438 | ||
439 | systab = (u64) (unsigned long) efi_phys.systab; | 439 | systab = (u64) (unsigned long) efi_phys.systab; |
440 | if (md->phys_addr <= systab && systab < end) { | 440 | if (md->phys_addr <= systab && systab < end) { |