summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioFsDxe/DriverBinding.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2020-12-16 22:10:43 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-21 17:16:23 +0000
commit6a2dc768f058ce96479e7ed524d27fcf59657f5b (patch)
treead8f187a2abaaa87c540fc701c369dbadc9591b0 /OvmfPkg/VirtioFsDxe/DriverBinding.c
parent6578cacb4654b0673194c4771f3ed793e7c09f31 (diff)
downloadedk2-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/DriverBinding.c')
-rw-r--r--OvmfPkg/VirtioFsDxe/DriverBinding.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/DriverBinding.c b/OvmfPkg/VirtioFsDxe/DriverBinding.c
index b888158a80..4a2787a50a 100644
--- a/OvmfPkg/VirtioFsDxe/DriverBinding.c
+++ b/OvmfPkg/VirtioFsDxe/DriverBinding.c
@@ -84,6 +84,11 @@ VirtioFsBindingStart (
goto CloseVirtio;
}
+ //
+ // Initialize the FUSE request counter.
+ //
+ VirtioFs->RequestId = 1;
+
Status = gBS->CreateEvent (EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_CALLBACK,
VirtioFsExitBoot, VirtioFs, &VirtioFs->ExitBoot);
if (EFI_ERROR (Status)) {