]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86: make 'mem=' option to work for efi platform
authorWen Congyang <wency@cn.fujitsu.com>
Sun, 10 Mar 2013 10:54:34 +0000 (21:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2013 03:56:22 +0000 (14:56 +1100)
commit596555c95ea42432c7de9fbb4ebbcff922a3a4a8
tree8f6b76e676f03496692852a3113e3f7e37d3157c
parent65ab666596bd383fd3fdcb6c9965f661fb9c6a3a
x86: make 'mem=' option to work for efi platform

Current mem boot option only can work for non efi environment.  If the
user specifies add_efi_memmap, it cannot work for efi environment.  In the
efi environment, we call e820_add_region() to add the memory map.  So we
can modify __e820_add_region() and the mem boot option can work for efi
environment.

Note: Only E820_RAM is limited, and BOOT_SERVICES_{CODE,DATA} are always
mapped(If its address >= mem_limit, the memory won't be freed in
efi_free_boot_services()).

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Rob Landley <rob@landley.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/include/asm/e820.h
arch/x86/kernel/e820.c
arch/x86/platform/efi/efi.c