On 03/18/2014 12:14 PM, Andrew Fish wrote: > Well the MpService protocol (https://svn.code.sf.net/p/edk2/code/trunk > /edk2/MdePkg/Include/Protocol/MpService.h) exists on a lot of > platforms today. It is hard to use as EFI is only safe to run on the > boot processor. Not even DEBUG prints and ASSERTs are MP safe.
(Yes... it would be nice to find a way around that at some point.) >> and Why creating it is really needed ? >> > > The value to creating a more robust MP environment in the PI world > (http://en.wikipedia.org/wiki/Platform_Initialization_Specification) is > to enable deterministic diagnostics. For example is a scheduler is > running you can not get a cache into a known state. While the OS helps, > it can also get in the way of a certain class of tests that require > determinism. > > The boot firmware may also run into to a computationally complex, or > high memory bandwidth, task that requires it to use MP services. Perhaps > there is a very large file that needs to be decompressed (OS > install/recovery image), or a robust memory test may be required on > certain boots. > > The biggest issue with writing MP PI code is most of the times it is not > done correctly. Some non MP safe library function ends up getting called > and it is just luck that it works. All good points. Thanks, Andrew. Another reason for using MP services is to initialize resources which can only be accessed from a particular CPU. An example for the Ia32/X64 architecture is the CPU MSRs (model-specific registers), which control various aspects of the CPU behavior. Each CPU must write its own MSRs. -- Brian -------------------------------------------------------------------- "When nothing is sure, everything is possible." -- Margaret Drabble ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel