Message ID | 1409918214-29584-7-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
On 09/05/14 13:56, Ard Biesheuvel wrote: > This introduces ArmGenericTimerCounterLib by adding the include file > ArmPkg/Include/Library/ArmGenericTimerCounterLib.h. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 85 ++++++++++++++++++++++ > 1 file changed, 85 insertions(+) > create mode 100644 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h These patches should have been a separate series, or at least deserved a separate blurb. It's not easy to reconstruct the goal and the progress from the patches, going in "unprepared". (You might have described it in more detail in v6, I didn't read that version, sorry.) Patches v7 06/24 to 10/24: Acked-by: Laszlo Ersek <lersek@redhat.com> Thanks Laszlo ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/
On 6 September 2014 21:03, Laszlo Ersek <lersek@redhat.com> wrote: > On 09/05/14 13:56, Ard Biesheuvel wrote: >> This introduces ArmGenericTimerCounterLib by adding the include file >> ArmPkg/Include/Library/ArmGenericTimerCounterLib.h. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> --- >> ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 85 ++++++++++++++++++++++ >> 1 file changed, 85 insertions(+) >> create mode 100644 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h > > These patches should have been a separate series, or at least deserved a > separate blurb. It's not easy to reconstruct the goal and the progress > from the patches, going in "unprepared". (You might have described it in > more detail in v6, I didn't read that version, sorry.) > > Patches v7 06/24 to 10/24: > Acked-by: Laszlo Ersek <lersek@redhat.com> > Thanks The main purpose of these patches is to get rid of the 'UseVirtualNotPhysicalTimer' feature PCD we had before, and instead make the selection by choosing a 'virtual' or 'physical' library implementation. However, there were some inconsistencies in the layering, so I had to fix that up first before I could isolate the timer code that has now become the physical flavor of the ArmGenericTimerCounterLib that this patch introduces. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/
diff --git a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h new file mode 100644 index 000000000000..6717ae370057 --- /dev/null +++ b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h @@ -0,0 +1,85 @@ +/** @file + + Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> + Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR> + + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __ARM_GENERIC_TIMER_COUNTER_LIB_H__ +#define __ARM_GENERIC_TIMER_COUNTER_LIB_H__ + +VOID +EFIAPI +ArmArchTimerEnableTimer ( + VOID + ); + +VOID +EFIAPI +ArmArchTimerDisableTimer ( + VOID + ); + +VOID +EFIAPI +ArmArchTimerSetTimerFreq ( + IN UINTN FreqInHz + ); + +UINTN +EFIAPI +ArmArchTimerGetTimerFreq ( + VOID + ); + +VOID +EFIAPI +ArmArchTimerSetTimerVal ( + IN UINTN Val + ); + +UINTN +EFIAPI +ArmArchTimerGetTimerVal ( + VOID + ); + +UINT64 +EFIAPI +ArmArchTimerGetSystemCount ( + VOID + ); + +UINTN +EFIAPI +ArmArchTimerGetTimerCtrlReg ( + VOID + ); + +VOID +EFIAPI +ArmArchTimerSetTimerCtrlReg ( + UINTN Val + ); + +UINT64 +EFIAPI +ArmArchTimerGetCompareVal ( + VOID + ); + +VOID +EFIAPI +ArmArchTimerSetCompareVal ( + IN UINT64 Val + ); + +#endif
This introduces ArmGenericTimerCounterLib by adding the include file ArmPkg/Include/Library/ArmGenericTimerCounterLib.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 ArmPkg/Include/Library/ArmGenericTimerCounterLib.h