diff options
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 49477484a2fa..7b613d2efb04 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1029,7 +1029,7 @@ void __init e820_reserve_resources(void) | |||
1029 | } | 1029 | } |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | char *__init __attribute__((weak)) machine_specific_memory_setup(void) | 1032 | char *__init default_machine_specific_memory_setup(void) |
1033 | { | 1033 | { |
1034 | char *who = "BIOS-e820"; | 1034 | char *who = "BIOS-e820"; |
1035 | int new_nr; | 1035 | int new_nr; |
@@ -1045,10 +1045,7 @@ char *__init __attribute__((weak)) machine_specific_memory_setup(void) | |||
1045 | &new_nr); | 1045 | &new_nr); |
1046 | boot_params.e820_entries = new_nr; | 1046 | boot_params.e820_entries = new_nr; |
1047 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) { | 1047 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) { |
1048 | #ifdef CONFIG_X86_64 | 1048 | u64 mem_size; |
1049 | early_panic("Cannot find a valid memory map"); | ||
1050 | #else | ||
1051 | unsigned long mem_size; | ||
1052 | 1049 | ||
1053 | /* compare results from other methods and take the greater */ | 1050 | /* compare results from other methods and take the greater */ |
1054 | if (boot_params.alt_mem_k | 1051 | if (boot_params.alt_mem_k |
@@ -1063,13 +1060,17 @@ char *__init __attribute__((weak)) machine_specific_memory_setup(void) | |||
1063 | e820.nr_map = 0; | 1060 | e820.nr_map = 0; |
1064 | e820_add_region(0, LOWMEMSIZE(), E820_RAM); | 1061 | e820_add_region(0, LOWMEMSIZE(), E820_RAM); |
1065 | e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM); | 1062 | e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM); |
1066 | #endif | ||
1067 | } | 1063 | } |
1068 | 1064 | ||
1069 | /* In case someone cares... */ | 1065 | /* In case someone cares... */ |
1070 | return who; | 1066 | return who; |
1071 | } | 1067 | } |
1072 | 1068 | ||
1069 | char *__init __attribute__((weak)) machine_specific_memory_setup(void) | ||
1070 | { | ||
1071 | return default_machine_specific_memory_setup(); | ||
1072 | } | ||
1073 | |||
1073 | /* Overridden in paravirt.c if CONFIG_PARAVIRT */ | 1074 | /* Overridden in paravirt.c if CONFIG_PARAVIRT */ |
1074 | char * __init __attribute__((weak)) memory_setup(void) | 1075 | char * __init __attribute__((weak)) memory_setup(void) |
1075 | { | 1076 | { |