From: Jian J Wang Date: Thu, 7 Dec 2017 12:17:32 +0000 (+0800) Subject: MdeModulePkg/Core/Dxe: Call new API InitializeCpuExceptionHandlersEx instead X-Git-Tag: edk2-stable201903~2898 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a8ab14d355072241915d87de86770c0fde92cba9 MdeModulePkg/Core/Dxe: Call new API InitializeCpuExceptionHandlersEx instead Original API InitializeCpuExceptionHandlers is used in DxeMain to initialize exception handlers but it does not support setting up stack switch required by Stack Guard feature. Using the new API instead to make sure Stack Guard feature is applicable to most part of code. Since this API is called before memory service initialization, there's no way to call AllocateXxx API to reserve memory. Global variables are used for this special case. GDT table is reserved at least 2KB which should be big enough for all current use cases. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Reviewed-by: Jeff Fan Reviewed-by: Jiewen.yao@intel.com --- diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 433cca3a80..62a597edaf 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -258,7 +258,7 @@ DxeMain ( if (GuidHob != NULL) { VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob)); } - Status = InitializeCpuExceptionHandlers (VectorInfoList); + Status = InitializeCpuExceptionHandlersEx (VectorInfoList, NULL); ASSERT_EFI_ERROR (Status); //