summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/SecCore/SecMain.c
diff options
context:
space:
mode:
authorKuo, Ted <ted.kuo@intel.com>2022-07-12 02:30:57 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-14 18:13:44 +0000
commit9ab389c01b875869c6173557aa053d397aaf14f1 (patch)
tree0ceae4b4fe4bf8060b932bf1981e92e21085d21e /UefiCpuPkg/SecCore/SecMain.c
parent12dd064a1804536518eb12229836fa572c232502 (diff)
downloadedk2-9ab389c01b875869c6173557aa053d397aaf14f1.zip
edk2-9ab389c01b875869c6173557aa053d397aaf14f1.tar.gz
edk2-9ab389c01b875869c6173557aa053d397aaf14f1.tar.bz2
UefiCpuPkg: Update SEC_IDT_TABLE struct
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>
Diffstat (limited to 'UefiCpuPkg/SecCore/SecMain.c')
-rw-r--r--UefiCpuPkg/SecCore/SecMain.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c
index 4edf0ce..fe03d80 100644
--- a/UefiCpuPkg/SecCore/SecMain.c
+++ b/UefiCpuPkg/SecCore/SecMain.c
@@ -211,6 +211,7 @@ SecStartup (
IdtTableInStack.PeiService = 0;
for (Index = 0; Index < SEC_IDT_ENTRY_COUNT; Index++) {
+ ZeroMem ((VOID *)&IdtTableInStack.IdtTable[Index], sizeof (IA32_IDT_GATE_DESCRIPTOR));
CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&mIdtEntryTemplate, sizeof (UINT64));
}