diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2015-09-30 10:01:56 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2015-10-12 09:20:09 -0400 |
commit | 0f96a99dab366333439e110d6ad253bc7c557c09 (patch) | |
tree | 9c5df8a648c1ca4ba54cf29ce5fc305bec4d02e2 /arch/x86/kernel/setup.c | |
parent | 0bbea1ce98ed44779736ecc54ca9cdbca2b95544 (diff) |
efi: Add "efi_fake_mem" boot option
This patch introduces new boot option named "efi_fake_mem".
By specifying this parameter, you can add arbitrary attribute
to specific memory range.
This is useful for debugging of Address Range Mirroring feature.
For example, if "efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000"
is specified, the original (firmware provided) EFI memmap will be
updated so that the specified memory regions have
EFI_MEMORY_MORE_RELIABLE attribute (0x10000):
<original>
efi: mem36: [Conventional Memory| | | | | | |WB|WT|WC|UC] range=[0x0000000100000000-0x00000020a0000000) (129536MB)
<updated>
efi: mem36: [Conventional Memory| |MR| | | | |WB|WT|WC|UC] range=[0x0000000100000000-0x0000000180000000) (2048MB)
efi: mem37: [Conventional Memory| | | | | | |WB|WT|WC|UC] range=[0x0000000180000000-0x00000010a0000000) (61952MB)
efi: mem38: [Conventional Memory| |MR| | | | |WB|WT|WC|UC] range=[0x00000010a0000000-0x0000001120000000) (2048MB)
efi: mem39: [Conventional Memory| | | | | | |WB|WT|WC|UC] range=[0x0000001120000000-0x00000020a0000000) (63488MB)
And you will find that the following message is output:
efi: Memory: 4096M/131455M mirrored memory
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 80f874bf999e..e3ed628f7db4 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1104,8 +1104,10 @@ void __init setup_arch(char **cmdline_p) | |||
1104 | memblock_set_current_limit(ISA_END_ADDRESS); | 1104 | memblock_set_current_limit(ISA_END_ADDRESS); |
1105 | memblock_x86_fill(); | 1105 | memblock_x86_fill(); |
1106 | 1106 | ||
1107 | if (efi_enabled(EFI_BOOT)) | 1107 | if (efi_enabled(EFI_BOOT)) { |
1108 | efi_fake_memmap(); | ||
1108 | efi_find_mirror(); | 1109 | efi_find_mirror(); |
1110 | } | ||
1109 | 1111 | ||
1110 | /* | 1112 | /* |
1111 | * The EFI specification says that boot service code won't be called | 1113 | * The EFI specification says that boot service code won't be called |