Author: stepan
Date: 2009-04-23 01:17:44 +0200 (Thu, 23 Apr 2009)
New Revision: 4190

Modified:
   trunk/util/inteltool/cpu.c
   trunk/util/inteltool/inteltool.c
Log:
mini fix to reliably compile inteltool on darwin, and on Linux both on 
x86/x86_64.
Signed-off-by: Stefan Reinauer <[email protected]>
Acked-by: Stefan Reinauer <[email protected]>


Modified: trunk/util/inteltool/cpu.c
===================================================================
--- trunk/util/inteltool/cpu.c  2009-04-22 22:55:15 UTC (rev 4189)
+++ trunk/util/inteltool/cpu.c  2009-04-22 23:17:44 UTC (rev 4190)
@@ -32,6 +32,7 @@
 {
        unsigned int ret;
        unsigned int dummy2, dummy3, dummy4;
+#if DARWIN
        asm volatile ( 
                "pushl %%ebx    \n"
                "cpuid          \n"
@@ -41,6 +42,14 @@
                : "a" (op)
                : "cc"
        );
+#else
+       asm volatile ( 
+               "cpuid"
+               : "=a" (ret), "=b" (dummy2), "=c" (dummy3), "=d" (dummy4)
+               : "a" (op)
+               : "cc"
+       );
+#endif
        return ret;
 }
 

Modified: trunk/util/inteltool/inteltool.c
===================================================================
--- trunk/util/inteltool/inteltool.c    2009-04-22 22:55:15 UTC (rev 4189)
+++ trunk/util/inteltool/inteltool.c    2009-04-22 23:17:44 UTC (rev 4190)
@@ -57,7 +57,7 @@
                    fd_mem, (off_t) phys_addr);
        
        if (virt_addr == MAP_FAILED) {
-               printf("Error mapping physical memory 0x%08x[0x%x]\n", 
phys_addr, len);
+               printf("Error mapping physical memory 0x%08lx[0x%x]\n", 
phys_addr, len);
                return NULL;
        }
 


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to