summaryrefslogtreecommitdiffstats
path: root/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c
index 76c93b28ae..b12045ed66 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c
@@ -311,8 +311,15 @@ Returns:
--*/
{
- RegisterSet->E.EIP = (UINT16)((UINT32 *)NULL)[IntNumber];
- RegisterSet->E.CS = (UINT16)(((UINT32 *)NULL)[IntNumber] >> 16);
+ UINT32 *VectorBase;
+
+ //
+ // The base address of legacy interrupt vector table is 0.
+ // We use this base address to get the legacy interrupt handler.
+ //
+ VectorBase = 0;
+ RegisterSet->E.EIP = (UINT16)(VectorBase)[IntNumber];
+ RegisterSet->E.CS = (UINT16)((VectorBase)[IntNumber] >> 16);
return AsmThunk16 (ThunkContext, RegisterSet, Flags | THUNK_INTERRUPT);
}