]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: Add QEMU fw-cfg only driver
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 2 Feb 2015 19:09:02 +0000 (19:09 +0000)
committerlersek <lersek@Edk2>
Mon, 2 Feb 2015 19:09:02 +0000 (19:09 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16697 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatform.c [new file with mode: 0644]
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf [new file with mode: 0644]

diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatform.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatform.c
new file mode 100644 (file)
index 0000000..88512ba
--- /dev/null
@@ -0,0 +1,52 @@
+/** @file\r
+  OVMF ACPI Platform Driver using QEMU's fw-cfg interface\r
+\r
+  Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this 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,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "AcpiPlatform.h"\r
+\r
+/**\r
+  Entrypoint of Acpi Platform driver.\r
+\r
+  @param  ImageHandle\r
+  @param  SystemTable\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_LOAD_ERROR\r
+  @return EFI_OUT_OF_RESOURCES\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+QemuFwCfgAcpiPlatformEntryPoint (\r
+  IN EFI_HANDLE         ImageHandle,\r
+  IN EFI_SYSTEM_TABLE   *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS                         Status;\r
+  EFI_ACPI_TABLE_PROTOCOL            *AcpiTable;\r
+\r
+  //\r
+  // Find the AcpiTable protocol\r
+  //\r
+  Status = gBS->LocateProtocol (\r
+                  &gEfiAcpiTableProtocolGuid,\r
+                  NULL,\r
+                  (VOID**)&AcpiTable\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_ABORTED;\r
+  }\r
+\r
+  Status = InstallAllQemuLinkedTables (AcpiTable);\r
+  return Status;\r
+}\r
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
new file mode 100644 (file)
index 0000000..56f9510
--- /dev/null
@@ -0,0 +1,53 @@
+## @file\r
+#  OVMF ACPI Platform Driver using QEMU's fw-cfg interface\r
+#\r
+#  Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this 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,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = QemuFwCfgAcpiPlatform\r
+  FILE_GUID                      = 17985e6f-e778-4d94-aefa-c5dd2b77e186\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  ENTRY_POINT                    = QemuFwCfgAcpiPlatformEntryPoint\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64\r
+#\r
+\r
+[Sources]\r
+  QemuFwCfgAcpiPlatform.c\r
+  QemuFwCfgAcpi.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  DebugLib\r
+  MemoryAllocationLib\r
+  OrderedCollectionLib\r
+  QemuFwCfgLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+\r
+[Protocols]\r
+  gEfiAcpiTableProtocolGuid                     # PROTOCOL ALWAYS_CONSUMED\r
+\r
+[Depex]\r
+  gEfiAcpiTableProtocolGuid\r
+\r
+[Depex.IA32, Depex.X64]\r
+  gEfiPciEnumerationCompleteProtocolGuid\r