Add DisableLvtInterrupts() for the Local APIC library class.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10827 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2010-08-27 03:46:18 +00:00
parent 9a43bc39a9
commit b1b8c631f6
3 changed files with 55 additions and 0 deletions

View File

@ -212,6 +212,17 @@ ProgramVirtualWireMode (
VOID VOID
); );
/**
Disable LINT0 & LINT1 interrupts.
This function sets the mask flag in the LVT LINT0 & LINT1 registers.
**/
VOID
EFIAPI
DisableLvtInterrupts (
VOID
);
/** /**
Read the initial count value from the init-count register. Read the initial count value from the init-count register.

View File

@ -460,6 +460,28 @@ ProgramVirtualWireMode (
WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, Lint.Uint32); WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, Lint.Uint32);
} }
/**
Disable LINT0 & LINT1 interrupts.
This function sets the mask flag in the LVT LINT0 & LINT1 registers.
**/
VOID
EFIAPI
DisableLvtInterrupts (
VOID
)
{
LOCAL_APIC_LVT_LINT LvtLint;
LvtLint.Uint32 = ReadLocalApicReg (XAPIC_LVT_LINT0_OFFSET);
LvtLint.Bits.Mask = 1;
WriteLocalApicReg (XAPIC_LVT_LINT0_OFFSET, LvtLint.Uint32);
LvtLint.Uint32 = ReadLocalApicReg (XAPIC_LVT_LINT1_OFFSET);
LvtLint.Bits.Mask = 1;
WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, LvtLint.Uint32);
}
/** /**
Read the initial count value from the init-count register. Read the initial count value from the init-count register.

View File

@ -543,6 +543,28 @@ ProgramVirtualWireMode (
WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, Lint.Uint32); WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, Lint.Uint32);
} }
/**
Disable LINT0 & LINT1 interrupts.
This function sets the mask flag in the LVT LINT0 & LINT1 registers.
**/
VOID
EFIAPI
DisableLvtInterrupts (
VOID
)
{
LOCAL_APIC_LVT_LINT LvtLint;
LvtLint.Uint32 = ReadLocalApicReg (XAPIC_LVT_LINT0_OFFSET);
LvtLint.Bits.Mask = 1;
WriteLocalApicReg (XAPIC_LVT_LINT0_OFFSET, LvtLint.Uint32);
LvtLint.Uint32 = ReadLocalApicReg (XAPIC_LVT_LINT1_OFFSET);
LvtLint.Bits.Mask = 1;
WriteLocalApicReg (XAPIC_LVT_LINT1_OFFSET, LvtLint.Uint32);
}
/** /**
Read the initial count value from the init-count register. Read the initial count value from the init-count register.