]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Update SEC_IDT_TABLE struct
authorKuo, Ted <ted.kuo@intel.com>
Tue, 12 Jul 2022 09:30:57 +0000 (02:30 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 14 Jul 2022 18:13:44 +0000 (18:13 +0000)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3957
The reserved IDT table size in SecCore is too small for X64. Changed the type
of IdtTable in SEC_IDT_TABLE from UINT64 to IA32_IDT_GATE_DESCRIPTOR to have
sufficient size reserved in IdtTable for X64. dff

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Harry Han <harry.han@intel.com>
Cc: Catharine West <catharine.west@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
UefiCpuPkg/SecCore/SecMain.c
UefiCpuPkg/SecCore/SecMain.h

index 4edf0ce9725eed3c4063d776d86b36b88f3d9218..fe03d8019a40dc93de8e7c4a5dbd52b9c76c3053 100644 (file)
@@ -211,6 +211,7 @@ SecStartup (
 \r
   IdtTableInStack.PeiService = 0;\r
   for (Index = 0; Index < SEC_IDT_ENTRY_COUNT; Index++) {\r
+    ZeroMem ((VOID *)&IdtTableInStack.IdtTable[Index], sizeof (IA32_IDT_GATE_DESCRIPTOR));\r
     CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&mIdtEntryTemplate, sizeof (UINT64));\r
   }\r
 \r
index 189fcf932625bd328025115594bab0364ffead4d..26c54bd9265ca945c30206d0cacdeb76987a1428 100644 (file)
@@ -43,8 +43,8 @@ typedef struct _SEC_IDT_TABLE {
   // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store\r
   // EFI_PEI_SERVICES**\r
   //\r
-  UINT64    PeiService;\r
-  UINT64    IdtTable[SEC_IDT_ENTRY_COUNT];\r
+  UINT64                      PeiService;\r
+  IA32_IDT_GATE_DESCRIPTOR    IdtTable[SEC_IDT_ENTRY_COUNT];\r
 } SEC_IDT_TABLE;\r
 \r
 /**\r