TianoCore EDK2 master
Loading...
Searching...
No Matches
AndroidBootImgLib.c
Go to the documentation of this file.
1
10#include <libfdt.h>
13#include <Library/PrintLib.h>
16#include <Library/UefiLib.h>
17
19#include <Protocol/LoadFile2.h>
21
23
24#define FDT_ADDITIONAL_ENTRIES_SIZE 0x400
25
26typedef struct {
30
31typedef struct {
32 VENDOR_DEVICE_PATH VendorMediaNode;
35
36STATIC ANDROID_BOOTIMG_PROTOCOL *mAndroidBootImg;
37STATIC VOID *mRamdiskData = NULL;
38STATIC UINTN mRamdiskSize = 0;
39STATIC EFI_HANDLE mRamDiskLoadFileHandle = NULL;
40
41STATIC CONST MEMORY_DEVICE_PATH mMemoryDevicePathTemplate =
42{
43 {
44 {
47 {
48 (UINT8)(sizeof (MEMMAP_DEVICE_PATH)),
49 (UINT8)((sizeof (MEMMAP_DEVICE_PATH)) >> 8),
50 },
51 }, // Header
52 0, // StartingAddress (set at runtime)
53 0 // EndingAddress (set at runtime)
54 }, // Node1
55 {
56 END_DEVICE_PATH_TYPE,
57 END_ENTIRE_DEVICE_PATH_SUBTYPE,
58 { sizeof (EFI_DEVICE_PATH_PROTOCOL), 0 }
59 } // End
60};
61
62STATIC CONST RAMDISK_DEVICE_PATH mRamdiskDevicePath =
63{
64 {
65 {
66 MEDIA_DEVICE_PATH,
68 { sizeof (VENDOR_DEVICE_PATH), 0 }
69 },
70 LINUX_EFI_INITRD_MEDIA_GUID
71 },
72 {
73 END_DEVICE_PATH_TYPE,
74 END_ENTIRE_DEVICE_PATH_SUBTYPE,
75 { sizeof (EFI_DEVICE_PATH_PROTOCOL), 0 }
76 }
77};
78
109EFIAPI
113 IN BOOLEAN BootPolicy,
114 IN OUT UINTN *BufferSize,
115 IN VOID *Buffer OPTIONAL
116 )
117
118{
119 // Verify if the valid parameters
120 if ((This == NULL) ||
121 (BufferSize == NULL) ||
122 (FilePath == NULL) ||
123 !IsDevicePathValid (FilePath, 0))
124 {
125 return EFI_INVALID_PARAMETER;
126 }
127
128 if (BootPolicy) {
129 return EFI_UNSUPPORTED;
130 }
131
132 // Check if the given buffer size is big enough
133 // EFI_BUFFER_TOO_SMALL to allow caller to allocate a bigger buffer
134 if (mRamdiskSize == 0) {
135 return EFI_NOT_FOUND;
136 }
137
138 if ((Buffer == NULL) || (*BufferSize < mRamdiskSize)) {
139 *BufferSize = mRamdiskSize;
140 return EFI_BUFFER_TOO_SMALL;
141 }
142
143 // Copy InitRd
144 CopyMem (Buffer, mRamdiskData, mRamdiskSize);
145 *BufferSize = mRamdiskSize;
146
147 return EFI_SUCCESS;
148}
149
155};
156
158AndroidBootImgGetImgSize (
159 IN VOID *BootImg,
160 OUT UINTN *ImgSize
161 )
162{
164
165 Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
166
167 if (AsciiStrnCmp (
168 (CONST CHAR8 *)Header->BootMagic,
169 ANDROID_BOOT_MAGIC,
170 ANDROID_BOOT_MAGIC_LENGTH
171 ) != 0)
172 {
173 return EFI_INVALID_PARAMETER;
174 }
175
176 /* The page size is not specified, but it should be power of 2 at least */
177 ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
178
179 /* Get real size of abootimg */
180 *ImgSize = ALIGN_VALUE (Header->KernelSize, Header->PageSize) +
181 ALIGN_VALUE (Header->RamdiskSize, Header->PageSize) +
182 ALIGN_VALUE (Header->SecondStageBootloaderSize, Header->PageSize) +
183 Header->PageSize;
184 return EFI_SUCCESS;
185}
186
188AndroidBootImgGetKernelInfo (
189 IN VOID *BootImg,
190 OUT VOID **Kernel,
191 OUT UINTN *KernelSize
192 )
193{
195
196 Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
197
198 if (AsciiStrnCmp (
199 (CONST CHAR8 *)Header->BootMagic,
200 ANDROID_BOOT_MAGIC,
201 ANDROID_BOOT_MAGIC_LENGTH
202 ) != 0)
203 {
204 return EFI_INVALID_PARAMETER;
205 }
206
207 if (Header->KernelSize == 0) {
208 return EFI_NOT_FOUND;
209 }
210
211 ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
212
213 *KernelSize = Header->KernelSize;
214 *Kernel = (VOID *)((UINTN)BootImg + Header->PageSize);
215 return EFI_SUCCESS;
216}
217
219AndroidBootImgGetRamdiskInfo (
220 IN VOID *BootImg,
221 OUT VOID **Ramdisk,
222 OUT UINTN *RamdiskSize
223 )
224{
226
227 Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
228
229 if (AsciiStrnCmp (
230 (CONST CHAR8 *)Header->BootMagic,
231 ANDROID_BOOT_MAGIC,
232 ANDROID_BOOT_MAGIC_LENGTH
233 ) != 0)
234 {
235 return EFI_INVALID_PARAMETER;
236 }
237
238 ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
239
240 *RamdiskSize = Header->RamdiskSize;
241
242 if (Header->RamdiskSize != 0) {
243 *Ramdisk = (VOID *)((INTN)BootImg
244 + Header->PageSize
245 + ALIGN_VALUE (Header->KernelSize, Header->PageSize));
246 }
247
248 return EFI_SUCCESS;
249}
250
252AndroidBootImgGetSecondBootLoaderInfo (
253 IN VOID *BootImg,
254 OUT VOID **Second,
255 OUT UINTN *SecondSize
256 )
257{
259
260 Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
261
262 if (AsciiStrnCmp (
263 (CONST CHAR8 *)Header->BootMagic,
264 ANDROID_BOOT_MAGIC,
265 ANDROID_BOOT_MAGIC_LENGTH
266 ) != 0)
267 {
268 return EFI_INVALID_PARAMETER;
269 }
270
271 ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
272
273 *SecondSize = Header->SecondStageBootloaderSize;
274
275 if (Header->SecondStageBootloaderSize != 0) {
276 *Second = (VOID *)((UINTN)BootImg
277 + Header->PageSize
278 + ALIGN_VALUE (Header->KernelSize, Header->PageSize)
279 + ALIGN_VALUE (Header->RamdiskSize, Header->PageSize));
280 }
281
282 return EFI_SUCCESS;
283}
284
286AndroidBootImgGetKernelArgs (
287 IN VOID *BootImg,
288 OUT CHAR8 *KernelArgs
289 )
290{
292
293 Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
295 KernelArgs,
296 ANDROID_BOOTIMG_KERNEL_ARGS_SIZE,
297 Header->KernelArgs,
298 ANDROID_BOOTIMG_KERNEL_ARGS_SIZE
299 );
300
301 return EFI_SUCCESS;
302}
303
305AndroidBootImgGetFdt (
306 IN VOID *BootImg,
307 IN VOID **FdtBase
308 )
309{
310 UINTN SecondLoaderSize;
311 EFI_STATUS Status;
312
313 /* Check whether FDT is located in second boot region as some vendor do so,
314 * because second loader is never used as far as I know. */
315 Status = AndroidBootImgGetSecondBootLoaderInfo (
316 BootImg,
317 FdtBase,
318 &SecondLoaderSize
319 );
320 return Status;
321}
322
324AndroidBootImgUpdateArgs (
325 IN VOID *BootImg,
326 OUT VOID **KernelArgs
327 )
328{
329 CHAR8 ImageKernelArgs[ANDROID_BOOTIMG_KERNEL_ARGS_SIZE];
330 EFI_STATUS Status;
331 UINT32 NewKernelArgSize;
332
333 // Get kernel arguments from Android boot image
334 Status = AndroidBootImgGetKernelArgs (BootImg, ImageKernelArgs);
335 if (EFI_ERROR (Status)) {
336 return Status;
337 }
338
339 NewKernelArgSize = ANDROID_BOOTIMG_KERNEL_ARGS_SIZE + PcdGet32 (PcdAndroidKernelCommandLineOverflow);
340 *KernelArgs = AllocateZeroPool (sizeof (CHAR16) * NewKernelArgSize);
341 if (*KernelArgs == NULL) {
342 DEBUG ((DEBUG_ERROR, "Fail to allocate memory\n"));
343 return EFI_OUT_OF_RESOURCES;
344 }
345
347 ImageKernelArgs,
348 *KernelArgs,
349 NewKernelArgSize
350 );
351 // Append platform kernel arguments
352 if (mAndroidBootImg->AppendArgs) {
353 Status = mAndroidBootImg->AppendArgs (
354 *KernelArgs,
355 NewKernelArgSize
356 );
357 }
358
359 return Status;
360}
361
363AndroidBootImgInstallLoadFile2 (
364 IN VOID *RamdiskData,
365 IN UINTN RamdiskSize
366 )
367{
368 mRamDiskLoadFileHandle = NULL;
369 mRamdiskData = RamdiskData;
370 mRamdiskSize = RamdiskSize;
371 return gBS->InstallMultipleProtocolInterfaces (
372 &mRamDiskLoadFileHandle,
373 &gEfiLoadFile2ProtocolGuid,
375 &gEfiDevicePathProtocolGuid,
376 &mRamdiskDevicePath,
377 NULL
378 );
379}
380
382AndroidBootImgUninstallLoadFile2 (
383 VOID
384 )
385{
386 EFI_STATUS Status;
387
388 Status = EFI_SUCCESS;
389 mRamdiskData = NULL;
390 mRamdiskSize = 0;
391 if (mRamDiskLoadFileHandle != NULL) {
392 Status = gBS->UninstallMultipleProtocolInterfaces (
393 mRamDiskLoadFileHandle,
394 &gEfiLoadFile2ProtocolGuid,
396 &gEfiDevicePathProtocolGuid,
397 &mRamdiskDevicePath,
398 NULL
399 );
400 mRamDiskLoadFileHandle = NULL;
401 }
402
403 return Status;
404}
405
406BOOLEAN
407AndroidBootImgAcpiSupported (
408 VOID
409 )
410{
411 EFI_STATUS Status;
412 VOID *AcpiTable;
413
414 Status = EfiGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
415 return !EFI_ERROR (Status);
416}
417
419AndroidBootImgLocateFdt (
420 IN VOID *BootImg,
421 IN VOID **FdtBase
422 )
423{
424 INTN Err;
425 EFI_STATUS Status;
426
427 Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, FdtBase);
428 if (!EFI_ERROR (Status)) {
429 return EFI_SUCCESS;
430 }
431
432 Status = AndroidBootImgGetFdt (BootImg, FdtBase);
433 if (EFI_ERROR (Status)) {
434 return Status;
435 }
436
437 Err = fdt_check_header (*FdtBase);
438 if (Err != 0) {
439 DEBUG ((
440 DEBUG_ERROR,
441 "ERROR: Device Tree header not valid (Err:%d)\n",
442 Err
443 ));
444 return EFI_INVALID_PARAMETER;
445 }
446
447 return EFI_SUCCESS;
448}
449
450INTN
451AndroidBootImgGetChosenNode (
452 IN INTN UpdatedFdtBase
453 )
454{
455 INTN ChosenNode;
456
457 ChosenNode = fdt_subnode_offset ((CONST VOID *)UpdatedFdtBase, 0, "chosen");
458 if (ChosenNode < 0) {
459 ChosenNode = fdt_add_subnode ((VOID *)UpdatedFdtBase, 0, "chosen");
460 if (ChosenNode < 0) {
461 DEBUG ((DEBUG_ERROR, "Fail to find fdt node chosen!\n"));
462 return 0;
463 }
464 }
465
466 return ChosenNode;
467}
468
470AndroidBootImgSetProperty64 (
471 IN INTN UpdatedFdtBase,
472 IN INTN ChosenNode,
473 IN CHAR8 *PropertyName,
474 IN UINT64 Val
475 )
476{
477 INTN Err;
478 struct fdt_property *Property;
479 int Len;
480
481 Property = fdt_get_property_w (
482 (VOID *)UpdatedFdtBase,
483 ChosenNode,
484 PropertyName,
485 &Len
486 );
487 if ((NULL == Property) && (Len == -FDT_ERR_NOTFOUND)) {
488 Val = cpu_to_fdt64 (Val);
489 Err = fdt_appendprop (
490 (VOID *)UpdatedFdtBase,
491 ChosenNode,
492 PropertyName,
493 &Val,
494 sizeof (UINT64)
495 );
496 if (Err) {
497 DEBUG ((DEBUG_ERROR, "fdt_appendprop() fail: %a\n", fdt_strerror (Err)));
498 return EFI_INVALID_PARAMETER;
499 }
500 } else if (Property != NULL) {
501 Err = fdt_setprop_u64 (
502 (VOID *)UpdatedFdtBase,
503 ChosenNode,
504 PropertyName,
505 Val
506 );
507 if (Err) {
508 DEBUG ((DEBUG_ERROR, "fdt_setprop_u64() fail: %a\n", fdt_strerror (Err)));
509 return EFI_INVALID_PARAMETER;
510 }
511 } else {
512 DEBUG ((DEBUG_ERROR, "Failed to set fdt Property %a\n", PropertyName));
513 return EFI_INVALID_PARAMETER;
514 }
515
516 return EFI_SUCCESS;
517}
518
520AndroidBootImgUpdateFdt (
521 IN VOID *BootImg,
522 IN VOID *FdtBase,
523 IN VOID *RamdiskData,
524 IN UINTN RamdiskSize
525 )
526{
527 INTN ChosenNode, Err, NewFdtSize;
528 EFI_STATUS Status;
529 EFI_PHYSICAL_ADDRESS UpdatedFdtBase, NewFdtBase;
530
531 NewFdtSize = (UINTN)fdt_totalsize (FdtBase)
532 + FDT_ADDITIONAL_ENTRIES_SIZE;
533 Status = gBS->AllocatePages (
536 EFI_SIZE_TO_PAGES (NewFdtSize),
537 &UpdatedFdtBase
538 );
539 if (EFI_ERROR (Status)) {
540 DEBUG ((
541 DEBUG_WARN,
542 "Warning: Failed to reallocate FDT, err %d.\n",
543 Status
544 ));
545 return Status;
546 }
547
548 // Load the Original FDT tree into the new region
549 Err = fdt_open_into (FdtBase, (VOID *)(INTN)UpdatedFdtBase, NewFdtSize);
550 if (Err) {
551 DEBUG ((DEBUG_ERROR, "fdt_open_into(): %a\n", fdt_strerror (Err)));
552 Status = EFI_INVALID_PARAMETER;
553 goto Fdt_Exit;
554 }
555
556 if (FeaturePcdGet (PcdAndroidBootLoadFile2)) {
557 Status = AndroidBootImgInstallLoadFile2 (RamdiskData, RamdiskSize);
558 if (EFI_ERROR (Status)) {
559 goto Fdt_Exit;
560 }
561 } else {
562 ChosenNode = AndroidBootImgGetChosenNode (UpdatedFdtBase);
563 if (!ChosenNode) {
564 goto Fdt_Exit;
565 }
566
567 Status = AndroidBootImgSetProperty64 (
568 UpdatedFdtBase,
569 ChosenNode,
570 "linux,initrd-start",
571 (UINTN)RamdiskData
572 );
573 if (EFI_ERROR (Status)) {
574 goto Fdt_Exit;
575 }
576
577 Status = AndroidBootImgSetProperty64 (
578 UpdatedFdtBase,
579 ChosenNode,
580 "linux,initrd-end",
581 (UINTN)RamdiskData + RamdiskSize
582 );
583 if (EFI_ERROR (Status)) {
584 goto Fdt_Exit;
585 }
586 }
587
588 if (mAndroidBootImg->UpdateDtb) {
589 Status = mAndroidBootImg->UpdateDtb (UpdatedFdtBase, &NewFdtBase);
590 if (EFI_ERROR (Status)) {
591 goto Fdt_Exit;
592 }
593 } else {
594 NewFdtBase = UpdatedFdtBase;
595 }
596
597 Status = gBS->InstallConfigurationTable (
598 &gFdtTableGuid,
599 (VOID *)(UINTN)NewFdtBase
600 );
601
602 if (!EFI_ERROR (Status)) {
603 return EFI_SUCCESS;
604 }
605
606Fdt_Exit:
607 gBS->FreePages (UpdatedFdtBase, EFI_SIZE_TO_PAGES (NewFdtSize));
608 return Status;
609}
610
612AndroidBootImgBoot (
613 IN VOID *Buffer,
614 IN UINTN BufferSize
615 )
616{
617 EFI_STATUS Status;
618 VOID *Kernel;
619 UINTN KernelSize;
620 MEMORY_DEVICE_PATH KernelDevicePath;
621 EFI_HANDLE ImageHandle;
622 VOID *NewKernelArg;
623 EFI_LOADED_IMAGE_PROTOCOL *ImageInfo;
624 VOID *RamdiskData;
625 UINTN RamdiskSize;
626 IN VOID *FdtBase;
627
628 if ((Buffer == NULL) || (BufferSize == 0)) {
629 return EFI_INVALID_PARAMETER;
630 }
631
632 NewKernelArg = NULL;
633 ImageHandle = NULL;
634
635 Status = gBS->LocateProtocol (
636 &gAndroidBootImgProtocolGuid,
637 NULL,
638 (VOID **)&mAndroidBootImg
639 );
640 if (EFI_ERROR (Status)) {
641 goto Exit;
642 }
643
644 Status = AndroidBootImgGetKernelInfo (
645 Buffer,
646 &Kernel,
647 &KernelSize
648 );
649 if (EFI_ERROR (Status)) {
650 goto Exit;
651 }
652
653 Status = AndroidBootImgUpdateArgs (Buffer, &NewKernelArg);
654 if (EFI_ERROR (Status)) {
655 goto Exit;
656 }
657
658 Status = AndroidBootImgGetRamdiskInfo (
659 Buffer,
660 &RamdiskData,
661 &RamdiskSize
662 );
663 if (EFI_ERROR (Status)) {
664 goto Exit;
665 }
666
667 if (AndroidBootImgAcpiSupported ()) {
668 Status = AndroidBootImgInstallLoadFile2 (RamdiskData, RamdiskSize);
669 if (EFI_ERROR (Status)) {
670 goto Exit;
671 }
672 } else {
673 Status = AndroidBootImgLocateFdt (Buffer, &FdtBase);
674 if (EFI_ERROR (Status)) {
675 goto Exit;
676 }
677
678 Status = AndroidBootImgUpdateFdt (Buffer, FdtBase, RamdiskData, RamdiskSize);
679 if (EFI_ERROR (Status)) {
680 goto Exit;
681 }
682 }
683
684 KernelDevicePath = mMemoryDevicePathTemplate;
685
686 KernelDevicePath.Node1.StartingAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Kernel;
687 KernelDevicePath.Node1.EndingAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Kernel
688 + KernelSize;
689
690 Status = gBS->LoadImage (
691 TRUE,
693 (EFI_DEVICE_PATH *)&KernelDevicePath,
694 (VOID *)(UINTN)Kernel,
695 KernelSize,
696 &ImageHandle
697 );
698 if (EFI_ERROR (Status)) {
699 goto Exit;
700 }
701
702 // Set kernel arguments
703 Status = gBS->HandleProtocol (
704 ImageHandle,
705 &gEfiLoadedImageProtocolGuid,
706 (VOID **)&ImageInfo
707 );
708 if (EFI_ERROR (Status)) {
709 goto Exit;
710 }
711
712 ImageInfo->LoadOptions = NewKernelArg;
713 ImageInfo->LoadOptionsSize = StrLen (NewKernelArg) * sizeof (CHAR16);
714
715 // Before calling the image, enable the Watchdog Timer for the 5 Minute period
716 gBS->SetWatchdogTimer (5 * 60, 0x10000, 0, NULL);
717 // Start the image
718 Status = gBS->StartImage (ImageHandle, NULL, NULL);
719 // Clear the Watchdog Timer if the image returns
720 gBS->SetWatchdogTimer (0, 0x10000, 0, NULL);
721
722Exit:
723 // Unload image as it will not be used anymore
724 if (ImageHandle != NULL) {
725 gBS->UnloadImage (ImageHandle);
726 ImageHandle = NULL;
727 }
728
729 if (EFI_ERROR (Status)) {
730 if (NewKernelArg != NULL) {
731 FreePool (NewKernelArg);
732 NewKernelArg = NULL;
733 }
734 }
735
736 AndroidBootImgUninstallLoadFile2 ();
737 return Status;
738}
UINT64 UINTN
INT64 INTN
STATIC EFI_LOAD_FILE2_PROTOCOL mAndroidBootImgLoadFile2
EFI_STATUS EFIAPI AndroidBootImgLoadFile2(IN EFI_LOAD_FILE2_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN BOOLEAN BootPolicy, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL)
RETURN_STATUS EFIAPI AsciiStrnCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
Definition: SafeString.c:1875
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
Definition: String.c:872
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
Definition: SafeString.c:2873
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
Definition: String.c:30
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define HARDWARE_DEVICE_PATH
Definition: DevicePath.h:68
#define HW_MEMMAP_DP
Definition: DevicePath.h:109
#define MEDIA_VENDOR_DP
Media vendor device path subtype.
Definition: DevicePath.h:1093
BOOLEAN EFIAPI IsDevicePathValid(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINTN MaxSize)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define ALIGN_VALUE(Value, Alignment)
Definition: Base.h:948
#define TRUE
Definition: Base.h:301
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define PcdGet32(TokenName)
Definition: PcdLib.h:362
#define FeaturePcdGet(TokenName)
Definition: PcdLib.h:50
VOID EFIAPI Exit(IN EFI_STATUS Status)
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SIZE_TO_PAGES(Size)
Definition: UefiBaseType.h:200
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_HANDLE gImageHandle
EFI_BOOT_SERVICES * gBS
EFI_STATUS EFIAPI EfiGetSystemConfigurationTable(IN EFI_GUID *TableGuid, OUT VOID **Table)
Definition: UefiLib.c:82
@ EfiBootServicesData
@ AllocateAnyPages
Definition: UefiSpec.h:33
VOID * LoadOptions
A pointer to the image's binary load options.
Definition: LoadedImage.h:62
UINT32 LoadOptionsSize
The size in bytes of LoadOptions.
Definition: LoadedImage.h:61
EFI_PHYSICAL_ADDRESS StartingAddress
Definition: DevicePath.h:123
EFI_PHYSICAL_ADDRESS EndingAddress
Definition: DevicePath.h:127