\r
Copyright (c) 2011-2013 ARM Ltd. All rights reserved.<BR>\r
\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
//\r
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
\r
+ // Signal end of interrupt early to help avoid losing subsequent ticks\r
+ // from long duration handlers\r
+ gInterrupt->EndOfInterrupt (gInterrupt, Source);\r
+\r
// Check if the timer interrupt is active\r
if ((ArmGenericTimerGetTimerCtrlReg () ) & ARM_ARCH_TIMER_ISTATUS) {\r
\r
- // Signal end of interrupt early to help avoid losing subsequent ticks from long duration handlers\r
- gInterrupt->EndOfInterrupt (gInterrupt, Source);\r
-\r
if (mTimerNotifyFunction) {\r
mTimerNotifyFunction (mTimerPeriod * mElapsedPeriod);\r
}\r
\r
// Set next compare value\r
ArmGenericTimerSetCompareVal (CompareValue);\r
- ArmGenericTimerEnableTimer ();\r
+ ArmGenericTimerReenableTimer ();\r
+ ArmInstructionSynchronizationBarrier ();\r
}\r
\r
- // Enable timer interrupts\r
- gInterrupt->EnableInterruptSource (gInterrupt, Source);\r
-\r
gBS->RestoreTPL (OriginalTPL);\r
}\r
\r
UINT32 TimerHypIntrNum;\r
\r
if (ArmIsArchTimerImplemented () == 0) {\r
- DEBUG ((EFI_D_ERROR, "ARM Architectural Timer is not available in the CPU, hence cann't use this Driver \n"));\r
+ DEBUG ((DEBUG_ERROR, "ARM Architectural Timer is not available in the CPU, hence can't use this Driver \n"));\r
ASSERT (0);\r
}\r
\r