Two hda_verb.h files: Add more comments.
[coreboot.git] / src / arch / i386 / include / bootblock_common.h
1 #define __PRE_RAM__
2 #if CONFIG_LOGICAL_CPUS && \
3  (defined(CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT) || defined(CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT))
4 #include <cpu/x86/lapic/boot_cpu.c>
5 #else
6 #define boot_cpu(x) 1
7 #endif
8
9 #ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
10 #include CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
11 #else
12 static void bootblock_northbridge_init(void) { }
13 #endif
14 #ifdef CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
15 #include CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
16 #else
17 static void bootblock_southbridge_init(void) { }
18 #endif
19
20 static unsigned long findstage(char* target)
21 {
22         unsigned long entry;
23         asm volatile (
24                 "mov $1f, %%esp\n\t"
25                 "jmp walkcbfs\n\t"
26                 "1:\n\t" : "=a" (entry) : "S" (target) : "ebx", "ecx", "edi", "esp");
27         return entry;
28 }
29
30 static void call(unsigned long addr, unsigned long bist)
31 {
32         asm volatile ("jmp *%0\n\t" : : "r" (addr), "a" (bist));
33 }