Platform.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /** @file
  2. Platform PEI module include file.
  3. Copyright (c) 2022 Loongson Technology Corporation Limited. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef PLATFORM_H_
  7. #define PLATFORM_H_
  8. #include <IndustryStandard/Pci22.h>
  9. /**
  10. Create system type memory range hand off block.
  11. @param MemoryBase memory base address.
  12. @param MemoryLimit memory length.
  13. @return VOID
  14. **/
  15. VOID
  16. AddMemoryBaseSizeHob (
  17. EFI_PHYSICAL_ADDRESS MemoryBase,
  18. UINT64 MemorySize
  19. );
  20. /**
  21. Create memory range hand off block.
  22. @param MemoryBase memory base address.
  23. @param MemoryLimit memory length.
  24. @return VOID
  25. **/
  26. VOID
  27. AddMemoryRangeHob (
  28. EFI_PHYSICAL_ADDRESS MemoryBase,
  29. EFI_PHYSICAL_ADDRESS MemoryLimit
  30. );
  31. /**
  32. Create Reserved type memory range hand off block.
  33. @param MemoryBase memory base address.
  34. @param MemoryLimit memory length.
  35. @return VOID
  36. **/
  37. VOID
  38. AddReservedMemoryBaseSizeHob (
  39. EFI_PHYSICAL_ADDRESS MemoryBase,
  40. UINT64 MemorySize
  41. );
  42. /**
  43. Publish PEI core memory
  44. @return EFI_SUCCESS The PEIM initialized successfully.
  45. **/
  46. EFI_STATUS
  47. PublishPeiMemory (
  48. VOID
  49. );
  50. /**
  51. Publish system RAM and reserve memory regions
  52. @return VOID
  53. **/
  54. VOID
  55. InitializeRamRegions (
  56. VOID
  57. );
  58. /**
  59. Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
  60. and DXE know about them.
  61. @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
  62. **/
  63. EFI_STATUS
  64. PeiFvInitialization (
  65. VOID
  66. );
  67. #endif // PLATFORM_H_