summaryrefslogtreecommitdiff
path: root/target-i386/op_helper.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-14 19:20:52 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-14 19:20:52 +0000
commit45fd08effd461f85d0480d3b8f85a07751fc55b3 (patch)
tree5949d2fd618f3e535e7d437c7fedd7fff0d8d333 /target-i386/op_helper.c
parent7ab064d2b512b13655a0ad9ef2a5f782d798d112 (diff)
target-i386: Add Core Duo Definition
This patch adds a CPU definition for the Core Duo CPU. I tried to resemble the original as closely as possible and document what features are missing still. This patch enables the use of a recent CPU definition on 32 bit platforms. It also fixes two issues that went along the line: - invalid xlevel in core2duo spec While looking though the CPUIDs again, I found that xlevel is actually 8. - non-PSE36 support The CoreDuo CPUID does not expose the PSE36 capability, but CPUID 0x80000008 is tied to 36 bits. This broke Windows XP installation for me, so I just set it to 32 bits width when PSE36 is not available. The original CPU also exposes 32 bit width in CPUID 0x80000008. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5488 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/op_helper.c')
-rw-r--r--target-i386/op_helper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index e9a6942440..644598a4b9 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -2026,7 +2026,10 @@ void helper_cpuid(void)
#if defined(USE_KQEMU)
EAX = 0x00000020; /* 32 bits physical */
#else
- EAX = 0x00000024; /* 36 bits physical */
+ if (env->cpuid_features & CPUID_PSE36)
+ EAX = 0x00000024; /* 36 bits physical */
+ else
+ EAX = 0x00000020; /* 32 bits physical */
#endif
}
EBX = 0;