summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/VirtioFsDxe/VirtioFsDxe.h')
-rw-r--r--OvmfPkg/VirtioFsDxe/VirtioFsDxe.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
index 287defd21f..2aae96ecd7 100644
--- a/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
+++ b/OvmfPkg/VirtioFsDxe/VirtioFsDxe.h
@@ -11,13 +11,22 @@
#define VIRTIO_FS_DXE_H_
#include <Base.h> // SIGNATURE_64()
+#include <IndustryStandard/VirtioFs.h> // VIRTIO_FS_TAG_BYTES
#include <Library/DebugLib.h> // CR()
#include <Protocol/SimpleFileSystem.h> // EFI_SIMPLE_FILE_SYSTEM_PROTOCOL
#include <Protocol/VirtioDevice.h> // VIRTIO_DEVICE_PROTOCOL
+#include <Uefi/UefiBaseType.h> // EFI_EVENT
#define VIRTIO_FS_SIG SIGNATURE_64 ('V', 'I', 'R', 'T', 'I', 'O', 'F', 'S')
//
+// Filesystem label encoded in UCS-2, transformed from the UTF-8 representation
+// in "VIRTIO_FS_CONFIG.Tag", and NUL-terminated. Only the printable ASCII code
+// points (U+0020 through U+007E) are supported.
+//
+typedef CHAR16 VIRTIO_FS_LABEL[VIRTIO_FS_TAG_BYTES + 1];
+
+//
// Main context structure, expressing an EFI_SIMPLE_FILE_SYSTEM_PROTOCOL
// interface on top of the Virtio Filesystem device.
//
@@ -31,6 +40,11 @@ typedef struct {
// ----------- ------------------ ----------
UINT64 Signature; // DriverBindingStart 0
VIRTIO_DEVICE_PROTOCOL *Virtio; // DriverBindingStart 0
+ VIRTIO_FS_LABEL Label; // VirtioFsInit 1
+ UINT16 QueueSize; // VirtioFsInit 1
+ VRING Ring; // VirtioRingInit 2
+ VOID *RingMap; // VirtioRingMap 2
+ EFI_EVENT ExitBoot; // DriverBindingStart 0
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL SimpleFs; // DriverBindingStart 0
} VIRTIO_FS;
@@ -38,6 +52,27 @@ typedef struct {
CR (SimpleFsReference, VIRTIO_FS, SimpleFs, VIRTIO_FS_SIG);
//
+// Initialization and helper routines for the Virtio Filesystem device.
+//
+
+EFI_STATUS
+VirtioFsInit (
+ IN OUT VIRTIO_FS *VirtioFs
+ );
+
+VOID
+VirtioFsUninit (
+ IN OUT VIRTIO_FS *VirtioFs
+ );
+
+VOID
+EFIAPI
+VirtioFsExitBoot (
+ IN EFI_EVENT ExitBootEvent,
+ IN VOID *VirtioFsAsVoid
+ );
+
+//
// EFI_SIMPLE_FILE_SYSTEM_PROTOCOL member functions for the Virtio Filesystem
// driver.
//