How I Disabled the Hardware Prefetchers of my Sandy Bridge Processor

The Sandy Bridge processors are equipped with several hardware prefetchers. Unlike previous architectures, disabling them using IA32_MISC_ENABLE MSR is no longer possible. In Intel Software Developer's Manual, the relevant bits are marked as "reserved" for Sandy Bridge and more recent architectures. Apparently, the only way to disable them is from BIOS settings, as Patrick Fay--an Intel Software Developer wrote here. It would be okay if there was a BIOS setting for it. But in my case, a Dell machine with some Dell motherboard (that goes by the name of OY2MRG), there isn't any mention of prefetchers in BIOS. Bleh!

I used to think that BIOS codes were akin to bootloaders, and that there would be many open source ones that one could easily customize or play with. Turns out, it is not. There are only a handful of major BIOS manufacturers, all of them having proprietary BIOS codes. For the current situtaion of BIOSes and open source community efforts, check out The BIOS Business. Even though open source replacements are not available (yet), customizing the proprietary one is possible to some extent. Dell buys their BIOSes from American Megatrends, and there is a tool called AMI Bios Configuration Program (AMIBCP) that can configure a .ROM file to modify the visible options on the BIOS settings (which is called Aptio Setup Utility) and generate a new ROM file to flash the BIOS with.

On a non-Windows machine, BIOS update gets a little tricky. To get a .ROM file, we download the BIOS update from Dell Support website for our particular model. The tool is a Windows binary. In Linux, we can open it in Wine to let the installer extract the files into a temporary folder which include the BIOS ROM file. It later gives an error, but doesn't matter as long as we have the files. We can also open the AMIBCP tool using Wine, open the ROM file, go to the Advanced->CPU Configuration tab, change the Access/Use setting to USER for Hardware Prefetcher, Adjacent Cache Line Prefetcher, L1 Data Prefetcher, and Data Reuse Optimization, save the modified ROM file and close the tool.

After trying and failing some BIOS flashing methods, what worked for me was

Disclaimer: This last part could brick the motherboard. At your own risk.

< Go back

March, 2014.