]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Core/Dxe: Call new API InitializeCpuExceptionHandlersEx instead
authorJian J Wang <jian.j.wang@intel.com>
Thu, 7 Dec 2017 12:17:32 +0000 (20:17 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 8 Dec 2017 06:38:51 +0000 (14:38 +0800)
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 <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com>
Reviewed-by: Jiewen.yao@intel.com
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c

index 433cca3a800c1c6acb36257b953c03706b6e2ba6..62a597edafcfd33e43b6eb991af706eda0c123df 100644 (file)
@@ -258,7 +258,7 @@ DxeMain (
   if (GuidHob != NULL) {\r
     VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob));\r
   }\r
-  Status = InitializeCpuExceptionHandlers (VectorInfoList);\r
+  Status = InitializeCpuExceptionHandlersEx (VectorInfoList, NULL);\r
   ASSERT_EFI_ERROR (Status);\r
   \r
   //\r