[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1223257827.5872.14.camel@yhuang-dev.sh.intel.com>
Date: Mon, 06 Oct 2008 09:50:27 +0800
From: Huang Ying <ying.huang@...el.com>
To: Yinghai Lu <yinghai@...nel.org>
Cc: huang ying <huang.ying.caritas@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] x86: make 64bit efi to use ioremap_cache for
efi_ioremap
On Sun, 2008-10-05 at 11:04 -0700, Yinghai Lu wrote:
> On Sun, Oct 5, 2008 at 1:56 AM, huang ying <huang.ying.caritas@...il.com> wrote:
> > On Sun, Oct 5, 2008 at 1:44 AM, Yinghai Lu <yinghai@...nel.org> wrote:
> >> On Sat, Oct 4, 2008 at 2:35 AM, huang ying <huang.ying.caritas@...il.com> wrote:
> > [...]
> >>> 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?
> >
> > Some EFI runtime range is just some RAM area used by EFI runtime
> > services, they can be direct-mapped. Some EFI runtime range may be IO
> > MEM range used by EFI runtime services, it is possible that these IO
> > MEM range can not be direct-mapped. So I implement efi_ioremap() to
> > deal with them.
> >
>
> i'm confused.
>
> so
> --- 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);
>
> md->virt_addr = (u64) (unsigned long) va;
> should be ok.
I think __va() and efi_ioremap() should be used.
> then how about use ioremap directly to replace fixed mapping in 64bit
> with efi_ioremap?
Because for kexec to work, EFI runtime memory area should be mapped to
same virtual address across reboot.
Best Regards,
Huang Ying
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists