memmap.c 2.0 KB

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