From 515327a3e3f39f201da09a4916e8c820a104c3c4 Mon Sep 17 00:00:00 2001 From: li-elvin Date: Tue, 18 Oct 2011 02:42:34 +0000 Subject: Use a local variable and assign 0 to it, then use it as legacy interrupt table base address. Signed-off-by: li-elvin Reviewed-by: mdkinney, ydong10 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12544 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'EdkCompatibilityPkg') diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c index ed24663b48..7f562cf484 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c +++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -381,8 +381,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); } -- cgit v1.2.3