PlatformInit.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /** @file
  2. Sample to provide platform init function.
  3. @copyright
  4. Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #include <PiPei.h>
  8. #include <Library/DebugLib.h>
  9. #include <Library/SerialPortLib.h>
  10. #include <Library/SecBoardInitLib.h>
  11. #include <Library/TestPointCheckLib.h>
  12. /**
  13. Platform initialization.
  14. @param[in] FspHobList HobList produced by FSP.
  15. @param[in] StartOfRange Start of temporary RAM.
  16. @param[in] EndOfRange End of temporary RAM.
  17. **/
  18. VOID
  19. EFIAPI
  20. PlatformInit (
  21. IN VOID *FspHobList,
  22. IN VOID *StartOfRange,
  23. IN VOID *EndOfRange
  24. )
  25. {
  26. //
  27. // Platform initialization
  28. // Enable Serial port here
  29. //
  30. if (PcdGetBool(PcdSecSerialPortDebugEnable)) {
  31. SerialPortInitialize ();
  32. }
  33. DEBUG ((DEBUG_INFO, "PrintPeiCoreEntryPointParam in PlatformInit\n"));
  34. DEBUG ((DEBUG_INFO, "FspHobList - 0x%x\n", FspHobList));
  35. DEBUG ((DEBUG_INFO, "StartOfRange - 0x%x\n", StartOfRange));
  36. DEBUG ((DEBUG_INFO, "EndOfRange - 0x%x\n", EndOfRange));
  37. BoardAfterTempRamInit ();
  38. TestPointTempMemoryFunction (StartOfRange, EndOfRange);
  39. }