init.c 1.9 KB

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