init.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. init.c
  5. Abstract:
  6. This module implements initialization support for the BCM2709 UEFI device
  7. library.
  8. Author:
  9. Chris Stevens 19-Mar-2015
  10. Environment:
  11. Firmware
  12. --*/
  13. //
  14. // ------------------------------------------------------------------- Includes
  15. //
  16. #include <uefifw.h>
  17. #include <dev/bcm2709.h>
  18. //
  19. // --------------------------------------------------------------------- Macros
  20. //
  21. //
  22. // ---------------------------------------------------------------- Definitions
  23. //
  24. //
  25. // ------------------------------------------------------ Data Type Definitions
  26. //
  27. //
  28. // ----------------------------------------------- Internal Function Prototypes
  29. //
  30. //
  31. // -------------------------------------------------------------------- Globals
  32. //
  33. //
  34. // Store the base address of the BCM2709 device registers.
  35. //
  36. VOID *EfiBcm2709Base;
  37. //
  38. // Store whether or not the BCM2709 device library has been initialized.
  39. //
  40. BOOLEAN EfiBcm2709Initialized = FALSE;
  41. //
  42. // ------------------------------------------------------------------ Functions
  43. //
  44. EFI_STATUS
  45. EfipBcm2709Initialize (
  46. VOID *PlatformBase
  47. )
  48. /*++
  49. Routine Description:
  50. This routine initializes the BCM2709 UEFI device library.
  51. Arguments:
  52. PlatformBase - Supplies the base address for the BCM2709 device registers.
  53. Return Value:
  54. Status code.
  55. --*/
  56. {
  57. if (PlatformBase == NULL) {
  58. return EFI_INVALID_PARAMETER;
  59. }
  60. EfiBcm2709Base = PlatformBase;
  61. EfiBcm2709Initialized = TRUE;
  62. return EFI_SUCCESS;
  63. }
  64. //
  65. // --------------------------------------------------------- Internal Functions
  66. //