Tested on Ubuntu 8.04 x86 and Ubuntu 8.10 x86_64. I don't know how gcc works on other OSs, so I'm not sure if this breaks them or not.
-Corey
Fix building on x86_64 linux. May break non-linux OS, I'm not sure. Signed-off-by: Corey Osgood <[email protected]> Index: cpu.c =================================================================== --- cpu.c (revision 3828) +++ cpu.c (working copy) @@ -33,10 +33,14 @@ unsigned int ret; unsigned int dummy2, dummy3, dummy4; asm volatile ( +#if defined(__i386__) "pushl %%ebx \n" "cpuid \n" "movl %%ebx, %1 \n" "popl %%ebx \n" +#else + "cpuid \n" +#endif : "=a" (ret), "=r" (dummy2), "=c" (dummy3), "=d" (dummy4) : "a" (op) : "cc"
-- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

