lkml.org 
[lkml]   [2013]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch v4] x86: make 'mem=' option to work for efi platform
From
Date
On Tue, 2012-11-13 at 18:58 +0800, Wen Congyang wrote:
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index ad44391..7592163 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -314,10 +314,17 @@ static void __init do_add_efi_memmap(void)
> int e820_type;
>
> switch (md->type) {
> - case EFI_LOADER_CODE:
> - case EFI_LOADER_DATA:
> case EFI_BOOT_SERVICES_CODE:
> case EFI_BOOT_SERVICES_DATA:
> + /* EFI_BOOT_SERVICES_{CODE,DATA} needs to be mapped */
> + if (md->attribute & EFI_MEMORY_WB)
> + e820_type = E820_RAM;
> + else
> + e820_type = E820_RESERVED;
> + e820_add_region(start, size, e820_type);
> + continue;
> + case EFI_LOADER_CODE:
> + case EFI_LOADER_DATA:
> case EFI_CONVENTIONAL_MEMORY:
> if (md->attribute & EFI_MEMORY_WB)
> e820_type = E820_RAM;

This chunk seems to cause one of my EFI machines to crash. If I include
EFI_LOADER_{CODE,DATA} in the same clause as EFI_BOOT_SERVICES* things
work. I'm not sure why that is since the e820_type is E820_RAM.

Maybe I need to use memmap= too when booting?



\
 
 \ /
  Last update: 2013-01-03 16:42    [W:0.035 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site