How do I programmatically set the CPU voltage and maximum CPU multiplier for Sandy Bridge processors? Similar to the functionality provided by motherboard software such a ASUS TurboV. I'm fine with writing kernel-mode drivers, and you can post example code in pretty much any programming language (ASM / C / C++ / Pascal preferred though).
Also, just out of curiosity, does anyone have an idea of how would I monitor the temperatures (particularly, individual core temperatures)?
Can the individual multipliers for each core be queried, or do they have to be measured via BCLK and RDTSC/thrash/RDTSC?
-Create driver to run in ring 0, which executes RDMSR / WRMSR instructions as requested by ring 3 process (performing relevant security checks against the calling ring 3 process and the target register). Report read value or write success/failure back to the calling ring 3 process.
Just out of interest, does such a driver already exists (either windows or linux) ?
Yes there are similar drivers such as winring0 for windows and others.
Changing voltage would I think be MB specific.
If you want to set multipliers then disable EIST in the BIOS. This normally results in zero performance states being reported to the OS and usually does not physically disable the EIST bit, YMMV. Use MSR 0x199 to change requested multiplier, you will likely be limited to the maximum multiplier set in BIOS. Note that the EIST bit in MSR 0x1A0 needs to be enabled.
Individual CPU core temperatures can be read from MSR 0x19C.
Average of individual core multipliers (multiplier can change many times between sampling) can be calculated using performance registers such as MSR 0x30A/0x30B. Instantaneous reading can be taken from MSR 0x198 but generally not so useful IMHO.