Do BIOSes almost always do this, or this one of those things that crappy BIOSes leave out? And when booting a (64-bit) SMP system would I need to mirror the MTRRs from the BSP to the APs?Intel 3A 10.11 wrote:Typically, the BIOS (basic input/output system) software configures
the MTRRs.
Bios + the MTRRs
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Bios + the MTRRs
From Intel 3A:
Re: Bios + the MTRRs
Hi,
An OS can reconfigure the MTRRs if it wants to or double check that the BIOS did it right, but it doesn't have to and most OSs don't.
The BIOS will configure MTRRs in all CPUs the same (during boot), but if you change the MTRRs then you'd need to change all CPUs at the same time (otherwise you get cache coherency problems).
Cheers,
Brendan
The BIOS configures MTRRs during boot, except for memory mapped PCI devices (e.g. video display memory) which will be left as "uncached". A crappy BIOS still does it, but might not use the best arrangement (for e.g. it might waste a variable range MTRR when it's avoidable).JohnnyTheDon wrote:From Intel 3A:
Do BIOSes almost always do this, or this one of those things that crappy BIOSes leave out?Intel 3A 10.11 wrote:Typically, the BIOS (basic input/output system) software configures
the MTRRs.
An OS can reconfigure the MTRRs if it wants to or double check that the BIOS did it right, but it doesn't have to and most OSs don't.
All CPUs need to have the same MTRRs, unless caching is disabled.JohnnyTheDon wrote:And when booting a (64-bit) SMP system would I need to mirror the MTRRs from the BSP to the APs?
The BIOS will configure MTRRs in all CPUs the same (during boot), but if you change the MTRRs then you'd need to change all CPUs at the same time (otherwise you get cache coherency problems).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Bios + the MTRRs
I've got a Phoenix BIOS on my main development machine. I'm not sure whether I'd call that a crappy BIOS or not ... and it's not exactly like it wastes VRs ... but it certainly doesn't follow the proper rules that are listed in the manual about how the ranges of the MTRRs are supposed to be configured. One thing I've wanted to do with my OS at some point (since I pulled the MTRR data and saw that it was so "funky") is reconfigure the MTRRs according to the proper rules, and see if there is a performance difference.Brendan wrote: A crappy BIOS still does it, but might not use the best arrangement (for e.g. it might waste a variable range MTRR when it's avoidable).
An OS can reconfigure the MTRRs if it wants to or double check that the BIOS did it right, but it doesn't have to and most OSs don't.