bcm2709.h 19 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. bcm2709.h
  5. Abstract:
  6. This header contains definitions for the BCM2709 UEFI device library.
  7. Author:
  8. Chris Stevens 18-Mar-2015
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. #include <minoca/soc/bcm2709.h>
  14. //
  15. // --------------------------------------------------------------------- Macros
  16. //
  17. //
  18. // This macro converts a BCM2709 device offset into the base address.
  19. //
  20. #define BCM2709_GET_BASE(_Offset) (EfiBcm2709Base + (_Offset))
  21. //
  22. // These macros define the device base addresses based on the fixed offsets.
  23. //
  24. #define BCM2709_SYSTEM_TIMER_BASE BCM2709_GET_BASE(BCM2709_SYSTEM_TIMER_OFFSET)
  25. #define BCM2709_INTERRUPT_BASE BCM2709_GET_BASE(BCM2709_INTERRUPT_OFFSET)
  26. #define BCM2709_ARM_TIMER_BASE BCM2709_GET_BASE(BCM2709_ARM_TIMER_OFFSET)
  27. #define BCM2709_MAILBOX_BASE BCM2709_GET_BASE(BCM2709_MAILBOX_OFFSET)
  28. #define BCM2709_PRM_BASE BCM2709_GET_BASE(BCM2709_PRM_OFFSET)
  29. #define BCM2709_GPIO_BASE BCM2709_GET_BASE(BCM2709_GPIO_OFFSET)
  30. #define BCM2709_UART_BASE BCM2709_GET_BASE(BCM2709_UART_OFFSET)
  31. #define BCM2709_EMMC_BASE BCM2709_GET_BASE(BCM2709_EMMC_OFFSET)
  32. //
  33. // ---------------------------------------------------------------- Definitions
  34. //
  35. //
  36. // ------------------------------------------------------ Data Type Definitions
  37. //
  38. /*++
  39. Structure Description:
  40. This structure defines the header used when sending property messages to
  41. the BCM2709 mailbox.
  42. Members:
  43. Size - Stores the size of the data being sent.
  44. Code - Stores the status code on return from the mailbox.
  45. --*/
  46. typedef struct _BCM2709_MAILBOX_HEADER {
  47. UINT32 Size;
  48. UINT32 Code;
  49. } BCM2709_MAILBOX_HEADER, *PBCM2709_MAILBOX_HEADER;
  50. /*++
  51. Structure Description:
  52. This structure defines the header for a mailbox tag, that is, an individual
  53. property's message.
  54. Members:
  55. Tag - Stores the tag that devices the nature of the mailbox message.
  56. Size - Stores the number of bytes in the message's buffer.
  57. Length - Stores the number of bytes sent to the mailbox in the message's
  58. buffer. On receive, this will contain the number of bytes read from the
  59. mailbox.
  60. --*/
  61. typedef struct _BCM2709_MAILBOX_TAG {
  62. UINT32 Tag;
  63. UINT32 Size;
  64. UINT32 Length;
  65. } BCM2709_MAILBOX_TAG, *PBCM2709_MAILBOX_TAG;
  66. /*++
  67. Structure Description:
  68. This structure defines a memory region message for the BCM2709 mailbox.
  69. Members:
  70. TagHeader - Stores the identification tag header for the message.
  71. BaseAddress - Stores the base physical address of the memory region.
  72. Size - Stores the size of the memory region, in bytes.
  73. --*/
  74. typedef struct _BCM2709_MAILBOX_MEMORY_REGION {
  75. BCM2709_MAILBOX_TAG TagHeader;
  76. UINT32 BaseAddress;
  77. UINT32 Size;
  78. } BCM2709_MAILBOX_MEMORY_REGION, *PBCM2709_MAILBOX_MEMORY_REGION;
  79. /*++
  80. Structure Description:
  81. This structure defines a device state message for the BCM2709 mailbox.
  82. Members:
  83. TagHeader - Stores the identification tag header for the message.
  84. DeviceId - Stores the identification number for the targeted device.
  85. State - Stores the desired state of the device.
  86. --*/
  87. typedef struct _BCM2709_MAILBOX_DEVICE_STATE {
  88. BCM2709_MAILBOX_TAG TagHeader;
  89. UINT32 DeviceId;
  90. UINT32 State;
  91. } BCM2709_MAILBOX_DEVICE_STATE, *PBCM2709_MAILBOX_DEVICE_STATE;
  92. /*++
  93. Structure Description:
  94. This structure defines the get clock rate message for the BCM2709 mailbox.
  95. Members:
  96. TagHeader - Stores the identification tag header for the message.
  97. ClockId - Stores the identification number for the clock.
  98. Rate - Stores the frequency of the clock in Hz.
  99. --*/
  100. typedef struct _BCM2709_MAILBOX_GET_CLOCK_RATE {
  101. BCM2709_MAILBOX_TAG TagHeader;
  102. UINT32 ClockId;
  103. UINT32 Rate;
  104. } BCM2709_MAILBOX_GET_CLOCK_RATE, *PBCM2709_MAILBOX_GET_CLOCK_RATE;
  105. /*++
  106. Structure Description:
  107. This structure defines the set clock rate message for the BCM2709 mailbox.
  108. Members:
  109. TagHeader - Stores the identification tag header for the message.
  110. ClockId - Stores the identification number for the clock.
  111. Rate - Stores the frequency of the clock in Hz.
  112. SkipSettingTurbo - Stores a boolean indicating whether or not to skip
  113. setting other high performance ("turbo") settings when the ARM
  114. frequency is set above the default.
  115. --*/
  116. typedef struct _BCM2709_MAILBOX_SET_CLOCK_RATE {
  117. BCM2709_MAILBOX_TAG TagHeader;
  118. UINT32 ClockId;
  119. UINT32 Rate;
  120. UINT32 SkipSettingTurbo;
  121. } BCM2709_MAILBOX_SET_CLOCK_RATE, *PBCM2709_MAILBOX_SET_CLOCK_RATE;
  122. /*++
  123. Structure Description:
  124. This structure defines a video resolution used by the BCM2709 mailbox.
  125. Members:
  126. Width - Stores the width of the resolution, in pixels.
  127. Height - Stores the height of the resolution, in pixels.
  128. --*/
  129. typedef struct _BCM2709_RESOLUTION {
  130. UINT32 Width;
  131. UINT32 Height;
  132. } BCM2709_RESOLUTION, *PBCM2709_RESOLUTION;
  133. /*++
  134. Structure Description:
  135. This structure defines a video offset used by the BCM2709 mailbox.
  136. Members:
  137. X - Stores the horizontal offset.
  138. Y - Stores the vertical offset.
  139. --*/
  140. typedef struct _BCM2709_OFFSET {
  141. UINT32 X;
  142. UINT32 Y;
  143. } BCM2709_OFFSET, *PBCM2709_OFFSET;
  144. /*++
  145. Structure Description:
  146. This structure defines a video overscan used by the BCM2709 mailbox.
  147. Members:
  148. Top - Stores the overcan value for the top edge of the screen.
  149. Bottom - Stores the overcan value for the bottom edge of the screen.
  150. Left - Stores the overcan value for the left side of the screen.
  151. Right - Stores the overcan value for the right side of the screen.
  152. --*/
  153. typedef struct _BCM2709_OVERSCAN {
  154. UINT32 Top;
  155. UINT32 Bottom;
  156. UINT32 Left;
  157. UINT32 Right;
  158. } BCM2709_OVERSCAN, *PBCM2709_OVERSCAN;
  159. /*++
  160. Structure Description:
  161. This structure defines a frame buffer used by the BCM2709 mailbox.
  162. Members:
  163. Base - Stores the base address of the frame buffer.
  164. Size - Stores the size of the frame buffer, in bytes.
  165. --*/
  166. typedef struct _BCM2709_FRAME_BUFFER {
  167. UINT32 Base;
  168. UINT32 Size;
  169. } BCM2709_FRAME_BUFFER, *PBCM2709_FRAME_BUFFER;
  170. /*++
  171. Structure Description:
  172. This structure defines a video resolution message for the BCM2709 mailbox.
  173. Members:
  174. TagHeader - Stores the identification tag header for the message.
  175. Resolution - Stores the resolution to set or receives the current
  176. resolution.
  177. --*/
  178. typedef struct _BCM2709_MAILBOX_RESOLUTION {
  179. BCM2709_MAILBOX_TAG TagHeader;
  180. BCM2709_RESOLUTION Resolution;
  181. } BCM2709_MAILBOX_RESOLUTION, *PBCM2709_MAILBOX_RESOLUTION;
  182. /*++
  183. Structure Description:
  184. This structure defines a bits per pixel message for the BCM2709 mailbox.
  185. Members:
  186. TagHeader - Stores the identification tag header for the message.
  187. BitsPerPixel - Stores the bits per pixel to set or receives the current
  188. bits per pixel.
  189. --*/
  190. typedef struct _BCM2709_MAILBOX_BITS_PER_PIXEL {
  191. BCM2709_MAILBOX_TAG TagHeader;
  192. UINT32 BitsPerPixel;
  193. } BCM2709_MAILBOX_BITS_PER_PIXEL, *PBCM2709_MAILBOX_BITS_PER_PIXEL;
  194. /*++
  195. Structure Description:
  196. This structure defines a pixel order message for the BCM2709 mailbox.
  197. Members:
  198. TagHeader - Stores the identification tag header for the message.
  199. PixelOrder - Stores the pixel order to set or receives the current pixel
  200. order.
  201. --*/
  202. typedef struct _BCM2709_MAILBOX_PIXEL_ORDER {
  203. BCM2709_MAILBOX_TAG TagHeader;
  204. UINT32 PixelOrder;
  205. } BCM2709_MAILBOX_PIXEL_ORDER, *PBCM2709_MAILBOX_PIXEL_ORDER;
  206. /*++
  207. Structure Description:
  208. This structure defines a video alpha mode message for the BCM2709 mailbox.
  209. Members:
  210. TagHeader - Stores the identification tag header for the message.
  211. AlphaMode - Stores the alpha mode to set or receives the current alpha mode.
  212. --*/
  213. typedef struct _BCM2709_MAILBOX_ALPHA_MODE {
  214. BCM2709_MAILBOX_TAG TagHeader;
  215. UINT32 AlphaMode;
  216. } BCM2709_MAILBOX_ALPHA_MODE, *PBCM2709_MAILBOX_ALPHA_MODE;
  217. /*++
  218. Structure Description:
  219. This structure defines a video virtual offset message for the BCM2709
  220. mailbox.
  221. Members:
  222. TagHeader - Stores the identification tag header for the message.
  223. Offset - Stores the virtual offset to set or receives the current virtual
  224. offset.
  225. --*/
  226. typedef struct _BCM2709_MAILBOX_VIRTUAL_OFFSET {
  227. BCM2709_MAILBOX_TAG TagHeader;
  228. BCM2709_OFFSET Offset;
  229. } BCM2709_MAILBOX_VIRTUAL_OFFSET, *PBCM2709_MAILBOX_VIRTUAL_OFFSET;
  230. /*++
  231. Structure Description:
  232. This structure defines a video overscan message for the BCM2709 mailbox.
  233. Members:
  234. TagHeader - Stores the identification tag header for the message.
  235. Overcan - Stores the overscan values to set or receives the current
  236. overscan values.
  237. --*/
  238. typedef struct _BCM2709_MAILBOX_OVERSCAN {
  239. BCM2709_MAILBOX_TAG TagHeader;
  240. BCM2709_OVERSCAN Overscan;
  241. } BCM2709_MAILBOX_OVERSCAN, *PBCM2709_MAILBOX_OVERSCAN;
  242. /*++
  243. Structure Description:
  244. This structure defines a video pitch message for the BCM2709 mailbox.
  245. Members:
  246. TagHeader - Stores the identification tag header for the message.
  247. BytesPerLine - Stores the bytes per scan line of the frame buffer.
  248. --*/
  249. typedef struct _BCM2709_MAILBOX_PITCH {
  250. BCM2709_MAILBOX_TAG TagHeader;
  251. UINT32 BytesPerScanLine;
  252. } BCM2709_MAILBOX_PITCH, *PBCM2709_MAILBOX_PITCH;
  253. /*++
  254. Structure Description:
  255. This structure defines a video frame buffer message for the BCM2709 mailbox.
  256. Members:
  257. TagHeader - Stores the identification tag header for the message.
  258. FrameBuffer - Stores the frame buffer to release or receives a frame buffer
  259. base and size.
  260. --*/
  261. typedef struct _BCM2709_MAILBOX_FRAME_BUFFER {
  262. BCM2709_MAILBOX_TAG TagHeader;
  263. BCM2709_FRAME_BUFFER FrameBuffer;
  264. } BCM2709_MAILBOX_FRAME_BUFFER, *PBCM2709_MAILBOX_FRAME_BUFFER;
  265. /*++
  266. Structure Description:
  267. This structure defines a board model message for the BCM2709 mailbox.
  268. Members:
  269. TagHeader - Stores the identification tag header for the message.
  270. ModelNumber - Stores the board model number.
  271. --*/
  272. typedef struct _BCM2709_MAILBOX_BOARD_MODEL {
  273. BCM2709_MAILBOX_TAG TagHeader;
  274. UINT32 ModelNumber;
  275. } BCM2709_MAILBOX_BOARD_MODEL, *PBCM2709_MAILBOX_BOARD_MODEL;
  276. /*++
  277. Structure Description:
  278. This structure defines a board revision message for the BCM2709 mailbox.
  279. Members:
  280. TagHeader - Stores the identification tag header for the message.
  281. ModelNumber - Stores the board revision number.
  282. --*/
  283. typedef struct _BCM2709_MAILBOX_BOARD_REVISION {
  284. BCM2709_MAILBOX_TAG TagHeader;
  285. UINT32 Revision;
  286. } BCM2709_MAILBOX_BOARD_REVISION, *PBCM2709_MAILBOX_BOARD_REVISION;
  287. /*++
  288. Structure Description:
  289. This structure defines a board serial number message for the BCM2709
  290. mailbox.
  291. Members:
  292. TagHeader - Stores the identification tag header for the message.
  293. SerialNumber - Stores the board serial number.
  294. --*/
  295. typedef struct _BCM2709_MAILBOX_BOARD_SERIAL_NUMBER {
  296. BCM2709_MAILBOX_TAG TagHeader;
  297. UINT32 SerialNumber[2];
  298. } BCM2709_MAILBOX_BOARD_SERIAL_NUMBER, *PBCM2709_MAILBOX_BOARD_SERIAL_NUMBER;
  299. /*++
  300. Structure Description:
  301. This structure defines the data necessary to get a BCM2709's clock rate.
  302. Members:
  303. Header - Stores a header that defines the total size of the messages being
  304. sent to and received from the mailbox.
  305. ClockRate - Stores a message getting the clock rate.
  306. EndTag - Stores the tag to denote the end of the mailbox message.
  307. --*/
  308. typedef struct _EFI_BCM2709_GET_CLOCK_RATE {
  309. BCM2709_MAILBOX_HEADER Header;
  310. BCM2709_MAILBOX_GET_CLOCK_RATE ClockRate;
  311. UINT32 EndTag;
  312. } EFI_BCM2709_GET_CLOCK_RATE, *PEFI_BCM2709_GET_CLOCK_RATE;
  313. /*++
  314. Structure Description:
  315. This structure defines a BCM2709 timer.
  316. Members:
  317. ClockTimer - Stores a boolean indicating whether or not the timer is the
  318. clock timer (TRUE) or the time counter (FALSE).
  319. Predivider - Stores the predivider to use when initializing the clock timer.
  320. --*/
  321. typedef struct _BCM2709_TIMER {
  322. BOOLEAN ClockTimer;
  323. UINT32 Predivider;
  324. } BCM2709_TIMER, *PBCM2709_TIMER;
  325. //
  326. // -------------------------------------------------------------------- Globals
  327. //
  328. //
  329. // Store the base address of the BCM2709 device registers.
  330. //
  331. extern VOID *EfiBcm2709Base;
  332. //
  333. // Store whether or not the BCM2709 device library has been initialized.
  334. //
  335. extern BOOLEAN EfiBcm2709Initialized;
  336. //
  337. // -------------------------------------------------------- Function Prototypes
  338. //
  339. EFI_STATUS
  340. EfipBcm2709Initialize (
  341. VOID *PlatformBase
  342. );
  343. /*++
  344. Routine Description:
  345. This routine initializes the BCM2709 UEFI device library.
  346. Arguments:
  347. PlatformBase - Supplies the base address for the BCM2709 device registers.
  348. Return Value:
  349. Status code.
  350. --*/
  351. EFI_STATUS
  352. EfipBcm2709InterruptInitialize (
  353. VOID
  354. );
  355. /*++
  356. Routine Description:
  357. This routine initializes a BCM2709 Interrupt Controller.
  358. Arguments:
  359. PlatformBase - Supplies the platform's BCM2709 register base address.
  360. Return Value:
  361. EFI Status code.
  362. --*/
  363. VOID
  364. EfipBcm2709InterruptBeginInterrupt (
  365. UINT32 *InterruptNumber,
  366. VOID **InterruptContext
  367. );
  368. /*++
  369. Routine Description:
  370. This routine is called when an interrupts comes in. This routine is
  371. responsible for reporting the interrupt number.
  372. Arguments:
  373. InterruptNumber - Supplies a pointer where interrupt line number will be
  374. returned.
  375. InterruptContext - Supplies a pointer where the platform can store a
  376. pointer's worth of context that will be passed back when ending the
  377. interrupt.
  378. Return Value:
  379. None.
  380. --*/
  381. VOID
  382. EfipBcm2709InterruptEndInterrupt (
  383. UINT32 InterruptNumber,
  384. VOID *InterruptContext
  385. );
  386. /*++
  387. Routine Description:
  388. This routine is called to finish handling of a platform interrupt. This is
  389. where the End-Of-Interrupt would get sent to the interrupt controller.
  390. Arguments:
  391. InterruptNumber - Supplies the interrupt number that occurred.
  392. InterruptContext - Supplies the context returned by the interrupt
  393. controller when the interrupt began.
  394. Return Value:
  395. None.
  396. --*/
  397. EFI_STATUS
  398. EfipBcm2709InterruptSetInterruptLineState (
  399. UINT32 LineNumber,
  400. BOOLEAN Enabled,
  401. BOOLEAN EdgeTriggered
  402. );
  403. /*++
  404. Routine Description:
  405. This routine enables or disables an interrupt line.
  406. Arguments:
  407. LineNumber - Supplies the line number to enable or disable.
  408. Enabled - Supplies a boolean indicating if the line should be enabled or
  409. disabled.
  410. EdgeTriggered - Supplies a boolean indicating if the interrupt is edge
  411. triggered (TRUE) or level triggered (FALSE).
  412. Return Value:
  413. EFI Status code.
  414. --*/
  415. VOID
  416. EfipBcm2709MailboxSend (
  417. UINT32 Channel,
  418. VOID *Data
  419. );
  420. /*++
  421. Routine Description:
  422. This routine sends the given data to the specified mailbox channel.
  423. Arguments:
  424. Channel - Supplies the mailbox channel to which the data should be sent.
  425. Data - Supplies the data buffer to send to the mailbox.
  426. Return Value:
  427. None.
  428. --*/
  429. EFI_STATUS
  430. EfipBcm2709MailboxReceive (
  431. UINT32 Channel,
  432. VOID **Data
  433. );
  434. /*++
  435. Routine Description:
  436. This routine receives data from the given mailbox channel.
  437. Arguments:
  438. Channel - Supplies the mailbox channel from which data is expected.
  439. Data - Supplies a pointer that receives the data buffer returned by the
  440. mailbox.
  441. Return Value:
  442. Status code.
  443. --*/
  444. EFI_STATUS
  445. EfipBcm2709MailboxSendCommand (
  446. UINT32 Channel,
  447. VOID *Command,
  448. UINT32 CommandSize,
  449. BOOLEAN Set
  450. );
  451. /*++
  452. Routine Description:
  453. This routine sends the given command to the given channel of the BCM2709's
  454. mailbox. If it is a GET request, then the data will be returned in the
  455. supplied command buffer.
  456. Arguments:
  457. Channel - Supplies the mailbox channel that is to receive the command.
  458. Command - Supplies the command to send.
  459. CommandSize - Supplies the size of the command to send.
  460. Set - Supplies a boolean indicating whether or not the command is a SET
  461. (TRUE) or GET (FALSE) request.
  462. Return Value:
  463. Status code.
  464. --*/
  465. EFI_STATUS
  466. EfipBcm2709TimerInitialize (
  467. PBCM2709_TIMER Timer
  468. );
  469. /*++
  470. Routine Description:
  471. This routine initializes a BCM2709 timer.
  472. Arguments:
  473. Timer - Supplies the pointer to the timer data.
  474. Return Value:
  475. Status code.
  476. --*/
  477. UINT64
  478. EfipBcm2709TimerRead (
  479. PBCM2709_TIMER Timer
  480. );
  481. /*++
  482. Routine Description:
  483. This routine returns the hardware counter's raw value.
  484. Arguments:
  485. Timer - Supplies the pointer to the timer data.
  486. Return Value:
  487. Returns the timer's current count.
  488. --*/
  489. VOID
  490. EfipBcm2709TimerArm (
  491. PBCM2709_TIMER Timer,
  492. UINT64 TickCount
  493. );
  494. /*++
  495. Routine Description:
  496. This routine arms the timer to fire an interrupt after the specified number
  497. of ticks.
  498. Arguments:
  499. Timer - Supplies the pointer to the timer data.
  500. Periodic - Supplies a boolean indicating if the timer should be armed
  501. periodically or one-shot.
  502. TickCount - Supplies the interval, in ticks, from now for the timer to fire
  503. in.
  504. Return Value:
  505. None.
  506. --*/
  507. VOID
  508. EfipBcm2709TimerDisarm (
  509. PBCM2709_TIMER Timer
  510. );
  511. /*++
  512. Routine Description:
  513. This routine disarms the timer, stopping interrupts from firing.
  514. Arguments:
  515. Timer - Supplies the pointer to the timer data.
  516. Return Value:
  517. None.
  518. --*/
  519. VOID
  520. EfipBcm2709TimerAcknowledgeInterrupt (
  521. PBCM2709_TIMER Timer
  522. );
  523. /*++
  524. Routine Description:
  525. This routine performs any actions necessary upon reciept of a timer's
  526. interrupt. This may involve writing to an acknowledge register to re-enable
  527. the timer to fire again, or other hardware specific actions.
  528. Arguments:
  529. Timer - Supplies the pointer to the timer data.
  530. Return Value:
  531. None.
  532. --*/
  533. EFI_STATUS
  534. EfipBcm2709GetInitialMemoryMap (
  535. EFI_MEMORY_DESCRIPTOR **Map,
  536. UINTN *MapSize
  537. );
  538. /*++
  539. Routine Description:
  540. This routine returns the initial platform memory map to the EFI core. The
  541. core maintains this memory map. The memory map returned does not need to
  542. take into account the firmware image itself or stack, the EFI core will
  543. reserve those regions automatically.
  544. Arguments:
  545. Map - Supplies a pointer where the array of memory descriptors constituting
  546. the initial memory map is returned on success. The EFI core will make
  547. a copy of these descriptors, so they can be in read-only or
  548. temporary memory.
  549. MapSize - Supplies a pointer where the number of elements in the initial
  550. memory map will be returned on success.
  551. Return Value:
  552. EFI status code.
  553. --*/
  554. EFI_STATUS
  555. EfipBcm2709GpioFunctionSelect (
  556. UINT32 Pin,
  557. UINT32 Mode
  558. );
  559. /*++
  560. Routine Description:
  561. This routine sets the given mode for the pin's function select.
  562. Arguments:
  563. Pin - Supplies the GPIO pin whose function select to modify.
  564. Mode - Supplies the function select mode to set.
  565. Return Value:
  566. EFI status code.
  567. --*/
  568. EFI_STATUS
  569. EfipBcm2709UsbInitialize (
  570. VOID
  571. );
  572. /*++
  573. Routine Description:
  574. This routine initialize the USB device on Broadcom 2709 SoCs.
  575. Arguments:
  576. None.
  577. Return Value:
  578. None.
  579. --*/
  580. EFI_STATUS
  581. EfipBcm2709EnumerateSd (
  582. VOID
  583. );
  584. /*++
  585. Routine Description:
  586. This routine enumerates the SD card on the BCM2709.
  587. Arguments:
  588. None.
  589. Return Value:
  590. EFI status code.
  591. --*/
  592. EFI_STATUS
  593. EfipBcm2709EnumerateVideo (
  594. VOID
  595. );
  596. /*++
  597. Routine Description:
  598. This routine enumerates the display on BCM2709 SoCs.
  599. Arguments:
  600. None.
  601. Return Value:
  602. EFI status code.
  603. --*/
  604. EFI_STATUS
  605. EfipBcm2709EnumerateSerial (
  606. VOID
  607. );
  608. /*++
  609. Routine Description:
  610. This routine enumerates the serial port on BCM2709 SoCs.
  611. Arguments:
  612. None.
  613. Return Value:
  614. EFI status code.
  615. --*/