VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/XenPvBlkDxe/BlockFront.h

Last change on this file was 99404, checked in by vboxsync, 19 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1/** @file
2 BlockFront functions and types declarations.
3
4 Copyright (C) 2014, Citrix Ltd.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9#include "XenPvBlkDxe.h"
10
11#include <IndustryStandard/Xen/event_channel.h>
12#include <IndustryStandard/Xen/io/blkif.h>
13
14typedef struct _XEN_BLOCK_FRONT_DEVICE XEN_BLOCK_FRONT_DEVICE;
15typedef struct _XEN_BLOCK_FRONT_IO XEN_BLOCK_FRONT_IO;
16
17struct _XEN_BLOCK_FRONT_IO {
18 XEN_BLOCK_FRONT_DEVICE *Dev;
19 UINT8 *Buffer;
20 UINTN Size;
21 UINTN Sector; ///< 512 bytes sector.
22
23 grant_ref_t GrantRef[BLKIF_MAX_SEGMENTS_PER_REQUEST];
24 INT32 NumRef;
25
26 EFI_STATUS Status;
27};
28
29typedef struct {
30 UINT64 Sectors;
31 UINT32 SectorSize;
32 UINT32 VDiskInfo;
33 BOOLEAN ReadWrite;
34 BOOLEAN CdRom;
35 BOOLEAN FeatureBarrier;
36 BOOLEAN FeatureFlushCache;
37} XEN_BLOCK_FRONT_MEDIA_INFO;
38
39#define XEN_BLOCK_FRONT_SIGNATURE SIGNATURE_32 ('X', 'p', 'v', 'B')
40struct _XEN_BLOCK_FRONT_DEVICE {
41 UINT32 Signature;
42 EFI_BLOCK_IO_PROTOCOL BlockIo;
43 domid_t DomainId;
44
45 blkif_front_ring_t Ring;
46 grant_ref_t RingRef;
47 evtchn_port_t EventChannel;
48 blkif_vdev_t DeviceId;
49
50 CONST CHAR8 *NodeName;
51 XEN_BLOCK_FRONT_MEDIA_INFO MediaInfo;
52
53 VOID *StateWatchToken;
54
55 XENBUS_PROTOCOL *XenBusIo;
56};
57
58#define XEN_BLOCK_FRONT_FROM_BLOCK_IO(b) \
59 CR (b, XEN_BLOCK_FRONT_DEVICE, BlockIo, XEN_BLOCK_FRONT_SIGNATURE)
60
61EFI_STATUS
62XenPvBlockFrontInitialization (
63 IN XENBUS_PROTOCOL *XenBusIo,
64 IN CONST CHAR8 *NodeName,
65 OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
66 );
67
68VOID
69XenPvBlockFrontShutdown (
70 IN XEN_BLOCK_FRONT_DEVICE *Dev
71 );
72
73VOID
74XenPvBlockAsyncIo (
75 IN OUT XEN_BLOCK_FRONT_IO *IoData,
76 IN BOOLEAN IsWrite
77 );
78
79EFI_STATUS
80XenPvBlockIo (
81 IN OUT XEN_BLOCK_FRONT_IO *IoData,
82 IN BOOLEAN IsWrite
83 );
84
85VOID
86XenPvBlockAsyncIoPoll (
87 IN XEN_BLOCK_FRONT_DEVICE *Dev
88 );
89
90VOID
91XenPvBlockSync (
92 IN XEN_BLOCK_FRONT_DEVICE *Dev
93 );
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette