FreeBSD Bugzilla – Attachment 190428 Details for
Bug 225584
Various compile process hang on Ryzen, but not on Intel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Disable RDFSBASE on zens.
1.patch (text/plain), 1.65 KB, created by
Konstantin Belousov
on 2018-02-08 10:50:15 UTC
(
hide
)
Description:
Disable RDFSBASE on zens.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2018-02-08 10:50:15 UTC
Size:
1.65 KB
patch
obsolete
>diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c >index 5c84c938c7a..f740589fa4b 100644 >--- a/sys/amd64/amd64/initcpu.c >+++ b/sys/amd64/amd64/initcpu.c >@@ -151,6 +156,14 @@ init_amd(void) > hw_lower_amd64_sharedpage = 1; > } > } >+ >+ if (CPUID_TO_FAMILY(cpu_id) == 0x17) { >+ msr = rdmsr(MSR_AMD_CPUID07); >+ msr &= ~CPUID_STDEXT_FSGSBASE; >+ wrmsr(MSR_AMD_CPUID07, msr); >+ if (IS_BSP()) >+ cpu_stdext_feature &= ~CPUID_STDEXT_FSGSBASE; >+ } > } > > /* >@@ -201,6 +214,15 @@ initializecpu(void) > uint64_t msr; > uint32_t cr4; > >+ switch (cpu_vendor_id) { >+ case CPU_VENDOR_AMD: >+ init_amd(); >+ break; >+ case CPU_VENDOR_CENTAUR: >+ init_via(); >+ break; >+ } >+ > cr4 = rcr4(); > if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > cr4 |= CR4_FXSR | CR4_XMM; >@@ -224,14 +246,6 @@ initializecpu(void) > pg_nx = PG_NX; > } > hw_ibrs_recalculate(); >- switch (cpu_vendor_id) { >- case CPU_VENDOR_AMD: >- init_amd(); >- break; >- case CPU_VENDOR_CENTAUR: >- init_via(); >- break; >- } > } > > void >diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h >index e812c373d91..72c72d36cfe 100644 >--- a/sys/x86/include/specialreg.h >+++ b/sys/x86/include/specialreg.h >@@ -1001,6 +1001,7 @@ > #define MSR_P_STATE_CONFIG(n) (0xc0010064 + (n)) /* P-state Config */ > #define MSR_SMM_ADDR 0xc0010112 /* SMM TSEG base address */ > #define MSR_SMM_MASK 0xc0010113 /* SMM TSEG address mask */ >+#define MSR_AMD_CPUID07 0xc0011002 /* CPUID 07 %ebx override */ > #define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ > #define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ > #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225584
:
190365
|
190376
|
190385
|
190408
| 190428 |
190430
|
190431
|
190490