AcpiTablePcds.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /** @file
  2. ACPI table pcds update.
  3. @copyright
  4. Copyright 2015 - 2021 Intel Corporation. <BR>
  5. Copyright (c) 2021, American Megatrends International LLC. <BR>
  6. SPDX-License-Identifier: BSD-2-Clause-Patent
  7. **/
  8. #include "PeiBoardInit.h"
  9. #include <Library/PcdLib.h>
  10. #include <Library/HobLib.h>
  11. #include <Guid/PlatformInfo.h>
  12. #include <UncoreCommonIncludes.h>
  13. #include <Cpu/CpuIds.h>
  14. EFI_STATUS
  15. TypeJunctionCityPlatformUpdateAcpiTablePcds (
  16. VOID
  17. )
  18. {
  19. CHAR8 AcpiName10nm[] = "EPRP10NM"; // USED for identify ACPI table for 10nm in systmeboard dxe driver
  20. CHAR8 OemTableIdXhci[] = "xh_nccrb";
  21. UINTN Size;
  22. EFI_STATUS Status;
  23. EFI_HOB_GUID_TYPE *GuidHob;
  24. EFI_PLATFORM_INFO *PlatformInfo;
  25. DEBUG ((DEBUG_INFO, "Uba Callback: PlatformUpdateAcpiTablePcds entered\n"));
  26. GuidHob = GetFirstGuidHob (&gEfiPlatformInfoGuid);
  27. ASSERT (GuidHob != NULL);
  28. if (GuidHob == NULL) {
  29. return EFI_NOT_FOUND;
  30. }
  31. PlatformInfo = GET_GUID_HOB_DATA (GuidHob);
  32. //#
  33. //#ACPI items
  34. //#
  35. Size = AsciiStrSize (AcpiName10nm);
  36. Status = PcdSetPtrS (PcdOemSkuAcpiName , &Size, AcpiName10nm);
  37. DEBUG ((DEBUG_INFO, "%a TypeJunctionCity ICX\n", __FUNCTION__));
  38. ASSERT_EFI_ERROR (Status);
  39. Size = AsciiStrSize (OemTableIdXhci);
  40. Status = PcdSetPtrS (PcdOemTableIdXhci , &Size, OemTableIdXhci);
  41. ASSERT_EFI_ERROR (Status);
  42. return Status;
  43. }