diff options
author | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-18 02:42:34 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-18 02:42:34 +0000 |
commit | 515327a3e3f39f201da09a4916e8c820a104c3c4 (patch) | |
tree | 2382b7f3ff3fcfd39e305e9f566b985527a57d5d /EdkCompatibilityPkg/Foundation/Library/Thunk16 | |
parent | d6c06dd77645c84654c51d5aa3582aaa241c429c (diff) | |
download | edk2-platforms-515327a3e3f39f201da09a4916e8c820a104c3c4.tar.xz |
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
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Thunk16')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c | 13 |
1 files changed, 10 insertions, 3 deletions
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.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
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);
}
|