integfw.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. integfw.h
  5. Abstract:
  6. This header contains definitions for the Integrator/CP
  7. Author:
  8. Evan Green 4-Apr-2014
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. //
  14. // ---------------------------------------------------------------- Definitions
  15. //
  16. #define INTEGRATOR_RAM_START 0x80000000
  17. #define INTEGRATOR_RAM_SIZE (1024 * 1024 * 16)
  18. #define INTEGRATOR_CM_BASE 0x10000000
  19. #define INTEGRATOR_CM_CONTROL 0x0C
  20. #define INTEGRATOR_CM_CONTROL_RESET 0x08
  21. #define INTEGRATOR_CM_SIZE 0x1000
  22. //
  23. // Define the location of the PL031 Real Time Clock.
  24. //
  25. #define INTEGRATOR_PL031_RTC_BASE 0x15000000
  26. #define INTEGRATOR_PL031_RTC_SIZE 0x1000
  27. //
  28. // Define the serial port address.
  29. //
  30. #define INTEGRATOR_UART_BASE 0x16000000
  31. #define INTEGRATOR_PL110_BASE 0xC0000000
  32. //
  33. // ------------------------------------------------------ Data Type Definitions
  34. //
  35. //
  36. // -------------------------------------------------------------------- Globals
  37. //
  38. //
  39. // -------------------------------------------------------- Function Prototypes
  40. //
  41. EFI_STATUS
  42. EfipIntegratorEnumerateVideo (
  43. VOID
  44. );
  45. /*++
  46. Routine Description:
  47. This routine enumerates the display on the Integrator/CP.
  48. Arguments:
  49. None.
  50. Return Value:
  51. EFI status code.
  52. --*/
  53. EFI_STATUS
  54. EfipEnumerateRamDisks (
  55. VOID
  56. );
  57. /*++
  58. Routine Description:
  59. This routine enumerates any RAM disks embedded in the firmware.
  60. Arguments:
  61. None.
  62. Return Value:
  63. EFI Status code.
  64. --*/
  65. EFI_STATUS
  66. EfipIntegratorEnumerateSerial (
  67. VOID
  68. );
  69. /*++
  70. Routine Description:
  71. This routine enumerates the serial port on the Integrator board.
  72. Arguments:
  73. None.
  74. Return Value:
  75. EFI status code.
  76. --*/
  77. EFI_STATUS
  78. EfipIntegratorCreateSmbiosTables (
  79. VOID
  80. );
  81. /*++
  82. Routine Description:
  83. This routine creates the SMBIOS tables.
  84. Arguments:
  85. None.
  86. Return Value:
  87. EFI Status code.
  88. --*/
  89. EFI_STATUS
  90. EfipPlatformSetInterruptLineState (
  91. UINT32 LineNumber,
  92. BOOLEAN Enabled,
  93. BOOLEAN EdgeTriggered
  94. );
  95. /*++
  96. Routine Description:
  97. This routine enables or disables an interrupt line.
  98. Arguments:
  99. LineNumber - Supplies the line number to enable or disable.
  100. Enabled - Supplies a boolean indicating if the line should be enabled or
  101. disabled.
  102. EdgeTriggered - Supplies a boolean indicating if the interrupt is edge
  103. triggered (TRUE) or level triggered (FALSE).
  104. Return Value:
  105. EFI Status code.
  106. --*/
  107. //
  108. // Runtime services
  109. //
  110. EFI_STATUS
  111. EfipIntegratorInitializeRtc (
  112. VOID
  113. );
  114. /*++
  115. Routine Description:
  116. This routine initializes support for the EFI time runtime services.
  117. Arguments:
  118. None.
  119. Return Value:
  120. EFI status code.
  121. --*/
  122. VOID
  123. EfipIntegratorRtcVirtualAddressChange (
  124. VOID
  125. );
  126. /*++
  127. Routine Description:
  128. This routine is called when the firmware is converting to virtual address
  129. mode. It converts any pointers it's got. This routine is called after
  130. ExitBootServices, so no EFI boot services are available.
  131. Arguments:
  132. None.
  133. Return Value:
  134. EFI status code.
  135. --*/
  136. EFIAPI
  137. EFI_STATUS
  138. EfipIntegratorGetTime (
  139. EFI_TIME *Time,
  140. EFI_TIME_CAPABILITIES *Capabilities
  141. );
  142. /*++
  143. Routine Description:
  144. This routine returns the current time and dat information, and
  145. timekeeping capabilities of the hardware platform.
  146. Arguments:
  147. Time - Supplies a pointer where the current time will be returned.
  148. Capabilities - Supplies an optional pointer where the capabilities will be
  149. returned on success.
  150. Return Value:
  151. EFI_SUCCESS on success.
  152. EFI_INVALID_PARAMETER if the time parameter was NULL.
  153. EFI_DEVICE_ERROR if there was a hardware error accessing the device.
  154. --*/
  155. EFIAPI
  156. EFI_STATUS
  157. EfipIntegratorSetTime (
  158. EFI_TIME *Time
  159. );
  160. /*++
  161. Routine Description:
  162. This routine sets the current local time and date information.
  163. Arguments:
  164. Time - Supplies a pointer to the time to set.
  165. Return Value:
  166. EFI_SUCCESS on success.
  167. EFI_INVALID_PARAMETER if a time field is out of range.
  168. EFI_DEVICE_ERROR if there was a hardware error accessing the device.
  169. --*/
  170. EFIAPI
  171. EFI_STATUS
  172. EfipIntegratorGetWakeupTime (
  173. BOOLEAN *Enabled,
  174. BOOLEAN *Pending,
  175. EFI_TIME *Time
  176. );
  177. /*++
  178. Routine Description:
  179. This routine gets the current wake alarm setting.
  180. Arguments:
  181. Enabled - Supplies a pointer that receives a boolean indicating if the
  182. alarm is currently enabled or disabled.
  183. Pending - Supplies a pointer that receives a boolean indicating if the
  184. alarm signal is pending and requires acknowledgement.
  185. Time - Supplies a pointer that receives the current wake time.
  186. Return Value:
  187. EFI_SUCCESS on success.
  188. EFI_INVALID_PARAMETER if any parameter is NULL.
  189. EFI_DEVICE_ERROR if there was a hardware error accessing the device.
  190. EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
  191. --*/
  192. EFIAPI
  193. EFI_STATUS
  194. EfipIntegratorSetWakeupTime (
  195. BOOLEAN Enable,
  196. EFI_TIME *Time
  197. );
  198. /*++
  199. Routine Description:
  200. This routine sets the current wake alarm setting.
  201. Arguments:
  202. Enable - Supplies a boolean enabling or disabling the wakeup timer.
  203. Time - Supplies an optional pointer to the time to set. This parameter is
  204. only optional if the enable parameter is FALSE.
  205. Return Value:
  206. EFI_SUCCESS on success.
  207. EFI_INVALID_PARAMETER if a time field is out of range.
  208. EFI_DEVICE_ERROR if there was a hardware error accessing the device.
  209. EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
  210. --*/