QemuLoaderCmdAllocate = 1,\r
QemuLoaderCmdAddPointer,\r
QemuLoaderCmdAddChecksum,\r
+ QemuLoaderCmdWritePointer,\r
} QEMU_LOADER_COMMAND_TYPE;\r
\r
typedef enum {\r
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