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
This commit is contained in:
li-elvin 2011-10-19 00:45:13 +00:00
parent e3d5b59a65
commit 26a74a36c1
1 changed files with 10 additions and 3 deletions

View File

@ -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)