Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146684323
D6060.id15492.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
646 B
Referenced Files
None
Subscribers
None
D6060.id15492.diff
View Options
Index: sys/amd64/amd64/initcpu.c
===================================================================
--- sys/amd64/amd64/initcpu.c
+++ sys/amd64/amd64/initcpu.c
@@ -80,6 +80,19 @@
wrmsr(0xc0011029, rdmsr(0xc0011029) | 1);
break;
}
+
+ /*
+ * BIOS may fail to set InitApicIdCpuIdLo to 1 as it should per BKDG.
+ * So, do it here or otherwise some tools could be confused by
+ * Initial Local APIC ID reported with CPUID Function 1 in EBX.
+ */
+ if (CPUID_TO_FAMILY(cpu_id) == 0x10) {
+ if ((cpu_feature2 & CPUID2_HV) == 0) {
+ msr = rdmsr(MSR_NB_CFG1);
+ msr |= (uint64_t)1 << 54;
+ wrmsr(MSR_NB_CFG1, msr);
+ }
+ }
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 5:10 PM (20 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29292607
Default Alt Text
D6060.id15492.diff (646 B)
Attached To
Mode
D6060: ensure that initial local apic id is sane on AMD 10h systems
Attached
Detach File
Event Timeline
Log In to Comment