d59326d3 |
1 | /*++\r |
2 | \r |
3 | Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r |
d18d8a1d |
4 | This program and the accompanying materials\r |
5 | are licensed and made available under the terms and conditions of the BSD License\r |
6 | which accompanies this distribution. The full text of the license may be found at\r |
7 | http://opensource.org/licenses/bsd-license.php\r |
8 | \r |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
d59326d3 |
11 | \r |
12 | Module Name:\r |
13 | \r |
14 | EmuBlockIo.h\r |
15 | \r |
16 | Abstract:\r |
17 | \r |
18 | Produce block IO abstractions for real devices on your PC using Posix APIs.\r |
d18d8a1d |
19 | The configuration of what devices to mount or emulate comes from UNIX\r |
20 | environment variables. The variables must be visible to the Microsoft*\r |
d59326d3 |
21 | Developer Studio for them to work.\r |
22 | \r |
23 | * Other names and brands may be claimed as the property of others.\r |
24 | \r |
25 | **/\r |
26 | \r |
27 | #ifndef _EMU_BLOCK_IO_H_\r |
28 | #define _EMU_BLOCK_IO_H_\r |
29 | \r |
30 | #include <PiDxe.h>\r |
31 | #include <Protocol/EmuIoThunk.h>\r |
32 | #include <Protocol/BlockIo.h>\r |
33 | #include <Protocol/BlockIo2.h>\r |
34 | #include <Protocol/EmuBlockIo.h>\r |
35 | \r |
36 | #include <Guid/EmuPhysicalDisk.h>\r |
37 | #include <Guid/EmuVirtualDisk.h>\r |
38 | \r |
39 | #include <Library/DebugLib.h>\r |
40 | #include <Library/BaseLib.h>\r |
41 | #include <Library/UefiDriverEntryPoint.h>\r |
42 | #include <Library/UefiLib.h>\r |
43 | #include <Library/BaseMemoryLib.h>\r |
44 | #include <Library/MemoryAllocationLib.h>\r |
45 | #include <Library/UefiBootServicesTableLib.h>\r |
46 | \r |
47 | \r |
48 | //\r |
49 | // Language supported for driverconfiguration protocol\r |
50 | //\r |
51 | \r |
52 | #define EMU_BLOCK_IO_PRIVATE_SIGNATURE SIGNATURE_32 ('E', 'M', 'b', 'k')\r |
53 | typedef struct {\r |
54 | UINTN Signature;\r |
55 | EMU_IO_THUNK_PROTOCOL *IoThunk;\r |
56 | EMU_BLOCK_IO_PROTOCOL *Io;\r |
57 | \r |
58 | EFI_HANDLE EfiHandle;\r |
59 | EFI_BLOCK_IO_PROTOCOL BlockIo;\r |
60 | EFI_BLOCK_IO2_PROTOCOL BlockIo2;\r |
61 | EFI_BLOCK_IO_MEDIA Media;\r |
62 | \r |
63 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r |
64 | \r |
65 | } EMU_BLOCK_IO_PRIVATE;\r |
66 | \r |
67 | #define EMU_BLOCK_IO_PRIVATE_DATA_FROM_THIS(a) \\r |
68 | CR(a, EMU_BLOCK_IO_PRIVATE, BlockIo, EMU_BLOCK_IO_PRIVATE_SIGNATURE)\r |
69 | \r |
70 | #define EMU_BLOCK_IO2_PRIVATE_DATA_FROM_THIS(a) \\r |
71 | CR(a, EMU_BLOCK_IO_PRIVATE, BlockIo2, EMU_BLOCK_IO_PRIVATE_SIGNATURE)\r |
72 | \r |
73 | \r |
74 | //\r |
75 | // Block I/O Global Variables\r |
76 | //\r |
77 | extern EFI_DRIVER_BINDING_PROTOCOL gEmuBlockIoDriverBinding;\r |
78 | extern EFI_COMPONENT_NAME_PROTOCOL gEmuBlockIoComponentName;\r |
79 | extern EFI_COMPONENT_NAME2_PROTOCOL gEmuBlockIoComponentName2;\r |
80 | extern EFI_DRIVER_CONFIGURATION_PROTOCOL gEmuBlockIoDriverConfiguration;\r |
81 | extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL gEmuBlockIoDriverDiagnostics;\r |
82 | extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gEmuBlockIoDriverDiagnostics2;\r |
83 | \r |
84 | #endif\r |