]> git.proxmox.com Git - mirror_edk2.git/blob - EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.h
Obsoleted by new schema and new build tools.
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Bus / WinNtBusDriver / WinNtBusDriver.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 WinNtBusDriver.h
15
16 Abstract:
17
18 This following section documents the envirnoment variables for the Win NT
19 build. These variables are used to define the (virtual) hardware
20 configuration of the NT environment
21
22 A ! can be used to seperate multiple instances in a variable. Each
23 instance represents a seperate hardware device.
24
25 EFI_WIN_NT_PHYSICAL_DISKS - maps to drives on your system
26 EFI_WIN_NT_VIRTUAL_DISKS - maps to a device emulated by a file
27 EFI_WIN_NT_FILE_SYSTEM - mouts a directory as a file system
28 EFI_WIN_NT_CONSOLE - make a logical comand line window (only one!)
29 EFI_WIN_NT_UGA - Builds UGA Windows of Width and Height
30 EFI_WIN_NT_SERIAL_PORT - maps physical serial ports
31 EFI_WIN_NT_PASS_THRU - associates a device with our PCI support
32
33 <F>ixed - Fixed disk like a hard drive.
34 <R>emovable - Removable media like a floppy or CD-ROM.
35 Read <O>nly - Write protected device.
36 Read <W>rite - Read write device.
37 <block count> - Decimal number of blocks a device supports.
38 <block size> - Decimal number of bytes per block.
39
40 NT envirnonment variable contents. '<' and '>' are not part of the variable,
41 they are just used to make this help more readable. There should be no
42 spaces between the ';'. Extra spaces will break the variable. A '!' is
43 used to seperate multiple devices in a variable.
44
45 EFI_WIN_NT_VIRTUAL_DISKS =
46 <F | R><O | W>;<block count>;<block size>[!...]
47
48 EFI_WIN_NT_PHYSICAL_DISKS =
49 <drive letter>:<F | R><O | W>;<block count>;<block size>[!...]
50
51 Virtual Disks: These devices use a file to emulate a hard disk or removable
52 media device.
53
54 Thus a 20 MB emulated hard drive would look like:
55 EFI_WIN_NT_VIRTUAL_DISKS=FW;40960;512
56
57 A 1.44MB emulated floppy with a block size of 1024 would look like:
58 EFI_WIN_NT_VIRTUAL_DISKS=RW;1440;1024
59
60 Physical Disks: These devices use NT to open a real device in your system
61
62 Thus a 120 MB floppy would look like:
63 EFI_WIN_NT_PHYSICAL_DISKS=B:RW;245760;512
64
65 Thus a standard CD-ROM floppy would look like:
66 EFI_WIN_NT_PHYSICAL_DISKS=Z:RO;307200;2048
67
68 EFI_WIN_NT_FILE_SYSTEM =
69 <directory path>[!...]
70
71 Mounting the two directories C:\FOO and C:\BAR would look like:
72 EFI_WIN_NT_FILE_SYSTEM=c:\foo!c:\bar
73
74 EFI_WIN_NT_CONSOLE =
75 <window title>
76
77 Declaring a text console window with the title "My EFI Console" woild look like:
78 EFI_WIN_NT_CONSOLE=My EFI Console
79
80 EFI_WIN_NT_UGA =
81 <width> <height>[!...]
82
83 Declaring a two UGA windows with resolutions of 800x600 and 1024x768 would look like:
84 Example : EFI_WIN_NT_UGA=800 600!1024 768
85
86 EFI_WIN_NT_SERIAL_PORT =
87 <port name>[!...]
88
89 Declaring two serial ports on COM1 and COM2 would look like:
90 Example : EFI_WIN_NT_SERIAL_PORT=COM1!COM2
91
92 EFI_WIN_NT_PASS_THROUGH =
93 <BaseAddress>;<Bus#>;<Device#>;<Function#>
94
95 Declaring a base address of 0xE0000000 (used for PCI Express devices)
96 and having NT32 talk to a device located at bus 0, device 1, function 0:
97 Example : EFI_WIN_NT_PASS_THROUGH=E000000;0;1;0
98
99 ---*/
100
101 #ifndef __NT_BUS_DRIVER_H__
102 #define __NT_BUS_DRIVER_H__
103
104
105
106 //
107 // WinNt Bus Driver Global Variables
108 //
109 extern EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding;
110 extern EFI_COMPONENT_NAME_PROTOCOL gWinNtBusDriverComponentName;
111
112 //
113 // WinNt Bus Controller Structure
114 //
115 #define WIN_NT_BUS_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('N', 'T', 'B', 'D')
116
117 typedef struct {
118 UINT64 Signature;
119 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
120 } WIN_NT_BUS_DEVICE;
121
122 //
123 // WinNt Child Device Controller Structure
124 //
125 #define WIN_NT_IO_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('N', 'T', 'V', 'D')
126
127 typedef struct {
128 UINT64 Signature;
129 EFI_HANDLE Handle;
130 EFI_WIN_NT_IO_PROTOCOL WinNtIo;
131 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
132
133 //
134 // Private data about the parent
135 //
136 EFI_HANDLE ControllerHandle;
137 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
138
139 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
140
141 } WIN_NT_IO_DEVICE;
142
143 #define WIN_NT_IO_DEVICE_FROM_THIS(a) \
144 CR(a, WIN_NT_IO_DEVICE, WinNtIo, WIN_NT_IO_DEVICE_SIGNATURE)
145
146 //
147 // This is the largest env variable we can parse
148 //
149 #define MAX_NT_ENVIRNMENT_VARIABLE_LENGTH 512
150
151 typedef struct {
152 UINTN Token;
153 EFI_GUID *DevicePathGuid;
154 } NT_PCD_ENTRY;
155
156 typedef struct {
157 VENDOR_DEVICE_PATH VendorDevicePath;
158 UINT32 Instance;
159 } WIN_NT_VENDOR_DEVICE_PATH_NODE;
160
161 EFI_STATUS
162 EFIAPI
163 CpuIoInitialize (
164 IN EFI_HANDLE ImageHandle,
165 IN EFI_SYSTEM_TABLE *SystemTable
166 )
167 /*++
168
169 Routine Description:
170
171 TODO: Add function description
172
173 Arguments:
174
175 ImageHandle - TODO: add argument description
176 SystemTable - TODO: add argument description
177
178 Returns:
179
180 TODO: add return values
181
182 --*/
183 ;
184
185 //
186 // Driver Binding Protocol function prototypes
187 //
188 EFI_STATUS
189 EFIAPI
190 WinNtBusDriverBindingSupported (
191 IN EFI_DRIVER_BINDING_PROTOCOL *This,
192 IN EFI_HANDLE Handle,
193 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
194 )
195 /*++
196
197 Routine Description:
198
199 TODO: Add function description
200
201 Arguments:
202
203 This - TODO: add argument description
204 Handle - TODO: add argument description
205 RemainingDevicePath - TODO: add argument description
206
207 Returns:
208
209 TODO: add return values
210
211 --*/
212 ;
213
214 EFI_STATUS
215 EFIAPI
216 WinNtBusDriverBindingStart (
217 IN EFI_DRIVER_BINDING_PROTOCOL *This,
218 IN EFI_HANDLE ParentHandle,
219 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
220 )
221 /*++
222
223 Routine Description:
224
225 TODO: Add function description
226
227 Arguments:
228
229 This - TODO: add argument description
230 ParentHandle - TODO: add argument description
231 RemainingDevicePath - TODO: add argument description
232
233 Returns:
234
235 TODO: add return values
236
237 --*/
238 ;
239
240 EFI_STATUS
241 EFIAPI
242 WinNtBusDriverBindingStop (
243 IN EFI_DRIVER_BINDING_PROTOCOL *This,
244 IN EFI_HANDLE Handle,
245 IN UINTN NumberOfChildren,
246 IN EFI_HANDLE *ChildHandleBuffer
247 )
248 /*++
249
250 Routine Description:
251
252 TODO: Add function description
253
254 Arguments:
255
256 This - TODO: add argument description
257 Handle - TODO: add argument description
258 NumberOfChildren - TODO: add argument description
259 ChildHandleBuffer - TODO: add argument description
260
261 Returns:
262
263 TODO: add return values
264
265 --*/
266 ;
267
268 //
269 // WinNt Bus Driver private worker functions
270 //
271 EFI_DEVICE_PATH_PROTOCOL *
272 WinNtBusCreateDevicePath (
273 IN EFI_DEVICE_PATH_PROTOCOL *RootDevicePath,
274 IN EFI_GUID *Guid,
275 IN UINT16 InstanceNumber
276 )
277 /*++
278
279 Routine Description:
280
281 TODO: Add function description
282
283 Arguments:
284
285 RootDevicePath - TODO: add argument description
286 Guid - TODO: add argument description
287 InstanceNumber - TODO: add argument description
288
289 Returns:
290
291 TODO: add return values
292
293 --*/
294 ;
295
296
297 #endif