PeiTiogaPassInitPostMemLib.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /** @file
  2. Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
  3. Copyright (c) 2021, American Megatrends International LLC.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #include <PiPei.h>
  7. #include <Library/DebugLib.h>
  8. #include <Library/BaseMemoryLib.h>
  9. #include <Library/IoLib.h>
  10. #include <Library/HobLib.h>
  11. #include <Library/PcdLib.h>
  12. #include <Library/PciLib.h>
  13. #include <Library/BoardInitLib.h>
  14. #include <Setup/IioUniversalData.h>
  15. #include "PeiTiogaPassInitLib.h"
  16. VOID
  17. GetIioUdsHob (
  18. IN IIO_UDS **UdsHobPtr
  19. )
  20. {
  21. EFI_GUID UniversalDataGuid = IIO_UNIVERSAL_DATA_GUID;
  22. EFI_HOB_GUID_TYPE *GuidHob;
  23. ASSERT(UdsHobPtr);
  24. *UdsHobPtr = NULL;
  25. GuidHob = GetFirstGuidHob (&UniversalDataGuid);
  26. if (GuidHob){
  27. *UdsHobPtr = GET_GUID_HOB_DATA (GuidHob);
  28. return;
  29. }
  30. ASSERT(FALSE);
  31. }
  32. EFI_STATUS
  33. EFIAPI
  34. TiogaPassBoardInitBeforeSiliconInit (
  35. VOID
  36. )
  37. {
  38. return EFI_SUCCESS;
  39. }
  40. EFI_STATUS
  41. EFIAPI
  42. TiogaPassBoardInitAfterSiliconInit (
  43. VOID
  44. )
  45. {
  46. IIO_UDS *IioUds;
  47. DEBUG((EFI_D_ERROR, "TiogaPassBoardInitAfterSiliconInit\n"));
  48. GetIioUdsHob(&IioUds);
  49. DEBUG ((EFI_D_ERROR, "Memory TOLM: %X\n", IioUds->PlatformData.MemTolm));
  50. DEBUG (
  51. (EFI_D_ERROR,
  52. "PCIE BASE: %lX Size : %X\n",
  53. IioUds->PlatformData.PciExpressBase,
  54. IioUds->PlatformData.PciExpressSize)
  55. );
  56. DEBUG (
  57. (EFI_D_ERROR,
  58. "PCI32 BASE: %X Limit: %X\n",
  59. IioUds->PlatformData.PlatGlobalMmiolBase,
  60. IioUds->PlatformData.PlatGlobalMmiolLimit)
  61. );
  62. DEBUG (
  63. (EFI_D_ERROR,
  64. "PCI64 BASE: %lX Limit: %lX\n",
  65. IioUds->PlatformData.PlatGlobalMmiohBase,
  66. IioUds->PlatformData.PlatGlobalMmiohLimit)
  67. );
  68. DEBUG ((EFI_D_ERROR, "UC START: %lX End : %lX\n", IioUds->PlatformData.PlatGlobalMmiohBase, (IioUds->PlatformData.PlatGlobalMmiohLimit + 1)));
  69. return EFI_SUCCESS;
  70. }