mirror_edk2/MdeModulePkg/Core/Dxe
mdkinney 0803854bc1 Update DXE Core to be compatible with PI 1.2 SMM Drivers.
PI 1.2 SMM Drivers are allowed to call UEFI/DXE services and Protocols from the entry point of the PI 1.2 SMM Driver.  These UEFI/DXE services and Protocols may directly or indirectly calls the UEFI Boot Services RaiseTPL() and RestoreTPL().  These UEFI Boot Services use the CPU Architectural Protocol to enable interrupts if the TPL level is below TPL_HIGH_LEVEL and enable interrupts of the TPL is at TPL_HIGH_LEVEL.  Interrupts should be masked while executing SMM drivers, so if a direct or indirect call to the UEFI Boot Service RestoreTPL() would enable interrupts, then an interrupt could be incorrectly delivered in SMM context.  

The solution is for the DXE Core to register for the PI 1.2 SMM Base2 Protocol.  If that protocol is present in the platform, then the DXE Core can use the SMM Base 2 Protocol's InSmm() function to determine if the platform is currently executing in SMM content.  If the current context is in SMM, then do not allow any requests to be forwarded to the CPU Architecture Protocol to enable interrupts.





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9997 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-13 01:57:22 +00:00
..
Dispatcher Remove reference to PCDs of status code value. Use macros introduced in PI1.2 instead. 2010-01-27 04:00:58 +00:00
DxeMain Update DXE Core to be compatible with PI 1.2 SMM Drivers. 2010-02-13 01:57:22 +00:00
Event Update DXE Core to be compatible with PI 1.2 SMM Drivers. 2010-02-13 01:57:22 +00:00
FwVol PI 1.1 SMM Feature Check-in 2009-12-23 06:51:36 +00:00
FwVolBlock Update comments on setting >= 8 bytes Fv Alignment. 2009-10-26 09:14:47 +00:00
Gcd revise the debug message to add 0x in front of the HEX number for consistency 2010-02-10 06:10:53 +00:00
Hand Remove DEBUG_LOAD for InstallProtocolInterface() to align with PPI installation debug message in PeiCore. 2010-02-08 03:14:15 +00:00
Image revise the debug message to add 0x in front of the HEX number for consistency 2010-02-10 06:10:53 +00:00
Library Remove the internal CoreCreateProtocolNotifyEvent() in DxeCore, for UefiLib provide the similar function EfiCreateProtocolNotifyEvent(). DxeCore can use that library function. 2008-09-12 01:12:31 +00:00
Mem revise the debug message to add 0x in front of the HEX number for consistency 2010-02-10 06:10:53 +00:00
Misc Apply code to avoid security warnings. 2009-01-15 03:00:00 +00:00
SectionExtraction Add assertion to ensure pointer dereference has been checked against NULL pointer. 2009-02-16 02:07:32 +00:00
DxeMain.h Update DXE Core to be compatible with PI 1.2 SMM Drivers. 2010-02-13 01:57:22 +00:00
DxeMain.inf Update DXE Core to be compatible with PI 1.2 SMM Drivers. 2010-02-13 01:57:22 +00:00