Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
r48674 r58459 2 2 Code for debug timer to support debug agent library implementation. 3 3 4 Copyright (c) 2010 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 18 18 Initialize CPU local APIC timer. 19 19 20 @return 32-bit Local APIC timer init count. 20 21 **/ 21 VOID 22 UINT32 22 23 InitializeDebugTimer ( 23 24 VOID … … 42 43 InitializeApicTimer (ApicTimerDivisor, InitialCount, TRUE, DEBUG_TIMER_VECTOR); 43 44 44 if (MultiProcessorDebugSupport) { 45 mDebugMpContext.DebugTimerInitCount = InitialCount; 46 } 45 return InitialCount; 47 46 } 48 47 … … 66 65 ) 67 66 { 68 BOOLEAN OldInterruptState;69 67 BOOLEAN OldDebugTimerInterruptState; 70 68 71 OldInterruptState = SaveAndDisableInterrupts ();72 69 OldDebugTimerInterruptState = GetApicTimerInterruptState (); 73 74 if (EnableStatus) { 75 EnableApicTimerInterrupt (); 76 } else { 77 DisableApicTimerInterrupt (); 70 71 if (OldDebugTimerInterruptState != EnableStatus) { 72 if (EnableStatus) { 73 EnableApicTimerInterrupt (); 74 } else { 75 DisableApicTimerInterrupt (); 76 } 77 // 78 // Validate the Debug Timer interrupt state 79 // This will make additional delay after Local Apic Timer interrupt state is changed. 80 // Thus, CPU could handle the potential pending interrupt of Local Apic timer. 81 // 82 while (GetApicTimerInterruptState () != EnableStatus) { 83 CpuPause (); 84 } 78 85 } 79 86 80 SetInterruptState (OldInterruptState);81 87 return OldDebugTimerInterruptState; 82 88 }
Note:
See TracChangeset
for help on using the changeset viewer.