Re: [RFC PATCH] x86: make 64bit efi to use ioremap_cache for efi_ioremap

From: Yinghai Lu
Date: Sat Oct 04 2008 - 13:44:19 EST


On Sat, Oct 4, 2008 at 2:35 AM, huang ying <huang.ying.caritas@xxxxxxxxx> wrote:
> Hi, Yinghai,
>
> On Sat, Oct 4, 2008 at 2:23 PM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
> [...]
>> --- linux-2.6.orig/arch/x86/kernel/efi.c
>> +++ linux-2.6/arch/x86/kernel/efi.c
>> @@ -475,10 +475,7 @@ void __init efi_enter_virtual_mode(void)
>> size = md->num_pages << EFI_PAGE_SHIFT;
>> end = md->phys_addr + size;
>>
>> - if (PFN_UP(end) <= max_low_pfn_mapped)
>> - va = __va(md->phys_addr);
>> - else
>> - va = efi_ioremap(md->phys_addr, size);
>> + va = efi_ioremap(md->phys_addr, size);
>
> Using __va and efi_ioremap() here is to make EFI support compatible
> with kexec. Because EFI provide only efi_enter_virtual_mode(), no
> efi_leave_virtual_mode(), we should make EFI runtime memory area
> mapped to same virtual memory area in original kernel and kexeced
> kernel, so that the EFI runtime services can be used in kexeced
> kernel.

so need to make efi range all under direct-mapping like E820-RAM?

if so we need to update
e820_end_of_low_ram_pfn to return correct max_low_pfn, and then
max_low_pfn_mapped...

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/