X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Farch%2Fi386%2Finclude%2Farch%2Fcpu.h;h=4d7be862230f37771c29e9b525ed0008ec966824;hb=198cb96387c457affa01696405ffaa4531e8e361;hp=f49b7cb50a81acb9092430fa11604762f2cc759b;hpb=0867062412dd4bfe5a556e5f3fd85ba5b682d79b;p=coreboot.git diff --git a/src/arch/i386/include/arch/cpu.h b/src/arch/i386/include/arch/cpu.h index f49b7cb50..4d7be8622 100644 --- a/src/arch/i386/include/arch/cpu.h +++ b/src/arch/i386/include/arch/cpu.h @@ -28,6 +28,7 @@ struct cpuid_result { uint32_t ecx; uint32_t edx; }; + /* * Generic CPUID function */ @@ -44,7 +45,6 @@ static inline struct cpuid_result cpuid(int op) return result; } - /* * CPUID functions returning a single datum */ @@ -58,6 +58,7 @@ static inline unsigned int cpuid_eax(unsigned int op) : "ebx", "ecx", "edx"); return eax; } + static inline unsigned int cpuid_ebx(unsigned int op) { unsigned int eax, ebx; @@ -68,6 +69,7 @@ static inline unsigned int cpuid_ebx(unsigned int op) : "ecx", "edx" ); return ebx; } + static inline unsigned int cpuid_ecx(unsigned int op) { unsigned int eax, ecx; @@ -78,6 +80,7 @@ static inline unsigned int cpuid_ecx(unsigned int op) : "ebx", "edx" ); return ecx; } + static inline unsigned int cpuid_edx(unsigned int op) { unsigned int eax, edx; @@ -89,8 +92,6 @@ static inline unsigned int cpuid_edx(unsigned int op) return edx; } - - #define X86_VENDOR_INVALID 0 #define X86_VENDOR_INTEL 1 #define X86_VENDOR_CYRIX 2 @@ -101,17 +102,17 @@ static inline unsigned int cpuid_edx(unsigned int op) #define X86_VENDOR_RISE 7 #define X86_VENDOR_TRANSMETA 8 #define X86_VENDOR_NSC 9 -#define X86_VENDOR_SIS 10 +#define X86_VENDOR_SIS 10 #define X86_VENDOR_UNKNOWN 0xff -#if !defined( __ROMCC__ ) && defined( __GNUC__) +#if !defined(__PRE_RAM__) #include - struct cpu_device_id { unsigned vendor; unsigned device; }; + struct cpu_driver { struct device_operations *ops; struct cpu_device_id *id_table; @@ -127,8 +128,8 @@ static inline struct cpu_info *cpu_info(void) struct cpu_info *ci; __asm__("andl %%esp,%0; " "orl %2, %0 " - :"=r" (ci) - : "0" (~(CONFIG_STACK_SIZE - 1)), + :"=r" (ci) + : "0" (~(CONFIG_STACK_SIZE - 1)), "r" (CONFIG_STACK_SIZE - sizeof(struct cpu_info)) ); return ci; @@ -141,7 +142,6 @@ static inline unsigned long cpu_index(void) return ci->index; } - struct cpuinfo_x86 { uint8_t x86; /* CPU family */ uint8_t x86_vendor; /* CPU vendor */