diff options
author | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-19 00:45:13 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-19 00:45:13 +0000 |
commit | 26a74a36c155e74463267e187b77b5c404dcd9cf (patch) | |
tree | dbd0285376cc40329297e6a098e50a5f899b91f4 /IntelFrameworkModulePkg/Csm | |
parent | e3d5b59a65db2733d0f4d76a6f1a0df504219d39 (diff) | |
download | edk2-platforms-26a74a36c155e74463267e187b77b5c404dcd9cf.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@12547 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Csm')
-rw-r--r-- | IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c index 9a62499f05..16c873d8f5 100644 --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c @@ -57,6 +57,8 @@ LegacyBiosInt86 ( IN EFI_IA32_REGISTER_SET *Regs
)
{
+ UINT32 *VectorBase;
+
Regs->X.Flags.Reserved1 = 1;
Regs->X.Flags.Reserved2 = 0;
Regs->X.Flags.Reserved3 = 0;
@@ -66,11 +68,16 @@ LegacyBiosInt86 ( Regs->X.Flags.IF = 0;
Regs->X.Flags.TF = 0;
Regs->X.Flags.CF = 0;
-
+ //
+ // The base address of legacy interrupt vector table is 0.
+ // We use this base address to get the legacy interrupt handler.
+ //
+ VectorBase = 0;
+
return InternalLegacyBiosFarCall (
This,
- (UINT16) (((UINT32 *)NULL)[BiosInt] >> 16),
- (UINT16) ((UINT32 *)NULL)[BiosInt],
+ (UINT16) ((VectorBase)[BiosInt] >> 16),
+ (UINT16) (VectorBase)[BiosInt],
Regs,
&Regs->X.Flags,
sizeof (Regs->X.Flags)
|