aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-10 11:30:40 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-10 12:55:31 -0400
commit3b33553badcde952adcf3b3ba5faae38d7d85071 (patch)
treee6f20de95b23a54689776e772ad25561ae109b69 /arch
parent520b9617ab4aea764ddfc5d58cae21c16b3318e1 (diff)
x86: add early quirk support
Add early quirks support. In preparation of enabling the generic architecture to boot on a VISWS. This will allow us to remove the VISWS subarch and all its complications. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/e820.c11
-rw-r--r--arch/x86/kernel/mpparse.c20
-rw-r--r--arch/x86/kernel/setup.c1
3 files changed, 30 insertions, 2 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 9836a079cfd9..269d367d2ace 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1297,6 +1297,11 @@ void __init e820_reserve_resources(void)
1297 } 1297 }
1298} 1298}
1299 1299
1300/*
1301 * Non-standard memory setup can be specified via this quirk:
1302 */
1303char * (*arch_memory_setup_quirk)(void);
1304
1300char *__init default_machine_specific_memory_setup(void) 1305char *__init default_machine_specific_memory_setup(void)
1301{ 1306{
1302 char *who = "BIOS-e820"; 1307 char *who = "BIOS-e820";
@@ -1337,6 +1342,12 @@ char *__init default_machine_specific_memory_setup(void)
1337 1342
1338char *__init __attribute__((weak)) machine_specific_memory_setup(void) 1343char *__init __attribute__((weak)) machine_specific_memory_setup(void)
1339{ 1344{
1345 if (arch_memory_setup_quirk) {
1346 char *who = arch_memory_setup_quirk();
1347
1348 if (who)
1349 return who;
1350 }
1340 return default_machine_specific_memory_setup(); 1351 return default_machine_specific_memory_setup();
1341} 1352}
1342 1353
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 8b6b1e05c306..3b25e49380c6 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -726,12 +726,22 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
726static struct intel_mp_floating *mpf_found; 726static struct intel_mp_floating *mpf_found;
727 727
728/* 728/*
729 * Machine specific quirk for finding the SMP config before other setup
730 * activities destroy the table:
731 */
732int (*mach_get_smp_config_quirk)(unsigned int early);
733
734/*
729 * Scan the memory blocks for an SMP configuration block. 735 * Scan the memory blocks for an SMP configuration block.
730 */ 736 */
731static void __init __get_smp_config(unsigned early) 737static void __init __get_smp_config(unsigned int early)
732{ 738{
733 struct intel_mp_floating *mpf = mpf_found; 739 struct intel_mp_floating *mpf = mpf_found;
734 740
741 if (mach_get_smp_config_quirk) {
742 if (mach_get_smp_config_quirk(early))
743 return;
744 }
735 if (acpi_lapic && early) 745 if (acpi_lapic && early)
736 return; 746 return;
737 /* 747 /*
@@ -889,10 +899,16 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
889 return 0; 899 return 0;
890} 900}
891 901
892static void __init __find_smp_config(unsigned reserve) 902int (*mach_find_smp_config_quirk)(unsigned int reserve);
903
904static void __init __find_smp_config(unsigned int reserve)
893{ 905{
894 unsigned int address; 906 unsigned int address;
895 907
908 if (mach_find_smp_config_quirk) {
909 if (mach_find_smp_config_quirk(reserve))
910 return;
911 }
896 /* 912 /*
897 * FIXME: Linux assumes you have 640K of base ram.. 913 * FIXME: Linux assumes you have 640K of base ram..
898 * this continues the error... 914 * this continues the error...
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a7c3471ea17c..cb3db406247c 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -596,6 +596,7 @@ void __init setup_arch(char **cmdline_p)
596{ 596{
597#ifdef CONFIG_X86_32 597#ifdef CONFIG_X86_32
598 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); 598 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
599 visws_early_detect();
599 pre_setup_arch_hook(); 600 pre_setup_arch_hook();
600 early_cpu_init(); 601 early_cpu_init();
601#else 602#else