Update DebugAgent to make sure the Local APIC SoftwareEnable bit is set
before using the Local APIC Timer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18712
6f19259b-4bc3-4df7-8a09-
765794883524
UINT32 InitialCount;\r
UINT32 ApicTimerFrequency;\r
\r
+ InitializeLocalApicSoftwareEnable (TRUE);\r
GetApicTimerState (&ApicTimerDivisor, NULL, NULL);\r
ApicTimerFrequency = PcdGet32(PcdFSBClock) / (UINT32)ApicTimerDivisor;\r
//\r
//\r
// Check if CPU APIC Timer is working, otherwise initialize it.\r
//\r
+ InitializeLocalApicSoftwareEnable (TRUE);\r
GetApicTimerState (NULL, &PeriodicMode, NULL);\r
TimerCycle = GetApicTimerInitCount ();\r
if (!PeriodicMode || TimerCycle == 0) {\r
//\r
// Check if CPU APIC Timer is working, otherwise initialize it.\r
//\r
+ InitializeLocalApicSoftwareEnable (TRUE);\r
GetApicTimerState (NULL, &PeriodicMode, NULL);\r
TimerCycle = GetApicTimerInitCount ();\r
if (!PeriodicMode || TimerCycle == 0) {\r