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

147 lines
5.5 KiB
INI

#/** @file
# This is core module in DXE phase. It provides an implementation of DXE Core that is
# compliant with DXE CIS.
#
# Copyright (c) 2006 - 2010, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#**/
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxeCore
FILE_GUID = D6A2CB7F-6A18-4e2f-B43B-9920A733700A
MODULE_TYPE = DXE_CORE
VERSION_STRING = 1.0
PI_SPECIFICATION_VERSION = 0x00010000
ENTRY_POINT = DxeMain
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only)
#
[Sources.common]
DxeMain.h
SectionExtraction/CoreSectionExtraction.c
Image/Image.c
Image/Image.h
Misc/DebugImageInfo.c
Misc/Stall.c
Misc/SetWatchdogTimer.c
Misc/InstallConfigurationTable.c
Library/Library.c
Hand/DriverSupport.c
Hand/Notify.c
Hand/Locate.c
Hand/Handle.c
Hand/Handle.h
Gcd/Gcd.c
Gcd/Gcd.h
Mem/Pool.c
Mem/Page.c
Mem/MemData.c
Mem/Imem.h
FwVolBlock/FwVolBlock.c
FwVolBlock/FwVolBlock.h
FwVol/FwVolWrite.c
FwVol/FwVolRead.c
FwVol/FwVolAttrib.c
FwVol/Ffs.c
FwVol/FwVol.c
FwVol/FwVolDriver.h
Event/Tpl.c
Event/Timer.c
Event/Event.c
Event/Event.h
Dispatcher/Dependency.c
Dispatcher/Dispatcher.c
DxeMain/DxeProtocolNotify.c
DxeMain/DxeMain.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseMemoryLib
CacheMaintenanceLib
UefiDecompressLib
PerformanceLib
HobLib
BaseLib
UefiLib
DebugLib
DxeCoreEntryPoint
PeCoffLib
ExtractGuidedSectionLib
MemoryAllocationLib
UefiBootServicesTableLib
DevicePathLib
ReportStatusCodeLib
TimerLib
DxeServicesLib
[Guids]
gEfiEventMemoryMapChangeGuid ## CONSUMES ## Event
gEfiEventVirtualAddressChangeGuid ## SOMETIMES_CONSUMES ## Event
gEfiEventExitBootServicesGuid ## SOMETIMES_CONSUMES ## Event
gEfiHobMemoryAllocModuleGuid ## CONSUMES ## Hob
gEfiFileInfoGuid ## CONSUMES ## File
gEfiFirmwareFileSystem2Guid ## CONSUMES ## GUID
gAprioriGuid ## CONSUMES ## GUID
gEfiDebugImageInfoTableGuid ## CONSUMES ## GUID
gEfiHobListGuid ## CONSUMES ## GUID
gEfiDxeServicesTableGuid ## CONSUMES ## GUID
gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
gLoadFixedAddressConfigurationTableGuid ## SOMETIMES_CONSUMES
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
gEfiCapsuleArchProtocolGuid ## CONSUMES
gEfiDecompressProtocolGuid ## CONSUMES
gEfiLoadPeImageProtocolGuid ## SOMETIMES_PRODUCES (Produces when PcdFrameworkCompatibilitySupport is set)
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
gEfiLoadFileProtocolGuid ## CONSUMES
gEfiLoadFile2ProtocolGuid ## CONSUMES
gEfiResetArchProtocolGuid ## CONSUMES
gEfiRealTimeClockArchProtocolGuid ## CONSUMES
gEfiRuntimeArchProtocolGuid ## CONSUMES
gEfiWatchdogTimerArchProtocolGuid ## CONSUMES
gEfiSecurityArchProtocolGuid ## CONSUMES
gEfiVariableArchProtocolGuid ## CONSUMES
gEfiBdsArchProtocolGuid ## CONSUMES
gEfiVariableWriteArchProtocolGuid ## CONSUMES
gEfiMonotonicCounterArchProtocolGuid ## CONSUMES
gEfiMetronomeArchProtocolGuid ## CONSUMES
gEfiTimerArchProtocolGuid ## CONSUMES
gEfiBusSpecificDriverOverrideProtocolGuid ## CONSUMES
gEfiPlatformDriverOverrideProtocolGuid ## CONSUMES
gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMES
gEfiFirmwareVolumeBlockProtocolGuid ## PRODUCES
gEfiFirmwareVolume2ProtocolGuid ## PRODUCES
gEfiCpuArchProtocolGuid ## CONSUMES
gEfiDevicePathProtocolGuid ## CONSUMES
gEfiLoadedImageProtocolGuid ## PRODUCES
gEfiHiiPackageListProtocolGuid ## SOMETIMES_PRODUCES
gEfiEbcProtocolGuid ## SOMETIMES_CONSUMES
gEfiLoadedImageDevicePathProtocolGuid ## PRODUCES
gEfiSmmBase2ProtocolGuid ## SOMETIMES_CONSUMES
[FeaturePcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageNumber ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES