/**\r
Get the state of the local APIC timer.\r
\r
+ This function will ASSERT if the local APIC is not software enabled.\r
+\r
@param DivideValue Return the divide value for the DCR. It is one of 1,2,4,8,16,32,64,128.\r
@param PeriodicMode Return the timer mode. If TRUE, timer mode is peridoic. Othewise, timer mode is one-shot.\r
@param Vector Return the timer interrupt vector number.\r
LOCAL_APIC_DCR Dcr;\r
LOCAL_APIC_LVT_TIMER LvtTimer;\r
\r
+ //\r
+ // Check the APIC Software Enable/Disable bit (bit 8) in Spurious-Interrupt\r
+ // Vector Register.\r
+ // This bit will be 1, if local APIC is software enabled.\r
+ //\r
+ ASSERT ((ReadLocalApicReg(XAPIC_SPURIOUS_VECTOR_OFFSET) & BIT8) != 0);\r
+\r
if (DivideValue != NULL) {\r
Dcr.Uint32 = ReadLocalApicReg (XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET);\r
Divisor = Dcr.Bits.DivideValue1 | (Dcr.Bits.DivideValue2 << 2);\r