b2709os.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. b2709os.h
  5. Abstract:
  6. This header contains OS definitions for the BCM 2709 SoC.
  7. Author:
  8. Chris Stevens 19-Mar-2015
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. //
  14. // ---------------------------------------------------------------- Definitions
  15. //
  16. //
  17. // Define the signature of the BCM 2709 ACPI table.
  18. //
  19. #define BCM2709_SIGNATURE 0x324D4342 // '2MCB'
  20. //
  21. // Define the flags for the CPU BCM2709 table entries.
  22. //
  23. #define BCM2709_CPU_FLAG_ENABLED 0x00000001
  24. //
  25. // ------------------------------------------------------ Data Type Definitions
  26. //
  27. typedef enum _BCM2709_ENTRY_TYPE {
  28. Bcm2709EntryTypeCpu = 0x0,
  29. } BCM2709_ENTRY_TYPE, *PBCM2709_ENTRY_TYPE;
  30. /*++
  31. Structure Description:
  32. This structure describes the BCM 2709 ACPI table.
  33. Members:
  34. Header - Stores the standard ACPI table header. The signature here is
  35. '2MCB'.
  36. ApbClockFrequency - Stores the frequency of the Advanced Peripheral Bus's
  37. clock.
  38. InterruptControllerPhysicalAddress - Stores the physical address of the
  39. interrupt controller's register base.
  40. InterruptControllerGsiBase - Stores the Global System Interrupt number of
  41. the first line of the interrupt controller.
  42. ArmTimerPhysicalAddress - Stores the physical address of the ARM timer's
  43. registers.
  44. ArmTimerGsi - Stores the Global System Interrupt of the ARM timer.
  45. DebugUartPhysicalAddress - Stores the physical address of the UART used for
  46. serial debugging.
  47. DebugUartClockFrequency - Stores the frequency of the clock use for the
  48. UART.
  49. SystemTimerPhysicalAddress - Stores the physical address of the system
  50. timer's registers.
  51. SystemTimerFrequency - Stores the frequency of the system timer's
  52. free-running counter.
  53. SystemTimerGsiBase - Stores the Global System Interrupt base of the 4
  54. contiguous system timer interrupts.
  55. MailboxPhysicalAddress - Stores the physical address of the BCM2709 Mailbox
  56. register base.
  57. CpuLocalPhysicalAddress - Stores the physical address of the processor
  58. local registers.
  59. --*/
  60. typedef struct _BCM2709_TABLE {
  61. DESCRIPTION_HEADER Header;
  62. ULONGLONG ApbClockFrequency;
  63. ULONGLONG InterruptControllerPhysicalAddress;
  64. ULONGLONG InterruptControllerGsiBase;
  65. ULONGLONG ArmTimerPhysicalAddress;
  66. ULONG ArmTimerGsi;
  67. ULONGLONG DebugUartPhysicalAddress;
  68. ULONG DebugUartClockFrequency;
  69. ULONGLONG SystemTimerPhysicalAddress;
  70. ULONGLONG SystemTimerFrequency;
  71. ULONG SystemTimerGsiBase;
  72. ULONGLONG MailboxPhysicalAddress;
  73. ULONGLONG CpuLocalPhysicalAddress;
  74. // ProcessorStructures[n].
  75. } PACKED BCM2709_TABLE, *PBCM2709_TABLE;
  76. /*++
  77. Structure Description:
  78. This structure describes an entry in the BCM2709 table whose content is not
  79. yet fully known.
  80. Members:
  81. Type - Stores the type of entry, used to differentiate the various types
  82. of entries.
  83. Length - Stores the size of the entry, in bytes.
  84. --*/
  85. typedef struct _BCM2709_GENERIC_ENTRY {
  86. UCHAR Type;
  87. UCHAR Length;
  88. } PACKED BCM2709_GENERIC_ENTRY, *PBCM2709_GENERIC_ENTRY;
  89. /*++
  90. Structure Description:
  91. This structure describes a BCM2709 CPU interface unit in the BCM2709 table.
  92. Members:
  93. Type - Stores a value to indicate a BCM2709 CPU interface structure (0x0).
  94. Length - Stores the size of this structure, 24.
  95. Reserved - Stores a reserved value which must be zero.
  96. ProcessorId - Stores the physical ID of the processor.
  97. Flags - Stores flags governing this BCM2709 CPU interface. See
  98. BCM2709_CPU_FLAG_*.
  99. ParkingProtocolVersion - Stores the version of the ARM processor parking
  100. protocol implemented.
  101. ParkedAddress - Stores the physical address of the processor's parking
  102. protocol mailbox.
  103. --*/
  104. typedef struct _BCM2709_CPU_ENTRY {
  105. UCHAR Type;
  106. UCHAR Length;
  107. USHORT Reserved;
  108. ULONG ProcessorId;
  109. ULONG Flags;
  110. ULONG ParkingProtocolVersion;
  111. ULONGLONG ParkedAddress;
  112. } PACKED BCM2709_CPU_ENTRY, *PBCM2709_CPU_ENTRY;
  113. //
  114. // -------------------------------------------------------------------- Globals
  115. //
  116. //
  117. // -------------------------------------------------------- Function Prototypes
  118. //