Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-34
[coreboot.git] / src / mainboard / tyan / s2850 / failover.c
index e6ecb65c4d03494114deb31b303254e6f97ae48e..fee04156a421a4a57840d9b8b218646bd9329a8f 100644 (file)
 #include "cpu/x86/lapic/boot_cpu.c"
 #include "northbridge/amd/amdk8/reset_test.c"
 
+#if CONFIG_LOGICAL_CPUS==1
+#include "cpu/amd/dualcore/dualcore_id.c"
+#endif  
+        
+                
 static unsigned long main(unsigned long bist)
-{
-       unsigned nodeid;
-       /* Make cerain my local apic is useable */
-       enable_lapic();
-       
-       nodeid = lapicid() & 0xf;
+{       
+#if CONFIG_LOGICAL_CPUS==1
+        struct node_core_id id;
+#else   
+        unsigned nodeid;
+#endif          
+        /* Make cerain my local apic is useable */
+        enable_lapic();
+        
+#if CONFIG_LOGICAL_CPUS==1
+        id = get_node_core_id_x();
+        /* Is this a cpu only reset? */
+        if (cpu_init_detected(id.nodeid)) {
+#else
+        nodeid = lapicid();
+        /* Is this a cpu only reset? */
+        if (cpu_init_detected(nodeid)) {
+#endif
 
-       /* Is this a cpu only reset? */
-       if (cpu_init_detected(nodeid)) {
                if (last_boot_normal()) {
                        goto normal_image;
                } else {