qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Add Core Duo support
       [not found] <5813587B-0AB3-4D3F-887C-B17AB2F41BA8@hotmail.com>
@ 2008-10-05 23:23 ` C.W. Betts
  2008-10-06 13:26   ` Alexander Graf
  0 siblings, 1 reply; 2+ messages in thread
From: C.W. Betts @ 2008-10-05 23:23 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

This patch adds the Core Duo support from Alexander Graf's patches to  
add Intel Mac emulation to qemu.  When looking at the code, I noticed  
that there wasn't a definition of the Core Duo processor that  
Alexander's patches requires.  There was a Core 2 Duo in the X86_64  
definition, but not one available in 32-bit mode.  Please note that  
this patch is more or less a direct copy and doesn't have the Model ID  
specified.

Also, this patch contains a patch so that the Athlon processor uses  
the CPUID_VENDOR_AMD_[3] defines.


[-- Attachment #2: coreduo_processor.diff --]
[-- Type: application/octet-stream, Size: 1246 bytes --]

Index: target-i386/helper.c
===================================================================
--- target-i386/helper.c	(revision 5430)
+++ target-i386/helper.c	(working copy)
@@ -188,6 +188,23 @@
     },
 #endif
     {
+        .name = "coreduo",
+        .level = 3,
+        .vendor1 = CPUID_VENDOR_INTEL_1,
+        .vendor2 = CPUID_VENDOR_INTEL_2,
+        .vendor3 = CPUID_VENDOR_INTEL_3,
+        .family = 6,
+        .model = 13,
+        .stepping = 1,
+        .features = PPRO_FEATURES | 
+             CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
+             CPUID_PSE36,
+        .ext_features = CPUID_EXT_SSE3,
+        .ext2_features = (PPRO_FEATURES & 0x0183F3FF) | 
+             CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
+        .xlevel = 0x8000000A,
+    },
+    {
         .name = "qemu32",
         .level = 2,
         .family = 6,
@@ -237,9 +254,9 @@
     {
         .name = "athlon",
         .level = 2,
-        .vendor1 = 0x68747541, /* "Auth" */
-        .vendor2 = 0x69746e65, /* "enti" */
-        .vendor3 = 0x444d4163, /* "cAMD" */
+        .vendor1 = CPUID_VENDOR_AMD_1,
+        .vendor2 = CPUID_VENDOR_AMD_2,
+        .vendor3 = CPUID_VENDOR_AMD_3,
         .family = 6,
         .model = 2,
         .stepping = 3,

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] Add Core Duo support
  2008-10-05 23:23 ` [Qemu-devel] Add Core Duo support C.W. Betts
@ 2008-10-06 13:26   ` Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2008-10-06 13:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: computers57

Hi,

C.W.Betts wrote:
> This patch adds the Core Duo support from Alexander Graf's patches to 
> add Intel Mac emulation to qemu.

Hey, cool. I'm really glad to hear that they are still in use. But 
please always CC me when you reuse code from me, so I can track on 
what's happening with it :-).
Also it's always nice to mark patches with a "[PATCH]" prefix in the 
subject.

> When looking at the code, I noticed that there wasn't a definition of 
> the Core Duo processor that Alexander's patches requires. There was a 
> Core 2 Duo in the X86_64 definition, but not one available in 32-bit mode.

Yes, I actually wanted to shift everything to the 64-bit version, as 
only a few Macs did not have x86_64 support. I have to admit, that 
there's no real need to do that, so it's probably best to include the 
coreduo and core2duo defines.

> Please note that this patch is more or less a direct copy and doesn't 
> have the Model ID specified.

Hum, I would rather like to see the "real deal" be added, including some 
information on what is missing, just like the core2duo define is too. I 
already extracted the CPUID information from a CoreDuo Macbook Pro and 
will write up and submit a patch soon.

> Also, this patch contains a patch so that the Athlon processor uses 
> the CPUID_VENDOR_AMD_[3] defines.

Please commit this second chunk. I apparently oversaw that one.


Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-06 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5813587B-0AB3-4D3F-887C-B17AB2F41BA8@hotmail.com>
2008-10-05 23:23 ` [Qemu-devel] Add Core Duo support C.W. Betts
2008-10-06 13:26   ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).