From ae40aef1fb4f5f34e5273b6fd5d4103bf6c7dd2d Mon Sep 17 00:00:00 2001 From: rsun3 Date: Thu, 26 Aug 2010 05:58:42 +0000 Subject: Improve Local APIC library class. Add new library APIs: GetApicVersion(), SendFixedIpi(), SendFixedIpiAllExcludingSelf(), GetApicTimerState(). Remove GetApicTimerDivisor (), its functionality can be covered by GetApicTimerState(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10824 6f19259b-4bc3-4df7-8a09-765794883524 --- UefiCpuPkg/Include/Library/LocalApicLib.h | 66 +++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 12 deletions(-) (limited to 'UefiCpuPkg/Include/Library/LocalApicLib.h') diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h b/UefiCpuPkg/Include/Library/LocalApicLib.h index 58e3474e88..d565dad96c 100644 --- a/UefiCpuPkg/Include/Library/LocalApicLib.h +++ b/UefiCpuPkg/Include/Library/LocalApicLib.h @@ -75,6 +75,45 @@ GetApicId ( VOID ); +/** + Get the value of the local APIC version register. + + @return the value of the local APIC version register. +**/ +UINT32 +EFIAPI +GetApicVersion ( + VOID + ); + +/** + Send a Fixed IPI to a specified target processor. + + This function returns after the IPI has been accepted by the target processor. + + @param ApicId The local APIC ID of the target processor. + @param Vector The vector number of the interrupt being sent. +**/ +VOID +EFIAPI +SendFixedIpi ( + IN UINT32 ApicId, + IN UINT8 Vector + ); + +/** + Send a Fixed IPI to all processors excluding self. + + This function returns after the IPI has been accepted by the target processors. + + @param Vector The vector number of the interrupt being sent. +**/ +VOID +EFIAPI +SendFixedIpiAllExcludingSelf ( + IN UINT8 Vector + ); + /** Send a SMI IPI to a specified target processor. @@ -173,18 +212,6 @@ ProgramVirtualWireMode ( VOID ); -/** - Get the divide value from the DCR (Divide Configuration Register) by which - the processor's bus clock is divided to form the time base for the APIC timer. - - @return The divide value is one of 1,2,4,8,16,32,64,128. -**/ -UINTN -EFIAPI -GetApicTimerDivisor ( - VOID - ); - /** Read the initial count value from the init-count register. @@ -227,6 +254,21 @@ InitializeApicTimer ( IN UINT8 Vector ); +/** + Get the state of the local APIC timer. + + @param DivideValue Return the divide value for the DCR. It is one of 1,2,4,8,16,32,64,128. + @param PeriodicMode Return the timer mode. If TRUE, timer mode is peridoic. Othewise, timer mode is one-shot. + @param Vector Return the timer interrupt vector number. +**/ +VOID +EFIAPI +GetApicTimerState ( + OUT UINTN *DivideValue OPTIONAL, + OUT BOOLEAN *PeriodicMode OPTIONAL, + OUT UINT8 *Vector OPTIONAL + ); + /** Enable the local APIC timer interrupt. **/ -- cgit v1.2.3