summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/FspSecCore/SecMain.c
diff options
context:
space:
mode:
authorKuo, Ted <ted.kuo@intel.com>2022-07-12 02:30:58 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-14 18:13:44 +0000
commit470206ba7f118aaa1153d66689cf3ee4d17051b7 (patch)
tree43212780997936e4a17c92a25698d494b28e190b /IntelFsp2Pkg/FspSecCore/SecMain.c
parent9ab389c01b875869c6173557aa053d397aaf14f1 (diff)
downloadedk2-470206ba7f118aaa1153d66689cf3ee4d17051b7.tar.gz
edk2-470206ba7f118aaa1153d66689cf3ee4d17051b7.tar.bz2
edk2-470206ba7f118aaa1153d66689cf3ee4d17051b7.zip
IntelFsp2Pkg: 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. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Signed-off-by: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Diffstat (limited to 'IntelFsp2Pkg/FspSecCore/SecMain.c')
-rw-r--r--IntelFsp2Pkg/FspSecCore/SecMain.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c b/IntelFsp2Pkg/FspSecCore/SecMain.c
index 8effe2225c..94ea3865b4 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.c
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.c
@@ -58,13 +58,13 @@ SecStartup (
IN UINT32 ApiIdx
)
{
- EFI_SEC_PEI_HAND_OFF SecCoreData;
- IA32_DESCRIPTOR IdtDescriptor;
- SEC_IDT_TABLE IdtTableInStack;
- UINT32 Index;
- FSP_GLOBAL_DATA PeiFspData;
- UINT64 ExceptionHandler;
- UINTN IdtSize;
+ EFI_SEC_PEI_HAND_OFF SecCoreData;
+ IA32_DESCRIPTOR IdtDescriptor;
+ SEC_IDT_TABLE IdtTableInStack;
+ UINT32 Index;
+ FSP_GLOBAL_DATA PeiFspData;
+ IA32_IDT_GATE_DESCRIPTOR ExceptionHandler;
+ UINTN IdtSize;
//
// Process all libraries constructor function linked to SecCore.
@@ -119,7 +119,7 @@ SecStartup (
if (IdtDescriptor.Base == 0) {
ExceptionHandler = FspGetExceptionHandler (mIdtEntryTemplate);
for (Index = 0; Index < FixedPcdGet8 (PcdFspMaxInterruptSupported); Index++) {
- CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&ExceptionHandler, sizeof (UINT64));
+ CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&ExceptionHandler, sizeof (IA32_IDT_GATE_DESCRIPTOR));
}
IdtSize = sizeof (IdtTableInStack.IdtTable);