]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: add QEMU_LOADER_WRITE_POINTER definitions
authorLaszlo Ersek <lersek@redhat.com>
Wed, 8 Feb 2017 16:14:34 +0000 (17:14 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 21 Feb 2017 12:10:33 +0000 (13:10 +0100)
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=359
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/AcpiPlatformDxe/QemuLoader.h

index b29944378d762ff12274312d3cd38fff71e3c1e8..437776d86d9a0351d86c71db66541fad9eb24112 100644 (file)
@@ -28,6 +28,7 @@ typedef enum {
   QemuLoaderCmdAllocate = 1,\r
   QemuLoaderCmdAddPointer,\r
   QemuLoaderCmdAddChecksum,\r
+  QemuLoaderCmdWritePointer,\r
 } QEMU_LOADER_COMMAND_TYPE;\r
 \r
 typedef enum {\r
@@ -72,12 +73,37 @@ typedef struct {
   UINT32 Length;\r
 } QEMU_LOADER_ADD_CHECKSUM;\r
 \r
+//\r
+// QemuLoaderCmdWritePointer: the bytes at\r
+// [PointerOffset..PointerOffset+PointerSize) in the writeable fw_cfg file\r
+// PointerFile are to receive the absolute address of PointeeFile, as allocated\r
+// and downloaded by the firmware, incremented by the value of PointeeOffset.\r
+// Store the sum of (a) the base address of where PointeeFile's contents have\r
+// been placed (when QemuLoaderCmdAllocate has been executed for PointeeFile)\r
+// and (b) PointeeOffset, to this portion of PointerFile.\r
+//\r
+// This command is similar to QemuLoaderCmdAddPointer; the difference is that\r
+// the "pointer to patch" does not exist in guest-physical address space, only\r
+// in "fw_cfg file space". In addition, the "pointer to patch" is not\r
+// initialized by QEMU in-place with a possibly nonzero offset value: the\r
+// relative offset into PointeeFile comes from the explicit PointeeOffset\r
+// field.\r
+//\r
+typedef struct {\r
+  UINT8  PointerFile[QEMU_LOADER_FNAME_SIZE]; // NUL-terminated\r
+  UINT8  PointeeFile[QEMU_LOADER_FNAME_SIZE]; // NUL-terminated\r
+  UINT32 PointerOffset;\r
+  UINT32 PointeeOffset;\r
+  UINT8  PointerSize;                         // one of 1, 2, 4, 8\r
+} QEMU_LOADER_WRITE_POINTER;\r
+\r
 typedef struct {\r
   UINT32 Type;                             // QEMU_LOADER_COMMAND_TYPE values\r
   union {\r
     QEMU_LOADER_ALLOCATE      Allocate;\r
     QEMU_LOADER_ADD_POINTER   AddPointer;\r
     QEMU_LOADER_ADD_CHECKSUM  AddChecksum;\r
+    QEMU_LOADER_WRITE_POINTER WritePointer;\r
     UINT8                     Padding[124];\r
   } Command;\r
 } QEMU_LOADER_ENTRY;\r