[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-cvs
Subject: [Bochs-cvs] SF.net SVN: bochs:[10506] trunk/bochs
From: sshwarts () users ! sourceforge ! net
Date: 2011-07-29 15:18:40
Message-ID: E1Qmopk-0006S1-4j () sfp-svn-3 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 10506
http://bochs.svn.sourceforge.net/bochs/?rev=10506&view=rev
Author: sshwarts
Date: 2011-07-29 15:18:39 +0000 (Fri, 29 Jul 2011)
Log Message:
-----------
fixed CPUID after correlation with real HW CPUZ output
Modified Paths:
--------------
trunk/bochs/.bochsrc
trunk/bochs/config.cc
trunk/bochs/cpu/cpudb/core2_extreme_x9770.cc
trunk/bochs/cpu/cpudb/corei7_sandy_bridge_2600K.cc
trunk/bochs/cpu/cpudb/p4_prescott_celeron_336.cc
trunk/bochs/cpu/generic_cpuid.cc
Modified: trunk/bochs/.bochsrc
===================================================================
--- trunk/bochs/.bochsrc 2011-07-29 15:03:54 UTC (rev 10505)
+++ trunk/bochs/.bochsrc 2011-07-29 15:18:39 UTC (rev 10506)
@@ -91,9 +91,10 @@
# has no effect anymore.
#
# CPU configurations that can be selected:
-# ------------------------------------------------------
-# core2_pnr Intel(R) Core(TM)2 Extreme CPU X9770
-# core2_snb Intel(R) Core(TM) i7-2600K CPU
+# -----------------------------------------------------------------
+# p4_prescott_celeron_336 Intel(R) Celeron(R) 336
+# core2_extreme_x9770 Intel(R) Core(TM)2 Extreme X9770
+# corei7_sandy_bridge_2600k Intel(R) Core(TM) i7-2600K
#
# COUNT:
# Set the number of processors:cores per processor:threads per core
Modified: trunk/bochs/config.cc
===================================================================
--- trunk/bochs/config.cc 2011-07-29 15:03:54 UTC (rev 10505)
+++ trunk/bochs/config.cc 2011-07-29 15:18:39 UTC (rev 10506)
@@ -3979,7 +3979,8 @@
#else
fprintf(fp, "cpu: count=1, ips=%u, ", SIM->get_param_num(BXPN_IPS)->get());
#endif
- fprintf(fp, "reset_on_triple_fault=%d, cpuid_limit_winnt=%d",
+ fprintf(fp, "model=%s, reset_on_triple_fault=%d, cpuid_limit_winnt=%d",
+ SIM->get_param_enum(BXPN_CPU_MODEL)->get_selected(),
SIM->get_param_bool(BXPN_RESET_ON_TRIPLE_FAULT)->get(),
SIM->get_param_bool(BXPN_CPUID_LIMIT_WINNT)->get());
#if BX_CPU_LEVEL >= 5
Modified: trunk/bochs/cpu/cpudb/core2_extreme_x9770.cc
===================================================================
--- trunk/bochs/cpu/cpudb/core2_extreme_x9770.cc 2011-07-29 15:03:54 UTC (rev 10505)
+++ trunk/bochs/cpu/cpudb/core2_extreme_x9770.cc 2011-07-29 15:18:39 UTC (rev 10506)
@@ -186,12 +186,13 @@
// [23:16] Number of logical processors in one physical processor
// [31:24] Local Apic ID
- leaf->ebx = (CACHE_LINE_SIZE / 8) << 8;
#if BX_SUPPORT_SMP
unsigned n_logical_processors = ncores*nthreads;
- if (n_logical_processors > 1)
- leaf->ebx |= (n_logical_processors << 16);
+#else
+ unsigned n_logical_processors = 1;
#endif
+ leaf->ebx = ((CACHE_LINE_SIZE / 8) << 8) |
+ (n_logical_processors << 16);
#if BX_SUPPORT_APIC
leaf->ebx |= ((cpu->get_apic_id() & 0xff) << 24);
#endif
Modified: trunk/bochs/cpu/cpudb/corei7_sandy_bridge_2600K.cc
===================================================================
--- trunk/bochs/cpu/cpudb/corei7_sandy_bridge_2600K.cc 2011-07-29 15:03:54 UTC (rev \
10505)
+++ trunk/bochs/cpu/cpudb/corei7_sandy_bridge_2600K.cc 2011-07-29 15:18:39 UTC (rev \
10506) @@ -207,12 +207,13 @@
// [23:16] Number of logical processors in one physical processor
// [31:24] Local Apic ID
- leaf->ebx = (CACHE_LINE_SIZE / 8) << 8;
#if BX_SUPPORT_SMP
unsigned n_logical_processors = ncores*nthreads;
- if (n_logical_processors > 1)
- leaf->ebx |= (n_logical_processors << 16);
+#else
+ unsigned n_logical_processors = 1;
#endif
+ leaf->ebx = ((CACHE_LINE_SIZE / 8) << 8) |
+ (n_logical_processors << 16);
#if BX_SUPPORT_APIC
leaf->ebx |= ((cpu->get_apic_id() & 0xff) << 24);
#endif
Modified: trunk/bochs/cpu/cpudb/p4_prescott_celeron_336.cc
===================================================================
--- trunk/bochs/cpu/cpudb/p4_prescott_celeron_336.cc 2011-07-29 15:03:54 UTC (rev \
10505)
+++ trunk/bochs/cpu/cpudb/p4_prescott_celeron_336.cc 2011-07-29 15:18:39 UTC (rev \
10506) @@ -156,12 +156,13 @@
// [23:16] Number of logical processors in one physical processor
// [31:24] Local Apic ID
- leaf->ebx = (CACHE_LINE_SIZE / 8) << 8;
#if BX_SUPPORT_SMP
unsigned n_logical_processors = ncores*nthreads;
- if (n_logical_processors > 1)
- leaf->ebx |= (n_logical_processors << 16);
+#else
+ unsigned n_logical_processors = 1;
#endif
+ leaf->ebx = ((CACHE_LINE_SIZE / 8) << 8) |
+ (n_logical_processors << 16);
#if BX_SUPPORT_APIC
leaf->ebx |= ((cpu->get_apic_id() & 0xff) << 24);
#endif
@@ -321,7 +322,7 @@
leaf->ebx = 0;
// ECX:
- // * [0:0] LAHF/SAHF instructions support in 64-bit mode
+ // [0:0] LAHF/SAHF instructions support in 64-bit mode
// [1:1] CMP_Legacy: Core multi-processing legacy mode (AMD)
// [2:2] SVM: Secure Virtual Machine (AMD)
// [3:3] Extended APIC Space
@@ -336,7 +337,7 @@
// [13:13] WDT: Watchdog timer support
// [31:14] reserved
- leaf->ecx = BX_CPUID_EXT2_LAHF_SAHF;
+ leaf->ecx = 0;
// EDX:
// Many of the bits in EDX are the same as EAX [*] for AMD
Modified: trunk/bochs/cpu/generic_cpuid.cc
===================================================================
--- trunk/bochs/cpu/generic_cpuid.cc 2011-07-29 15:03:54 UTC (rev 10505)
+++ trunk/bochs/cpu/generic_cpuid.cc 2011-07-29 15:18:39 UTC (rev 10506)
@@ -186,9 +186,10 @@
}
#if BX_SUPPORT_SMP
unsigned n_logical_processors = ncores*nthreads;
- if (n_logical_processors > 1)
- leaf->ebx |= (n_logical_processors << 16);
+#else
+ unsigned n_logical_processors = 1;
#endif
+ leaf->ebx |= (n_logical_processors << 16);
#if BX_SUPPORT_APIC
leaf->ebx |= ((cpu->get_apic_id() & 0xff) << 24);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic