Fixed one code error, should use & instead of |.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15648 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -140,10 +140,10 @@ LegacyBiosInt86 (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Status;
|
UINTN Status;
|
||||||
UINTN Eflags;
|
|
||||||
IA32_REGISTER_SET ThunkRegSet;
|
IA32_REGISTER_SET ThunkRegSet;
|
||||||
BOOLEAN Ret;
|
BOOLEAN Ret;
|
||||||
UINT16 *Stack16;
|
UINT16 *Stack16;
|
||||||
|
BOOLEAN Enabled;
|
||||||
|
|
||||||
ZeroMem (&ThunkRegSet, sizeof (ThunkRegSet));
|
ZeroMem (&ThunkRegSet, sizeof (ThunkRegSet));
|
||||||
ThunkRegSet.E.EFLAGS.Bits.Reserved_0 = 1;
|
ThunkRegSet.E.EFLAGS.Bits.Reserved_0 = 1;
|
||||||
@@ -169,10 +169,7 @@ LegacyBiosInt86 (
|
|||||||
//
|
//
|
||||||
// The call to Legacy16 is a critical section to EFI
|
// The call to Legacy16 is a critical section to EFI
|
||||||
//
|
//
|
||||||
Eflags = AsmReadEflags ();
|
Enabled = SaveAndDisableInterrupts();
|
||||||
if ((Eflags | EFI_CPU_EFLAGS_IF) != 0) {
|
|
||||||
DisableInterrupts ();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||||
@@ -199,9 +196,7 @@ LegacyBiosInt86 (
|
|||||||
//
|
//
|
||||||
// End critical section
|
// End critical section
|
||||||
//
|
//
|
||||||
if ((Eflags | EFI_CPU_EFLAGS_IF) != 0) {
|
SetInterruptState (Enabled);
|
||||||
EnableInterrupts ();
|
|
||||||
}
|
|
||||||
|
|
||||||
Regs->E.EDI = ThunkRegSet.E.EDI;
|
Regs->E.EDI = ThunkRegSet.E.EDI;
|
||||||
Regs->E.ESI = ThunkRegSet.E.ESI;
|
Regs->E.ESI = ThunkRegSet.E.ESI;
|
||||||
|
Reference in New Issue
Block a user