]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SourceLevelDebugPkg: DebugAgent: Set Local APIC SoftwareEnable
authorMichael Kinney <michael.d.kinney@intel.com>
Fri, 30 Oct 2015 17:53:53 +0000 (17:53 +0000)
committermdkinney <mdkinney@Edk2>
Fri, 30 Oct 2015 17:53:53 +0000 (17:53 +0000)
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

SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c

index e287c4cbbe9561d1d2aa4c5249fe9d56e5d4d58e..d01d1ae4848509cea43159ef79b43e4ccd0af1bd 100644 (file)
@@ -32,6 +32,7 @@ InitializeDebugTimer (
   UINT32      InitialCount;\r
   UINT32      ApicTimerFrequency;\r
 \r
+  InitializeLocalApicSoftwareEnable (TRUE);\r
   GetApicTimerState (&ApicTimerDivisor, NULL, NULL);\r
   ApicTimerFrequency = PcdGet32(PcdFSBClock) / (UINT32)ApicTimerDivisor;\r
   //\r
index 35fb5e645029e1cbfab6ad3f338c2ac01da54b5a..a63932c6a71b8c20691dcdfa144d74dd1fd7cf3b 100644 (file)
@@ -372,6 +372,7 @@ InitializeDebugAgent (
     //\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
index 3a759f900dc65d9e22206d27004565bd8f12cfa1..32b1ae6c8f48740915900011867435594c991729 100644 (file)
@@ -280,6 +280,7 @@ InitializeDebugAgent (
     //\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