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
System Programming Guide, Part 2
126.96.36.199 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 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 allows BIOS to detect the presence of hardware support of opportunistic
processor performance operation.
IA32_MISC_ENABLE 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 188.8.131.52. BIOS can set IA32_MISC_ENABLE with 1 to disable opportunistic processor
performance operation; it must clear the default value of IA32_MISC_ENABLE 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) 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 is set, CPUID.06H:EAX will return 0.
I convert above paragraph into following c language code:
Code: Select all
ida = bitfield(p->CPU.CPUID[CPUID_6], 1, 1);
if(ida == 1)
verbose("CPU: Attempting to disable IDA ");
msr = rdmsr64(MSR_IA32_MISC_ENABLE);
msr |= (1ull << 38);
if(bitfield(p->CPU.CPUID[CPUID_81], 1, 1) == 1) verbose("Failed!\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.