memmap.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. memmap.c
  5. Abstract:
  6. This module implements support for returning the initial memory map on the
  7. Raspberry Pi 2.
  8. Author:
  9. Chris Stevens 19-Mar-2015
  10. Environment:
  11. Firmware
  12. --*/
  13. //
  14. // ------------------------------------------------------------------- Includes
  15. //
  16. #include <uefifw.h>
  17. #include "rpi2fw.h"
  18. //
  19. // ---------------------------------------------------------------- Definitions
  20. //
  21. //
  22. // ------------------------------------------------------ Data Type Definitions
  23. //
  24. //
  25. // ----------------------------------------------- Internal Function Prototypes
  26. //
  27. //
  28. // -------------------------------------------------------------------- Globals
  29. //
  30. //
  31. // ------------------------------------------------------------------ Functions
  32. //
  33. EFI_STATUS
  34. EfiPlatformGetInitialMemoryMap (
  35. EFI_MEMORY_DESCRIPTOR **Map,
  36. UINTN *MapSize
  37. )
  38. /*++
  39. Routine Description:
  40. This routine returns the initial platform memory map to the EFI core. The
  41. core maintains this memory map. The memory map returned does not need to
  42. take into account the firmware image itself or stack, the EFI core will
  43. reserve those regions automatically.
  44. Arguments:
  45. Map - Supplies a pointer where the array of memory descriptors constituting
  46. the initial memory map is returned on success. The EFI core will make
  47. a copy of these descriptors, so they can be in read-only or
  48. temporary memory.
  49. MapSize - Supplies a pointer where the number of elements in the initial
  50. memory map will be returned on success.
  51. Return Value:
  52. EFI status code.
  53. --*/
  54. {
  55. return EfipBcm2709GetInitialMemoryMap(Map, MapSize);
  56. }
  57. //
  58. // --------------------------------------------------------- Internal Functions
  59. //