VirtualBox

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

最後變更 在這個檔案從95057是 80721,由 vboxsync 提交於 5 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.1 KB
 
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{
19 XEN_BLOCK_FRONT_DEVICE *Dev;
20 UINT8 *Buffer;
21 UINTN Size;
22 UINTN Sector; ///< 512 bytes sector.
23
24 grant_ref_t GrantRef[BLKIF_MAX_SEGMENTS_PER_REQUEST];
25 INT32 NumRef;
26
27 EFI_STATUS Status;
28};
29
30typedef struct
31{
32 UINT64 Sectors;
33 UINT32 SectorSize;
34 UINT32 VDiskInfo;
35 BOOLEAN ReadWrite;
36 BOOLEAN CdRom;
37 BOOLEAN FeatureBarrier;
38 BOOLEAN FeatureFlushCache;
39} XEN_BLOCK_FRONT_MEDIA_INFO;
40
41#define XEN_BLOCK_FRONT_SIGNATURE SIGNATURE_32 ('X', 'p', 'v', 'B')
42struct _XEN_BLOCK_FRONT_DEVICE {
43 UINT32 Signature;
44 EFI_BLOCK_IO_PROTOCOL BlockIo;
45 domid_t DomainId;
46
47 blkif_front_ring_t Ring;
48 grant_ref_t RingRef;
49 evtchn_port_t EventChannel;
50 blkif_vdev_t DeviceId;
51
52 CONST CHAR8 *NodeName;
53 XEN_BLOCK_FRONT_MEDIA_INFO MediaInfo;
54
55 VOID *StateWatchToken;
56
57 XENBUS_PROTOCOL *XenBusIo;
58};
59
60#define XEN_BLOCK_FRONT_FROM_BLOCK_IO(b) \
61 CR (b, XEN_BLOCK_FRONT_DEVICE, BlockIo, XEN_BLOCK_FRONT_SIGNATURE)
62
63EFI_STATUS
64XenPvBlockFrontInitialization (
65 IN XENBUS_PROTOCOL *XenBusIo,
66 IN CONST CHAR8 *NodeName,
67 OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
68 );
69
70VOID
71XenPvBlockFrontShutdown (
72 IN XEN_BLOCK_FRONT_DEVICE *Dev
73 );
74
75VOID
76XenPvBlockAsyncIo (
77 IN OUT XEN_BLOCK_FRONT_IO *IoData,
78 IN BOOLEAN IsWrite
79 );
80
81EFI_STATUS
82XenPvBlockIo (
83 IN OUT XEN_BLOCK_FRONT_IO *IoData,
84 IN BOOLEAN IsWrite
85 );
86
87VOID
88XenPvBlockAsyncIoPoll (
89 IN XEN_BLOCK_FRONT_DEVICE *Dev
90 );
91
92VOID
93XenPvBlockSync (
94 IN XEN_BLOCK_FRONT_DEVICE *Dev
95 );
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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