Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553147
D61521.1794700484.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61521.1794700484.diff
View Options
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -423,22 +423,29 @@
return;
}
- /* We only support three levels for now. */
+ /*
+ * Each level reports the shift that addresses the next level up, so
+ * the shift of the last level enumerated is the package's. Leaf 1Fh
+ * may enumerate module, tile, die and die group levels above the core
+ * level; they are not represented in the topology, but they must not
+ * be mistaken for the package boundary.
+ */
for (i = 0; ; i++) {
cpuid_count(leaf, i, p);
bits = p[0] & 0x1f;
type = (p[2] >> 8) & 0xff;
- if (type == 0)
+ /* A level without logical processors also ends the list. */
+ if (type == 0 || (p[1] & 0xffff) == 0)
break;
+ pkg_id_shift = bits;
if (type == CPUID_TYPE_SMT)
core_id_shift = bits;
- else if (type == CPUID_TYPE_CORE)
- pkg_id_shift = bits;
- else if (bootverbose)
- printf("Topology level type %d shift: %d\n", type, bits);
+ else if (type != CPUID_TYPE_CORE && bootverbose)
+ printf("Topology level type %d shift: %d\n", type,
+ bits);
}
if (pkg_id_shift < core_id_shift) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 11:54 PM (19 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41731927
Default Alt Text
D61521.1794700484.diff (1 KB)
Attached To
Mode
D61521: x86: Do not take a CPUID leaf 1Fh module for the package
Attached
Detach File
Event Timeline