42 END_ENTIRE_DEVICE_PATH_SUBTYPE,
72 Status =
gBS->LoadImage (
80 if (EFI_ERROR (Status)) {
87 if (Status == EFI_SECURITY_VIOLATION) {
88 gBS->UnloadImage (ImageHandle);
95 if (LoadOptionsSize != 0) {
96 Status =
gBS->HandleProtocol (
98 &gEfiLoadedImageProtocolGuid,
101 if (EFI_ERROR (Status)) {
105 LoadedImage->LoadOptionsSize = LoadOptionsSize;
106 LoadedImage->LoadOptions = LoadOptions;
110 gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00,
NULL);
112 Status =
gBS->StartImage (ImageHandle,
NULL,
NULL);
114 gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000,
NULL);
126 CHAR8 KernelArgs[ANDROID_BOOTIMG_KERNEL_ARGS_SIZE];
132 CHAR16 *LoadOptions, *NewLoadOptions;
134 Status = ParseAndroidBootImg (
142 if (EFI_ERROR (Status)) {
146 KernelDevicePath = MemoryDevicePathTemplate;
155 if (LoadOptions ==
NULL) {
156 return EFI_OUT_OF_RESOURCES;
159 if (RamdiskSize != 0) {
162 L
" initrd=0x%x,0x%x",
167 if (NewLoadOptions ==
NULL) {
168 return EFI_OUT_OF_RESOURCES;
171 LoadOptions = NewLoadOptions;
180 if (EFI_ERROR (Status)) {
181 DEBUG ((DEBUG_ERROR,
"Couldn't Boot Linux: %d\n", Status));
182 Status = EFI_DEVICE_ERROR;
183 goto FreeLoadOptions;
188 DEBUG ((DEBUG_ERROR,
"WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
STATIC EFI_STATUS StartEfiApplication(IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINTN LoadOptionsSize, IN VOID *LoadOptions)
#define HARDWARE_DEVICE_PATH
VOID EFIAPI FreePool(IN VOID *Buffer)
#define DEBUG(Expression)
UINT64 EFI_PHYSICAL_ADDRESS
CHAR16 *EFIAPI CatSPrint(IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString,...)
EFI_PHYSICAL_ADDRESS StartingAddress
EFI_PHYSICAL_ADDRESS EndingAddress