Works after I disable IDA during booting. The sound issue fixed, FSB shows also correctly!
This is the guide I used (PDF downloaded from Intel website):
Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 3B:
System Programming Guide, Part 2
14.3.2.1 Discover Hardware Support and Enabling of Opportunistic Processor Operation
If an Intel 64 processor has hardware support for opportunistic processor performance operation, the power-on
default state of IA32_MISC_ENABLE[38] indicates the presence of such hardware support. For Intel 64 processors
that support opportunistic processor performance operation, the default value is 1, indicating its presence. For
processors that do not support opportunistic processor performance operation, the default value is 0. The poweron
default value of IA32_MISC_ENABLE[38] allows BIOS to detect the presence of hardware support of opportunistic
processor performance operation.
IA32_MISC_ENABLE[38] is shared across all logical processors in a physical package. It is written by BIOS during
platform initiation to enable/disable opportunistic processor operation in conjunction of OS power management
capabilities, see Section 14.3.2.2. BIOS can set IA32_MISC_ENABLE[38] with 1 to disable opportunistic processor
performance operation; it must clear the default value of IA32_MISC_ENABLE[38] to 0 to enable opportunistic
processor performance operation. OS and applications must use CPUID leaf 06H if it needs to detect processors
that has opportunistic processor operation enabled.
When CPUID is executed with EAX = 06H on input, Bit 1 of EAX in Leaf 06H (i.e. CPUID.06H:EAX[1]) indicates
opportunistic processor performance operation, such as IDA, has been enabled by BIOS.
Opportunistic processor performance operation can be disabled by setting bit 38 of IA32_MISC_ENABLE. This
mechanism is intended for BIOS only. If IA32_MISC_ENABLE[38] is set, CPUID.06H:EAX[1] will return 0.
I convert above paragraph into following c language code:
Code: Select all
do_cpuid(6, p->CPU.CPUID[CPUID_6]);
ida = bitfield(p->CPU.CPUID[CPUID_6][0], 1, 1);
if(ida == 1)
{
verbose("CPU: Attempting to disable IDA ");
msr = rdmsr64(MSR_IA32_MISC_ENABLE);
msr |= (1ull << 38);
wrmsr64(MSR_IA32_MISC_ENABLE, msr);
delay(1);
if(bitfield(p->CPU.CPUID[CPUID_81][0], 1, 1) == 1) verbose("Failed!\n");
else verbose("Succeded!\n");
}
I embedded above code into cpu.c, recompile chameleon boot loader, tested on 2 laptops, T61 and T61P
VoodooHDA works perfectly, no matter VoodooBattery or ACPIBatteryManager.
Give me sometime to make the code more clean. and do more test.
