EntryPoint.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** @file
  2. Entry point of OVMF ACPI Platform Driver for Xen guests
  3. Copyright (C) 2015-2021, Red Hat, Inc.
  4. Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #include <Library/DebugLib.h> // ASSERT_EFI_ERROR()
  8. #include <Library/UefiBootServicesTableLib.h> // gBS
  9. #include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
  10. #include "AcpiPlatform.h"
  11. STATIC
  12. EFI_ACPI_TABLE_PROTOCOL *
  13. FindAcpiTableProtocol (
  14. VOID
  15. )
  16. {
  17. EFI_STATUS Status;
  18. EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
  19. Status = gBS->LocateProtocol (
  20. &gEfiAcpiTableProtocolGuid,
  21. NULL,
  22. (VOID **)&AcpiTable
  23. );
  24. ASSERT_EFI_ERROR (Status);
  25. return AcpiTable;
  26. }
  27. EFI_STATUS
  28. EFIAPI
  29. AcpiPlatformEntryPoint (
  30. IN EFI_HANDLE ImageHandle,
  31. IN EFI_SYSTEM_TABLE *SystemTable
  32. )
  33. {
  34. return InstallAcpiTables (FindAcpiTableProtocol ());
  35. }