Revision: 18712
          http://sourceforge.net/p/edk2/code/18712
Author:   mdkinney
Date:     2015-10-30 17:53:53 +0000 (Fri, 30 Oct 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Hao Wu <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>

Modified Paths:
--------------
    
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
    
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
    
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c

Modified: 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
===================================================================
--- 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c 
    2015-10-30 17:53:31 UTC (rev 18711)
+++ 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c 
    2015-10-30 17:53:53 UTC (rev 18712)
@@ -32,6 +32,7 @@
   UINT32      InitialCount;
   UINT32      ApicTimerFrequency;
 
+  InitializeLocalApicSoftwareEnable (TRUE);
   GetApicTimerState (&ApicTimerDivisor, NULL, NULL);
   ApicTimerFrequency = PcdGet32(PcdFSBClock) / (UINT32)ApicTimerDivisor;
   //

Modified: 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
===================================================================
--- 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
  2015-10-30 17:53:31 UTC (rev 18711)
+++ 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
  2015-10-30 17:53:53 UTC (rev 18712)
@@ -372,6 +372,7 @@
     //
     // Check if CPU APIC Timer is working, otherwise initialize it.
     //
+    InitializeLocalApicSoftwareEnable (TRUE);
     GetApicTimerState (NULL, &PeriodicMode, NULL);
     TimerCycle = GetApicTimerInitCount ();
     if (!PeriodicMode || TimerCycle == 0) {

Modified: 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
===================================================================
--- 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
  2015-10-30 17:53:31 UTC (rev 18711)
+++ 
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
  2015-10-30 17:53:53 UTC (rev 18712)
@@ -280,6 +280,7 @@
     //
     // Check if CPU APIC Timer is working, otherwise initialize it.
     //
+    InitializeLocalApicSoftwareEnable (TRUE);
     GetApicTimerState (NULL, &PeriodicMode, NULL);
     TimerCycle = GetApicTimerInitCount ();
     if (!PeriodicMode || TimerCycle == 0) {


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to