]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Include/TianoSpecApi.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Include / TianoSpecApi.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 TianoSpecApi.h\r
15\r
16Abstract:\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
38typedef\r
39EFI_BOOTSERVICE\r
40EFI_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
49Routine Description:\r
50\r
51 Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
52global coherency domain of the processor.\r
53\r
54Arguments:\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
64Returns:\r
65\r
66 EFI_SUCCESS - Merged this memory space into GCD map. \r
67\r
68--*/\r
69;\r
70\r
71typedef\r
72EFI_BOOTSERVICE\r
73EFI_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
85Routine Description:\r
86\r
87 Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
88I/O resources from the global coherency domain of the processor.\r
89\r
90Arguments:\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
106Returns:\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
117typedef\r
118EFI_BOOTSERVICE\r
119EFI_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
126Routine Description:Routine Description:\r
127\r
128 Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
129I/O resources from the global coherency domain of the processor.\r
130\r
131Arguments:\r
132 \r
133 BaseAddress - Base address of the segment.\r
134 \r
135 Length - Length of the segment.\r
136 \r
137Returns:\r
138\r
139 EFI_SUCCESS - Space successfully freed.\r
140\r
141--*/\r
142;\r
143\r
144typedef\r
145EFI_BOOTSERVICE\r
146EFI_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
153Routine Description:Routine Description:\r
154\r
155 Removes reserved memory, system memory, or memory-mapped I/O resources from\r
156the global coherency domain of the processor.\r
157\r
158Arguments:\r
159 \r
160 BaseAddress - Base address of the memory space.\r
161 \r
162 Length - Length of the memory space.\r
163 \r
164Returns:\r
165\r
166 EFI_SUCCESS - Successfully remove a segment of memory space.\r
167\r
168--*/\r
169;\r
170\r
171typedef\r
172EFI_BOOTSERVICE\r
173EFI_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
180Routine Description:\r
181\r
182 Retrieves the descriptor for a memory region containing a specified address.\r
183\r
184Arguments:\r
185\r
186 BaseAddress - Specified start address\r
187 \r
188 Descriptor - Specified length\r
189\r
190Returns:\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
199typedef\r
200EFI_BOOTSERVICE\r
201EFI_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
209Routine Description:\r
210\r
211 Modifies the attributes for a memory region in the global coherency domain of the\r
212processor.\r
213\r
214Arguments:\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
222Returns:\r
223\r
224 EFI_SUCCESS - Successfully set attribute of a segment of memory space.\r
225\r
226--*/\r
227;\r
228\r
229typedef\r
230EFI_BOOTSERVICE\r
231EFI_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
238Routine Description:\r
239\r
240 Returns a map of the memory resources in the global coherency domain of the\r
241processor.\r
242\r
243Arguments:\r
244\r
245 NumberOfDescriptors - Number of descriptors.\r
246 \r
247 MemorySpaceMap - Descriptor array\r
248\r
249Returns:\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
260typedef\r
261EFI_BOOTSERVICE\r
262EFI_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
270Routine Description:\r
271\r
272 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
273\r
274Arguments:\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
282Returns:\r
283\r
284 EFI_SUCCESS - Merged this segment into GCD map.\r
285\r
286--*/\r
287;\r
288\r
289typedef\r
290EFI_BOOTSERVICE\r
291EFI_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
303Routine Description:\r
304\r
305 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
306domain of the processor.\r
307\r
308Arguments:\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
324Returns:\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
335typedef\r
336EFI_BOOTSERVICE\r
337EFI_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
344Routine Description:Routine Description:\r
345\r
346 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
347domain of the processor.\r
348\r
349Arguments:\r
350 \r
351 BaseAddress - Base address of the segment.\r
352 \r
353 Length - Length of the segment.\r
354 \r
355Returns:\r
356\r
357 EFI_SUCCESS - Space successfully freed.\r
358\r
359--*/\r
360;\r
361\r
362typedef\r
363EFI_BOOTSERVICE\r
364EFI_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
371Routine Description:Routine Description:\r
372\r
373 Removes reserved I/O or I/O resources from the global coherency domain of the\r
374processor.\r
375\r
376Arguments:\r
377 \r
378 BaseAddress - Base address of the segment.\r
379 \r
380 Length - Length of the segment.\r
381 \r
382Returns:\r
383\r
384 EFI_SUCCESS - Successfully removed a segment of IO space.\r
385\r
386--*/\r
387;\r
388\r
389typedef\r
390EFI_BOOTSERVICE\r
391EFI_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
398Routine Description:\r
399\r
400 Retrieves the descriptor for an I/O region containing a specified address.\r
401\r
402Arguments:\r
403\r
404 BaseAddress - Specified start address\r
405 \r
406 Descriptor - Specified length\r
407\r
408Returns:\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
417typedef\r
418EFI_BOOTSERVICE\r
419EFI_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
426Routine Description:\r
427\r
428 Returns a map of the I/O resources in the global coherency domain of the processor.\r
429\r
430Arguments:\r
431\r
432 NumberOfDescriptors - Number of descriptors.\r
433 \r
434 MemorySpaceMap - Descriptor array\r
435\r
436Returns:\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
447typedef\r
448EFI_BOOTSERVICE\r
449EFI_STATUS\r
450(EFIAPI *EFI_DISPATCH) (VOID)\r
451/*++\r
452\r
453Routine Description:\r
454\r
455 Loads and executed DXE drivers from firmware volumes.\r
456\r
457Arguments:\r
458\r
459 None\r
460\r
461Returns:\r
462\r
463 Status code\r
464\r
465--*/\r
466;\r
467\r
468typedef\r
469EFI_BOOTSERVICE\r
470EFI_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
477Routine 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
481Arguments:\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
487Returns:\r
488\r
489 Status code\r
490\r
491--*/\r
492;\r
493\r
494typedef\r
495EFI_BOOTSERVICE\r
496EFI_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
503Routine Description:\r
504\r
505 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
506\r
507Arguments:\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
513Returns:\r
514\r
515 Status code\r
516\r
517--*/\r
518;\r
519\r
520typedef\r
521EFI_BOOTSERVICE\r
522EFI_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
530Routine Description:\r
531\r
532 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
533\r
534Arguments:\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
540Returns:\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
557typedef 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