]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Include/Library/QemuFwCfgLib.h
OvmfPkg, ArmVirtPkg: clean up SetBootOrderFromQemu() parameter list
[mirror_edk2.git] / OvmfPkg / Include / Library / QemuFwCfgLib.h
index 9d023777c9d8cd8d00d38fff5dda997983b24baf..baaa257d6188ece06ef4cd7815fd265e8cc946ff 100644 (file)
@@ -2,6 +2,8 @@
   QEMU/KVM Firmware Configuration access\r
 \r
   Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (C) 2013, Red Hat, Inc.\r
+\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
 #ifndef __FW_CFG_LIB__\r
 #define __FW_CFG_LIB__\r
 \r
+//\r
+// The size, in bytes, of names of firmware configuration files, including at\r
+// least one terminating NUL byte.\r
+//\r
+#define QEMU_FW_CFG_FNAME_SIZE 56\r
+\r
 typedef enum {\r
   QemuFwCfgItemSignature            = 0x0000,\r
   QemuFwCfgItemInterfaceVersion     = 0x0001,\r
@@ -56,6 +64,8 @@ typedef enum {
   Returns a boolean indicating if the firmware configuration interface\r
   is available or not.\r
 \r
+  This function may change fw_cfg state.\r
+\r
   @retval    TRUE   The interface is available\r
   @retval    FALSE  The interface is not available\r
 \r
@@ -193,5 +203,36 @@ QemuFwCfgFindFile (
   OUT  FIRMWARE_CONFIG_ITEM  *Item,\r
   OUT  UINTN                 *Size\r
   );\r
+\r
+\r
+/**\r
+  Returns a boolean indicating if the firmware configuration interface is\r
+  available for library-internal purposes.\r
+\r
+  This function never changes fw_cfg state.\r
+\r
+  @retval    TRUE   The interface is available internally.\r
+  @retval    FALSE  The interface is not available internally.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+InternalQemuFwCfgIsAvailable (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Determine if S3 support is explicitly enabled.\r
+\r
+  @retval  TRUE   if S3 support is explicitly enabled.\r
+           FALSE  otherwise. This includes unavailability of the firmware\r
+                  configuration interface.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+QemuFwCfgS3Enabled (\r
+  VOID\r
+  );\r
+\r
 #endif\r
 \r