diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-16 22:10:43 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 17:16:23 +0000 |
commit | 6a2dc768f058ce96479e7ed524d27fcf59657f5b (patch) | |
tree | ad8f187a2abaaa87c540fc701c369dbadc9591b0 /OvmfPkg/VirtioFsDxe/VirtioFsDxe.h | |
parent | 6578cacb4654b0673194c4771f3ed793e7c09f31 (diff) | |
download | edk2-6a2dc768f058ce96479e7ed524d27fcf59657f5b.tar.gz edk2-6a2dc768f058ce96479e7ed524d27fcf59657f5b.tar.bz2 edk2-6a2dc768f058ce96479e7ed524d27fcf59657f5b.zip |
OvmfPkg/VirtioFsDxe: introduce the basic FUSE request/response headers
Introduce the VIRTIO_FS_FUSE_REQUEST and VIRTIO_FS_FUSE_RESPONSE
structures, which are the common headers for the various FUSE
request/response structures.
Introduce the VirtioFsFuseNewRequest() helper function for populating
VIRTIO_FS_FUSE_REQUEST, from parameters and from a VIRTIO_FS-level request
counter.
Introduce the VirtioFsFuseCheckResponse() helper function for verifying
most FUSE response types that begin with the VIRTIO_FS_FUSE_RESPONSE
header.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-7-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'OvmfPkg/VirtioFsDxe/VirtioFsDxe.h')
-rw-r--r-- | OvmfPkg/VirtioFsDxe/VirtioFsDxe.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h index 12acbd6dc3..f7eae9a4b7 100644 --- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h +++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h @@ -44,6 +44,7 @@ typedef struct { UINT16 QueueSize; // VirtioFsInit 1
VRING Ring; // VirtioRingInit 2
VOID *RingMap; // VirtioRingMap 2
+ UINT64 RequestId; // DriverBindingStart 0
EFI_EVENT ExitBoot; // DriverBindingStart 0
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL SimpleFs; // DriverBindingStart 0
} VIRTIO_FS;
@@ -132,6 +133,22 @@ VirtioFsSgListsSubmit ( IN OUT VIRTIO_FS_SCATTER_GATHER_LIST *ResponseSgList OPTIONAL
);
+EFI_STATUS
+VirtioFsFuseNewRequest (
+ IN OUT VIRTIO_FS *VirtioFs,
+ OUT VIRTIO_FS_FUSE_REQUEST *Request,
+ IN UINT32 RequestSize,
+ IN UINT32 Opcode,
+ IN UINT64 NodeId
+ );
+
+EFI_STATUS
+VirtioFsFuseCheckResponse (
+ IN VIRTIO_FS_SCATTER_GATHER_LIST *ResponseSgList,
+ IN UINT64 RequestId,
+ OUT UINTN *TailBufferFill
+ );
+
//
// EFI_SIMPLE_FILE_SYSTEM_PROTOCOL member functions for the Virtio Filesystem
// driver.
|