lkml.org 
[lkml]   [2009]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: efi/e820 table merge fix
From
Date
On Wed, 2009-06-17 at 09:38 +0800, H. Peter Anvin wrote:
> Huang Ying wrote:
> > On Wed, 2009-06-17 at 05:43 +0800, Cliff Wickman wrote:
> >> From: Cliff Wickman <cpw@sgi.com>
> >> --- linux.orig/arch/x86/kernel/efi.c
> >> +++ linux/arch/x86/kernel/efi.c
> >> @@ -240,10 +240,35 @@ static void __init do_add_efi_memmap(voi
> >> unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;
> >> int e820_type;
> >>
> >> - if (md->attribute & EFI_MEMORY_WB)
> >> - e820_type = E820_RAM;
> >> - else
> >> + switch (md->type) {
> >> + case EFI_LOADER_CODE:
> >> + case EFI_LOADER_DATA:
> >> + case EFI_BOOT_SERVICES_CODE:
> >> + case EFI_BOOT_SERVICES_DATA:
> >> + case EFI_CONVENTIONAL_MEMORY:
> >> + if (md->attribute & EFI_MEMORY_WB)
> >> + e820_type = E820_RAM;
> >> + else
> >> + e820_type = E820_RESERVED;
> >> + break;
> >
> > Why does BIOS mark memory region without EFI_MEMORY_WB as these types?
> > Any example?
> >
> Probably not, but if it does, it's broken, and the memory should be
> ignored. The original code had the EFI_MEMORY_WB check already, so it
> seems prudent to keep it.

Maybe we need a real life example for that "fix". And attribute that to
the vendor in comments.

Best Regards,
Huang Ying




\
 
 \ /
  Last update: 2009-06-17 03:47    [W:0.047 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site