[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] HVM SMBIOS v3 [1/5]


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Andrew D. Ball" <aball@xxxxxxxxxx>
  • Date: Mon, 14 Aug 2006 13:43:01 -0400
  • Delivery-date: Mon, 14 Aug 2006 10:43:48 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

[HVM] Cleanup: move cpuid function to util.c .

Signed-off-by: Andrew D. Ball <aball@xxxxxxxxxx>

diff -r f328519053f5 -r 4cc861f6b425 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Mon Aug 14 10:58:02 2006 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Mon Aug 14 11:16:09 2006 -0400
@@ -116,15 +116,6 @@ check_amd(void)
 }
 
 static void
-cpuid(uint32_t idx, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
-{
-       __asm__ __volatile__(
-               "cpuid"
-               : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
-               : "0" (idx) );
-}
-
-static void
 wrmsr(uint32_t idx, uint64_t v)
 {
        __asm__ __volatile__(
diff -r f328519053f5 -r 4cc861f6b425 tools/firmware/hvmloader/util.c
--- a/tools/firmware/hvmloader/util.c   Mon Aug 14 10:58:02 2006 +0100
+++ b/tools/firmware/hvmloader/util.c   Mon Aug 14 11:16:09 2006 -0400
@@ -94,3 +94,12 @@ void puts(const char *s)
        while (*s)
                outb(0xE9, *s++);
 }
+
+void
+cpuid(uint32_t idx, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
+{
+        __asm__ __volatile__(
+                "cpuid"
+                : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+                : "0" (idx) );
+}
diff -r f328519053f5 -r 4cc861f6b425 tools/firmware/hvmloader/util.h
--- a/tools/firmware/hvmloader/util.h   Mon Aug 14 10:58:02 2006 +0100
+++ b/tools/firmware/hvmloader/util.h   Mon Aug 14 11:16:09 2006 -0400
@@ -8,6 +8,10 @@ void outb(uint16_t addr, uint8_t val);
 /* I/O input */
 uint8_t inb(uint16_t addr);
 
+/* Do cpuid instruction, with operation 'idx' */
+void
+cpuid(uint32_t idx, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t 
*edx);
+
 /* String and memory functions */
 int strcmp(const char *cs, const char *ct);
 void *memcpy(void *dest, const void *src, unsigned n);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.