]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
f57387d5 HT |
3 | Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 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 | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | TianoSpecApi.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Tiano intrinsic definitions in Tiano spec.\r | |
19 | \r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #ifndef _TIANO_SPEC_API_H_\r | |
24 | #define _TIANO_SPEC_API_H_\r | |
25 | \r | |
26 | \r | |
27 | #if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))\r | |
28 | //\r | |
29 | // Prior to UEFI 2.0 Tiano extended these enums. This was replaced by\r | |
30 | // CreateEventEx() Event Groups in UEFI 2.0\r | |
31 | //\r | |
32 | #define EFI_EVENT_NOTIFY_SIGNAL_ALL 0x00000400\r | |
33 | \r | |
34 | #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203\r | |
35 | #define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204\r | |
36 | #endif\r | |
37 | \r | |
38 | typedef\r | |
39 | EFI_BOOTSERVICE\r | |
40 | EFI_STATUS\r | |
41 | (EFIAPI *EFI_ADD_MEMORY_SPACE) (\r | |
42 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
43 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
44 | IN UINT64 Length,\r | |
45 | IN UINT64 Capabilities\r | |
46 | )\r | |
47 | /*++\r | |
48 | \r | |
49 | Routine Description:\r | |
50 | \r | |
51 | Adds reserved memory, system memory, or memory-mapped I/O resources to the\r | |
52 | global coherency domain of the processor.\r | |
53 | \r | |
54 | Arguments:\r | |
55 | \r | |
56 | GcdMemoryType - Memory type of the memory space.\r | |
57 | \r | |
58 | BaseAddress - Base address of the memory space.\r | |
59 | \r | |
60 | Length - Length of the memory space.\r | |
61 | \r | |
62 | Capabilities - alterable attributes of the memory space.\r | |
63 | \r | |
64 | Returns:\r | |
65 | \r | |
66 | EFI_SUCCESS - Merged this memory space into GCD map. \r | |
67 | \r | |
68 | --*/\r | |
69 | ;\r | |
70 | \r | |
71 | typedef\r | |
72 | EFI_BOOTSERVICE\r | |
73 | EFI_STATUS\r | |
74 | (EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (\r | |
75 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
76 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
77 | IN UINTN Alignment,\r | |
78 | IN UINT64 Length,\r | |
79 | IN OUT EFI_PHYSICAL_ADDRESS * BaseAddress,\r | |
80 | IN EFI_HANDLE ImageHandle,\r | |
81 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
82 | )\r | |
83 | /*++\r | |
84 | \r | |
85 | Routine Description:\r | |
86 | \r | |
87 | Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r | |
88 | I/O resources from the global coherency domain of the processor.\r | |
89 | \r | |
90 | Arguments:\r | |
91 | \r | |
92 | GcdAllocateType - The type of allocate operation\r | |
93 | \r | |
94 | GcdMemoryType - The desired memory type\r | |
95 | \r | |
96 | Alignment - Align with 2^Alignment\r | |
97 | \r | |
98 | Length - Length to allocate\r | |
99 | \r | |
100 | BaseAddress - Base address to allocate\r | |
101 | \r | |
102 | Imagehandle - The image handle consume the allocated space.\r | |
103 | \r | |
104 | DeviceHandle - The device handle consume the allocated space.\r | |
105 | \r | |
106 | Returns:\r | |
107 | \r | |
108 | EFI_INVALID_PARAMETER - Invalid parameter.\r | |
109 | \r | |
110 | EFI_NOT_FOUND - No descriptor contains the desired space.\r | |
111 | \r | |
112 | EFI_SUCCESS - Memory space successfully allocated.\r | |
113 | \r | |
114 | --*/\r | |
115 | ;\r | |
116 | \r | |
117 | typedef\r | |
118 | EFI_BOOTSERVICE\r | |
119 | EFI_STATUS\r | |
120 | (EFIAPI *EFI_FREE_MEMORY_SPACE) (\r | |
121 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
122 | IN UINT64 Length\r | |
123 | )\r | |
124 | /*++\r | |
125 | \r | |
126 | Routine Description:Routine Description:\r | |
127 | \r | |
128 | Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r | |
129 | I/O resources from the global coherency domain of the processor.\r | |
130 | \r | |
131 | Arguments:\r | |
132 | \r | |
133 | BaseAddress - Base address of the segment.\r | |
134 | \r | |
135 | Length - Length of the segment.\r | |
136 | \r | |
137 | Returns:\r | |
138 | \r | |
139 | EFI_SUCCESS - Space successfully freed.\r | |
140 | \r | |
141 | --*/\r | |
142 | ;\r | |
143 | \r | |
144 | typedef\r | |
145 | EFI_BOOTSERVICE\r | |
146 | EFI_STATUS\r | |
147 | (EFIAPI *EFI_REMOVE_MEMORY_SPACE) (\r | |
148 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
149 | IN UINT64 Length\r | |
150 | )\r | |
151 | /*++\r | |
152 | \r | |
153 | Routine Description:Routine Description:\r | |
154 | \r | |
155 | Removes reserved memory, system memory, or memory-mapped I/O resources from\r | |
156 | the global coherency domain of the processor.\r | |
157 | \r | |
158 | Arguments:\r | |
159 | \r | |
160 | BaseAddress - Base address of the memory space.\r | |
161 | \r | |
162 | Length - Length of the memory space.\r | |
163 | \r | |
164 | Returns:\r | |
165 | \r | |
166 | EFI_SUCCESS - Successfully remove a segment of memory space.\r | |
167 | \r | |
168 | --*/\r | |
169 | ;\r | |
170 | \r | |
171 | typedef\r | |
172 | EFI_BOOTSERVICE\r | |
173 | EFI_STATUS\r | |
174 | (EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (\r | |
175 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
176 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR * Descriptor\r | |
177 | )\r | |
178 | /*++\r | |
179 | \r | |
180 | Routine Description:\r | |
181 | \r | |
182 | Retrieves the descriptor for a memory region containing a specified address.\r | |
183 | \r | |
184 | Arguments:\r | |
185 | \r | |
186 | BaseAddress - Specified start address\r | |
187 | \r | |
188 | Descriptor - Specified length\r | |
189 | \r | |
190 | Returns:\r | |
191 | \r | |
192 | EFI_INVALID_PARAMETER - Invalid parameter\r | |
193 | \r | |
194 | EFI_SUCCESS - Successfully get memory space descriptor.\r | |
195 | \r | |
196 | --*/\r | |
197 | ;\r | |
198 | \r | |
199 | typedef\r | |
200 | EFI_BOOTSERVICE\r | |
201 | EFI_STATUS\r | |
202 | (EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (\r | |
203 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
204 | IN UINT64 Length,\r | |
205 | IN UINT64 Attributes\r | |
206 | )\r | |
207 | /*++\r | |
208 | \r | |
209 | Routine Description:\r | |
210 | \r | |
211 | Modifies the attributes for a memory region in the global coherency domain of the\r | |
212 | processor.\r | |
213 | \r | |
214 | Arguments:\r | |
215 | \r | |
216 | BaseAddress - Specified start address\r | |
217 | \r | |
218 | Length - Specified length\r | |
219 | \r | |
220 | Attributes - Specified attributes\r | |
221 | \r | |
222 | Returns:\r | |
223 | \r | |
224 | EFI_SUCCESS - Successfully set attribute of a segment of memory space.\r | |
225 | \r | |
226 | --*/\r | |
227 | ;\r | |
228 | \r | |
229 | typedef\r | |
230 | EFI_BOOTSERVICE\r | |
231 | EFI_STATUS\r | |
232 | (EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (\r | |
233 | OUT UINTN *NumberOfDescriptors,\r | |
234 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r | |
235 | )\r | |
236 | /*++\r | |
237 | \r | |
238 | Routine Description:\r | |
239 | \r | |
240 | Returns a map of the memory resources in the global coherency domain of the\r | |
241 | processor.\r | |
242 | \r | |
243 | Arguments:\r | |
244 | \r | |
245 | NumberOfDescriptors - Number of descriptors.\r | |
246 | \r | |
247 | MemorySpaceMap - Descriptor array\r | |
248 | \r | |
249 | Returns:\r | |
250 | \r | |
251 | EFI_INVALID_PARAMETER - Invalid parameter\r | |
252 | \r | |
253 | EFI_OUT_OF_RESOURCES - No enough buffer to allocate\r | |
254 | \r | |
255 | EFI_SUCCESS - Successfully get memory space map.\r | |
256 | \r | |
257 | --*/\r | |
258 | ;\r | |
259 | \r | |
260 | typedef\r | |
261 | EFI_BOOTSERVICE\r | |
262 | EFI_STATUS\r | |
263 | (EFIAPI *EFI_ADD_IO_SPACE) (\r | |
264 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
265 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
266 | IN UINT64 Length\r | |
267 | )\r | |
268 | /*++\r | |
269 | \r | |
270 | Routine Description:\r | |
271 | \r | |
272 | Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r | |
273 | \r | |
274 | Arguments:\r | |
275 | \r | |
276 | GcdIoType - IO type of the segment.\r | |
277 | \r | |
278 | BaseAddress - Base address of the segment.\r | |
279 | \r | |
280 | Length - Length of the segment.\r | |
281 | \r | |
282 | Returns:\r | |
283 | \r | |
284 | EFI_SUCCESS - Merged this segment into GCD map.\r | |
285 | \r | |
286 | --*/\r | |
287 | ;\r | |
288 | \r | |
289 | typedef\r | |
290 | EFI_BOOTSERVICE\r | |
291 | EFI_STATUS\r | |
292 | (EFIAPI *EFI_ALLOCATE_IO_SPACE) (\r | |
293 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
294 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
295 | IN UINTN Alignment,\r | |
296 | IN UINT64 Length,\r | |
297 | IN OUT EFI_PHYSICAL_ADDRESS * BaseAddress,\r | |
298 | IN EFI_HANDLE ImageHandle,\r | |
299 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
300 | )\r | |
301 | /*++\r | |
302 | \r | |
303 | Routine Description:\r | |
304 | \r | |
305 | Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
306 | domain of the processor.\r | |
307 | \r | |
308 | Arguments:\r | |
309 | \r | |
310 | GcdAllocateType - The type of allocate operation\r | |
311 | \r | |
312 | GcdIoType - The desired IO type\r | |
313 | \r | |
314 | Alignment - Align with 2^Alignment\r | |
315 | \r | |
316 | Length - Length to allocate\r | |
317 | \r | |
318 | BaseAddress - Base address to allocate\r | |
319 | \r | |
320 | Imagehandle - The image handle consume the allocated space.\r | |
321 | \r | |
322 | DeviceHandle - The device handle consume the allocated space.\r | |
323 | \r | |
324 | Returns:\r | |
325 | \r | |
326 | EFI_INVALID_PARAMETER - Invalid parameter.\r | |
327 | \r | |
328 | EFI_NOT_FOUND - No descriptor contains the desired space.\r | |
329 | \r | |
330 | EFI_SUCCESS - IO space successfully allocated.\r | |
331 | \r | |
332 | --*/\r | |
333 | ;\r | |
334 | \r | |
335 | typedef\r | |
336 | EFI_BOOTSERVICE\r | |
337 | EFI_STATUS\r | |
338 | (EFIAPI *EFI_FREE_IO_SPACE) (\r | |
339 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
340 | IN UINT64 Length\r | |
341 | )\r | |
342 | /*++\r | |
343 | \r | |
344 | Routine Description:Routine Description:\r | |
345 | \r | |
346 | Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
347 | domain of the processor.\r | |
348 | \r | |
349 | Arguments:\r | |
350 | \r | |
351 | BaseAddress - Base address of the segment.\r | |
352 | \r | |
353 | Length - Length of the segment.\r | |
354 | \r | |
355 | Returns:\r | |
356 | \r | |
357 | EFI_SUCCESS - Space successfully freed.\r | |
358 | \r | |
359 | --*/\r | |
360 | ;\r | |
361 | \r | |
362 | typedef\r | |
363 | EFI_BOOTSERVICE\r | |
364 | EFI_STATUS\r | |
365 | (EFIAPI *EFI_REMOVE_IO_SPACE) (\r | |
366 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
367 | IN UINT64 Length\r | |
368 | )\r | |
369 | /*++\r | |
370 | \r | |
371 | Routine Description:Routine Description:\r | |
372 | \r | |
373 | Removes reserved I/O or I/O resources from the global coherency domain of the\r | |
374 | processor.\r | |
375 | \r | |
376 | Arguments:\r | |
377 | \r | |
378 | BaseAddress - Base address of the segment.\r | |
379 | \r | |
380 | Length - Length of the segment.\r | |
381 | \r | |
382 | Returns:\r | |
383 | \r | |
384 | EFI_SUCCESS - Successfully removed a segment of IO space.\r | |
385 | \r | |
386 | --*/\r | |
387 | ;\r | |
388 | \r | |
389 | typedef\r | |
390 | EFI_BOOTSERVICE\r | |
391 | EFI_STATUS\r | |
392 | (EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (\r | |
393 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
394 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR * Descriptor\r | |
395 | )\r | |
396 | /*++\r | |
397 | \r | |
398 | Routine Description:\r | |
399 | \r | |
400 | Retrieves the descriptor for an I/O region containing a specified address.\r | |
401 | \r | |
402 | Arguments:\r | |
403 | \r | |
404 | BaseAddress - Specified start address\r | |
405 | \r | |
406 | Descriptor - Specified length\r | |
407 | \r | |
408 | Returns:\r | |
409 | \r | |
410 | EFI_INVALID_PARAMETER - Descriptor is NULL.\r | |
411 | \r | |
412 | EFI_SUCCESS - Successfully get the IO space descriptor.\r | |
413 | \r | |
414 | --*/\r | |
415 | ;\r | |
416 | \r | |
417 | typedef\r | |
418 | EFI_BOOTSERVICE\r | |
419 | EFI_STATUS\r | |
420 | (EFIAPI *EFI_GET_IO_SPACE_MAP) (\r | |
421 | OUT UINTN *NumberOfDescriptors,\r | |
422 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r | |
423 | )\r | |
424 | /*++\r | |
425 | \r | |
426 | Routine Description:\r | |
427 | \r | |
428 | Returns a map of the I/O resources in the global coherency domain of the processor.\r | |
429 | \r | |
430 | Arguments:\r | |
431 | \r | |
432 | NumberOfDescriptors - Number of descriptors.\r | |
433 | \r | |
434 | MemorySpaceMap - Descriptor array\r | |
435 | \r | |
436 | Returns:\r | |
437 | \r | |
438 | EFI_INVALID_PARAMETER - Invalid parameter\r | |
439 | \r | |
440 | EFI_OUT_OF_RESOURCES - No enough buffer to allocate\r | |
441 | \r | |
442 | EFI_SUCCESS - Successfully get IO space map.\r | |
443 | \r | |
444 | --*/\r | |
445 | ;\r | |
446 | \r | |
447 | typedef\r | |
448 | EFI_BOOTSERVICE\r | |
449 | EFI_STATUS\r | |
450 | (EFIAPI *EFI_DISPATCH) (VOID)\r | |
451 | /*++\r | |
452 | \r | |
453 | Routine Description:\r | |
454 | \r | |
455 | Loads and executed DXE drivers from firmware volumes.\r | |
456 | \r | |
457 | Arguments:\r | |
458 | \r | |
459 | None\r | |
460 | \r | |
461 | Returns:\r | |
462 | \r | |
463 | Status code\r | |
464 | \r | |
465 | --*/\r | |
466 | ;\r | |
467 | \r | |
468 | typedef\r | |
469 | EFI_BOOTSERVICE\r | |
470 | EFI_STATUS\r | |
471 | (EFIAPI *EFI_SCHEDULE) (\r | |
472 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
473 | IN EFI_GUID * DriverName\r | |
474 | )\r | |
475 | /*++\r | |
476 | \r | |
477 | Routine Description:\r | |
478 | \r | |
479 | Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r | |
480 | \r | |
481 | Arguments:\r | |
482 | \r | |
483 | FirmwareVolumeHandle - The handle of the firmware volume that contains the file specified by FileName.\r | |
484 | \r | |
485 | DriverName - A pointer to the name of the file in a firmware volume. \r | |
486 | \r | |
487 | Returns:\r | |
488 | \r | |
489 | Status code\r | |
490 | \r | |
491 | --*/\r | |
492 | ;\r | |
493 | \r | |
494 | typedef\r | |
495 | EFI_BOOTSERVICE\r | |
496 | EFI_STATUS\r | |
497 | (EFIAPI *EFI_TRUST) (\r | |
498 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
499 | IN EFI_GUID * DriverName\r | |
500 | )\r | |
501 | /*++\r | |
502 | \r | |
503 | Routine Description:\r | |
504 | \r | |
505 | Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r | |
506 | \r | |
507 | Arguments:\r | |
508 | \r | |
509 | FirmwareVolumeHandle - The handle of the firmware volume that contains the file specified by FileName.\r | |
510 | \r | |
511 | DriverName - A pointer to the name of the file in a firmware volume. \r | |
512 | \r | |
513 | Returns:\r | |
514 | \r | |
515 | Status code\r | |
516 | \r | |
517 | --*/\r | |
518 | ;\r | |
519 | \r | |
520 | typedef\r | |
521 | EFI_BOOTSERVICE\r | |
522 | EFI_STATUS\r | |
523 | (EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (\r | |
524 | IN VOID *FvHeader,\r | |
525 | IN UINTN Size,\r | |
526 | OUT EFI_HANDLE * FirmwareVolumeHandle\r | |
527 | )\r | |
528 | /*++\r | |
529 | \r | |
530 | Routine Description:\r | |
531 | \r | |
532 | Creates a firmware volume handle for a firmware volume that is present in system memory.\r | |
533 | \r | |
534 | Arguments:\r | |
535 | \r | |
536 | FirmwareVolumeHeader - A pointer to the header of the firmware volume.\r | |
537 | Size - The size, in bytes, of the firmware volume.\r | |
538 | FirmwareVolumeHandle - On output, a pointer to the created handle.\r | |
539 | \r | |
540 | Returns:\r | |
541 | \r | |
542 | Status code\r | |
543 | \r | |
544 | --*/\r | |
545 | ;\r | |
546 | \r | |
547 | //\r | |
548 | // DXE Services Table\r | |
549 | //\r | |
550 | #define EFI_DXE_SERVICES_SIGNATURE 0x565245535f455844\r | |
551 | #if (PI_SPECIFICATION_VERSION < 0x00010000)\r | |
552 | #define EFI_DXE_SERVICES_REVISION ((0 << 16) | (90))\r | |
553 | #else\r | |
554 | #define EFI_DXE_SERVICES_REVISION ((1 << 16) | (00))\r | |
555 | #endif\r | |
556 | \r | |
557 | typedef struct {\r | |
558 | EFI_TABLE_HEADER Hdr;\r | |
559 | \r | |
560 | //\r | |
561 | // Global Coherency Domain Services\r | |
562 | //\r | |
563 | EFI_ADD_MEMORY_SPACE AddMemorySpace;\r | |
564 | EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r | |
565 | EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r | |
566 | EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r | |
567 | EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r | |
568 | EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r | |
569 | EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r | |
570 | EFI_ADD_IO_SPACE AddIoSpace;\r | |
571 | EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r | |
572 | EFI_FREE_IO_SPACE FreeIoSpace;\r | |
573 | EFI_REMOVE_IO_SPACE RemoveIoSpace;\r | |
574 | EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r | |
575 | EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r | |
576 | \r | |
577 | //\r | |
578 | // Dispatcher Services\r | |
579 | //\r | |
580 | EFI_DISPATCH Dispatch;\r | |
581 | EFI_SCHEDULE Schedule;\r | |
582 | EFI_TRUST Trust;\r | |
583 | //\r | |
584 | // Service to process a single firmware volume found in a capsule\r | |
585 | //\r | |
586 | EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r | |
587 | } EFI_DXE_SERVICES;\r | |
588 | \r | |
589 | #endif\r |