mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 14:25:58 +01:00
x86_cstates: disable C5 and C6 states on Skylake
could help with #19341 see https://bugzilla.kernel.org/show_bug.cgi?id=109081 Change-Id: Ide72f46193093c3c4695c39d4466e9418808cbd0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8881 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
6c380f3c8e
commit
d59339ff6c
@ -155,6 +155,14 @@ init_cstates()
|
||||
if ((cpuid.regs.ecx & CPUID_MWAIT_ECX_SUPPORT) != CPUID_MWAIT_ECX_SUPPORT)
|
||||
return B_ERROR;
|
||||
|
||||
cpu_ent* cpu = &gCPU[0];
|
||||
uint8 model = cpu->arch.model + (cpu->arch.extended_model << 4);
|
||||
if (cpu->arch.family == 6) {
|
||||
// disable C5 and C6 states on Skylake (same as Linux)
|
||||
if (model == 0x5e && (mwaitSubStates & (0xf << 28)) != 0)
|
||||
mwaitSubStates &= 0xf00fffff;
|
||||
}
|
||||
|
||||
char cStates[64];
|
||||
unsigned int offset = 0;
|
||||
for (int32 i = 1; i < CPUIDLE_CSTATE_MAX; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user