]>
Commit | Line | Data |
---|---|---|
d59326d3 | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r | |
e3ba31da | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
d59326d3 | 5 | \r |
6 | Module Name:\r | |
7 | \r | |
8 | EmuBlockIo.h\r | |
9 | \r | |
10 | Abstract:\r | |
11 | \r | |
12 | Produce block IO abstractions for real devices on your PC using Posix APIs.\r | |
d18d8a1d | 13 | The configuration of what devices to mount or emulate comes from UNIX\r |
14 | environment variables. The variables must be visible to the Microsoft*\r | |
d59326d3 | 15 | Developer Studio for them to work.\r |
16 | \r | |
17 | * Other names and brands may be claimed as the property of others.\r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef _EMU_BLOCK_IO_H_\r | |
22 | #define _EMU_BLOCK_IO_H_\r | |
23 | \r | |
24 | #include <PiDxe.h>\r | |
25 | #include <Protocol/EmuIoThunk.h>\r | |
26 | #include <Protocol/BlockIo.h>\r | |
27 | #include <Protocol/BlockIo2.h>\r | |
28 | #include <Protocol/EmuBlockIo.h>\r | |
29 | \r | |
30 | #include <Guid/EmuPhysicalDisk.h>\r | |
31 | #include <Guid/EmuVirtualDisk.h>\r | |
32 | \r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/BaseLib.h>\r | |
35 | #include <Library/UefiDriverEntryPoint.h>\r | |
36 | #include <Library/UefiLib.h>\r | |
37 | #include <Library/BaseMemoryLib.h>\r | |
38 | #include <Library/MemoryAllocationLib.h>\r | |
39 | #include <Library/UefiBootServicesTableLib.h>\r | |
40 | \r | |
41 | \r | |
42 | //\r | |
43 | // Language supported for driverconfiguration protocol\r | |
44 | //\r | |
45 | \r | |
46 | #define EMU_BLOCK_IO_PRIVATE_SIGNATURE SIGNATURE_32 ('E', 'M', 'b', 'k')\r | |
47 | typedef struct {\r | |
48 | UINTN Signature;\r | |
49 | EMU_IO_THUNK_PROTOCOL *IoThunk;\r | |
50 | EMU_BLOCK_IO_PROTOCOL *Io;\r | |
51 | \r | |
52 | EFI_HANDLE EfiHandle;\r | |
53 | EFI_BLOCK_IO_PROTOCOL BlockIo;\r | |
54 | EFI_BLOCK_IO2_PROTOCOL BlockIo2;\r | |
55 | EFI_BLOCK_IO_MEDIA Media;\r | |
56 | \r | |
57 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r | |
58 | \r | |
59 | } EMU_BLOCK_IO_PRIVATE;\r | |
60 | \r | |
61 | #define EMU_BLOCK_IO_PRIVATE_DATA_FROM_THIS(a) \\r | |
62 | CR(a, EMU_BLOCK_IO_PRIVATE, BlockIo, EMU_BLOCK_IO_PRIVATE_SIGNATURE)\r | |
63 | \r | |
64 | #define EMU_BLOCK_IO2_PRIVATE_DATA_FROM_THIS(a) \\r | |
65 | CR(a, EMU_BLOCK_IO_PRIVATE, BlockIo2, EMU_BLOCK_IO_PRIVATE_SIGNATURE)\r | |
66 | \r | |
67 | \r | |
68 | //\r | |
69 | // Block I/O Global Variables\r | |
70 | //\r | |
71 | extern EFI_DRIVER_BINDING_PROTOCOL gEmuBlockIoDriverBinding;\r | |
72 | extern EFI_COMPONENT_NAME_PROTOCOL gEmuBlockIoComponentName;\r | |
73 | extern EFI_COMPONENT_NAME2_PROTOCOL gEmuBlockIoComponentName2;\r | |
74 | extern EFI_DRIVER_CONFIGURATION_PROTOCOL gEmuBlockIoDriverConfiguration;\r | |
75 | extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL gEmuBlockIoDriverDiagnostics;\r | |
76 | extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gEmuBlockIoDriverDiagnostics2;\r | |
77 | \r | |
78 | #endif\r |