#include <device/pci_ids.h>
#include <arch/io.h>
#include <arch/romcc_io.h>
-#include <arch/smp/lapic.h>
+#include <cpu/x86/lapic.h>
#include "pc80/mc146818rtc_early.c"
#include "southbridge/amd/amd8111/amd8111_enable_rom.c"
#include "northbridge/amd/amdk8/early_ht.c"
-#include "cpu/p6/boot_cpu.c"
+#include "cpu/x86/lapic/boot_cpu.c"
+#include "cpu/x86/mtrr/earlymtrr.c"
#include "northbridge/amd/amdk8/reset_test.c"
-#define HAVE_REGPARM_SUPPORT 0
-#if HAVE_REGPARM_SUPPORT
-static unsigned long main(unsigned long bist)
-{
+#if CONFIG_LOGICAL_CPUS==1
+#include "cpu/amd/dualcore/dualcore_id.c"
#else
-static void main(void)
-{
- unsigned long bist = 0;
+#include "cpu/amd/model_fxx/node_id.c"
#endif
- /* Make cerain my local apic is useable */
- enable_lapic();
+static unsigned long main(unsigned long bist)
+{
+ /* Is this a cpu only reset? */
+ if (early_mtrr_init_detected()) {
/* Is this a cpu only reset? */
- if (cpu_init_detected()) {
if (last_boot_normal()) {
goto normal_image;
} else {
- goto cpu_reset;
+ goto fallback_image;
}
}
/* Is this a secondary cpu? */
}
}
-
/* Nothing special needs to be done to find bus 0 */
/* Allow the HT devices to be found */
enumerate_ht_chain();
goto fallback_image;
}
normal_image:
- asm("jmp __normal_image"
+ asm volatile ("jmp __normal_image"
: /* outputs */
: "a" (bist) /* inputs */
: /* clobbers */
);
- cpu_reset:
- asm("jmp __cpu_reset"
- : /* outputs */
- : "a"(bist) /* inputs */
- : /* clobbers */
- );
fallback_image:
-#if HAVE_REGPARM_SUPPORT
return bist;
-#else
- return;
-#endif
}