AcpiTablePcds.c 1.4 KB

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