summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-27 03:46:18 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-27 03:46:18 +0000
commitb1b8c631f613084d43d64d0b9e1d27337d4d8b5a (patch)
treef017aa293e3eba38be46d8c1731b003070a52f61 /UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
parent9a43bc39a9b038523a9c5678f05cc31c62640bf0 (diff)
downloadedk2-b1b8c631f613084d43d64d0b9e1d27337d4d8b5a.tar.gz
edk2-b1b8c631f613084d43d64d0b9e1d27337d4d8b5a.tar.bz2
edk2-b1b8c631f613084d43d64d0b9e1d27337d4d8b5a.zip
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
Diffstat (limited to 'UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c')
-rw-r--r--UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
index 1ac3853071..79a0fcd413 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -461,6 +461,28 @@ ProgramVirtualWireMode (
}
/**
+ 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.
@return The initial count value read from the init-count register.