DxeTiogaPassAcpiTableLib.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 <Base.h>
  7. #include <Uefi.h>
  8. #include <PiDxe.h>
  9. #include <Library/BaseLib.h>
  10. #include <Library/IoLib.h>
  11. #include <Library/BoardAcpiTableLib.h>
  12. #include <Library/PcdLib.h>
  13. #include <Library/DebugLib.h>
  14. #include <Library/UefiBootServicesTableLib.h>
  15. #include <Acpi/GlobalNvsAreaDef.h>
  16. GLOBAL_REMOVE_IF_UNREFERENCED BIOS_ACPI_PARAM *mGlobalNvsArea;
  17. VOID
  18. TiogaPassUpdateGlobalNvs (
  19. VOID
  20. )
  21. {
  22. //
  23. // Allocate and initialize the NVS area for SMM and ASL communication.
  24. //
  25. mGlobalNvsArea = (VOID *)(UINTN)PcdGet64 (PcdAcpiGnvsAddress);
  26. //
  27. // Update global NVS area for ASL and SMM init code to use
  28. //
  29. }
  30. EFI_STATUS
  31. EFIAPI
  32. TiogaPassBoardUpdateAcpiTable (
  33. IN OUT EFI_ACPI_COMMON_HEADER *Table,
  34. IN OUT EFI_ACPI_TABLE_VERSION *Version
  35. )
  36. {
  37. if (Table->Signature == EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) {
  38. TiogaPassUpdateGlobalNvs ();
  39. }
  40. return EFI_SUCCESS;
  41. }