diff options
author | Laszlo Ersek <lersek@redhat.com> | 2017-02-08 17:14:34 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-02-21 13:10:33 +0100 |
commit | 774f52f6debdc3ba4e43bb6f49b1223ca727241b (patch) | |
tree | 7ca71e2c12cf8b24f29fd925890468055c606680 /OvmfPkg | |
parent | 75ccd1d89e78d4aa3ba3facbdada897149ff7091 (diff) | |
download | edk2-platforms-774f52f6debdc3ba4e43bb6f49b1223ca727241b.tar.xz |
OvmfPkg/AcpiPlatformDxe: add QEMU_LOADER_WRITE_POINTER definitions
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/QemuLoader.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuLoader.h b/OvmfPkg/AcpiPlatformDxe/QemuLoader.h index b29944378d..437776d86d 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuLoader.h +++ b/OvmfPkg/AcpiPlatformDxe/QemuLoader.h @@ -28,6 +28,7 @@ typedef enum { QemuLoaderCmdAllocate = 1,
QemuLoaderCmdAddPointer,
QemuLoaderCmdAddChecksum,
+ QemuLoaderCmdWritePointer,
} QEMU_LOADER_COMMAND_TYPE;
typedef enum {
@@ -72,12 +73,37 @@ typedef struct { UINT32 Length;
} QEMU_LOADER_ADD_CHECKSUM;
+//
+// QemuLoaderCmdWritePointer: the bytes at
+// [PointerOffset..PointerOffset+PointerSize) in the writeable fw_cfg file
+// PointerFile are to receive the absolute address of PointeeFile, as allocated
+// and downloaded by the firmware, incremented by the value of PointeeOffset.
+// Store the sum of (a) the base address of where PointeeFile's contents have
+// been placed (when QemuLoaderCmdAllocate has been executed for PointeeFile)
+// and (b) PointeeOffset, to this portion of PointerFile.
+//
+// This command is similar to QemuLoaderCmdAddPointer; the difference is that
+// the "pointer to patch" does not exist in guest-physical address space, only
+// in "fw_cfg file space". In addition, the "pointer to patch" is not
+// initialized by QEMU in-place with a possibly nonzero offset value: the
+// relative offset into PointeeFile comes from the explicit PointeeOffset
+// field.
+//
+typedef struct {
+ UINT8 PointerFile[QEMU_LOADER_FNAME_SIZE]; // NUL-terminated
+ UINT8 PointeeFile[QEMU_LOADER_FNAME_SIZE]; // NUL-terminated
+ UINT32 PointerOffset;
+ UINT32 PointeeOffset;
+ UINT8 PointerSize; // one of 1, 2, 4, 8
+} QEMU_LOADER_WRITE_POINTER;
+
typedef struct {
UINT32 Type; // QEMU_LOADER_COMMAND_TYPE values
union {
QEMU_LOADER_ALLOCATE Allocate;
QEMU_LOADER_ADD_POINTER AddPointer;
QEMU_LOADER_ADD_CHECKSUM AddChecksum;
+ QEMU_LOADER_WRITE_POINTER WritePointer;
UINT8 Padding[124];
} Command;
} QEMU_LOADER_ENTRY;
|