On Feb 7, 2013, at 8:50 AM, David Woodhouse <[email protected]> wrote:
> I've been doing some testing of SMP booting with CSM, and the only > problem I've found is one that *doesn't* seem to be CSM-specific. Even > when I boot Linux in EFI mode under OVMF with more than one CPU, it > complains that the MTRRs are inconsistent: > > [ 0.059069] mtrr: your CPUs had inconsistent fixed MTRR settings > [ 0.060002] mtrr: your CPUs had inconsistent variable MTRR settings > [ 0.060667] mtrr: your CPUs had inconsistent MTRRdefType settings > [ 0.061002] mtrr: probably your BIOS does not setup all CPUs. > [ 0.061611] mtrr: corrected configuration. > > Presumably we should be bringing up the secondary CPUs to set the MTRRs > on them.... do we currently bring them up at all, or is all that > infrastructure code absent? I don't think this code exists in the open source. In the "real world" the CPU driver comes from the chip vendor and does all the extra magic that is in the BIOS Writers Guide. > I still haven't really found my way around > the code base to find this for myself... > Likely the code should exist in https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/UefiCpuPkg/CpuDxe, but this driver is UP. The closest code in the code base is for the Unix Emulator, but the emulator is not programming MTRRs https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c. But at least this code implements the MP Services Protocol. The Unix Emulator uses pthreads add the APs into the emulator. A real driver would have to send the INIT SIPI SIPI and wake the AP up in real mode and take control of it. Don't forget to leave it in a state where the OS can send INIT SIPI SIPI. So basically if the CpuDxe driver implemented MP Services Protocol the MTRR programming code could be updated to sync all CPUs when the MTRRs are updated. Thanks, Andrew Fish ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
