diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2015-10-30 17:53:53 +0000 |
---|---|---|
committer | mdkinney <mdkinney@Edk2> | 2015-10-30 17:53:53 +0000 |
commit | df60fb4cc2ca896fcea9e37b06c276d569f1a6b8 (patch) | |
tree | 9eac7dc9c1cb0743209adcdf7c194dca597c9c59 /SourceLevelDebugPkg | |
parent | 14e4ca25c6199fa29bda7066f31d919197840664 (diff) | |
download | edk2-platforms-df60fb4cc2ca896fcea9e37b06c276d569f1a6b8.tar.xz |
SourceLevelDebugPkg: DebugAgent: Set Local APIC SoftwareEnable
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
Diffstat (limited to 'SourceLevelDebugPkg')
3 files changed, 3 insertions, 0 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c index e287c4cbbe..d01d1ae484 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c @@ -32,6 +32,7 @@ InitializeDebugTimer ( UINT32 InitialCount;
UINT32 ApicTimerFrequency;
+ InitializeLocalApicSoftwareEnable (TRUE);
GetApicTimerState (&ApicTimerDivisor, NULL, NULL);
ApicTimerFrequency = PcdGet32(PcdFSBClock) / (UINT32)ApicTimerDivisor;
//
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c index 35fb5e6450..a63932c6a7 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c @@ -372,6 +372,7 @@ InitializeDebugAgent ( //
// Check if CPU APIC Timer is working, otherwise initialize it.
//
+ InitializeLocalApicSoftwareEnable (TRUE);
GetApicTimerState (NULL, &PeriodicMode, NULL);
TimerCycle = GetApicTimerInitCount ();
if (!PeriodicMode || TimerCycle == 0) {
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c index 3a759f900d..32b1ae6c8f 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c @@ -280,6 +280,7 @@ InitializeDebugAgent ( //
// Check if CPU APIC Timer is working, otherwise initialize it.
//
+ InitializeLocalApicSoftwareEnable (TRUE);
GetApicTimerState (NULL, &PeriodicMode, NULL);
TimerCycle = GetApicTimerInitCount ();
if (!PeriodicMode || TimerCycle == 0) {
|