On Wed, 2014-11-26 at 13:09 -0800, Andrew Fish wrote: > > > On Nov 26, 2014, at 12:49 PM, Jordan Justen > > <jordan.l.jus...@intel.com> wrote: > > > > On 2014-11-26 12:07:53, Laszlo Ersek wrote: > > > On 11/26/14 20:28, Jordan Justen wrote: > > > > On 2014-11-13 17:34:59, Chen, Fan wrote: > > > > > Of course, I hope to help improve the MP. > > > > > > > > Another idea I had (besides the AP sleep task) is to synchronize > > > > the > > > > APs MTRRs with the BSP. > > > > > > > > I think this should be fairly simple. Probably in a 'Ready to > > > > Boot' or > > > > 'Exit Boot Services' callback, the BSP could read the MTRRs, and > > > > then > > > > send the APs off on a task to set their MTRRs using the buffer > > > > where > > > > then BSP read its MTRRs. > > > > > > > > I think MtrrLib should make this fairly easy. > > > > > > > > If you boot Linux SMP today the dmesg output will note the > > > > issue: > > > > [ 0.051370] mtrr: your CPUs had inconsistent fixed MTRR > > > > settings > > > > [ 0.051371] mtrr: your CPUs had inconsistent variable MTRR > > > > settings > > > > [ 0.051371] mtrr: your CPUs had inconsistent MTRRdefType > > > > settings > > > > [ 0.051372] mtrr: probably your BIOS does not setup all CPUs. > > > > [ 0.051373] mtrr: corrected configuration. > > > > > > I think such MTRR setup should be done early (as soon as all APs > > > are > > > booted), > > > > Seems reasonable. > > > > But, MTRRs can be changed after this phase, so they may need to be > > sync'd later as well. > > > > > > I'm not sure there is a great way to ensure that they are always > > sync'd, so maybe AP startup plus just before booting the OS would be > > a > > good start. > > > > > > > > > It is the CPU driver that is doing this, so it should just sync the > MTRRs. Seems like it would be easy enough to set the MTRRs on startup, > just pass them, or let them be a global variable and set them when the > APs init. > > > The MTRR’s are getting updated via CpuSetMemoryAttributes(), and I > think there just needs to be some code added to sync the APs if the > MTRRs change. > > > https://svn.code.sf.net/p/edk2/code/trunk/edk2/UefiCpuPkg/CpuDxe/CpuDxe.c > > Thanks all of you about this. I will investigate it at first.
Chen > Thanks, > > > Andrew Fish > > ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel