lkml.org 
[lkml]   [2008]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Fix left over EFI cache mapping problems
From
Date
On Fri, 2008-02-15 at 08:08 +0100, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@intel.com> wrote:
>
> > On Thu, 2008-02-14 at 17:12 +0100, Ingo Molnar wrote:
> > > this is indeed a bug (we change the attributes for a larger area than
> > > needed), but your fix is unclean. Find below a cleaner solution.
> > >
> > > Ying, if you agree with this fix could you please test and ACK it before
> > > we push it to Linus? (this fix is also in the latest x86.git#mm)
> >
> > I think the patch following may be better, because it is possible that
> > the EFI_PAGE_SHIFT and PAGE_SHIFT are different.
>
> right now, EFI page size is 4096:
>
> include/linux/efi.h:#define EFI_PAGE_SHIFT 12
>
> i doubt we'll ever change PAGE_SIZE on x86 - ia64's variable lowlevel
> pagesizes are not particularly useful IMO. I think we'll at most have
> some generic kernel feature that allows a larger PAGE_CACHE_SHIFT - but
> on the lowlevel MMU level we'll always stay at 4K.
>
> and i doubt EFI_PAGE_SHIFT would want to (ever) go away from 12 either.

After looking up in UEFI specification, I found that it is specified by
UEFI specification 2.1 (section 6.2, page 124) that the NumberOfPages
(num_pages) of EFI_MEMORY_DESCRIPTOR (efi_memory_desc_t) must be "Number
of 4KB pages in the memory region". So we need not worry about potential
EFI_PAGE_SHIFT changes.

Best Regards,
Huang Ying

> So perhaps, at least as far as arch/x86/kernel/efi*.c files go, it would
> be cleaner to just replace EFI_PAGE_SHIFT with PAGE_SHIFT and
> EFI_PAGE_SIZE with PAGE_SIZE?



\
 
 \ /
  Last update: 2008-02-18 02:57    [W:0.113 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site