Skip to content

Commit

Permalink
x86: EFI set_memory_x()/set_memory_uc() fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Feb 14, 2008
1 parent cae30f8 commit 3223f59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static void __init runtime_code_page_mkexec(void)
if (md->type != EFI_RUNTIME_SERVICES_CODE)
continue;

set_memory_x(md->virt_addr, md->num_pages << EFI_PAGE_SHIFT);
set_memory_x(md->virt_addr, md->num_pages);
}
}

Expand Down Expand Up @@ -434,7 +434,7 @@ void __init efi_enter_virtual_mode(void)
}

if (!(md->attribute & EFI_MEMORY_WB))
set_memory_uc(md->virt_addr, size);
set_memory_uc(md->virt_addr, md->num_pages);

systab = (u64) (unsigned long) efi_phys.systab;
if (md->phys_addr <= systab && systab < end) {
Expand Down

0 comments on commit 3223f59

Please sign in to comment.