#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
+//\r
+// Macros for the FW_CFG_DMA_ACCESS.Control bitmap (in native encoding).\r
+//\r
+#define FW_CFG_DMA_CTL_ERROR BIT0\r
+#define FW_CFG_DMA_CTL_READ BIT1\r
+#define FW_CFG_DMA_CTL_SKIP BIT2\r
+#define FW_CFG_DMA_CTL_SELECT BIT3\r
+\r
typedef enum {\r
QemuFwCfgItemSignature = 0x0000,\r
QemuFwCfgItemInterfaceVersion = 0x0001,\r
\r
} FIRMWARE_CONFIG_ITEM;\r
\r
+//\r
+// Communication structure for the DMA access method. All fields are encoded in\r
+// big endian.\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+ UINT32 Control;\r
+ UINT32 Length;\r
+ UINT64 Address;\r
+} FW_CFG_DMA_ACCESS;\r
+#pragma pack ()\r
\r
/**\r
Returns a boolean indicating if the firmware configuration interface\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
+ Determine if S3 support is explicitly enabled.\r
\r
- @retval TRUE The interface is available internally.\r
- @retval FALSE The interface is not available internally.\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
-InternalQemuFwCfgIsAvailable (\r
+QemuFwCfgS3Enabled (\r
VOID\r
);\r
\r