]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c
EmbeddedPkg: introduce PlatformHasAcpiLib
[mirror_edk2.git] / EmbeddedPkg / Library / PlatformHasAcpiLib / PlatformHasAcpiLib.c
diff --git a/EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c b/EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c
new file mode 100644 (file)
index 0000000..2c73e71
--- /dev/null
@@ -0,0 +1,36 @@
+/** @file\r
+  A hook-in library for MdeModulePkg/Universal/Acpi/AcpiTableDxe.\r
+\r
+  Plugging this library instance into AcpiTableDxe makes\r
+  EFI_ACPI_TABLE_PROTOCOL and (if enabled) EFI_ACPI_SDT_PROTOCOL depend on the\r
+  platform's dynamic decision whether to expose an ACPI-based hardware\r
+  description to the operating system.\r
+\r
+  Universal and platform specific DXE drivers that produce ACPI tables depend\r
+  on EFI_ACPI_TABLE_PROTOCOL / EFI_ACPI_SDT_PROTOCOL in turn.\r
+\r
+  Copyright (C) 2017, Red Hat, Inc.\r
+\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution. The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
+#include <Base.h>\r
+\r
+RETURN_STATUS\r
+EFIAPI\r
+PlatformHasAcpiInitialize (\r
+  VOID\r
+  )\r
+{\r
+  //\r
+  // Do nothing, just imbue AcpiTableDxe with a protocol dependency on\r
+  // EDKII_PLATFORM_HAS_ACPI_GUID.\r
+  //\r
+  return RETURN_SUCCESS;\r
+}\r