timera.S 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*++
  2. Copyright (c) 2016 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. timera.S
  9. Abstract:
  10. This module implements assembly routines for BCM2836 timers.
  11. Author:
  12. Chris Stevens 14-Jun-2016
  13. Environment:
  14. Firmware
  15. --*/
  16. //
  17. // ------------------------------------------------------------------ Includes
  18. //
  19. #include <minoca/kernel/arm.inc>
  20. //
  21. // --------------------------------------------------------------- Definitions
  22. //
  23. //
  24. // ---------------------------------------------------------------------- Code
  25. //
  26. ASSEMBLY_FILE_HEADER
  27. //
  28. // UINT32
  29. // EfipBcm2836GetGtFrequency (
  30. // VOID
  31. // )
  32. //
  33. /*++
  34. Routine Description:
  35. This routine gets the ARM Generic Timer's frequency (CNTFRQ).
  36. Arguments:
  37. None.
  38. Return Value:
  39. Returns the value of the CNTFRQ.
  40. --*/
  41. FUNCTION EfipBcm2836GetGtFrequency
  42. mrc p15, 0, %r0, %c14, %c0, 0 @ Get the CNTFRQ
  43. bx %lr @
  44. END_FUNCTION EfipBcm2836GetGtFrequency
  45. //
  46. // --------------------------------------------------------- Internal Functions
  47. //