summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan
diff options
context:
space:
mode:
authorJason Schildt <jschildt@gmail.com>2005-10-25 21:45:17 +0000
committerJason Schildt <jschildt@gmail.com>2005-10-25 21:45:17 +0000
commitfddf46f275f27b20a05ff761c4e267fd619e9664 (patch)
tree23d5651fa8e93c1cc1f9bf13363c32830d4d33b4 /src/mainboard/tyan
parentcf6df2afb5becca923e398521ae0e2d155cf3aa2 (diff)
downloadcoreboot-fddf46f275f27b20a05ff761c4e267fd619e9664.tar.xz
- See Issue Tracker id-12 "lnxi-patch-12".
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2076 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/tyan')
-rw-r--r--src/mainboard/tyan/s2875/auto.c50
-rw-r--r--src/mainboard/tyan/s2880/auto.c45
-rw-r--r--src/mainboard/tyan/s2881/auto.c43
-rw-r--r--src/mainboard/tyan/s2882/auto.c45
-rw-r--r--src/mainboard/tyan/s2885/auto.c77
-rw-r--r--src/mainboard/tyan/s2891/auto.c53
-rw-r--r--src/mainboard/tyan/s2892/auto.c54
-rw-r--r--src/mainboard/tyan/s2895/auto.c82
-rw-r--r--src/mainboard/tyan/s4880/auto.c50
-rw-r--r--src/mainboard/tyan/s4882/auto.c74
10 files changed, 27 insertions, 546 deletions
diff --git a/src/mainboard/tyan/s2875/auto.c b/src/mainboard/tyan/s2875/auto.c
index 7b75db20ab..d26e5a5f63 100644
--- a/src/mainboard/tyan/s2875/auto.c
+++ b/src/mainboard/tyan/s2875/auto.c
@@ -24,6 +24,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -112,11 +113,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
#include "sdram/generic_sdram.c"
#include "northbridge/amd/amdk8/resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -149,47 +145,8 @@ static void main(unsigned long bist)
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
-
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
-// start_other_core(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -202,9 +159,6 @@ static void main(unsigned long bist)
setup_default_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
needs_reset |= ht_setup_chain(PCI_DEV(0, 0x18, 0), 0x80);
if (needs_reset) {
print_info("ht reset -\r\n");
diff --git a/src/mainboard/tyan/s2880/auto.c b/src/mainboard/tyan/s2880/auto.c
index 2532386132..b8ce483fc0 100644
--- a/src/mainboard/tyan/s2880/auto.c
+++ b/src/mainboard/tyan/s2880/auto.c
@@ -24,6 +24,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -149,46 +150,8 @@ static void main(unsigned long bist)
};
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
-
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -201,10 +164,6 @@ static void main(unsigned long bist)
setup_default_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
-
needs_reset |= ht_setup_chain(PCI_DEV(0, 0x18, 0), 0x80);
if (needs_reset) {
print_info("ht reset -\r\n");
diff --git a/src/mainboard/tyan/s2881/auto.c b/src/mainboard/tyan/s2881/auto.c
index fc622793d3..eb1e382ee3 100644
--- a/src/mainboard/tyan/s2881/auto.c
+++ b/src/mainboard/tyan/s2881/auto.c
@@ -24,6 +24,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -114,11 +115,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -156,39 +152,7 @@ static void main(unsigned long bist)
#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -200,9 +164,6 @@ static void main(unsigned long bist)
setup_s2881_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
// automatically set that for you, but you might meet tight space
needs_reset |= ht_setup_chains_x();
if (needs_reset) {
diff --git a/src/mainboard/tyan/s2882/auto.c b/src/mainboard/tyan/s2882/auto.c
index 910db9e8a5..7edb666b9c 100644
--- a/src/mainboard/tyan/s2882/auto.c
+++ b/src/mainboard/tyan/s2882/auto.c
@@ -24,6 +24,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -113,11 +114,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
#include "northbridge/amd/amdk8/coherent_ht.c"
#include "sdram/generic_sdram.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -160,40 +156,8 @@ static void main(unsigned long bist)
#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
- }
+ k8_init_and_stop_secondaries();
+ }
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
uart_init();
@@ -204,9 +168,6 @@ static void main(unsigned long bist)
setup_default_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
needs_reset |= ht_setup_chains_x();
if (needs_reset) {
print_info("ht reset -\r\n");
diff --git a/src/mainboard/tyan/s2885/auto.c b/src/mainboard/tyan/s2885/auto.c
index 8275f6d5d7..f4f30737ab 100644
--- a/src/mainboard/tyan/s2885/auto.c
+++ b/src/mainboard/tyan/s2885/auto.c
@@ -23,6 +23,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -121,13 +122,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#else
-#include "cpu/amd/model_fxx/node_id.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -160,72 +154,9 @@ static void main(unsigned long bist)
};
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-
- id = get_node_core_id_x(); // that is initid
- #if ENABLE_APIC_EXT_ID == 1
- if(id.coreid == 0) {
- enable_apic_ext_id(id.nodeid);
- }
- #endif
-#else
- nodeid = get_node_id();
- #if ENABLE_APIC_EXT_ID == 1
- enable_apic_ext_id(nodeid);
- #endif
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if( id.nodeid != 0 ) //all except cores in node0
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) );
- #endif
-
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-
-#else
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if(nodeid != 0)
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) ); // CPU apicid is from 0x10
-
- #endif
-
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -238,10 +169,6 @@ static void main(unsigned long bist)
setup_s2885_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
-
// automatically set that for you, but you might meet tight space
needs_reset |= ht_setup_chains_x();
diff --git a/src/mainboard/tyan/s2891/auto.c b/src/mainboard/tyan/s2891/auto.c
index 4637b4e9c6..be81f89e11 100644
--- a/src/mainboard/tyan/s2891/auto.c
+++ b/src/mainboard/tyan/s2891/auto.c
@@ -26,6 +26,7 @@
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#include "northbridge/amd/amdk8/setup_resource_map.c"
@@ -77,11 +78,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -125,45 +121,10 @@ static void main(unsigned long bist)
#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- post_code(0x31);
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
- post_code(0x32);
+ // post_code(0x32);
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
uart_init();
@@ -175,12 +136,8 @@ static void main(unsigned long bist)
setup_s2891_resource_map();
needs_reset = setup_coherent_ht_domain();
-
-#if CONFIG_LOGICAL_CPUS==1
- // It is said that we should start core1 after all core0 launched
- start_other_cores();
-#endif
- needs_reset |= ht_setup_chains_x();
+
+ needs_reset |= ht_setup_chains_x();
needs_reset |= ck804_early_setup_x();
diff --git a/src/mainboard/tyan/s2892/auto.c b/src/mainboard/tyan/s2892/auto.c
index 25967056de..1d19ecfafc 100644
--- a/src/mainboard/tyan/s2892/auto.c
+++ b/src/mainboard/tyan/s2892/auto.c
@@ -26,6 +26,7 @@
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#include "northbridge/amd/amdk8/setup_resource_map.c"
@@ -76,11 +77,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
#define TOTAL_CPUS (FIRST_CPU + SECOND_CPU)
@@ -125,47 +121,9 @@ static void main(unsigned long bist)
};
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
-// start_other_core(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
@@ -179,12 +137,8 @@ static void main(unsigned long bist)
setup_s2892_resource_map();
needs_reset = setup_coherent_ht_domain();
-
-#if CONFIG_LOGICAL_CPUS==1
- // It is said that we should start core1 after all core0 launched
- start_other_cores();
-#endif
- needs_reset |= ht_setup_chains_x();
+
+ needs_reset |= ht_setup_chains_x();
needs_reset |= ck804_early_setup_x();
diff --git a/src/mainboard/tyan/s2895/auto.c b/src/mainboard/tyan/s2895/auto.c
index 0a26f21735..8c11f30fa7 100644
--- a/src/mainboard/tyan/s2895/auto.c
+++ b/src/mainboard/tyan/s2895/auto.c
@@ -28,6 +28,7 @@
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#include "superio/smsc/lpc47b397/lpc47b397_early_gpio.c"
@@ -106,12 +107,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#else
-#include "cpu/amd/model_fxx/node_id.c"
-#endif
#define FIRST_CPU 1
#define SECOND_CPU 1
@@ -163,79 +158,12 @@ static void main(unsigned long bist)
};
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-
- id = get_node_core_id_x(); // that is initid
- #if ENABLE_APIC_EXT_ID == 1
- if(id.coreid == 0) {
- enable_apic_ext_id(id.nodeid);
- }
- #endif
-#else
- nodeid = get_node_id();
- #if ENABLE_APIC_EXT_ID == 1
- enable_apic_ext_id(nodeid);
- #endif
-#endif
-
- enable_lapic();
- init_timer();
-
- post_code(0x30);
-
-#if CONFIG_LOGICAL_CPUS==1
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if( id.nodeid != 0 ) //all except cores in node0
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) );
- #endif
-
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-
-#else
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if(nodeid != 0)
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) ); // CPU apicid is from 0x10
-
- #endif
-
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- post_code(0x31);
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
- post_code(0x32);
+ // post_code(0x32);
lpc47b397_enable_serial(SERIAL_DEV, TTYS0_BASE);
uart_init();
@@ -249,10 +177,6 @@ static void main(unsigned long bist)
setup_s2895_resource_map();
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- // It is said that we should start core1 after all core0 launched
- start_other_cores();
-#endif
needs_reset |= ht_setup_chains_x();
diff --git a/src/mainboard/tyan/s4880/auto.c b/src/mainboard/tyan/s4880/auto.c
index 3e0d4825df..bcabf22eef 100644
--- a/src/mainboard/tyan/s4880/auto.c
+++ b/src/mainboard/tyan/s4880/auto.c
@@ -24,6 +24,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -125,11 +126,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
@@ -202,47 +198,9 @@ static void main(unsigned long bist)
};
int i;
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- id = get_node_core_id_x();
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
-// start_other_core(id.nodeid);
- }
-#else
- nodeid = lapicid();
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -256,10 +214,6 @@ static void main(unsigned long bist)
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- start_other_cores();
-#endif
-
needs_reset |= ht_setup_chains_x();
if (needs_reset) {
diff --git a/src/mainboard/tyan/s4882/auto.c b/src/mainboard/tyan/s4882/auto.c
index e8d46e7961..ba58af9d63 100644
--- a/src/mainboard/tyan/s4882/auto.c
+++ b/src/mainboard/tyan/s4882/auto.c
@@ -23,6 +23,7 @@
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
#include "cpu/x86/bist.h"
+#include "cpu/amd/dualcore/dualcore.c"
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -129,13 +130,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
/* tyan does not want the default */
#include "resourcemap.c"
-#if CONFIG_LOGICAL_CPUS==1
-#define SET_NB_CFG_54 1
-#include "cpu/amd/dualcore/dualcore.c"
-#else
-#include "cpu/amd/model_fxx/node_id.c"
-#endif
-
#define FIRST_CPU 1
#define SECOND_CPU 1
@@ -208,68 +202,9 @@ static void main(unsigned long bist)
};
int i;
int needs_reset;
-#if CONFIG_LOGICAL_CPUS==1
- struct node_core_id id;
-#else
- unsigned nodeid;
-#endif
if (bist == 0) {
- /* Skip this if there was a built in self test failure */
- amd_early_mtrr_init();
-
-#if CONFIG_LOGICAL_CPUS==1
- set_apicid_cpuid_lo();
-
- id = get_node_core_id_x(); // that is initid
- #if ENABLE_APIC_EXT_ID == 1
- if(id.coreid == 0) {
- enable_apic_ext_id(id.nodeid);
- }
- #endif
-#else
- nodeid = get_node_id();
- #if ENABLE_APIC_EXT_ID == 1
- enable_apic_ext_id(nodeid);
- #endif
-#endif
-
- enable_lapic();
- init_timer();
-
-#if CONFIG_LOGICAL_CPUS==1
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if( id.nodeid != 0 ) //all except cores in node0
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) );
- #endif
- if(id.coreid == 0) {
- if (cpu_init_detected(id.nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(id.nodeid);
- }
-#else
- #if ENABLE_APIC_EXT_ID == 1
- #if LIFT_BSP_APIC_ID == 0
- if(nodeid != 0)
- #endif
- lapic_write(LAPIC_ID, ( lapic_read(LAPIC_ID) | (APIC_ID_OFFSET<<24) ) ); // CPU apicid is from 0x10
- #endif
- if (cpu_init_detected(nodeid)) {
- asm volatile ("jmp __cpu_reset");
- }
- distinguish_cpu_resets(nodeid);
-#endif
-
- if (!boot_cpu()
-#if CONFIG_LOGICAL_CPUS==1
- || (id.coreid != 0)
-#endif
- ) {
- stop_this_cpu(); // it will stop all cores except core0 of cpu0
- }
+ k8_init_and_stop_secondaries();
}
w83627hf_enable_serial(SERIAL_DEV, TTYS0_BASE);
@@ -283,11 +218,6 @@ static void main(unsigned long bist)
needs_reset = setup_coherent_ht_domain();
-#if CONFIG_LOGICAL_CPUS==1
- // It is said that we should start core1 after all core0 launched
- start_other_cores();
-#endif
-
needs_reset |= ht_setup_chains_x();
if (needs_reset) {
print_info("ht reset -\r\n");