audk/MdeModulePkg/Library
Ray Ni e7abb94d1f CpuException: Add InitializeSeparateExceptionStacks
Today InitializeCpuExceptionHandlersEx is called from three modules:
1. DxeCore (links to DxeCpuExceptionHandlerLib)
    DxeCore expects it initializes the IDT entries as well as
    assigning separate stacks for #DF and #PF.
2. CpuMpPei (links to PeiCpuExceptionHandlerLib)
   and CpuDxe (links to DxeCpuExceptionHandlerLib)
    It's called for each thread for only assigning separate stacks for
    #DF and #PF. The IDT entries initialization is skipped because
    caller sets InitData->X64.InitDefaultHandlers to FALSE.

Additionally, SecPeiCpuExceptionHandlerLib, SmmCpuExceptionHandlerLib
also implement such API and the behavior of the API is simply to initialize
IDT entries only.

Because it mixes the IDT entries initialization and separate stacks
assignment for certain exception handlers together, in order to know
whether the function call only initializes IDT entries, or assigns stacks,
we need to check:
1. value of InitData->X64.InitDefaultHandlers
2. library instance

This patch cleans up the code to separate the stack assignment to a new API:
InitializeSeparateExceptionStacks().

Only when caller calls the new API, the separate stacks are assigned.
With this change, the SecPei and Smm instance can return unsupported which
gives caller a very clear status.

The old API InitializeCpuExceptionHandlersEx() is removed in this patch.
Because no platform module is consuming the old API, the impact is none.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
2022-06-10 07:54:48 +00:00
..
AuthVariableLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseBmpSupportLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseHobLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseIpmiLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseMemoryAllocationLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BasePlatformHookLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseResetSystemLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseSerialPortLib16550 MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseSortLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseVariableFlashInfoLib MdeModulePkg/VariableFlashInfoLib: Add initial library 2022-05-19 06:11:20 +00:00
BootDiscoveryPolicyUiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BootLogoLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BootMaintenanceManagerUiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BootManagerUiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BrotliCustomDecompressLib MdeModulePkg: update brotli submodule 2022-02-15 02:13:32 +00:00
CpuExceptionHandlerLibNull CpuException: Add InitializeSeparateExceptionStacks 2022-06-10 07:54:48 +00:00
CustomizedDisplayLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DebugAgentLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DeviceManagerUiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DisplayUpdateProgressLibGraphics MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DisplayUpdateProgressLibText MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCapsuleLibFmp MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCapsuleLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCoreMemoryAllocationLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCorePerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCrc32GuidedSectionExtractLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeDebugPrintErrorLevelLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeFileExplorerProtocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeIpmiLibIpmiProtocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxePerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxePrintLibPrint2Protocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeReportStatusCodeLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeResetSystemLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeSecurityManagementLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FileExplorerLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FmpAuthenticationLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FrameBufferBltLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LockBoxNullLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LzmaCustomDecompressLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
NonDiscoverableDeviceRegistrationLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
OemHookStatusCodeLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiCrc32GuidedSectionExtractLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDebugLibDebugPpi MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDebugPrintHobLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDxeDebugLibReportStatusCode edk2/MdeModulePkg/Debuglib: Add Standalone MM support 2022-03-02 02:34:00 +00:00
PeiIpmiLibIpmiPpi MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiPerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiReportStatusCodeLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiResetSystemLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiDxeS3BootScriptLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmmCoreMemoryAllocationLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmmCoreSmmServicesTableLib MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PlatformBootManagerLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformHookLibSerialPortPpi MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PlatformVarCleanupLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ResetUtilityLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RuntimeDxeReportStatusCodeLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RuntimeResetSystemLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCorePerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCorePlatformHookLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmIpmiLibSmmIpmiProtocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmLockBoxLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmMemoryAllocationProfileLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmPerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmReportStatusCodeLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmSmiHandlerProfileLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TpmMeasurementLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiBootManagerLib MdeModulePkg/UefiBootManagerLib: Convert BmLoadOption to Variable Policy 2022-01-28 06:08:45 +00:00
UefiHiiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiHiiServicesLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiMemoryAllocationProfileLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiSortLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckHiiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckPcdLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckPolicyLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckUefiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VariablePolicyHelperLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VariablePolicyLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00