Questions about ASM and clocking

Flux

Regular
Is it possible to overclock a CPU (or GPU) using just assembly?

Will you eventual destroy it if you do?
 
You can't overclock a x86 CPU just by running some specific instructions.
The "overclocking" softwares provided by the motherboard vendors writes specific commands to the chipset to modify the settings.
 
Can you change those settings?

How can you change them?

and

Will you ruin the hardware if you do?
 
You can change any setting that the BIOS or a video driver can change. The secret is to write assembly language drivers that run in the Windows Ring-0 (privileged) level that manipulate the appropriate hardware registers. You cannot so this from user level (ring 3 - application) code.

With that said it is doubtful that you can do on-the-fly overclocking. Even some overclocking utils supplied by the motherboard maker requires a reboot to apply settings changes. The same rules will apply to your assembly-language code. The system will need to be reset to activate any chipset/video register changes you make.

Also you have to know damn well what you are doing. Unlike user-mode programs you can damage your hardware by blindly fooling around with its registers. Ask anybody who was infected by the Chernobyl virus some years back. Fooling around in ring-0 is to be approached with the utmost respect, knowledge and care.
 
Also you have to know damn well what you are doing. Unlike user-mode programs you can damage your hardware by blindly fooling around with its registers. Ask anybody who was infected by the Chernobyl virus some years back. Fooling around in ring-0 is to be approached with the utmost respect, knowledge and care.
Come on! Triple faults are hilarious. But yeah, you need PL0, which means you'd need to be run whatever code you are trying to run in the kernel of whatever OS you're using. So, it'd be difficult.
 
Actually it's not that difficult to run under ring 0 in Windows. You just need to write a device driver.
I've modified a device driver (which is written for accessing serial ports) to access the MSR of the CPU. Although, if you make any mistakes in the driver, you'll be welcomed with a nice BSOD.
 
You can't overclock a x86 CPU just by running some specific instructions.
The "overclocking" softwares provided by the motherboard vendors writes specific commands to the chipset to modify the settings.

How do you think that overclocking software was made? :LOL: I'm pretty sure it runs "some specific instructions". :p
 
How do you think that overclocking software was made? :LOL: I'm pretty sure it runs "some specific instructions". :p

No. No X86 CPU I know provides instructions or registers for changing clock rate. As I said in the quoted post, the overclocking softwares do so by writing specific commands (through I/O registers, for example) to the chipset to modify the settings. So it's specific to chipsets, not the CPU.
 
So overclocking the CPU on the driver level is possible yet can destroy it?

i don;t think you understand something here about overclocking -- and i'm a layman so someone please correct me if i'm wrong -- overclocking a cpu by either drivers or BIOS will result in the same risks. in gneral, if you ask a CPU or GPU to perform at a higher speed than it is capable of, it will simply fail to operate. if you run it at the highest spec it can perform at at its native voltage for a long period, you may diminish its lifespan without proper cooling.In general, these risks are minimal. However, if you raise the voltage to the chips, you can definitly risk melting them if you're not careful about cooling or if you're unlucky. AFAIK the same still applies -- usually a chip or mobo component will give up and cause a crash before damaging themselves very much -- but you can certainly get unlucky.
 
The whole "ASM" part of the question is utterly irrelevant. All, and by that I mean all programming languages that can be used on x86 processors, cause x86 "assembly" instructions to be executed because that's the only language the processor even understands. Higher-level languages, VMs and frameworks are for humans to work with, not for x86 processors.
So please scratch that all.

Access to hardware registers is a definite possibility from C++ and C at least, but even some basic dialects let you do it, and assuming a sane OS it might even be sufficient to dump a string to a specific location in the file hierarchy to access hardware registers more or less directly. No manual assembly hacking is involved in this at all.

The much more relevant part of the question is "What sort of configuration does the hardware expose?" to which the answer is "It varies, but you're expecting much too crazy things". As a rule, if CrystalCPUID or somesuch can do it, it's because the hardware exposed the functionality through some registers. Everything that can be done is usually documented in the processor documentation you can freely access without registration at e,g. amd.com or intel.com.
Some chipsets or specialized stuff used on motherboards (voltage regulators, monitors and similar nuts and bolts) may have their own registers available for futzing around with. Documentation for that is often more obscure, but that's why we have these wonderful people working on these wonderful tools.

Because of the business models of CPU makers, it's generally not possible to increase the multiplier above the one that suffices to reach the advertised clock speed at the advertised bus or reference clock. We know that mainstream AMD CPUs allow lowering the voltages and multiplier through software, and with the FX line the multiplier is unlocked, allowing increases as well. But that's not what you were expecting to hear I guess, because you already should know it if you're a self-esteeming overclocker ;)
 
Back
Top