]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Type and macro definitions specific to the Virtio Filesystem device.\r | |
3 | \r | |
4 | At the time of this writing, the latest released Virtio specification (v1.1)\r | |
5 | does not include the virtio-fs device. The development version of the\r | |
6 | specification defines it however; see the latest version at\r | |
7 | <https://github.com/oasis-tcs/virtio-spec/blob/87fa6b5d8155/virtio-fs.tex>.\r | |
8 | \r | |
9 | This header file is minimal, and only defines the types and macros that are\r | |
10 | necessary for the OvmfPkg implementation.\r | |
11 | \r | |
12 | Copyright (C) 2020, Red Hat, Inc.\r | |
13 | \r | |
14 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef VIRTIO_FS_H_\r | |
18 | #define VIRTIO_FS_H_\r | |
19 | \r | |
20 | #include <IndustryStandard/Virtio.h>\r | |
21 | \r | |
22 | //\r | |
23 | // Lowest numbered queue for sending normal priority requests.\r | |
24 | //\r | |
25 | #define VIRTIO_FS_REQUEST_QUEUE 1\r | |
26 | \r | |
27 | //\r | |
28 | // Number of bytes in the "VIRTIO_FS_CONFIG.Tag" field.\r | |
29 | //\r | |
30 | #define VIRTIO_FS_TAG_BYTES 36\r | |
31 | \r | |
32 | //\r | |
33 | // Device configuration layout.\r | |
34 | //\r | |
35 | #pragma pack (1)\r | |
36 | typedef struct {\r | |
37 | //\r | |
38 | // The Tag field can be considered the filesystem label, or a mount point\r | |
39 | // hint. It is UTF-8 encoded, and padded to full size with NUL bytes. If the\r | |
40 | // encoded bytes take up the entire Tag field, then there is no NUL\r | |
41 | // terminator.\r | |
42 | //\r | |
43 | UINT8 Tag[VIRTIO_FS_TAG_BYTES];\r | |
44 | //\r | |
45 | // The total number of request virtqueues exposed by the device (i.e.,\r | |
46 | // excluding the "hiprio" queue).\r | |
47 | //\r | |
48 | UINT32 NumReqQueues;\r | |
49 | } VIRTIO_FS_CONFIG;\r | |
50 | #pragma pack ()\r | |
51 | \r | |
52 | #endif // VIRTIO_FS_H_\r |