]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg, OvmfPkg: QemuFwCfgLib: move DMA-related defs to lib class
authorLaszlo Ersek <lersek@redhat.com>
Wed, 30 Nov 2016 10:35:00 +0000 (11:35 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Mon, 5 Dec 2016 18:44:36 +0000 (19:44 +0100)
Move the type and macro definitions related to QEMU's DMA-like fw_cfg
access method to the library class header.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
OvmfPkg/Include/Library/QemuFwCfgLib.h

index 2fd8d90505660e1226189b5f11dce0a347704e36..6033a2a14c4202f7cbf358d4c298672c4f5b7623 100644 (file)
@@ -53,26 +53,6 @@ STATIC READ_BYTES_FUNCTION DmaReadBytes;
 //\r
 STATIC READ_BYTES_FUNCTION *InternalQemuFwCfgReadBytes = MmioReadBytes;\r
 \r
 //\r
 STATIC READ_BYTES_FUNCTION *InternalQemuFwCfgReadBytes = MmioReadBytes;\r
 \r
-//\r
-// Communication structure for DmaReadBytes(). All fields are encoded in big\r
-// 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
-// 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
 \r
 /**\r
   Returns a boolean indicating if the firmware configuration interface\r
 \r
 /**\r
   Returns a boolean indicating if the firmware configuration interface\r
index 7c29422fbd722c0d3b7c41e1b3f99fc0c23cb350..40a07456c5308ebc699cf9eddad8485ea0919368 100644 (file)
 //\r
 #define QEMU_FW_CFG_FNAME_SIZE 56\r
 \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
 typedef enum {\r
   QemuFwCfgItemSignature            = 0x0000,\r
   QemuFwCfgItemInterfaceVersion     = 0x0001,\r
@@ -59,6 +67,17 @@ typedef enum {
 \r
 } FIRMWARE_CONFIG_ITEM;\r
 \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
   Returns a boolean indicating if the firmware configuration interface\r