diff options
Diffstat (limited to 'src/mainboard/tyan/s2891/auto.c')
-rw-r--r-- | src/mainboard/tyan/s2891/auto.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mainboard/tyan/s2891/auto.c b/src/mainboard/tyan/s2891/auto.c index d0ee70ba2b..4a8ef3f952 100644 --- a/src/mainboard/tyan/s2891/auto.c +++ b/src/mainboard/tyan/s2891/auto.c @@ -77,11 +77,17 @@ 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) #define CK804_NUM 1 +#include "southbridge/nvidia/ck804/ck804_early_setup.h" #include "southbridge/nvidia/ck804/ck804_early_setup_ss.h" #include "southbridge/nvidia/ck804/ck804_early_setup.c" @@ -113,23 +119,44 @@ 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(); } @@ -146,6 +173,9 @@ 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(); needs_reset |= ck804_early_setup_x(); |