2 #if CONFIG_LOGICAL_CPUS && \
3 (defined(CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT) || defined(CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT))
4 #include <cpu/x86/lapic/boot_cpu.c>
9 #ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
10 #include CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
12 static void bootblock_northbridge_init(void) { }
14 #ifdef CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
15 #include CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
17 static void bootblock_southbridge_init(void) { }
20 static unsigned long findstage(char* target)
26 "1:\n\t" : "=a" (entry) : "S" (target) : "ebx", "ecx", "edi", "esp");
30 static void call(unsigned long addr, unsigned long bist)
32 asm volatile ("jmp *%0\n\t" : : "r" (addr), "a" (bist));
35 static void main(unsigned long bist)
38 bootblock_northbridge_init();
39 bootblock_southbridge_init();
41 const char* target1 = "fallback/romstage";
43 entry = findstage(target1);
44 if (entry) call(entry, bist);
45 asm volatile ("1:\n\thlt\n\tjmp 1b\n\t");