]>
Commit | Line | Data |
---|---|---|
162ed594 | 1 | /** @file\r |
504214c4 LG |
2 | The internal header file includes the common header files, defines\r |
3 | internal structure and functions used by DxeCore module.\r | |
23c98c94 | 4 | \r |
5 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
28a00297 | 13 | \r |
797a9d67 | 14 | **/\r |
28a00297 | 15 | \r |
16 | #ifndef _DXE_MAIN_H_\r | |
17 | #define _DXE_MAIN_H_\r | |
18 | \r | |
19 | \r | |
ed7748fe | 20 | \r |
28a00297 | 21 | #include <PiDxe.h>\r |
ed7748fe | 22 | \r |
28a00297 | 23 | #include <Protocol/LoadedImage.h>\r |
24 | #include <Protocol/GuidedSectionExtraction.h>\r | |
28a00297 | 25 | #include <Protocol/DevicePath.h>\r |
26 | #include <Protocol/Runtime.h>\r | |
27 | #include <Protocol/LoadFile.h>\r | |
28 | #include <Protocol/DriverBinding.h>\r | |
29 | #include <Protocol/VariableWrite.h>\r | |
30 | #include <Protocol/PlatformDriverOverride.h>\r | |
31 | #include <Protocol/Variable.h>\r | |
28a00297 | 32 | #include <Protocol/Timer.h>\r |
33 | #include <Protocol/SimpleFileSystem.h>\r | |
34 | #include <Protocol/Bds.h>\r | |
28a00297 | 35 | #include <Protocol/RealTimeClock.h>\r |
28a00297 | 36 | #include <Protocol/WatchdogTimer.h>\r |
0c2b5da8 | 37 | #include <Protocol/FirmwareVolume2.h>\r |
28a00297 | 38 | #include <Protocol/MonotonicCounter.h>\r |
28a00297 | 39 | #include <Protocol/StatusCode.h>\r |
28a00297 | 40 | #include <Protocol/Decompress.h>\r |
41 | #include <Protocol/LoadPe32Image.h>\r | |
42 | #include <Protocol/FirmwareVolumeDispatch.h>\r | |
43 | #include <Protocol/Security.h>\r | |
44 | #include <Protocol/Ebc.h>\r | |
28a00297 | 45 | #include <Protocol/Reset.h>\r |
28a00297 | 46 | #include <Protocol/Cpu.h>\r |
28a00297 | 47 | #include <Protocol/Metronome.h>\r |
48 | #include <Protocol/FirmwareVolumeBlock.h>\r | |
49 | #include <Protocol/Capsule.h>\r | |
50 | #include <Protocol/BusSpecificDriverOverride.h>\r | |
51 | #include <Protocol/Performance.h>\r | |
022c6d45 | 52 | #include <Protocol/TcgService.h>\r |
822360ee | 53 | #include <Protocol/TcgPlatform.h>\r |
022c6d45 | 54 | #include <Guid/MemoryTypeInformation.h>\r |
55 | #include <Guid/FirmwareFileSystem2.h>\r | |
56 | #include <Guid/HobList.h>\r | |
57 | #include <Guid/DebugImageInfoTable.h>\r | |
58 | #include <Guid/FileInfo.h>\r | |
59 | #include <Guid/Apriori.h>\r | |
60 | #include <Guid/DxeServices.h>\r | |
61 | #include <Guid/MemoryAllocationHob.h>\r | |
62 | #include <Guid/EventLegacyBios.h>\r | |
63 | #include <Guid/EventGroup.h>\r | |
64 | \r | |
ed7748fe | 65 | \r |
28a00297 | 66 | #include <Library/DxeCoreEntryPoint.h>\r |
67 | #include <Library/DebugLib.h>\r | |
68 | #include <Library/UefiLib.h>\r | |
69 | #include <Library/BaseLib.h>\r | |
70 | #include <Library/HobLib.h>\r | |
71 | #include <Library/PerformanceLib.h>\r | |
72 | #include <Library/UefiDecompressLib.h>\r | |
18fd8d65 | 73 | #include <Library/ExtractGuidedSectionLib.h>\r |
28a00297 | 74 | #include <Library/CacheMaintenanceLib.h>\r |
75 | #include <Library/BaseMemoryLib.h>\r | |
3d7b0992 | 76 | #include <Library/PeCoffLib.h>\r |
797a9d67 | 77 | #include <Library/PcdLib.h>\r |
c4869732 | 78 | #include <Library/MemoryAllocationLib.h>\r |
070f0cf7 | 79 | #include <Library/DevicePathLib.h>\r |
0e9b156d | 80 | #include <Library/UefiBootServicesTableLib.h>\r |
2680a308 | 81 | #include <Library/ReportStatusCodeLib.h>\r |
28a00297 | 82 | \r |
28a00297 | 83 | //\r |
84 | // attributes for reserved memory before it is promoted to system memory\r | |
85 | //\r | |
86 | #define EFI_MEMORY_PRESENT 0x0100000000000000ULL\r | |
87 | #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL\r | |
88 | #define EFI_MEMORY_TESTED 0x0400000000000000ULL\r | |
89 | \r | |
90 | //\r | |
91 | // range for memory mapped port I/O on IPF\r | |
92 | //\r | |
93 | #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL\r | |
94 | \r | |
95 | \r | |
96 | ///\r | |
97 | /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression\r | |
98 | /// to save time. A EFI_DEP_PUSH is evauated one an\r | |
7f932291 | 99 | /// replaced with EFI_DEP_REPLACE_TRUE. If PI spec's Vol 2\r |
100 | /// Driver Execution Environment Core Interface use 0xff\r | |
101 | /// as new DEPEX opcode. EFI_DEP_REPLACE_TRUE should be\r | |
102 | /// defined to a new value that is not conflicting with PI spec.\r | |
28a00297 | 103 | ///\r |
104 | #define EFI_DEP_REPLACE_TRUE 0xff\r | |
105 | \r | |
106 | ///\r | |
107 | /// Define the initial size of the dependency expression evaluation stack\r | |
108 | ///\r | |
109 | #define DEPEX_STACK_SIZE_INCREMENT 0x1000\r | |
110 | \r | |
111 | typedef struct {\r | |
112 | EFI_GUID *ProtocolGuid;\r | |
113 | VOID **Protocol;\r | |
114 | EFI_EVENT Event;\r | |
115 | VOID *Registration;\r | |
116 | BOOLEAN Present;\r | |
117 | } ARCHITECTURAL_PROTOCOL_ENTRY;\r | |
118 | \r | |
28a00297 | 119 | //\r |
120 | // DXE Dispatcher Data structures\r | |
121 | //\r | |
122 | \r | |
123 | #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')\r | |
124 | typedef struct {\r | |
125 | UINTN Signature;\r | |
022c6d45 | 126 | LIST_ENTRY Link; // mFvHandleList\r |
28a00297 | 127 | EFI_HANDLE Handle;\r |
128 | } KNOWN_HANDLE;\r | |
129 | \r | |
130 | \r | |
131 | #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')\r | |
132 | typedef struct {\r | |
133 | UINTN Signature;\r | |
134 | LIST_ENTRY Link; // mDriverList\r | |
135 | \r | |
136 | LIST_ENTRY ScheduledLink; // mScheduledQueue\r | |
137 | \r | |
138 | EFI_HANDLE FvHandle;\r | |
139 | EFI_GUID FileName;\r | |
140 | EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;\r | |
0c2b5da8 | 141 | EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;\r |
28a00297 | 142 | \r |
143 | VOID *Depex;\r | |
144 | UINTN DepexSize;\r | |
145 | \r | |
146 | BOOLEAN Before;\r | |
147 | BOOLEAN After;\r | |
148 | EFI_GUID BeforeAfterGuid;\r | |
149 | \r | |
150 | BOOLEAN Dependent;\r | |
151 | BOOLEAN Unrequested;\r | |
152 | BOOLEAN Scheduled;\r | |
153 | BOOLEAN Untrusted;\r | |
154 | BOOLEAN Initialized;\r | |
155 | BOOLEAN DepexProtocolError;\r | |
156 | \r | |
157 | EFI_HANDLE ImageHandle;\r | |
158 | \r | |
159 | } EFI_CORE_DRIVER_ENTRY;\r | |
160 | \r | |
161 | //\r | |
162 | //The data structure of GCD memory map entry\r | |
163 | //\r | |
164 | #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')\r | |
165 | typedef struct {\r | |
166 | UINTN Signature;\r | |
167 | LIST_ENTRY Link;\r | |
168 | EFI_PHYSICAL_ADDRESS BaseAddress;\r | |
169 | UINT64 EndAddress;\r | |
170 | UINT64 Capabilities;\r | |
171 | UINT64 Attributes;\r | |
172 | EFI_GCD_MEMORY_TYPE GcdMemoryType;\r | |
173 | EFI_GCD_IO_TYPE GcdIoType;\r | |
174 | EFI_HANDLE ImageHandle;\r | |
175 | EFI_HANDLE DeviceHandle;\r | |
176 | } EFI_GCD_MAP_ENTRY;\r | |
177 | \r | |
178 | //\r | |
179 | // DXE Core Global Variables\r | |
180 | //\r | |
181 | extern EFI_SYSTEM_TABLE *gDxeCoreST;\r | |
28a00297 | 182 | extern EFI_RUNTIME_SERVICES *gDxeCoreRT;\r |
183 | extern EFI_DXE_SERVICES *gDxeCoreDS;\r | |
184 | extern EFI_HANDLE gDxeCoreImageHandle;\r | |
185 | \r | |
186 | extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress;\r | |
28a00297 | 187 | \r |
188 | extern EFI_RUNTIME_ARCH_PROTOCOL *gRuntime;\r | |
189 | extern EFI_CPU_ARCH_PROTOCOL *gCpu;\r | |
190 | extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *gWatchdogTimer;\r | |
191 | extern EFI_METRONOME_ARCH_PROTOCOL *gMetronome;\r | |
192 | extern EFI_TIMER_ARCH_PROTOCOL *gTimer;\r | |
193 | extern EFI_SECURITY_ARCH_PROTOCOL *gSecurity;\r | |
194 | extern EFI_BDS_ARCH_PROTOCOL *gBds;\r | |
28a00297 | 195 | \r |
196 | extern EFI_TPL gEfiCurrentTpl;\r | |
197 | \r | |
198 | extern EFI_GUID *gDxeCoreFileName;\r | |
199 | extern EFI_LOADED_IMAGE_PROTOCOL *gDxeCoreLoadedImage;\r | |
200 | \r | |
201 | extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1];\r | |
202 | \r | |
203 | extern BOOLEAN gDispatcherRunning;\r | |
204 | extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;\r | |
205 | \r | |
206 | //\r | |
207 | // Service Initialization Functions\r | |
208 | //\r | |
209 | \r | |
210 | \r | |
162ed594 | 211 | \r |
212 | /**\r | |
213 | Called to initialize the pool.\r | |
214 | \r | |
215 | **/\r | |
28a00297 | 216 | VOID\r |
217 | CoreInitializePool (\r | |
218 | VOID\r | |
23c98c94 | 219 | );\r |
28a00297 | 220 | \r |
28a00297 | 221 | \r |
162ed594 | 222 | /**\r |
223 | Called to initialize the memory map and add descriptors to\r | |
224 | the current descriptor list.\r | |
225 | The first descriptor that is added must be general usable\r | |
226 | memory as the addition allocates heap.\r | |
28a00297 | 227 | \r |
022c6d45 | 228 | @param Type The type of memory to add\r |
229 | @param Start The starting address in the memory range Must be\r | |
230 | page aligned\r | |
231 | @param NumberOfPages The number of pages in the range\r | |
232 | @param Attribute Attributes of the memory to add\r | |
28a00297 | 233 | \r |
162ed594 | 234 | @return None. The range is added to the memory map\r |
28a00297 | 235 | \r |
162ed594 | 236 | **/\r |
28a00297 | 237 | VOID\r |
238 | CoreAddMemoryDescriptor (\r | |
239 | IN EFI_MEMORY_TYPE Type,\r | |
240 | IN EFI_PHYSICAL_ADDRESS Start,\r | |
241 | IN UINT64 NumberOfPages,\r | |
242 | IN UINT64 Attribute\r | |
23c98c94 | 243 | );\r |
28a00297 | 244 | \r |
28a00297 | 245 | \r |
162ed594 | 246 | /**\r |
247 | Release memory lock on mGcdMemorySpaceLock.\r | |
28a00297 | 248 | \r |
162ed594 | 249 | **/\r |
28a00297 | 250 | VOID\r |
251 | CoreReleaseGcdMemoryLock (\r | |
252 | VOID\r | |
23c98c94 | 253 | );\r |
28a00297 | 254 | \r |
28a00297 | 255 | \r |
162ed594 | 256 | /**\r |
257 | Acquire memory lock on mGcdMemorySpaceLock.\r | |
28a00297 | 258 | \r |
162ed594 | 259 | **/\r |
28a00297 | 260 | VOID\r |
261 | CoreAcquireGcdMemoryLock (\r | |
262 | VOID\r | |
23c98c94 | 263 | );\r |
28a00297 | 264 | \r |
28a00297 | 265 | \r |
162ed594 | 266 | /**\r |
c18f12d3 | 267 | External function. Initializes memory services based on the memory\r |
268 | descriptor HOBs. This function is responsible for priming the memory\r | |
269 | map, so memory allocations and resource allocations can be made.\r | |
270 | The first part of this function can not depend on any memory services\r | |
271 | until at least one memory descriptor is provided to the memory services.\r | |
28a00297 | 272 | \r |
022c6d45 | 273 | @param HobStart The start address of the HOB.\r |
274 | @param MemoryBaseAddress Start address of memory region found to init DXE\r | |
275 | core.\r | |
276 | @param MemoryLength Length of memory region found to init DXE core.\r | |
28a00297 | 277 | \r |
162ed594 | 278 | @retval EFI_SUCCESS Memory services successfully initialized.\r |
28a00297 | 279 | \r |
162ed594 | 280 | **/\r |
28a00297 | 281 | EFI_STATUS\r |
282 | CoreInitializeMemoryServices (\r | |
23c98c94 | 283 | IN VOID **HobStart,\r |
284 | OUT EFI_PHYSICAL_ADDRESS *MemoryBaseAddress,\r | |
285 | OUT UINT64 *MemoryLength\r | |
286 | );\r | |
162ed594 | 287 | \r |
28a00297 | 288 | \r |
28a00297 | 289 | \r |
162ed594 | 290 | /**\r |
291 | External function. Initializes the GCD and memory services based on the memory\r | |
28a00297 | 292 | descriptor HOBs. This function is responsible for priming the GCD map and the\r |
c18f12d3 | 293 | memory map, so memory allocations and resource allocations can be made. The\r |
294 | HobStart will be relocated to a pool buffer.\r | |
28a00297 | 295 | \r |
022c6d45 | 296 | @param HobStart The start address of the HOB\r |
297 | @param MemoryBaseAddress Start address of memory region found to init DXE\r | |
298 | core.\r | |
299 | @param MemoryLength Length of memory region found to init DXE core.\r | |
28a00297 | 300 | \r |
162ed594 | 301 | @retval EFI_SUCCESS GCD services successfully initialized.\r |
28a00297 | 302 | \r |
162ed594 | 303 | **/\r |
28a00297 | 304 | EFI_STATUS\r |
305 | CoreInitializeGcdServices (\r | |
022c6d45 | 306 | IN OUT VOID **HobStart,\r |
28a00297 | 307 | IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress,\r |
308 | IN UINT64 MemoryLength\r | |
23c98c94 | 309 | );\r |
28a00297 | 310 | \r |
28a00297 | 311 | \r |
162ed594 | 312 | /**\r |
1947c70c | 313 | Initializes "event" support.\r |
28a00297 | 314 | \r |
162ed594 | 315 | @retval EFI_SUCCESS Always return success\r |
28a00297 | 316 | \r |
162ed594 | 317 | **/\r |
28a00297 | 318 | EFI_STATUS\r |
319 | CoreInitializeEventServices (\r | |
320 | VOID\r | |
23c98c94 | 321 | );\r |
28a00297 | 322 | \r |
28a00297 | 323 | \r |
162ed594 | 324 | /**\r |
325 | Add the Image Services to EFI Boot Services Table and install the protocol\r | |
326 | interfaces for this image.\r | |
28a00297 | 327 | \r |
022c6d45 | 328 | @param HobStart The HOB to initialize\r |
28a00297 | 329 | \r |
162ed594 | 330 | @return Status code.\r |
28a00297 | 331 | \r |
162ed594 | 332 | **/\r |
28a00297 | 333 | EFI_STATUS\r |
334 | CoreInitializeImageServices (\r | |
335 | IN VOID *HobStart\r | |
23c98c94 | 336 | );\r |
28a00297 | 337 | \r |
28a00297 | 338 | \r |
162ed594 | 339 | /**\r |
340 | Creates an event that is fired everytime a Protocol of a specific type is installed.\r | |
28a00297 | 341 | \r |
162ed594 | 342 | **/\r |
28a00297 | 343 | VOID\r |
344 | CoreNotifyOnArchProtocolInstallation (\r | |
345 | VOID\r | |
23c98c94 | 346 | );\r |
28a00297 | 347 | \r |
28a00297 | 348 | \r |
162ed594 | 349 | /**\r |
350 | Return TRUE if all AP services are availible.\r | |
28a00297 | 351 | \r |
022c6d45 | 352 | @retval EFI_SUCCESS All AP services are available\r |
162ed594 | 353 | @retval EFI_NOT_FOUND At least one AP service is not available\r |
28a00297 | 354 | \r |
162ed594 | 355 | **/\r |
28a00297 | 356 | EFI_STATUS\r |
357 | CoreAllEfiServicesAvailable (\r | |
358 | VOID\r | |
23c98c94 | 359 | );\r |
28a00297 | 360 | \r |
28a00297 | 361 | \r |
162ed594 | 362 | /**\r |
363 | Calcualte the 32-bit CRC in a EFI table using the service provided by the\r | |
364 | gRuntime service.\r | |
28a00297 | 365 | \r |
162ed594 | 366 | @param Hdr Pointer to an EFI standard header\r |
28a00297 | 367 | \r |
162ed594 | 368 | **/\r |
28a00297 | 369 | VOID\r |
370 | CalculateEfiHdrCrc (\r | |
371 | IN OUT EFI_TABLE_HEADER *Hdr\r | |
23c98c94 | 372 | );\r |
28a00297 | 373 | \r |
28a00297 | 374 | \r |
162ed594 | 375 | /**\r |
376 | Called by the platform code to process a tick.\r | |
28a00297 | 377 | \r |
022c6d45 | 378 | @param Duration The number of 100ns elasped since the last call\r |
162ed594 | 379 | to TimerTick\r |
28a00297 | 380 | \r |
162ed594 | 381 | **/\r |
28a00297 | 382 | VOID\r |
383 | EFIAPI\r | |
384 | CoreTimerTick (\r | |
23c98c94 | 385 | IN UINT64 Duration\r |
386 | );\r | |
28a00297 | 387 | \r |
28a00297 | 388 | \r |
162ed594 | 389 | /**\r |
390 | Initialize the dispatcher. Initialize the notification function that runs when\r | |
022c6d45 | 391 | an FV2 protocol is added to the system.\r |
28a00297 | 392 | \r |
162ed594 | 393 | **/\r |
28a00297 | 394 | VOID\r |
395 | CoreInitializeDispatcher (\r | |
396 | VOID\r | |
23c98c94 | 397 | );\r |
28a00297 | 398 | \r |
28a00297 | 399 | \r |
162ed594 | 400 | /**\r |
401 | This is the POSTFIX version of the dependency evaluator. This code does\r | |
402 | not need to handle Before or After, as it is not valid to call this\r | |
403 | routine in this case. The SOR is just ignored and is a nop in the grammer.\r | |
404 | POSTFIX means all the math is done on top of the stack.\r | |
28a00297 | 405 | \r |
022c6d45 | 406 | @param DriverEntry DriverEntry element to update.\r |
28a00297 | 407 | \r |
022c6d45 | 408 | @retval TRUE If driver is ready to run.\r |
409 | @retval FALSE If driver is not ready to run or some fatal error\r | |
162ed594 | 410 | was found.\r |
28a00297 | 411 | \r |
162ed594 | 412 | **/\r |
28a00297 | 413 | BOOLEAN\r |
414 | CoreIsSchedulable (\r | |
022c6d45 | 415 | IN EFI_CORE_DRIVER_ENTRY *DriverEntry\r |
23c98c94 | 416 | );\r |
28a00297 | 417 | \r |
28a00297 | 418 | \r |
162ed594 | 419 | /**\r |
420 | Preprocess dependency expression and update DriverEntry to reflect the\r | |
421 | state of Before, After, and SOR dependencies. If DriverEntry->Before\r | |
422 | or DriverEntry->After is set it will never be cleared. If SOR is set\r | |
423 | it will be cleared by CoreSchedule(), and then the driver can be\r | |
424 | dispatched.\r | |
28a00297 | 425 | \r |
022c6d45 | 426 | @param DriverEntry DriverEntry element to update .\r |
28a00297 | 427 | \r |
162ed594 | 428 | @retval EFI_SUCCESS It always works.\r |
28a00297 | 429 | \r |
162ed594 | 430 | **/\r |
28a00297 | 431 | EFI_STATUS\r |
432 | CorePreProcessDepex (\r | |
022c6d45 | 433 | IN EFI_CORE_DRIVER_ENTRY *DriverEntry\r |
23c98c94 | 434 | );\r |
28a00297 | 435 | \r |
28a00297 | 436 | \r |
28a00297 | 437 | \r |
162ed594 | 438 | /**\r |
439 | Terminates all boot services.\r | |
28a00297 | 440 | \r |
022c6d45 | 441 | @param ImageHandle Handle that identifies the exiting image.\r |
162ed594 | 442 | @param MapKey Key to the latest memory map.\r |
28a00297 | 443 | \r |
022c6d45 | 444 | @retval EFI_SUCCESS Boot Services terminated\r |
162ed594 | 445 | @retval EFI_INVALID_PARAMETER MapKey is incorrect.\r |
28a00297 | 446 | \r |
162ed594 | 447 | **/\r |
28a00297 | 448 | EFI_STATUS\r |
449 | EFIAPI\r | |
450 | CoreExitBootServices (\r | |
451 | IN EFI_HANDLE ImageHandle,\r | |
452 | IN UINTN MapKey\r | |
23c98c94 | 453 | );\r |
28a00297 | 454 | \r |
28a00297 | 455 | \r |
162ed594 | 456 | /**\r |
457 | Make sure the memory map is following all the construction rules,\r | |
458 | it is the last time to check memory map error before exit boot services.\r | |
28a00297 | 459 | \r |
022c6d45 | 460 | @param MapKey Memory map key\r |
28a00297 | 461 | \r |
022c6d45 | 462 | @retval EFI_INVALID_PARAMETER Memory map not consistent with construction\r |
463 | rules.\r | |
162ed594 | 464 | @retval EFI_SUCCESS Valid memory map.\r |
28a00297 | 465 | \r |
162ed594 | 466 | **/\r |
28a00297 | 467 | EFI_STATUS\r |
468 | CoreTerminateMemoryMap (\r | |
23c98c94 | 469 | IN UINTN MapKey\r |
470 | );\r | |
28a00297 | 471 | \r |
28a00297 | 472 | \r |
162ed594 | 473 | /**\r |
474 | Signals all events in the EventGroup.\r | |
28a00297 | 475 | \r |
162ed594 | 476 | @param EventGroup The list to signal\r |
28a00297 | 477 | \r |
162ed594 | 478 | **/\r |
28a00297 | 479 | VOID\r |
480 | CoreNotifySignalList (\r | |
481 | IN EFI_GUID *EventGroup\r | |
23c98c94 | 482 | );\r |
28a00297 | 483 | \r |
28a00297 | 484 | \r |
28a00297 | 485 | \r |
162ed594 | 486 | /**\r |
487 | Boot Service called to add, modify, or remove a system configuration table from\r | |
488 | the EFI System Table.\r | |
28a00297 | 489 | \r |
022c6d45 | 490 | @param Guid Pointer to the GUID for the entry to add, update, or\r |
491 | remove\r | |
492 | @param Table Pointer to the configuration table for the entry to add,\r | |
493 | update, or remove, may be NULL.\r | |
28a00297 | 494 | \r |
162ed594 | 495 | @return EFI_SUCCESS Guid, Table pair added, updated, or removed.\r |
496 | @return EFI_INVALID_PARAMETER Input GUID not valid.\r | |
497 | @return EFI_NOT_FOUND Attempted to delete non-existant entry\r | |
498 | @return EFI_OUT_OF_RESOURCES Not enough memory available\r | |
28a00297 | 499 | \r |
162ed594 | 500 | **/\r |
28a00297 | 501 | EFI_STATUS\r |
502 | EFIAPI\r | |
503 | CoreInstallConfigurationTable (\r | |
23c98c94 | 504 | IN EFI_GUID *Guid,\r |
505 | IN VOID *Table\r | |
506 | );\r | |
28a00297 | 507 | \r |
28a00297 | 508 | \r |
28a00297 | 509 | \r |
162ed594 | 510 | /**\r |
511 | Raise the task priority level to the new level.\r | |
512 | High level is implemented by disabling processor interrupts.\r | |
28a00297 | 513 | \r |
022c6d45 | 514 | @param NewTpl New task priority level\r |
28a00297 | 515 | \r |
162ed594 | 516 | @return The previous task priority level\r |
28a00297 | 517 | \r |
162ed594 | 518 | **/\r |
28a00297 | 519 | EFI_TPL\r |
520 | EFIAPI\r | |
521 | CoreRaiseTpl (\r | |
23c98c94 | 522 | IN EFI_TPL NewTpl\r |
523 | );\r | |
28a00297 | 524 | \r |
28a00297 | 525 | \r |
28a00297 | 526 | \r |
162ed594 | 527 | /**\r |
528 | Lowers the task priority to the previous value. If the new\r | |
529 | priority unmasks events at a higher priority, they are dispatched.\r | |
28a00297 | 530 | \r |
162ed594 | 531 | @param NewTpl New, lower, task priority\r |
28a00297 | 532 | \r |
162ed594 | 533 | **/\r |
28a00297 | 534 | VOID\r |
535 | EFIAPI\r | |
536 | CoreRestoreTpl (\r | |
23c98c94 | 537 | IN EFI_TPL NewTpl\r |
538 | );\r | |
28a00297 | 539 | \r |
28a00297 | 540 | \r |
28a00297 | 541 | \r |
162ed594 | 542 | /**\r |
543 | Introduces a fine-grained stall.\r | |
28a00297 | 544 | \r |
162ed594 | 545 | @param Microseconds The number of microseconds to stall execution.\r |
28a00297 | 546 | \r |
022c6d45 | 547 | @retval EFI_SUCCESS Execution was stalled for at least the requested\r |
548 | amount of microseconds.\r | |
162ed594 | 549 | @retval EFI_NOT_AVAILABLE_YET gMetronome is not available yet\r |
28a00297 | 550 | \r |
162ed594 | 551 | **/\r |
28a00297 | 552 | EFI_STATUS\r |
553 | EFIAPI\r | |
554 | CoreStall (\r | |
555 | IN UINTN Microseconds\r | |
23c98c94 | 556 | );\r |
28a00297 | 557 | \r |
28a00297 | 558 | \r |
28a00297 | 559 | \r |
162ed594 | 560 | /**\r |
561 | Sets the system's watchdog timer.\r | |
28a00297 | 562 | \r |
162ed594 | 563 | @param Timeout The number of seconds to set the watchdog timer to.\r |
564 | A value of zero disables the timer.\r | |
565 | @param WatchdogCode The numeric code to log on a watchdog timer timeout\r | |
566 | event. The firmware reserves codes 0x0000 to 0xFFFF.\r | |
567 | Loaders and operating systems may use other timeout\r | |
568 | codes.\r | |
569 | @param DataSize The size, in bytes, of WatchdogData.\r | |
570 | @param WatchdogData A data buffer that includes a Null-terminated Unicode\r | |
571 | string, optionally followed by additional binary data.\r | |
572 | The string is a description that the call may use to\r | |
573 | further indicate the reason to be logged with a\r | |
574 | watchdog event.\r | |
575 | \r | |
576 | @return EFI_SUCCESS Timeout has been set\r | |
577 | @return EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet\r | |
578 | @return EFI_UNSUPPORTED System does not have a timer (currently not used)\r | |
579 | @return EFI_DEVICE_ERROR Could not complete due to hardware error\r | |
28a00297 | 580 | \r |
162ed594 | 581 | **/\r |
28a00297 | 582 | EFI_STATUS\r |
583 | EFIAPI\r | |
584 | CoreSetWatchdogTimer (\r | |
23c98c94 | 585 | IN UINTN Timeout,\r |
586 | IN UINT64 WatchdogCode,\r | |
587 | IN UINTN DataSize,\r | |
588 | IN CHAR16 *WatchdogData OPTIONAL\r | |
589 | );\r | |
28a00297 | 590 | \r |
28a00297 | 591 | \r |
28a00297 | 592 | \r |
162ed594 | 593 | /**\r |
594 | Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which\r | |
595 | Calls the private one which contains a BOOLEAN parameter for notifications\r | |
28a00297 | 596 | \r |
022c6d45 | 597 | @param UserHandle The handle to install the protocol handler on,\r |
598 | or NULL if a new handle is to be allocated\r | |
599 | @param Protocol The protocol to add to the handle\r | |
600 | @param InterfaceType Indicates whether Interface is supplied in\r | |
601 | native form.\r | |
602 | @param Interface The interface for the protocol being added\r | |
28a00297 | 603 | \r |
162ed594 | 604 | @return Status code\r |
28a00297 | 605 | \r |
162ed594 | 606 | **/\r |
28a00297 | 607 | EFI_STATUS\r |
608 | EFIAPI\r | |
609 | CoreInstallProtocolInterface (\r | |
610 | IN OUT EFI_HANDLE *UserHandle,\r | |
611 | IN EFI_GUID *Protocol,\r | |
612 | IN EFI_INTERFACE_TYPE InterfaceType,\r | |
613 | IN VOID *Interface\r | |
23c98c94 | 614 | );\r |
28a00297 | 615 | \r |
28a00297 | 616 | \r |
162ed594 | 617 | /**\r |
618 | Installs a protocol interface into the boot services environment.\r | |
28a00297 | 619 | \r |
022c6d45 | 620 | @param UserHandle The handle to install the protocol handler on,\r |
621 | or NULL if a new handle is to be allocated\r | |
622 | @param Protocol The protocol to add to the handle\r | |
623 | @param InterfaceType Indicates whether Interface is supplied in\r | |
624 | native form.\r | |
625 | @param Interface The interface for the protocol being added\r | |
626 | @param Notify indicates whether notify the notification list\r | |
627 | for this protocol\r | |
28a00297 | 628 | \r |
022c6d45 | 629 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
630 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 631 | @retval EFI_SUCCESS Protocol interface successfully installed\r |
28a00297 | 632 | \r |
162ed594 | 633 | **/\r |
28a00297 | 634 | EFI_STATUS\r |
635 | CoreInstallProtocolInterfaceNotify (\r | |
636 | IN OUT EFI_HANDLE *UserHandle,\r | |
637 | IN EFI_GUID *Protocol,\r | |
638 | IN EFI_INTERFACE_TYPE InterfaceType,\r | |
639 | IN VOID *Interface,\r | |
640 | IN BOOLEAN Notify\r | |
23c98c94 | 641 | );\r |
28a00297 | 642 | \r |
28a00297 | 643 | \r |
28a00297 | 644 | \r |
162ed594 | 645 | /**\r |
646 | Installs a list of protocol interface into the boot services environment.\r | |
647 | This function calls InstallProtocolInterface() in a loop. If any error\r | |
648 | occures all the protocols added by this function are removed. This is\r | |
649 | basically a lib function to save space.\r | |
28a00297 | 650 | \r |
022c6d45 | 651 | @param Handle The handle to install the protocol handlers on,\r |
652 | or NULL if a new handle is to be allocated\r | |
653 | @param ... EFI_GUID followed by protocol instance. A NULL\r | |
654 | terminates the list. The pairs are the\r | |
655 | arguments to InstallProtocolInterface(). All the\r | |
656 | protocols are added to Handle.\r | |
28a00297 | 657 | \r |
022c6d45 | 658 | @retval EFI_INVALID_PARAMETER Handle is NULL.\r |
162ed594 | 659 | @retval EFI_SUCCESS Protocol interfaces successfully installed.\r |
28a00297 | 660 | \r |
162ed594 | 661 | **/\r |
28a00297 | 662 | EFI_STATUS\r |
663 | EFIAPI\r | |
664 | CoreInstallMultipleProtocolInterfaces (\r | |
665 | IN OUT EFI_HANDLE *Handle,\r | |
666 | ...\r | |
23c98c94 | 667 | );\r |
28a00297 | 668 | \r |
28a00297 | 669 | \r |
28a00297 | 670 | \r |
162ed594 | 671 | /**\r |
672 | Uninstalls a list of protocol interface in the boot services environment.\r | |
673 | This function calls UnisatllProtocolInterface() in a loop. This is\r | |
674 | basically a lib function to save space.\r | |
28a00297 | 675 | \r |
022c6d45 | 676 | @param Handle The handle to uninstall the protocol\r |
677 | @param ... EFI_GUID followed by protocol instance. A NULL\r | |
678 | terminates the list. The pairs are the\r | |
679 | arguments to UninstallProtocolInterface(). All\r | |
680 | the protocols are added to Handle.\r | |
28a00297 | 681 | \r |
162ed594 | 682 | @return Status code\r |
28a00297 | 683 | \r |
162ed594 | 684 | **/\r |
28a00297 | 685 | EFI_STATUS\r |
686 | EFIAPI\r | |
687 | CoreUninstallMultipleProtocolInterfaces (\r | |
688 | IN EFI_HANDLE Handle,\r | |
689 | ...\r | |
23c98c94 | 690 | );\r |
28a00297 | 691 | \r |
28a00297 | 692 | \r |
28a00297 | 693 | \r |
162ed594 | 694 | /**\r |
695 | Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.\r | |
28a00297 | 696 | \r |
022c6d45 | 697 | @param UserHandle Handle on which the interface is to be\r |
698 | reinstalled\r | |
699 | @param Protocol The numeric ID of the interface\r | |
700 | @param OldInterface A pointer to the old interface\r | |
701 | @param NewInterface A pointer to the new interface\r | |
28a00297 | 702 | \r |
162ed594 | 703 | @retval EFI_SUCCESS The protocol interface was installed\r |
704 | @retval EFI_NOT_FOUND The OldInterface on the handle was not found\r | |
705 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
28a00297 | 706 | \r |
162ed594 | 707 | **/\r |
28a00297 | 708 | EFI_STATUS\r |
709 | EFIAPI\r | |
710 | CoreReinstallProtocolInterface (\r | |
711 | IN EFI_HANDLE UserHandle,\r | |
712 | IN EFI_GUID *Protocol,\r | |
713 | IN VOID *OldInterface,\r | |
714 | IN VOID *NewInterface\r | |
23c98c94 | 715 | );\r |
28a00297 | 716 | \r |
717 | \r | |
28a00297 | 718 | \r |
162ed594 | 719 | /**\r |
720 | Uninstalls all instances of a protocol:interfacer from a handle.\r | |
721 | If the last protocol interface is remove from the handle, the\r | |
722 | handle is freed.\r | |
28a00297 | 723 | \r |
022c6d45 | 724 | @param UserHandle The handle to remove the protocol handler from\r |
725 | @param Protocol The protocol, of protocol:interface, to remove\r | |
726 | @param Interface The interface, of protocol:interface, to remove\r | |
28a00297 | 727 | \r |
022c6d45 | 728 | @retval EFI_INVALID_PARAMETER Protocol is NULL.\r |
162ed594 | 729 | @retval EFI_SUCCESS Protocol interface successfully uninstalled.\r |
28a00297 | 730 | \r |
162ed594 | 731 | **/\r |
28a00297 | 732 | EFI_STATUS\r |
733 | EFIAPI\r | |
734 | CoreUninstallProtocolInterface (\r | |
735 | IN EFI_HANDLE UserHandle,\r | |
736 | IN EFI_GUID *Protocol,\r | |
737 | IN VOID *Interface\r | |
23c98c94 | 738 | );\r |
28a00297 | 739 | \r |
28a00297 | 740 | \r |
28a00297 | 741 | \r |
162ed594 | 742 | /**\r |
743 | Queries a handle to determine if it supports a specified protocol.\r | |
28a00297 | 744 | \r |
022c6d45 | 745 | @param UserHandle The handle being queried.\r |
746 | @param Protocol The published unique identifier of the protocol.\r | |
747 | @param Interface Supplies the address where a pointer to the\r | |
748 | corresponding Protocol Interface is returned.\r | |
28a00297 | 749 | \r |
162ed594 | 750 | @return The requested protocol interface for the handle\r |
28a00297 | 751 | \r |
162ed594 | 752 | **/\r |
28a00297 | 753 | EFI_STATUS\r |
754 | EFIAPI\r | |
755 | CoreHandleProtocol (\r | |
23c98c94 | 756 | IN EFI_HANDLE UserHandle,\r |
757 | IN EFI_GUID *Protocol,\r | |
758 | OUT VOID **Interface\r | |
759 | );\r | |
28a00297 | 760 | \r |
28a00297 | 761 | \r |
28a00297 | 762 | \r |
162ed594 | 763 | /**\r |
764 | Locates the installed protocol handler for the handle, and\r | |
765 | invokes it to obtain the protocol interface. Usage information\r | |
766 | is registered in the protocol data base.\r | |
28a00297 | 767 | \r |
022c6d45 | 768 | @param UserHandle The handle to obtain the protocol interface on\r |
769 | @param Protocol The ID of the protocol\r | |
770 | @param Interface The location to return the protocol interface\r | |
771 | @param ImageHandle The handle of the Image that is opening the\r | |
772 | protocol interface specified by Protocol and\r | |
773 | Interface.\r | |
774 | @param ControllerHandle The controller handle that is requiring this\r | |
775 | interface.\r | |
776 | @param Attributes The open mode of the protocol interface\r | |
777 | specified by Handle and Protocol.\r | |
778 | \r | |
779 | @retval EFI_INVALID_PARAMETER Protocol is NULL.\r | |
162ed594 | 780 | @retval EFI_SUCCESS Get the protocol interface.\r |
28a00297 | 781 | \r |
162ed594 | 782 | **/\r |
28a00297 | 783 | EFI_STATUS\r |
784 | EFIAPI\r | |
785 | CoreOpenProtocol (\r | |
786 | IN EFI_HANDLE UserHandle,\r | |
787 | IN EFI_GUID *Protocol,\r | |
788 | OUT VOID **Interface OPTIONAL,\r | |
789 | IN EFI_HANDLE ImageHandle,\r | |
790 | IN EFI_HANDLE ControllerHandle,\r | |
791 | IN UINT32 Attributes\r | |
23c98c94 | 792 | );\r |
28a00297 | 793 | \r |
28a00297 | 794 | \r |
28a00297 | 795 | \r |
162ed594 | 796 | /**\r |
797 | Return information about Opened protocols in the system\r | |
28a00297 | 798 | \r |
022c6d45 | 799 | @param UserHandle The handle to close the protocol interface on\r |
800 | @param Protocol The ID of the protocol\r | |
801 | @param EntryBuffer A pointer to a buffer of open protocol\r | |
802 | information in the form of\r | |
803 | EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r | |
162ed594 | 804 | @param EntryCount Number of EntryBuffer entries\r |
28a00297 | 805 | \r |
162ed594 | 806 | **/\r |
28a00297 | 807 | EFI_STATUS\r |
808 | EFIAPI\r | |
809 | CoreOpenProtocolInformation (\r | |
810 | IN EFI_HANDLE UserHandle,\r | |
811 | IN EFI_GUID *Protocol,\r | |
812 | OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r | |
813 | OUT UINTN *EntryCount\r | |
23c98c94 | 814 | );\r |
28a00297 | 815 | \r |
28a00297 | 816 | \r |
28a00297 | 817 | \r |
162ed594 | 818 | /**\r |
819 | Closes a protocol on a handle that was opened using OpenProtocol().\r | |
28a00297 | 820 | \r |
022c6d45 | 821 | @param UserHandle The handle for the protocol interface that was\r |
822 | previously opened with OpenProtocol(), and is\r | |
823 | now being closed.\r | |
824 | @param Protocol The published unique identifier of the protocol.\r | |
825 | It is the caller's responsibility to pass in a\r | |
826 | valid GUID.\r | |
827 | @param AgentHandle The handle of the agent that is closing the\r | |
828 | protocol interface.\r | |
829 | @param ControllerHandle If the agent that opened a protocol is a driver\r | |
830 | that follows the EFI Driver Model, then this\r | |
831 | parameter is the controller handle that required\r | |
832 | the protocol interface. If the agent does not\r | |
833 | follow the EFI Driver Model, then this parameter\r | |
834 | is optional and may be NULL.\r | |
835 | \r | |
836 | @retval EFI_SUCCESS The protocol instance was closed.\r | |
837 | @retval EFI_INVALID_PARAMETER Handle, AgentHandle or ControllerHandle is not a\r | |
838 | valid EFI_HANDLE.\r | |
839 | @retval EFI_NOT_FOUND Can not find the specified protocol or\r | |
162ed594 | 840 | AgentHandle.\r |
28a00297 | 841 | \r |
162ed594 | 842 | **/\r |
28a00297 | 843 | EFI_STATUS\r |
844 | EFIAPI\r | |
845 | CoreCloseProtocol (\r | |
846 | IN EFI_HANDLE UserHandle,\r | |
847 | IN EFI_GUID *Protocol,\r | |
162ed594 | 848 | IN EFI_HANDLE AgentHandle,\r |
022c6d45 | 849 | IN EFI_HANDLE ControllerHandle\r |
23c98c94 | 850 | );\r |
28a00297 | 851 | \r |
28a00297 | 852 | \r |
28a00297 | 853 | \r |
162ed594 | 854 | /**\r |
855 | Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r | |
856 | from pool.\r | |
857 | \r | |
022c6d45 | 858 | @param UserHandle The handle from which to retrieve the list of\r |
859 | protocol interface GUIDs.\r | |
860 | @param ProtocolBuffer A pointer to the list of protocol interface GUID\r | |
861 | pointers that are installed on Handle.\r | |
862 | @param ProtocolBufferCount A pointer to the number of GUID pointers present\r | |
863 | in ProtocolBuffer.\r | |
864 | \r | |
865 | @retval EFI_SUCCESS The list of protocol interface GUIDs installed\r | |
866 | on Handle was returned in ProtocolBuffer. The\r | |
867 | number of protocol interface GUIDs was returned\r | |
868 | in ProtocolBufferCount.\r | |
869 | @retval EFI_INVALID_PARAMETER Handle is NULL.\r | |
870 | @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r | |
871 | @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.\r | |
872 | @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.\r | |
873 | @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the\r | |
162ed594 | 874 | results.\r |
28a00297 | 875 | \r |
162ed594 | 876 | **/\r |
28a00297 | 877 | EFI_STATUS\r |
878 | EFIAPI\r | |
879 | CoreProtocolsPerHandle (\r | |
23c98c94 | 880 | IN EFI_HANDLE UserHandle,\r |
881 | OUT EFI_GUID ***ProtocolBuffer,\r | |
882 | OUT UINTN *ProtocolBufferCount\r | |
883 | );\r | |
28a00297 | 884 | \r |
28a00297 | 885 | \r |
28a00297 | 886 | \r |
162ed594 | 887 | /**\r |
888 | Add a new protocol notification record for the request protocol.\r | |
28a00297 | 889 | \r |
022c6d45 | 890 | @param Protocol The requested protocol to add the notify\r |
891 | registration\r | |
892 | @param Event The event to signal\r | |
893 | @param Registration Returns the registration record\r | |
28a00297 | 894 | \r |
022c6d45 | 895 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
896 | @retval EFI_SUCCESS Successfully returned the registration record\r | |
162ed594 | 897 | that has been added\r |
28a00297 | 898 | \r |
162ed594 | 899 | **/\r |
28a00297 | 900 | EFI_STATUS\r |
901 | EFIAPI\r | |
902 | CoreRegisterProtocolNotify (\r | |
23c98c94 | 903 | IN EFI_GUID *Protocol,\r |
904 | IN EFI_EVENT Event,\r | |
022c6d45 | 905 | OUT VOID **Registration\r |
23c98c94 | 906 | );\r |
022c6d45 | 907 | \r |
28a00297 | 908 | \r |
ec90508b | 909 | /**\r |
910 | Removes all the events in the protocol database that match Event.\r | |
911 | \r | |
912 | @param Event The event to search for in the protocol\r | |
913 | database.\r | |
914 | \r | |
915 | @return EFI_SUCCESS when done searching the entire database.\r | |
916 | \r | |
917 | **/\r | |
918 | EFI_STATUS\r | |
919 | CoreUnregisterProtocolNotify (\r | |
920 | IN EFI_EVENT Event\r | |
921 | );\r | |
922 | \r | |
28a00297 | 923 | \r |
162ed594 | 924 | /**\r |
925 | Locates the requested handle(s) and returns them in Buffer.\r | |
28a00297 | 926 | \r |
022c6d45 | 927 | @param SearchType The type of search to perform to locate the\r |
928 | handles\r | |
929 | @param Protocol The protocol to search for\r | |
930 | @param SearchKey Dependant on SearchType\r | |
931 | @param BufferSize On input the size of Buffer. On output the\r | |
932 | size of data returned.\r | |
933 | @param Buffer The buffer to return the results in\r | |
28a00297 | 934 | \r |
022c6d45 | 935 | @retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is\r |
936 | returned in BufferSize.\r | |
937 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
938 | @retval EFI_SUCCESS Successfully found the requested handle(s) and\r | |
162ed594 | 939 | returns them in Buffer.\r |
28a00297 | 940 | \r |
162ed594 | 941 | **/\r |
28a00297 | 942 | EFI_STATUS\r |
943 | EFIAPI\r | |
944 | CoreLocateHandle (\r | |
23c98c94 | 945 | IN EFI_LOCATE_SEARCH_TYPE SearchType,\r |
946 | IN EFI_GUID *Protocol OPTIONAL,\r | |
947 | IN VOID *SearchKey OPTIONAL,\r | |
948 | IN OUT UINTN *BufferSize,\r | |
949 | OUT EFI_HANDLE *Buffer\r | |
950 | );\r | |
022c6d45 | 951 | \r |
28a00297 | 952 | \r |
28a00297 | 953 | \r |
162ed594 | 954 | /**\r |
955 | Locates the handle to a device on the device path that best matches the specified protocol.\r | |
28a00297 | 956 | \r |
022c6d45 | 957 | @param Protocol The protocol to search for.\r |
958 | @param DevicePath On input, a pointer to a pointer to the device\r | |
959 | path. On output, the device path pointer is\r | |
960 | modified to point to the remaining part of the\r | |
961 | devicepath.\r | |
962 | @param Device A pointer to the returned device handle.\r | |
28a00297 | 963 | \r |
022c6d45 | 964 | @retval EFI_SUCCESS The resulting handle was returned.\r |
965 | @retval EFI_NOT_FOUND No handles matched the search.\r | |
162ed594 | 966 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r |
28a00297 | 967 | \r |
162ed594 | 968 | **/\r |
28a00297 | 969 | EFI_STATUS\r |
970 | EFIAPI\r | |
971 | CoreLocateDevicePath (\r | |
23c98c94 | 972 | IN EFI_GUID *Protocol,\r |
973 | IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,\r | |
974 | OUT EFI_HANDLE *Device\r | |
975 | );\r | |
28a00297 | 976 | \r |
022c6d45 | 977 | \r |
28a00297 | 978 | \r |
162ed594 | 979 | /**\r |
980 | Function returns an array of handles that support the requested protocol\r | |
981 | in a buffer allocated from pool. This is a version of CoreLocateHandle()\r | |
982 | that allocates a buffer for the caller.\r | |
28a00297 | 983 | \r |
022c6d45 | 984 | @param SearchType Specifies which handle(s) are to be returned.\r |
985 | @param Protocol Provides the protocol to search by. This\r | |
986 | parameter is only valid for SearchType\r | |
987 | ByProtocol.\r | |
988 | @param SearchKey Supplies the search key depending on the\r | |
989 | SearchType.\r | |
990 | @param NumberHandles The number of handles returned in Buffer.\r | |
991 | @param Buffer A pointer to the buffer to return the requested\r | |
992 | array of handles that support Protocol.\r | |
993 | \r | |
994 | @retval EFI_SUCCESS The result array of handles was returned.\r | |
995 | @retval EFI_NOT_FOUND No handles match the search.\r | |
996 | @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the\r | |
997 | matching results.\r | |
998 | @retval EFI_INVALID_PARAMETER One or more paramters are not valid.\r | |
28a00297 | 999 | \r |
162ed594 | 1000 | **/\r |
28a00297 | 1001 | EFI_STATUS\r |
1002 | EFIAPI\r | |
1003 | CoreLocateHandleBuffer (\r | |
23c98c94 | 1004 | IN EFI_LOCATE_SEARCH_TYPE SearchType,\r |
1005 | IN EFI_GUID *Protocol OPTIONAL,\r | |
1006 | IN VOID *SearchKey OPTIONAL,\r | |
1007 | IN OUT UINTN *NumberHandles,\r | |
1008 | OUT EFI_HANDLE **Buffer\r | |
1009 | );\r | |
28a00297 | 1010 | \r |
022c6d45 | 1011 | \r |
28a00297 | 1012 | \r |
162ed594 | 1013 | /**\r |
1014 | Return the first Protocol Interface that matches the Protocol GUID. If\r | |
1015 | Registration is pasased in return a Protocol Instance that was just add\r | |
1016 | to the system. If Retistration is NULL return the first Protocol Interface\r | |
1017 | you find.\r | |
28a00297 | 1018 | \r |
44310938 | 1019 | @param Protocol The protocol to search for\r |
1020 | @param Registration Optional Registration Key returned from\r | |
1021 | RegisterProtocolNotify()\r | |
1022 | @param Interface Return the Protocol interface (instance).\r | |
28a00297 | 1023 | \r |
44310938 | 1024 | @retval EFI_SUCCESS If a valid Interface is returned\r |
1025 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
162ed594 | 1026 | @retval EFI_NOT_FOUND Protocol interface not found\r |
28a00297 | 1027 | \r |
162ed594 | 1028 | **/\r |
28a00297 | 1029 | EFI_STATUS\r |
1030 | EFIAPI\r | |
1031 | CoreLocateProtocol (\r | |
23c98c94 | 1032 | IN EFI_GUID *Protocol,\r |
1033 | IN VOID *Registration OPTIONAL,\r | |
1034 | OUT VOID **Interface\r | |
1035 | );\r | |
28a00297 | 1036 | \r |
28a00297 | 1037 | \r |
162ed594 | 1038 | /**\r |
1039 | return handle database key.\r | |
28a00297 | 1040 | \r |
28a00297 | 1041 | \r |
162ed594 | 1042 | @return Handle database key.\r |
28a00297 | 1043 | \r |
162ed594 | 1044 | **/\r |
28a00297 | 1045 | UINT64\r |
1046 | CoreGetHandleDatabaseKey (\r | |
1047 | VOID\r | |
23c98c94 | 1048 | );\r |
28a00297 | 1049 | \r |
28a00297 | 1050 | \r |
162ed594 | 1051 | /**\r |
1052 | Go connect any handles that were created or modified while a image executed.\r | |
28a00297 | 1053 | \r |
022c6d45 | 1054 | @param Key The Key to show that the handle has been\r |
162ed594 | 1055 | created/modified\r |
28a00297 | 1056 | \r |
162ed594 | 1057 | **/\r |
28a00297 | 1058 | VOID\r |
1059 | CoreConnectHandlesByKey (\r | |
1060 | UINT64 Key\r | |
23c98c94 | 1061 | );\r |
28a00297 | 1062 | \r |
28a00297 | 1063 | \r |
28a00297 | 1064 | \r |
162ed594 | 1065 | /**\r |
1066 | Connects one or more drivers to a controller.\r | |
28a00297 | 1067 | \r |
022c6d45 | 1068 | @param ControllerHandle Handle of the controller to be\r |
1069 | connected.\r | |
1070 | @param DriverImageHandle DriverImageHandle A pointer to an\r | |
1071 | ordered list of driver image\r | |
1072 | handles.\r | |
1073 | @param RemainingDevicePath RemainingDevicePath A pointer to\r | |
1074 | the device path that specifies a\r | |
1075 | child of the controller specified\r | |
1076 | by ControllerHandle.\r | |
1077 | @param Recursive Whether the function would be\r | |
1078 | called recursively or not.\r | |
28a00297 | 1079 | \r |
162ed594 | 1080 | @return Status code.\r |
28a00297 | 1081 | \r |
162ed594 | 1082 | **/\r |
022c6d45 | 1083 | EFI_STATUS\r |
28a00297 | 1084 | EFIAPI\r |
1085 | CoreConnectController (\r | |
1086 | IN EFI_HANDLE ControllerHandle,\r | |
1087 | IN EFI_HANDLE *DriverImageHandle OPTIONAL,\r | |
1088 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,\r | |
1089 | IN BOOLEAN Recursive\r | |
23c98c94 | 1090 | );\r |
28a00297 | 1091 | \r |
28a00297 | 1092 | \r |
28a00297 | 1093 | \r |
162ed594 | 1094 | /**\r |
1095 | Disonnects a controller from a driver\r | |
28a00297 | 1096 | \r |
022c6d45 | 1097 | @param ControllerHandle ControllerHandle The handle of\r |
1098 | the controller from which\r | |
1099 | driver(s) are to be\r | |
1100 | disconnected.\r | |
1101 | @param DriverImageHandle DriverImageHandle The driver to\r | |
1102 | disconnect from ControllerHandle.\r | |
1103 | @param ChildHandle ChildHandle The handle of the\r | |
1104 | child to destroy.\r | |
1105 | \r | |
1106 | @retval EFI_SUCCESS One or more drivers were\r | |
1107 | disconnected from the controller.\r | |
1108 | @retval EFI_SUCCESS On entry, no drivers are managing\r | |
1109 | ControllerHandle.\r | |
1110 | @retval EFI_SUCCESS DriverImageHandle is not NULL,\r | |
1111 | and on entry DriverImageHandle is\r | |
1112 | not managing ControllerHandle.\r | |
1113 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r | |
1114 | EFI_HANDLE.\r | |
1115 | @retval EFI_INVALID_PARAMETER DriverImageHandle is not NULL,\r | |
1116 | and it is not a valid EFI_HANDLE.\r | |
1117 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL, and it\r | |
1118 | is not a valid EFI_HANDLE.\r | |
1119 | @retval EFI_OUT_OF_RESOURCES There are not enough resources\r | |
1120 | available to disconnect any\r | |
1121 | drivers from ControllerHandle.\r | |
1122 | @retval EFI_DEVICE_ERROR The controller could not be\r | |
1123 | disconnected because of a device\r | |
162ed594 | 1124 | error.\r |
28a00297 | 1125 | \r |
162ed594 | 1126 | **/\r |
022c6d45 | 1127 | EFI_STATUS\r |
28a00297 | 1128 | EFIAPI\r |
1129 | CoreDisconnectController (\r | |
23c98c94 | 1130 | IN EFI_HANDLE ControllerHandle,\r |
1131 | IN EFI_HANDLE DriverImageHandle OPTIONAL,\r | |
1132 | IN EFI_HANDLE ChildHandle OPTIONAL\r | |
1133 | );\r | |
28a00297 | 1134 | \r |
28a00297 | 1135 | \r |
28a00297 | 1136 | \r |
162ed594 | 1137 | /**\r |
1138 | Allocates pages from the memory map.\r | |
28a00297 | 1139 | \r |
022c6d45 | 1140 | @param Type The type of allocation to perform\r |
1141 | @param MemoryType The type of memory to turn the allocated pages\r | |
1142 | into\r | |
1143 | @param NumberOfPages The number of pages to allocate\r | |
1144 | @param Memory A pointer to receive the base allocated memory\r | |
1145 | address\r | |
28a00297 | 1146 | \r |
162ed594 | 1147 | @return Status. On success, Memory is filled in with the base address allocated\r |
022c6d45 | 1148 | @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in\r |
1149 | spec.\r | |
1150 | @retval EFI_NOT_FOUND Could not allocate pages match the requirement.\r | |
1151 | @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.\r | |
162ed594 | 1152 | @retval EFI_SUCCESS Pages successfully allocated.\r |
28a00297 | 1153 | \r |
162ed594 | 1154 | **/\r |
28a00297 | 1155 | EFI_STATUS\r |
1156 | EFIAPI\r | |
1157 | CoreAllocatePages (\r | |
23c98c94 | 1158 | IN EFI_ALLOCATE_TYPE Type,\r |
1159 | IN EFI_MEMORY_TYPE MemoryType,\r | |
1160 | IN UINTN NumberOfPages,\r | |
1161 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
1162 | );\r | |
28a00297 | 1163 | \r |
28a00297 | 1164 | \r |
28a00297 | 1165 | \r |
162ed594 | 1166 | /**\r |
1167 | Frees previous allocated pages.\r | |
28a00297 | 1168 | \r |
022c6d45 | 1169 | @param Memory Base address of memory being freed\r |
1170 | @param NumberOfPages The number of pages to free\r | |
28a00297 | 1171 | \r |
022c6d45 | 1172 | @retval EFI_NOT_FOUND Could not find the entry that covers the range\r |
1173 | @retval EFI_INVALID_PARAMETER Address not aligned\r | |
162ed594 | 1174 | @return EFI_SUCCESS -Pages successfully freed.\r |
28a00297 | 1175 | \r |
162ed594 | 1176 | **/\r |
022c6d45 | 1177 | EFI_STATUS\r |
28a00297 | 1178 | EFIAPI\r |
1179 | CoreFreePages (\r | |
1180 | IN EFI_PHYSICAL_ADDRESS Memory,\r | |
1181 | IN UINTN NumberOfPages\r | |
23c98c94 | 1182 | );\r |
28a00297 | 1183 | \r |
28a00297 | 1184 | \r |
28a00297 | 1185 | \r |
162ed594 | 1186 | /**\r |
1187 | This function returns a copy of the current memory map. The map is an array of\r | |
1188 | memory descriptors, each of which describes a contiguous block of memory.\r | |
28a00297 | 1189 | \r |
022c6d45 | 1190 | @param MemoryMapSize A pointer to the size, in bytes, of the\r |
1191 | MemoryMap buffer. On input, this is the size of\r | |
1192 | the buffer allocated by the caller. On output,\r | |
1193 | it is the size of the buffer returned by the\r | |
1194 | firmware if the buffer was large enough, or the\r | |
1195 | size of the buffer needed to contain the map if\r | |
1196 | the buffer was too small.\r | |
1197 | @param MemoryMap A pointer to the buffer in which firmware places\r | |
1198 | the current memory map.\r | |
1199 | @param MapKey A pointer to the location in which firmware\r | |
1200 | returns the key for the current memory map.\r | |
1201 | @param DescriptorSize A pointer to the location in which firmware\r | |
1202 | returns the size, in bytes, of an individual\r | |
1203 | EFI_MEMORY_DESCRIPTOR.\r | |
1204 | @param DescriptorVersion A pointer to the location in which firmware\r | |
1205 | returns the version number associated with the\r | |
1206 | EFI_MEMORY_DESCRIPTOR.\r | |
1207 | \r | |
1208 | @retval EFI_SUCCESS The memory map was returned in the MemoryMap\r | |
1209 | buffer.\r | |
1210 | @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current\r | |
1211 | buffer size needed to hold the memory map is\r | |
1212 | returned in MemoryMapSize.\r | |
162ed594 | 1213 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r |
28a00297 | 1214 | \r |
162ed594 | 1215 | **/\r |
28a00297 | 1216 | EFI_STATUS\r |
1217 | EFIAPI\r | |
1218 | CoreGetMemoryMap (\r | |
23c98c94 | 1219 | IN OUT UINTN *MemoryMapSize,\r |
1220 | IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,\r | |
1221 | OUT UINTN *MapKey,\r | |
1222 | OUT UINTN *DescriptorSize,\r | |
1223 | OUT UINT32 *DescriptorVersion\r | |
1224 | );\r | |
28a00297 | 1225 | \r |
28a00297 | 1226 | \r |
28a00297 | 1227 | \r |
162ed594 | 1228 | /**\r |
1229 | Allocate pool of a particular type.\r | |
28a00297 | 1230 | \r |
022c6d45 | 1231 | @param PoolType Type of pool to allocate\r |
1232 | @param Size The amount of pool to allocate\r | |
1233 | @param Buffer The address to return a pointer to the allocated\r | |
1234 | pool\r | |
28a00297 | 1235 | \r |
022c6d45 | 1236 | @retval EFI_INVALID_PARAMETER PoolType not valid\r |
1237 | @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r | |
162ed594 | 1238 | @retval EFI_SUCCESS Pool successfully allocated.\r |
28a00297 | 1239 | \r |
162ed594 | 1240 | **/\r |
28a00297 | 1241 | EFI_STATUS\r |
1242 | EFIAPI\r | |
1243 | CoreAllocatePool (\r | |
23c98c94 | 1244 | IN EFI_MEMORY_TYPE PoolType,\r |
1245 | IN UINTN Size,\r | |
1246 | OUT VOID **Buffer\r | |
1247 | );\r | |
28a00297 | 1248 | \r |
28a00297 | 1249 | \r |
28a00297 | 1250 | \r |
162ed594 | 1251 | /**\r |
1252 | Frees pool.\r | |
28a00297 | 1253 | \r |
022c6d45 | 1254 | @param Buffer The allocated pool entry to free\r |
28a00297 | 1255 | \r |
022c6d45 | 1256 | @retval EFI_INVALID_PARAMETER Buffer is not a valid value.\r |
162ed594 | 1257 | @retval EFI_SUCCESS Pool successfully freed.\r |
28a00297 | 1258 | \r |
162ed594 | 1259 | **/\r |
28a00297 | 1260 | EFI_STATUS\r |
1261 | EFIAPI\r | |
1262 | CoreFreePool (\r | |
23c98c94 | 1263 | IN VOID *Buffer\r |
1264 | );\r | |
28a00297 | 1265 | \r |
28a00297 | 1266 | \r |
28a00297 | 1267 | \r |
162ed594 | 1268 | /**\r |
1269 | Loads an EFI image into memory and returns a handle to the image.\r | |
28a00297 | 1270 | \r |
022c6d45 | 1271 | @param BootPolicy If TRUE, indicates that the request originates\r |
1272 | from the boot manager, and that the boot\r | |
1273 | manager is attempting to load FilePath as a\r | |
1274 | boot selection.\r | |
1275 | @param ParentImageHandle The caller's image handle.\r | |
1276 | @param FilePath The specific file path from which the image is\r | |
1277 | loaded.\r | |
1278 | @param SourceBuffer If not NULL, a pointer to the memory location\r | |
1279 | containing a copy of the image to be loaded.\r | |
1280 | @param SourceSize The size in bytes of SourceBuffer.\r | |
1281 | @param ImageHandle Pointer to the returned image handle that is\r | |
1282 | created when the image is successfully loaded.\r | |
1283 | \r | |
1284 | @retval EFI_SUCCESS The image was loaded into memory.\r | |
1285 | @retval EFI_NOT_FOUND The FilePath was not found.\r | |
1286 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r | |
1287 | @retval EFI_UNSUPPORTED The image type is not supported, or the device\r | |
1288 | path cannot be parsed to locate the proper\r | |
1289 | protocol for loading the file.\r | |
1290 | @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient\r | |
162ed594 | 1291 | resources.\r |
28a00297 | 1292 | \r |
162ed594 | 1293 | **/\r |
28a00297 | 1294 | EFI_STATUS\r |
1295 | EFIAPI\r | |
1296 | CoreLoadImage (\r | |
23c98c94 | 1297 | IN BOOLEAN BootPolicy,\r |
1298 | IN EFI_HANDLE ParentImageHandle,\r | |
1299 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r | |
1300 | IN VOID *SourceBuffer OPTIONAL,\r | |
1301 | IN UINTN SourceSize,\r | |
1302 | OUT EFI_HANDLE *ImageHandle\r | |
1303 | );\r | |
28a00297 | 1304 | \r |
28a00297 | 1305 | \r |
28a00297 | 1306 | \r |
162ed594 | 1307 | /**\r |
1308 | Unloads an image.\r | |
28a00297 | 1309 | \r |
022c6d45 | 1310 | @param ImageHandle Handle that identifies the image to be\r |
1311 | unloaded.\r | |
28a00297 | 1312 | \r |
022c6d45 | 1313 | @retval EFI_SUCCESS The image has been unloaded.\r |
1314 | @retval EFI_UNSUPPORTED The image has been sarted, and does not support\r | |
1315 | unload.\r | |
162ed594 | 1316 | @retval EFI_INVALID_PARAMPETER ImageHandle is not a valid image handle.\r |
28a00297 | 1317 | \r |
162ed594 | 1318 | **/\r |
28a00297 | 1319 | EFI_STATUS\r |
1320 | EFIAPI\r | |
1321 | CoreUnloadImage (\r | |
1322 | IN EFI_HANDLE ImageHandle\r | |
23c98c94 | 1323 | );\r |
28a00297 | 1324 | \r |
28a00297 | 1325 | \r |
28a00297 | 1326 | \r |
162ed594 | 1327 | /**\r |
1328 | Transfer control to a loaded image's entry point.\r | |
28a00297 | 1329 | \r |
022c6d45 | 1330 | @param ImageHandle Handle of image to be started.\r |
1331 | @param ExitDataSize Pointer of the size to ExitData\r | |
1332 | @param ExitData Pointer to a pointer to a data buffer that\r | |
1333 | includes a Null-terminated Unicode string,\r | |
1334 | optionally followed by additional binary data.\r | |
1335 | The string is a description that the caller may\r | |
1336 | use to further indicate the reason for the\r | |
1337 | image's exit.\r | |
1338 | \r | |
1339 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
1340 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
1341 | @retval EFI_SUCCESS Successfully transfer control to the image's\r | |
162ed594 | 1342 | entry point.\r |
28a00297 | 1343 | \r |
162ed594 | 1344 | **/\r |
28a00297 | 1345 | EFI_STATUS\r |
1346 | EFIAPI\r | |
1347 | CoreStartImage (\r | |
23c98c94 | 1348 | IN EFI_HANDLE ImageHandle,\r |
1349 | OUT UINTN *ExitDataSize,\r | |
1350 | OUT CHAR16 **ExitData OPTIONAL\r | |
1351 | );\r | |
28a00297 | 1352 | \r |
28a00297 | 1353 | \r |
28a00297 | 1354 | \r |
162ed594 | 1355 | /**\r |
1356 | Terminates the currently loaded EFI image and returns control to boot services.\r | |
28a00297 | 1357 | \r |
022c6d45 | 1358 | @param ImageHandle Handle that identifies the image. This\r |
1359 | parameter is passed to the image on entry.\r | |
1360 | @param Status The image's exit code.\r | |
1361 | @param ExitDataSize The size, in bytes, of ExitData. Ignored if\r | |
1362 | ExitStatus is EFI_SUCCESS.\r | |
1363 | @param ExitData Pointer to a data buffer that includes a\r | |
1364 | Null-terminated Unicode string, optionally\r | |
1365 | followed by additional binary data. The string\r | |
1366 | is a description that the caller may use to\r | |
1367 | further indicate the reason for the image's\r | |
1368 | exit.\r | |
1369 | \r | |
1370 | @retval EFI_INVALID_PARAMETER Image handle is NULL or it is not current\r | |
1371 | image.\r | |
1372 | @retval EFI_SUCCESS Successfully terminates the currently loaded\r | |
1373 | EFI image.\r | |
1374 | @retval EFI_ACCESS_DENIED Should never reach there.\r | |
162ed594 | 1375 | @retval EFI_OUT_OF_RESOURCES Could not allocate pool\r |
28a00297 | 1376 | \r |
162ed594 | 1377 | **/\r |
28a00297 | 1378 | EFI_STATUS\r |
1379 | EFIAPI\r | |
1380 | CoreExit (\r | |
1381 | IN EFI_HANDLE ImageHandle,\r | |
1382 | IN EFI_STATUS Status,\r | |
1383 | IN UINTN ExitDataSize,\r | |
1384 | IN CHAR16 *ExitData OPTIONAL\r | |
23c98c94 | 1385 | );\r |
28a00297 | 1386 | \r |
28a00297 | 1387 | \r |
28a00297 | 1388 | \r |
162ed594 | 1389 | /**\r |
1390 | Creates a general-purpose event structure.\r | |
28a00297 | 1391 | \r |
022c6d45 | 1392 | @param Type The type of event to create and its mode and\r |
1393 | attributes\r | |
1394 | @param NotifyTpl The task priority level of event notifications\r | |
1395 | @param NotifyFunction Pointer to the events notification function\r | |
1396 | @param NotifyContext Pointer to the notification functions context;\r | |
1397 | corresponds to parameter "Context" in the\r | |
1398 | notification function\r | |
1399 | @param Event Pointer to the newly created event if the call\r | |
1400 | succeeds; undefined otherwise\r | |
1401 | \r | |
1402 | @retval EFI_SUCCESS The event structure was created\r | |
1403 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
162ed594 | 1404 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated\r |
28a00297 | 1405 | \r |
162ed594 | 1406 | **/\r |
28a00297 | 1407 | EFI_STATUS\r |
1408 | EFIAPI\r | |
1409 | CoreCreateEvent (\r | |
23c98c94 | 1410 | IN UINT32 Type,\r |
1411 | IN EFI_TPL NotifyTpl,\r | |
1412 | IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r | |
1413 | IN VOID *NotifyContext, OPTIONAL\r | |
1414 | OUT EFI_EVENT *Event\r | |
1415 | );\r | |
28a00297 | 1416 | \r |
28a00297 | 1417 | \r |
28a00297 | 1418 | \r |
162ed594 | 1419 | /**\r |
1420 | Creates a general-purpose event structure\r | |
28a00297 | 1421 | \r |
022c6d45 | 1422 | @param Type The type of event to create and its mode and\r |
1423 | attributes\r | |
1424 | @param NotifyTpl The task priority level of event notifications\r | |
1425 | @param NotifyFunction Pointer to the events notification function\r | |
1426 | @param NotifyContext Pointer to the notification functions context;\r | |
1427 | corresponds to parameter "Context" in the\r | |
1428 | notification function\r | |
1429 | @param EventGroup GUID for EventGroup if NULL act the same as\r | |
1430 | gBS->CreateEvent().\r | |
1431 | @param Event Pointer to the newly created event if the call\r | |
1432 | succeeds; undefined otherwise\r | |
1433 | \r | |
1434 | @retval EFI_SUCCESS The event structure was created\r | |
1435 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
162ed594 | 1436 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated\r |
28a00297 | 1437 | \r |
162ed594 | 1438 | **/\r |
28a00297 | 1439 | EFI_STATUS\r |
1440 | EFIAPI\r | |
1441 | CoreCreateEventEx (\r | |
1442 | IN UINT32 Type,\r | |
1443 | IN EFI_TPL NotifyTpl,\r | |
1444 | IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r | |
1445 | IN CONST VOID *NotifyContext, OPTIONAL\r | |
1446 | IN CONST EFI_GUID *EventGroup, OPTIONAL\r | |
1447 | OUT EFI_EVENT *Event\r | |
23c98c94 | 1448 | );\r |
28a00297 | 1449 | \r |
28a00297 | 1450 | \r |
28a00297 | 1451 | \r |
162ed594 | 1452 | /**\r |
1453 | Sets the type of timer and the trigger time for a timer event.\r | |
28a00297 | 1454 | \r |
022c6d45 | 1455 | @param UserEvent The timer event that is to be signaled at the\r |
1456 | specified time\r | |
1457 | @param Type The type of time that is specified in\r | |
1458 | TriggerTime\r | |
1459 | @param TriggerTime The number of 100ns units until the timer\r | |
1460 | expires\r | |
28a00297 | 1461 | \r |
022c6d45 | 1462 | @retval EFI_SUCCESS The event has been set to be signaled at the\r |
1463 | requested time\r | |
162ed594 | 1464 | @retval EFI_INVALID_PARAMETER Event or Type is not valid\r |
28a00297 | 1465 | \r |
162ed594 | 1466 | **/\r |
28a00297 | 1467 | EFI_STATUS\r |
1468 | EFIAPI\r | |
1469 | CoreSetTimer (\r | |
23c98c94 | 1470 | IN EFI_EVENT UserEvent,\r |
28a00297 | 1471 | IN EFI_TIMER_DELAY Type,\r |
1472 | IN UINT64 TriggerTime\r | |
23c98c94 | 1473 | );\r |
28a00297 | 1474 | \r |
28a00297 | 1475 | \r |
28a00297 | 1476 | \r |
162ed594 | 1477 | /**\r |
022c6d45 | 1478 | Signals the event. Queues the event to be notified if needed.\r |
28a00297 | 1479 | \r |
022c6d45 | 1480 | @param UserEvent The event to signal .\r |
28a00297 | 1481 | \r |
022c6d45 | 1482 | @retval EFI_INVALID_PARAMETER Parameters are not valid.\r |
162ed594 | 1483 | @retval EFI_SUCCESS The event was signaled.\r |
28a00297 | 1484 | \r |
162ed594 | 1485 | **/\r |
28a00297 | 1486 | EFI_STATUS\r |
1487 | EFIAPI\r | |
1488 | CoreSignalEvent (\r | |
23c98c94 | 1489 | IN EFI_EVENT UserEvent\r |
1490 | );\r | |
28a00297 | 1491 | \r |
28a00297 | 1492 | \r |
28a00297 | 1493 | \r |
162ed594 | 1494 | /**\r |
1495 | Stops execution until an event is signaled.\r | |
28a00297 | 1496 | \r |
022c6d45 | 1497 | @param NumberOfEvents The number of events in the UserEvents array\r |
1498 | @param UserEvents An array of EFI_EVENT\r | |
1499 | @param UserIndex Pointer to the index of the event which\r | |
1500 | satisfied the wait condition\r | |
28a00297 | 1501 | \r |
022c6d45 | 1502 | @retval EFI_SUCCESS The event indicated by Index was signaled.\r |
1503 | @retval EFI_INVALID_PARAMETER The event indicated by Index has a notification\r | |
1504 | function or Event was not a valid type\r | |
162ed594 | 1505 | @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION\r |
28a00297 | 1506 | \r |
162ed594 | 1507 | **/\r |
28a00297 | 1508 | EFI_STATUS\r |
1509 | EFIAPI\r | |
1510 | CoreWaitForEvent (\r | |
23c98c94 | 1511 | IN UINTN NumberOfEvents,\r |
1512 | IN EFI_EVENT *UserEvents,\r | |
1513 | OUT UINTN *UserIndex\r | |
1514 | );\r | |
28a00297 | 1515 | \r |
28a00297 | 1516 | \r |
28a00297 | 1517 | \r |
162ed594 | 1518 | /**\r |
1519 | Closes an event and frees the event structure.\r | |
28a00297 | 1520 | \r |
022c6d45 | 1521 | @param UserEvent Event to close\r |
28a00297 | 1522 | \r |
022c6d45 | 1523 | @retval EFI_INVALID_PARAMETER Parameters are not valid.\r |
162ed594 | 1524 | @retval EFI_SUCCESS The event has been closed\r |
28a00297 | 1525 | \r |
162ed594 | 1526 | **/\r |
28a00297 | 1527 | EFI_STATUS\r |
1528 | EFIAPI\r | |
1529 | CoreCloseEvent (\r | |
23c98c94 | 1530 | IN EFI_EVENT UserEvent\r |
1531 | );\r | |
28a00297 | 1532 | \r |
28a00297 | 1533 | \r |
28a00297 | 1534 | \r |
162ed594 | 1535 | /**\r |
1536 | Check the status of an event.\r | |
28a00297 | 1537 | \r |
022c6d45 | 1538 | @param UserEvent The event to check\r |
28a00297 | 1539 | \r |
022c6d45 | 1540 | @retval EFI_SUCCESS The event is in the signaled state\r |
1541 | @retval EFI_NOT_READY The event is not in the signaled state\r | |
162ed594 | 1542 | @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL\r |
28a00297 | 1543 | \r |
162ed594 | 1544 | **/\r |
28a00297 | 1545 | EFI_STATUS\r |
1546 | EFIAPI\r | |
1547 | CoreCheckEvent (\r | |
23c98c94 | 1548 | IN EFI_EVENT UserEvent\r |
1549 | );\r | |
28a00297 | 1550 | \r |
28a00297 | 1551 | \r |
162ed594 | 1552 | /**\r |
1553 | Adds reserved memory, system memory, or memory-mapped I/O resources to the\r | |
1554 | global coherency domain of the processor.\r | |
28a00297 | 1555 | \r |
022c6d45 | 1556 | @param GcdMemoryType Memory type of the memory space.\r |
1557 | @param BaseAddress Base address of the memory space.\r | |
1558 | @param Length Length of the memory space.\r | |
1559 | @param Capabilities alterable attributes of the memory space.\r | |
28a00297 | 1560 | \r |
162ed594 | 1561 | @retval EFI_SUCCESS Merged this memory space into GCD map.\r |
28a00297 | 1562 | \r |
162ed594 | 1563 | **/\r |
28a00297 | 1564 | EFI_STATUS\r |
3b6ffb6a | 1565 | EFIAPI\r |
28a00297 | 1566 | CoreAddMemorySpace (\r |
1567 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
1568 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1569 | IN UINT64 Length,\r | |
1570 | IN UINT64 Capabilities\r | |
23c98c94 | 1571 | );\r |
28a00297 | 1572 | \r |
28a00297 | 1573 | \r |
162ed594 | 1574 | /**\r |
1575 | Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r | |
1576 | I/O resources from the global coherency domain of the processor.\r | |
28a00297 | 1577 | \r |
022c6d45 | 1578 | @param GcdAllocateType The type of allocate operation\r |
1579 | @param GcdMemoryType The desired memory type\r | |
1580 | @param Alignment Align with 2^Alignment\r | |
1581 | @param Length Length to allocate\r | |
1582 | @param BaseAddress Base address to allocate\r | |
1583 | @param ImageHandle The image handle consume the allocated space.\r | |
1584 | @param DeviceHandle The device handle consume the allocated space.\r | |
28a00297 | 1585 | \r |
022c6d45 | 1586 | @retval EFI_INVALID_PARAMETER Invalid parameter.\r |
1587 | @retval EFI_NOT_FOUND No descriptor contains the desired space.\r | |
162ed594 | 1588 | @retval EFI_SUCCESS Memory space successfully allocated.\r |
28a00297 | 1589 | \r |
162ed594 | 1590 | **/\r |
28a00297 | 1591 | EFI_STATUS\r |
3b6ffb6a | 1592 | EFIAPI\r |
28a00297 | 1593 | CoreAllocateMemorySpace (\r |
1594 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
1595 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
1596 | IN UINTN Alignment,\r | |
1597 | IN UINT64 Length,\r | |
1598 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
1599 | IN EFI_HANDLE ImageHandle,\r | |
1600 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
23c98c94 | 1601 | );\r |
28a00297 | 1602 | \r |
28a00297 | 1603 | \r |
162ed594 | 1604 | /**\r |
1605 | Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r | |
1606 | I/O resources from the global coherency domain of the processor.\r | |
28a00297 | 1607 | \r |
022c6d45 | 1608 | @param BaseAddress Base address of the memory space.\r |
1609 | @param Length Length of the memory space.\r | |
28a00297 | 1610 | \r |
162ed594 | 1611 | @retval EFI_SUCCESS Space successfully freed.\r |
28a00297 | 1612 | \r |
162ed594 | 1613 | **/\r |
28a00297 | 1614 | EFI_STATUS\r |
3b6ffb6a | 1615 | EFIAPI\r |
28a00297 | 1616 | CoreFreeMemorySpace (\r |
1617 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1618 | IN UINT64 Length\r | |
23c98c94 | 1619 | );\r |
28a00297 | 1620 | \r |
28a00297 | 1621 | \r |
162ed594 | 1622 | /**\r |
1623 | Removes reserved memory, system memory, or memory-mapped I/O resources from\r | |
1624 | the global coherency domain of the processor.\r | |
28a00297 | 1625 | \r |
022c6d45 | 1626 | @param BaseAddress Base address of the memory space.\r |
1627 | @param Length Length of the memory space.\r | |
28a00297 | 1628 | \r |
162ed594 | 1629 | @retval EFI_SUCCESS Successfully remove a segment of memory space.\r |
28a00297 | 1630 | \r |
162ed594 | 1631 | **/\r |
28a00297 | 1632 | EFI_STATUS\r |
3b6ffb6a | 1633 | EFIAPI\r |
28a00297 | 1634 | CoreRemoveMemorySpace (\r |
1635 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1636 | IN UINT64 Length\r | |
23c98c94 | 1637 | );\r |
28a00297 | 1638 | \r |
28a00297 | 1639 | \r |
162ed594 | 1640 | /**\r |
1641 | Retrieves the descriptor for a memory region containing a specified address.\r | |
28a00297 | 1642 | \r |
022c6d45 | 1643 | @param BaseAddress Specified start address\r |
1644 | @param Descriptor Specified length\r | |
28a00297 | 1645 | \r |
022c6d45 | 1646 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
162ed594 | 1647 | @retval EFI_SUCCESS Successfully get memory space descriptor.\r |
28a00297 | 1648 | \r |
162ed594 | 1649 | **/\r |
28a00297 | 1650 | EFI_STATUS\r |
3b6ffb6a | 1651 | EFIAPI\r |
28a00297 | 1652 | CoreGetMemorySpaceDescriptor (\r |
1653 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1654 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r | |
23c98c94 | 1655 | );\r |
28a00297 | 1656 | \r |
28a00297 | 1657 | \r |
162ed594 | 1658 | /**\r |
1659 | Modifies the attributes for a memory region in the global coherency domain of the\r | |
1660 | processor.\r | |
28a00297 | 1661 | \r |
022c6d45 | 1662 | @param BaseAddress Specified start address\r |
1663 | @param Length Specified length\r | |
1664 | @param Attributes Specified attributes\r | |
28a00297 | 1665 | \r |
022c6d45 | 1666 | @retval EFI_SUCCESS Successfully set attribute of a segment of\r |
162ed594 | 1667 | memory space.\r |
28a00297 | 1668 | \r |
162ed594 | 1669 | **/\r |
28a00297 | 1670 | EFI_STATUS\r |
3b6ffb6a | 1671 | EFIAPI\r |
28a00297 | 1672 | CoreSetMemorySpaceAttributes (\r |
1673 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1674 | IN UINT64 Length,\r | |
1675 | IN UINT64 Attributes\r | |
23c98c94 | 1676 | );\r |
28a00297 | 1677 | \r |
28a00297 | 1678 | \r |
162ed594 | 1679 | /**\r |
1680 | Returns a map of the memory resources in the global coherency domain of the\r | |
1681 | processor.\r | |
28a00297 | 1682 | \r |
022c6d45 | 1683 | @param NumberOfDescriptors Number of descriptors.\r |
1684 | @param MemorySpaceMap Descriptor array\r | |
28a00297 | 1685 | \r |
022c6d45 | 1686 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
1687 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 1688 | @retval EFI_SUCCESS Successfully get memory space map.\r |
28a00297 | 1689 | \r |
162ed594 | 1690 | **/\r |
28a00297 | 1691 | EFI_STATUS\r |
3b6ffb6a | 1692 | EFIAPI\r |
28a00297 | 1693 | CoreGetMemorySpaceMap (\r |
1694 | OUT UINTN *NumberOfDescriptors,\r | |
1695 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r | |
23c98c94 | 1696 | );\r |
28a00297 | 1697 | \r |
28a00297 | 1698 | \r |
162ed594 | 1699 | /**\r |
1700 | Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r | |
28a00297 | 1701 | \r |
022c6d45 | 1702 | @param GcdIoType IO type of the segment.\r |
1703 | @param BaseAddress Base address of the segment.\r | |
1704 | @param Length Length of the segment.\r | |
28a00297 | 1705 | \r |
022c6d45 | 1706 | @retval EFI_SUCCESS Merged this segment into GCD map.\r |
162ed594 | 1707 | @retval EFI_INVALID_PARAMETER Parameter not valid\r |
28a00297 | 1708 | \r |
162ed594 | 1709 | **/\r |
28a00297 | 1710 | EFI_STATUS\r |
3b6ffb6a | 1711 | EFIAPI\r |
28a00297 | 1712 | CoreAddIoSpace (\r |
1713 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
1714 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1715 | IN UINT64 Length\r | |
23c98c94 | 1716 | );\r |
28a00297 | 1717 | \r |
28a00297 | 1718 | \r |
162ed594 | 1719 | /**\r |
1720 | Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
1721 | domain of the processor.\r | |
28a00297 | 1722 | \r |
022c6d45 | 1723 | @param GcdAllocateType The type of allocate operation\r |
1724 | @param GcdIoType The desired IO type\r | |
1725 | @param Alignment Align with 2^Alignment\r | |
1726 | @param Length Length to allocate\r | |
1727 | @param BaseAddress Base address to allocate\r | |
1728 | @param ImageHandle The image handle consume the allocated space.\r | |
1729 | @param DeviceHandle The device handle consume the allocated space.\r | |
28a00297 | 1730 | \r |
022c6d45 | 1731 | @retval EFI_INVALID_PARAMETER Invalid parameter.\r |
1732 | @retval EFI_NOT_FOUND No descriptor contains the desired space.\r | |
162ed594 | 1733 | @retval EFI_SUCCESS IO space successfully allocated.\r |
28a00297 | 1734 | \r |
162ed594 | 1735 | **/\r |
28a00297 | 1736 | EFI_STATUS\r |
3b6ffb6a | 1737 | EFIAPI\r |
28a00297 | 1738 | CoreAllocateIoSpace (\r |
1739 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
1740 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
1741 | IN UINTN Alignment,\r | |
1742 | IN UINT64 Length,\r | |
1743 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
1744 | IN EFI_HANDLE ImageHandle,\r | |
1745 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
23c98c94 | 1746 | );\r |
28a00297 | 1747 | \r |
28a00297 | 1748 | \r |
162ed594 | 1749 | /**\r |
1750 | Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
1751 | domain of the processor.\r | |
28a00297 | 1752 | \r |
022c6d45 | 1753 | @param BaseAddress Base address of the segment.\r |
1754 | @param Length Length of the segment.\r | |
28a00297 | 1755 | \r |
162ed594 | 1756 | @retval EFI_SUCCESS Space successfully freed.\r |
28a00297 | 1757 | \r |
162ed594 | 1758 | **/\r |
28a00297 | 1759 | EFI_STATUS\r |
3b6ffb6a | 1760 | EFIAPI\r |
28a00297 | 1761 | CoreFreeIoSpace (\r |
1762 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1763 | IN UINT64 Length\r | |
23c98c94 | 1764 | );\r |
28a00297 | 1765 | \r |
28a00297 | 1766 | \r |
162ed594 | 1767 | /**\r |
1768 | Removes reserved I/O or I/O resources from the global coherency domain of the\r | |
1769 | processor.\r | |
28a00297 | 1770 | \r |
022c6d45 | 1771 | @param BaseAddress Base address of the segment.\r |
1772 | @param Length Length of the segment.\r | |
28a00297 | 1773 | \r |
162ed594 | 1774 | @retval EFI_SUCCESS Successfully removed a segment of IO space.\r |
28a00297 | 1775 | \r |
162ed594 | 1776 | **/\r |
28a00297 | 1777 | EFI_STATUS\r |
3b6ffb6a | 1778 | EFIAPI\r |
28a00297 | 1779 | CoreRemoveIoSpace (\r |
1780 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1781 | IN UINT64 Length\r | |
23c98c94 | 1782 | );\r |
28a00297 | 1783 | \r |
28a00297 | 1784 | \r |
162ed594 | 1785 | /**\r |
1786 | Retrieves the descriptor for an I/O region containing a specified address.\r | |
28a00297 | 1787 | \r |
022c6d45 | 1788 | @param BaseAddress Specified start address\r |
1789 | @param Descriptor Specified length\r | |
28a00297 | 1790 | \r |
022c6d45 | 1791 | @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r |
162ed594 | 1792 | @retval EFI_SUCCESS Successfully get the IO space descriptor.\r |
28a00297 | 1793 | \r |
162ed594 | 1794 | **/\r |
28a00297 | 1795 | EFI_STATUS\r |
3b6ffb6a | 1796 | EFIAPI\r |
28a00297 | 1797 | CoreGetIoSpaceDescriptor (\r |
1798 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1799 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r | |
23c98c94 | 1800 | );\r |
28a00297 | 1801 | \r |
28a00297 | 1802 | \r |
162ed594 | 1803 | /**\r |
1804 | Returns a map of the I/O resources in the global coherency domain of the processor.\r | |
28a00297 | 1805 | \r |
022c6d45 | 1806 | @param NumberOfDescriptors Number of descriptors.\r |
1807 | @param IoSpaceMap Descriptor array\r | |
28a00297 | 1808 | \r |
022c6d45 | 1809 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
1810 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 1811 | @retval EFI_SUCCESS Successfully get IO space map.\r |
28a00297 | 1812 | \r |
162ed594 | 1813 | **/\r |
28a00297 | 1814 | EFI_STATUS\r |
3b6ffb6a | 1815 | EFIAPI\r |
28a00297 | 1816 | CoreGetIoSpaceMap (\r |
1817 | OUT UINTN *NumberOfDescriptors,\r | |
1818 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r | |
23c98c94 | 1819 | );\r |
28a00297 | 1820 | \r |
28a00297 | 1821 | \r |
162ed594 | 1822 | /**\r |
1823 | This is the main Dispatcher for DXE and it exits when there are no more\r | |
1824 | drivers to run. Drain the mScheduledQueue and load and start a PE\r | |
1825 | image for each driver. Search the mDiscoveredList to see if any driver can\r | |
1826 | be placed on the mScheduledQueue. If no drivers are placed on the\r | |
1827 | mScheduledQueue exit the function. On exit it is assumed the Bds()\r | |
1828 | will be called, and when the Bds() exits the Dispatcher will be called\r | |
1829 | again.\r | |
28a00297 | 1830 | \r |
022c6d45 | 1831 | @retval EFI_ALREADY_STARTED The DXE Dispatcher is already running\r |
1832 | @retval EFI_NOT_FOUND No DXE Drivers were dispatched\r | |
1833 | @retval EFI_SUCCESS One or more DXE Drivers were dispatched\r | |
28a00297 | 1834 | \r |
23c98c94 | 1835 | **/\r |
28a00297 | 1836 | EFI_STATUS\r |
1837 | EFIAPI\r | |
1838 | CoreDispatcher (\r | |
1839 | VOID\r | |
23c98c94 | 1840 | );\r |
28a00297 | 1841 | \r |
162ed594 | 1842 | /**\r |
1843 | Check every driver and locate a matching one. If the driver is found, the Unrequested\r | |
1844 | state flag is cleared.\r | |
28a00297 | 1845 | \r |
022c6d45 | 1846 | @param FirmwareVolumeHandle The handle of the Firmware Volume that contains\r |
1847 | the firmware file specified by DriverName.\r | |
1848 | @param DriverName The Driver name to put in the Dependent state.\r | |
28a00297 | 1849 | \r |
022c6d45 | 1850 | @retval EFI_SUCCESS The DriverName was found and it's SOR bit was\r |
1851 | cleared\r | |
1852 | @retval EFI_NOT_FOUND The DriverName does not exist or it's SOR bit was\r | |
1853 | not set.\r | |
28a00297 | 1854 | \r |
23c98c94 | 1855 | **/\r |
28a00297 | 1856 | EFI_STATUS\r |
1857 | EFIAPI\r | |
1858 | CoreSchedule (\r | |
1859 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
1860 | IN EFI_GUID *DriverName\r | |
23c98c94 | 1861 | );\r |
28a00297 | 1862 | \r |
28a00297 | 1863 | \r |
162ed594 | 1864 | /**\r |
022c6d45 | 1865 | Convert a driver from the Untrused back to the Scheduled state.\r |
28a00297 | 1866 | \r |
022c6d45 | 1867 | @param FirmwareVolumeHandle The handle of the Firmware Volume that contains\r |
1868 | the firmware file specified by DriverName.\r | |
1869 | @param DriverName The Driver name to put in the Scheduled state\r | |
28a00297 | 1870 | \r |
022c6d45 | 1871 | @retval EFI_SUCCESS The file was found in the untrusted state, and it\r |
1872 | was promoted to the trusted state.\r | |
1873 | @retval EFI_NOT_FOUND The file was not found in the untrusted state.\r | |
28a00297 | 1874 | \r |
23c98c94 | 1875 | **/\r |
28a00297 | 1876 | EFI_STATUS\r |
1877 | EFIAPI\r | |
1878 | CoreTrust (\r | |
1879 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
1880 | IN EFI_GUID *DriverName\r | |
23c98c94 | 1881 | );\r |
28a00297 | 1882 | \r |
28a00297 | 1883 | \r |
162ed594 | 1884 | /**\r |
1885 | Helper function called as part of the code needed\r | |
1886 | to allocate the proper sized buffer for various\r | |
1887 | EFI interfaces.\r | |
28a00297 | 1888 | \r |
022c6d45 | 1889 | @param Status Current status\r |
1890 | @param Buffer Current allocated buffer, or NULL\r | |
1891 | @param BufferSize Current buffer size needed\r | |
28a00297 | 1892 | \r |
022c6d45 | 1893 | @retval TRUE if the buffer was reallocated and the caller\r |
1894 | should try the API again.\r | |
1895 | @retval FALSE buffer could not be allocated and the caller\r | |
162ed594 | 1896 | should not try the API again.\r |
28a00297 | 1897 | \r |
162ed594 | 1898 | **/\r |
28a00297 | 1899 | BOOLEAN\r |
1900 | CoreGrowBuffer (\r | |
23c98c94 | 1901 | IN OUT EFI_STATUS *Status,\r |
1902 | IN OUT VOID **Buffer,\r | |
1903 | IN UINTN BufferSize\r | |
1904 | );\r | |
28a00297 | 1905 | \r |
28a00297 | 1906 | \r |
162ed594 | 1907 | /**\r |
1908 | This routine is the driver initialization entry point. It initializes the\r | |
1909 | libraries, and registers two notification functions. These notification\r | |
1910 | functions are responsible for building the FV stack dynamically.\r | |
28a00297 | 1911 | \r |
022c6d45 | 1912 | @param ImageHandle The image handle.\r |
1913 | @param SystemTable The system table.\r | |
28a00297 | 1914 | \r |
162ed594 | 1915 | @retval EFI_SUCCESS Function successfully returned.\r |
28a00297 | 1916 | \r |
162ed594 | 1917 | **/\r |
28a00297 | 1918 | EFI_STATUS\r |
1919 | EFIAPI\r | |
1920 | FwVolDriverInit (\r | |
1921 | IN EFI_HANDLE ImageHandle,\r | |
1922 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
23c98c94 | 1923 | );\r |
28a00297 | 1924 | \r |
28a00297 | 1925 | \r |
162ed594 | 1926 | /**\r |
1927 | Entry point of the section extraction code. Initializes an instance of the\r | |
1928 | section extraction interface and installs it on a new handle.\r | |
1929 | \r | |
1930 | @param ImageHandle A handle for the image that is initializing this driver\r | |
1931 | @param SystemTable A pointer to the EFI system table\r | |
28a00297 | 1932 | \r |
162ed594 | 1933 | @retval EFI_SUCCESS Driver initialized successfully\r |
1934 | @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources\r | |
1935 | \r | |
1936 | **/\r | |
28a00297 | 1937 | EFI_STATUS\r |
1938 | EFIAPI\r | |
1939 | InitializeSectionExtraction (\r | |
1940 | IN EFI_HANDLE ImageHandle,\r | |
1941 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
23c98c94 | 1942 | );\r |
28a00297 | 1943 | \r |
28a00297 | 1944 | \r |
162ed594 | 1945 | /**\r |
1946 | This DXE service routine is used to process a firmware volume. In\r | |
1947 | particular, it can be called by BDS to process a single firmware\r | |
1948 | volume found in a capsule.\r | |
28a00297 | 1949 | \r |
022c6d45 | 1950 | @param FvHeader pointer to a firmware volume header\r |
1951 | @param Size the size of the buffer pointed to by FvHeader\r | |
1952 | @param FVProtocolHandle the handle on which a firmware volume protocol\r | |
1953 | was produced for the firmware volume passed in.\r | |
28a00297 | 1954 | \r |
022c6d45 | 1955 | @retval EFI_OUT_OF_RESOURCES if an FVB could not be produced due to lack of\r |
1956 | system resources\r | |
1957 | @retval EFI_VOLUME_CORRUPTED if the volume was corrupted\r | |
1958 | @retval EFI_SUCCESS a firmware volume protocol was produced for the\r | |
162ed594 | 1959 | firmware volume\r |
28a00297 | 1960 | \r |
162ed594 | 1961 | **/\r |
28a00297 | 1962 | EFI_STATUS\r |
3b6ffb6a | 1963 | EFIAPI\r |
28a00297 | 1964 | CoreProcessFirmwareVolume (\r |
23c98c94 | 1965 | IN VOID *FvHeader,\r |
022c6d45 | 1966 | IN UINTN Size,\r |
23c98c94 | 1967 | OUT EFI_HANDLE *FVProtocolHandle\r |
1968 | );\r | |
28a00297 | 1969 | \r |
1970 | //\r | |
1971 | //Functions used during debug buils\r | |
1972 | //\r | |
162ed594 | 1973 | \r |
1974 | /**\r | |
1975 | Displays Architectural protocols that were not loaded and are required for DXE\r | |
23c98c94 | 1976 | core to function. Only used in Debug Builds.\r |
162ed594 | 1977 | \r |
1978 | **/\r | |
28a00297 | 1979 | VOID\r |
1980 | CoreDisplayMissingArchProtocols (\r | |
1981 | VOID\r | |
23c98c94 | 1982 | );\r |
022c6d45 | 1983 | \r |
28a00297 | 1984 | \r |
162ed594 | 1985 | /**\r |
1986 | Traverse the discovered list for any drivers that were discovered but not loaded\r | |
1987 | because the dependency experessions evaluated to false.\r | |
28a00297 | 1988 | \r |
162ed594 | 1989 | **/\r |
28a00297 | 1990 | VOID\r |
1991 | CoreDisplayDiscoveredNotDispatched (\r | |
1992 | VOID\r | |
23c98c94 | 1993 | );\r |
28a00297 | 1994 | \r |
28a00297 | 1995 | \r |
162ed594 | 1996 | /**\r |
23c98c94 | 1997 | Place holder function until all the Boot Services and Runtime Services are\r |
1998 | available.\r | |
28a00297 | 1999 | \r |
162ed594 | 2000 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2001 | \r |
162ed594 | 2002 | **/\r |
28a00297 | 2003 | EFI_STATUS\r |
2004 | EFIAPI\r | |
2005 | CoreEfiNotAvailableYetArg0 (\r | |
2006 | VOID\r | |
23c98c94 | 2007 | );\r |
28a00297 | 2008 | \r |
28a00297 | 2009 | \r |
162ed594 | 2010 | /**\r |
23c98c94 | 2011 | Place holder function until all the Boot Services and Runtime Services are\r |
2012 | available.\r | |
28a00297 | 2013 | \r |
022c6d45 | 2014 | @param Arg1 Undefined\r |
28a00297 | 2015 | \r |
162ed594 | 2016 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2017 | \r |
162ed594 | 2018 | **/\r |
28a00297 | 2019 | EFI_STATUS\r |
2020 | EFIAPI\r | |
2021 | CoreEfiNotAvailableYetArg1 (\r | |
2022 | UINTN Arg1\r | |
23c98c94 | 2023 | );\r |
28a00297 | 2024 | \r |
28a00297 | 2025 | \r |
162ed594 | 2026 | /**\r |
2027 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2028 | \r |
022c6d45 | 2029 | @param Arg1 Undefined\r |
2030 | @param Arg2 Undefined\r | |
28a00297 | 2031 | \r |
162ed594 | 2032 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2033 | \r |
162ed594 | 2034 | **/\r |
28a00297 | 2035 | EFI_STATUS\r |
2036 | EFIAPI\r | |
2037 | CoreEfiNotAvailableYetArg2 (\r | |
2038 | UINTN Arg1,\r | |
2039 | UINTN Arg2\r | |
23c98c94 | 2040 | );\r |
28a00297 | 2041 | \r |
28a00297 | 2042 | \r |
162ed594 | 2043 | /**\r |
2044 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2045 | \r |
022c6d45 | 2046 | @param Arg1 Undefined\r |
2047 | @param Arg2 Undefined\r | |
2048 | @param Arg3 Undefined\r | |
28a00297 | 2049 | \r |
162ed594 | 2050 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2051 | \r |
162ed594 | 2052 | **/\r |
28a00297 | 2053 | EFI_STATUS\r |
2054 | EFIAPI\r | |
2055 | CoreEfiNotAvailableYetArg3 (\r | |
2056 | UINTN Arg1,\r | |
2057 | UINTN Arg2,\r | |
2058 | UINTN Arg3\r | |
23c98c94 | 2059 | );\r |
28a00297 | 2060 | \r |
28a00297 | 2061 | \r |
162ed594 | 2062 | /**\r |
2063 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2064 | \r |
022c6d45 | 2065 | @param Arg1 Undefined\r |
2066 | @param Arg2 Undefined\r | |
2067 | @param Arg3 Undefined\r | |
2068 | @param Arg4 Undefined\r | |
28a00297 | 2069 | \r |
162ed594 | 2070 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2071 | \r |
162ed594 | 2072 | **/\r |
28a00297 | 2073 | EFI_STATUS\r |
2074 | EFIAPI\r | |
2075 | CoreEfiNotAvailableYetArg4 (\r | |
2076 | UINTN Arg1,\r | |
2077 | UINTN Arg2,\r | |
2078 | UINTN Arg3,\r | |
2079 | UINTN Arg4\r | |
23c98c94 | 2080 | );\r |
28a00297 | 2081 | \r |
28a00297 | 2082 | \r |
162ed594 | 2083 | /**\r |
2084 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2085 | \r |
022c6d45 | 2086 | @param Arg1 Undefined\r |
2087 | @param Arg2 Undefined\r | |
2088 | @param Arg3 Undefined\r | |
2089 | @param Arg4 Undefined\r | |
2090 | @param Arg5 Undefined\r | |
28a00297 | 2091 | \r |
162ed594 | 2092 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2093 | \r |
162ed594 | 2094 | **/\r |
28a00297 | 2095 | EFI_STATUS\r |
2096 | EFIAPI\r | |
2097 | CoreEfiNotAvailableYetArg5 (\r | |
2098 | UINTN Arg1,\r | |
2099 | UINTN Arg2,\r | |
2100 | UINTN Arg3,\r | |
2101 | UINTN Arg4,\r | |
2102 | UINTN Arg5\r | |
23c98c94 | 2103 | );\r |
28a00297 | 2104 | \r |
28a00297 | 2105 | \r |
162ed594 | 2106 | /**\r |
2107 | Given a compressed source buffer, this function retrieves the size of the\r | |
2108 | uncompressed buffer and the size of the scratch buffer required to decompress\r | |
2109 | the compressed source buffer.\r | |
2110 | \r | |
2111 | The GetInfo() function retrieves the size of the uncompressed buffer and the\r | |
2112 | temporary scratch buffer required to decompress the buffer specified by Source\r | |
2113 | and SourceSize. If the size of the uncompressed buffer or the size of the\r | |
2114 | scratch buffer cannot be determined from the compressed data specified by\r | |
2115 | Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r | |
2116 | size of the uncompressed buffer is returned in DestinationSize, the size of\r | |
2117 | the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r | |
2118 | The GetInfo() function does not have scratch buffer available to perform a\r | |
2119 | thorough checking of the validity of the source data. It just retrieves the\r | |
2120 | "Original Size" field from the beginning bytes of the source data and output\r | |
2121 | it as DestinationSize. And ScratchSize is specific to the decompression\r | |
2122 | implementation.\r | |
2123 | \r | |
2124 | @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r | |
2125 | @param Source The source buffer containing the compressed data.\r | |
2126 | @param SourceSize The size, in bytes, of the source buffer.\r | |
2127 | @param DestinationSize A pointer to the size, in bytes, of the\r | |
2128 | uncompressed buffer that will be generated when the\r | |
2129 | compressed buffer specified by Source and\r | |
2130 | SourceSize is decompressed.\r | |
2131 | @param ScratchSize A pointer to the size, in bytes, of the scratch\r | |
2132 | buffer that is required to decompress the\r | |
2133 | compressed buffer specified by Source and\r | |
2134 | SourceSize.\r | |
022c6d45 | 2135 | \r |
162ed594 | 2136 | @retval EFI_SUCCESS The size of the uncompressed data was returned in\r |
2137 | DestinationSize and the size of the scratch buffer\r | |
2138 | was returned in ScratchSize.\r | |
2139 | @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r | |
2140 | the scratch buffer cannot be determined from the\r | |
2141 | compressed data specified by Source and\r | |
2142 | SourceSize.\r | |
28a00297 | 2143 | \r |
162ed594 | 2144 | **/\r |
28a00297 | 2145 | EFI_STATUS\r |
23c98c94 | 2146 | EFIAPI\r |
28a00297 | 2147 | DxeMainUefiDecompressGetInfo (\r |
2148 | IN EFI_DECOMPRESS_PROTOCOL *This,\r | |
2149 | IN VOID *Source,\r | |
2150 | IN UINT32 SourceSize,\r | |
2151 | OUT UINT32 *DestinationSize,\r | |
2152 | OUT UINT32 *ScratchSize\r | |
2153 | );\r | |
2154 | \r | |
162ed594 | 2155 | \r |
2156 | /**\r | |
2157 | Decompresses a compressed source buffer.\r | |
2158 | \r | |
2159 | The Decompress() function extracts decompressed data to its original form.\r | |
2160 | This protocol is designed so that the decompression algorithm can be\r | |
2161 | implemented without using any memory services. As a result, the Decompress()\r | |
2162 | Function is not allowed to call AllocatePool() or AllocatePages() in its\r | |
db405d1b | 2163 | implementation. It is the caller's responsibility to allocate and free the\r |
162ed594 | 2164 | Destination and Scratch buffers.\r |
2165 | If the compressed source data specified by Source and SourceSize is\r | |
2166 | sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r | |
2167 | the compressed source data specified by Source and SourceSize is not in a\r | |
2168 | valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r | |
2169 | \r | |
2170 | @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r | |
2171 | @param Source The source buffer containing the compressed data.\r | |
2172 | @param SourceSize SourceSizeThe size of source data.\r | |
2173 | @param Destination On output, the destination buffer that contains\r | |
2174 | the uncompressed data.\r | |
2175 | @param DestinationSize The size of the destination buffer. The size of\r | |
2176 | the destination buffer needed is obtained from\r | |
2177 | EFI_DECOMPRESS_PROTOCOL.GetInfo().\r | |
2178 | @param Scratch A temporary scratch buffer that is used to perform\r | |
2179 | the decompression.\r | |
2180 | @param ScratchSize The size of scratch buffer. The size of the\r | |
2181 | scratch buffer needed is obtained from GetInfo().\r | |
022c6d45 | 2182 | \r |
162ed594 | 2183 | @retval EFI_SUCCESS Decompression completed successfully, and the\r |
2184 | uncompressed buffer is returned in Destination.\r | |
2185 | @retval EFI_INVALID_PARAMETER The source buffer specified by Source and\r | |
2186 | SourceSize is corrupted (not in a valid\r | |
2187 | compressed format).\r | |
2188 | \r | |
2189 | **/\r | |
28a00297 | 2190 | EFI_STATUS\r |
2191 | EFIAPI\r | |
2192 | DxeMainUefiDecompress (\r | |
022c6d45 | 2193 | IN EFI_DECOMPRESS_PROTOCOL *This,\r |
28a00297 | 2194 | IN VOID *Source,\r |
2195 | IN UINT32 SourceSize,\r | |
2196 | IN OUT VOID *Destination,\r | |
2197 | IN UINT32 DestinationSize,\r | |
2198 | IN OUT VOID *Scratch,\r | |
2199 | IN UINT32 ScratchSize\r | |
2200 | );\r | |
2201 | \r | |
162ed594 | 2202 | /**\r |
2203 | SEP member function. This function creates and returns a new section stream\r | |
2204 | handle to represent the new section stream.\r | |
28a00297 | 2205 | \r |
022c6d45 | 2206 | @param SectionStreamLength Size in bytes of the section stream.\r |
2207 | @param SectionStream Buffer containing the new section stream.\r | |
2208 | @param SectionStreamHandle A pointer to a caller allocated UINTN that on\r | |
2209 | output contains the new section stream handle.\r | |
28a00297 | 2210 | \r |
162ed594 | 2211 | @retval EFI_SUCCESS The section stream is created successfully.\r |
022c6d45 | 2212 | @retval EFI_OUT_OF_RESOURCES memory allocation failed.\r |
2213 | @retval EFI_INVALID_PARAMETER Section stream does not end concident with end\r | |
162ed594 | 2214 | of last section.\r |
28a00297 | 2215 | \r |
162ed594 | 2216 | **/\r |
797a9d67 | 2217 | EFI_STATUS\r |
2218 | EFIAPI\r | |
2219 | OpenSectionStream (\r | |
2220 | IN UINTN SectionStreamLength,\r | |
2221 | IN VOID *SectionStream,\r | |
2222 | OUT UINTN *SectionStreamHandle\r | |
2223 | );\r | |
2224 | \r | |
162ed594 | 2225 | \r |
2226 | \r | |
2227 | /**\r | |
2228 | SEP member function. Retrieves requested section from section stream.\r | |
2229 | \r | |
2230 | @param SectionStreamHandle The section stream from which to extract the\r | |
2231 | requested section.\r | |
2232 | @param SectionType A pointer to the type of section to search for.\r | |
2233 | @param SectionDefinitionGuid If the section type is EFI_SECTION_GUID_DEFINED,\r | |
2234 | then SectionDefinitionGuid indicates which of\r | |
2235 | these types of sections to search for.\r | |
2236 | @param SectionInstance Indicates which instance of the requested\r | |
2237 | section to return.\r | |
2238 | @param Buffer Double indirection to buffer. If *Buffer is\r | |
2239 | non-null on input, then the buffer is caller\r | |
2240 | allocated. If Buffer is NULL, then the buffer\r | |
2241 | is callee allocated. In either case, the\r | |
2242 | requried buffer size is returned in *BufferSize.\r | |
2243 | @param BufferSize On input, indicates the size of *Buffer if\r | |
2244 | *Buffer is non-null on input. On output,\r | |
2245 | indicates the required size (allocated size if\r | |
2246 | callee allocated) of *Buffer.\r | |
2247 | @param AuthenticationStatus A pointer to a caller-allocated UINT32 that\r | |
2248 | indicates the authentication status of the\r | |
db405d1b | 2249 | output buffer. If the input section's\r |
162ed594 | 2250 | GuidedSectionHeader.Attributes field\r |
2251 | has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r | |
2252 | bit as clear, AuthenticationStatus must return\r | |
2253 | zero. Both local bits (19:16) and aggregate\r | |
2254 | bits (3:0) in AuthenticationStatus are returned\r | |
2255 | by ExtractSection(). These bits reflect the\r | |
2256 | status of the extraction operation. The bit\r | |
2257 | pattern in both regions must be the same, as\r | |
2258 | the local and aggregate authentication statuses\r | |
2259 | have equivalent meaning at this level. If the\r | |
2260 | function returns anything other than\r | |
2261 | EFI_SUCCESS, the value of *AuthenticationStatus\r | |
2262 | is undefined.\r | |
2263 | \r | |
2264 | @retval EFI_SUCCESS Section was retrieved successfully\r | |
2265 | @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the\r | |
2266 | section stream with its\r | |
2267 | EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,\r | |
2268 | but there was no corresponding GUIDed Section\r | |
2269 | Extraction Protocol in the handle database.\r | |
2270 | *Buffer is unmodified.\r | |
2271 | @retval EFI_NOT_FOUND An error was encountered when parsing the\r | |
2272 | SectionStream. This indicates the SectionStream\r | |
2273 | is not correctly formatted.\r | |
2274 | @retval EFI_NOT_FOUND The requested section does not exist.\r | |
2275 | @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process\r | |
2276 | the request.\r | |
2277 | @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r | |
2278 | @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is\r | |
2279 | insufficient to contain the requested section.\r | |
2280 | The input buffer is filled and section contents\r | |
2281 | are truncated.\r | |
2282 | \r | |
2283 | **/\r | |
797a9d67 | 2284 | EFI_STATUS\r |
2285 | EFIAPI\r | |
2286 | GetSection (\r | |
2287 | IN UINTN SectionStreamHandle,\r | |
2288 | IN EFI_SECTION_TYPE *SectionType,\r | |
2289 | IN EFI_GUID *SectionDefinitionGuid,\r | |
2290 | IN UINTN SectionInstance,\r | |
2291 | IN VOID **Buffer,\r | |
2292 | IN OUT UINTN *BufferSize,\r | |
2293 | OUT UINT32 *AuthenticationStatus\r | |
2294 | );\r | |
2295 | \r | |
162ed594 | 2296 | \r |
2297 | /**\r | |
2298 | SEP member function. Deletes an existing section stream\r | |
2299 | \r | |
022c6d45 | 2300 | @param StreamHandleToClose Indicates the stream to close\r |
162ed594 | 2301 | \r |
2302 | @retval EFI_SUCCESS The section stream is closed sucessfully.\r | |
022c6d45 | 2303 | @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r |
2304 | @retval EFI_INVALID_PARAMETER Section stream does not end concident with end\r | |
162ed594 | 2305 | of last section.\r |
2306 | \r | |
2307 | **/\r | |
797a9d67 | 2308 | EFI_STATUS\r |
2309 | EFIAPI\r | |
2310 | CloseSectionStream (\r | |
23c98c94 | 2311 | IN UINTN StreamHandleToClose\r |
797a9d67 | 2312 | );\r |
2313 | \r | |
ec90508b | 2314 | /**\r |
2315 | Creates and initializes the DebugImageInfo Table. Also creates the configuration\r | |
2316 | table and registers it into the system table.\r | |
2317 | \r | |
2318 | Note:\r | |
2319 | This function allocates memory, frees it, and then allocates memory at an\r | |
2320 | address within the initial allocation. Since this function is called early\r | |
2321 | in DXE core initialization (before drivers are dispatched), this should not\r | |
2322 | be a problem.\r | |
2323 | \r | |
2324 | **/\r | |
2325 | VOID\r | |
2326 | CoreInitializeDebugImageInfoTable (\r | |
2327 | VOID\r | |
2328 | );\r | |
2329 | \r | |
2330 | \r | |
2331 | /**\r | |
2332 | Update the CRC32 in the Debug Table.\r | |
2333 | Since the CRC32 service is made available by the Runtime driver, we have to\r | |
2334 | wait for the Runtime Driver to be installed before the CRC32 can be computed.\r | |
2335 | This function is called elsewhere by the core when the runtime architectural\r | |
2336 | protocol is produced.\r | |
2337 | \r | |
2338 | **/\r | |
2339 | VOID\r | |
2340 | CoreUpdateDebugTableCrc32 (\r | |
2341 | VOID\r | |
2342 | );\r | |
2343 | \r | |
2344 | \r | |
2345 | /**\r | |
2346 | Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates\r | |
2347 | the table if it's not large enough to accomidate another entry.\r | |
2348 | \r | |
2349 | @param ImageInfoType type of debug image information\r | |
2350 | @param LoadedImage pointer to the loaded image protocol for the image being\r | |
2351 | loaded\r | |
2352 | @param ImageHandle image handle for the image being loaded\r | |
2353 | \r | |
2354 | **/\r | |
2355 | VOID\r | |
2356 | CoreNewDebugImageInfoEntry (\r | |
2357 | IN UINT32 ImageInfoType,\r | |
2358 | IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r | |
2359 | IN EFI_HANDLE ImageHandle\r | |
2360 | );\r | |
2361 | \r | |
2362 | \r | |
2363 | /**\r | |
2364 | Removes and frees an entry from the DebugImageInfo Table.\r | |
2365 | \r | |
2366 | @param ImageHandle image handle for the image being unloaded\r | |
2367 | \r | |
2368 | **/\r | |
2369 | VOID\r | |
2370 | CoreRemoveDebugImageInfoEntry (\r | |
2371 | EFI_HANDLE ImageHandle\r | |
2372 | );\r | |
2373 | \r | |
2374 | \r | |
2375 | /**\r | |
2376 | This routine consumes FV hobs and produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r | |
2377 | \r | |
2378 | @param ImageHandle The image handle.\r | |
2379 | @param SystemTable The system table.\r | |
2380 | \r | |
2381 | @retval EFI_SUCCESS Successfully initialized firmware volume block\r | |
2382 | driver.\r | |
2383 | \r | |
2384 | **/\r | |
2385 | EFI_STATUS\r | |
2386 | EFIAPI\r | |
2387 | FwVolBlockDriverInit (\r | |
2388 | IN EFI_HANDLE ImageHandle,\r | |
2389 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
2390 | );\r | |
2391 | \r | |
2392 | \r | |
2393 | /**\r | |
2394 | This routine produces a firmware volume block protocol on a given\r | |
2395 | buffer.\r | |
2396 | \r | |
2397 | @param BaseAddress base address of the firmware volume image\r | |
2398 | @param Length length of the firmware volume image\r | |
2399 | @param ParentHandle handle of parent firmware volume, if this image\r | |
2400 | came from an FV image file in another firmware\r | |
2401 | volume (ala capsules)\r | |
2402 | @param FvProtocol Firmware volume block protocol produced.\r | |
2403 | \r | |
2404 | @retval EFI_VOLUME_CORRUPTED Volume corrupted.\r | |
2405 | @retval EFI_OUT_OF_RESOURCES No enough buffer to be allocated.\r | |
2406 | @retval EFI_SUCCESS Successfully produced a FVB protocol on given\r | |
2407 | buffer.\r | |
2408 | \r | |
2409 | **/\r | |
2410 | EFI_STATUS\r | |
2411 | ProduceFVBProtocolOnBuffer (\r | |
2412 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
2413 | IN UINT64 Length,\r | |
2414 | IN EFI_HANDLE ParentHandle,\r | |
2415 | OUT EFI_HANDLE *FvProtocol OPTIONAL\r | |
2416 | );\r | |
2417 | \r | |
2418 | \r | |
2419 | /**\r | |
2420 | Raising to the task priority level of the mutual exclusion\r | |
2421 | lock, and then acquires ownership of the lock.\r | |
2422 | \r | |
2423 | @param Lock The lock to acquire\r | |
2424 | \r | |
2425 | @return Lock owned\r | |
2426 | \r | |
2427 | **/\r | |
2428 | VOID\r | |
2429 | CoreAcquireLock (\r | |
2430 | IN EFI_LOCK *Lock\r | |
2431 | );\r | |
2432 | \r | |
2433 | \r | |
2434 | /**\r | |
2435 | Initialize a basic mutual exclusion lock. Each lock\r | |
2436 | provides mutual exclusion access at it's task priority\r | |
2437 | level. Since there is no-premption (at any TPL) or\r | |
2438 | multiprocessor support, acquiring the lock only consists\r | |
2439 | of raising to the locks TPL.\r | |
2440 | \r | |
2441 | @param Lock The EFI_LOCK structure to initialize\r | |
2442 | \r | |
2443 | @retval EFI_SUCCESS Lock Owned.\r | |
2444 | @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.\r | |
2445 | \r | |
2446 | **/\r | |
2447 | EFI_STATUS\r | |
2448 | CoreAcquireLockOrFail (\r | |
2449 | IN EFI_LOCK *Lock\r | |
2450 | );\r | |
2451 | \r | |
2452 | \r | |
2453 | /**\r | |
2454 | Releases ownership of the mutual exclusion lock, and\r | |
2455 | restores the previous task priority level.\r | |
2456 | \r | |
2457 | @param Lock The lock to release\r | |
2458 | \r | |
2459 | @return Lock unowned\r | |
2460 | \r | |
2461 | **/\r | |
2462 | VOID\r | |
2463 | CoreReleaseLock (\r | |
2464 | IN EFI_LOCK *Lock\r | |
2465 | );\r | |
2466 | \r | |
28a00297 | 2467 | #endif\r |