WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] HVM SMBIOS v3 [1/5]
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
[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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] HVM SMBIOS v3 [1/5], Andrew D. Ball <=