Lines Matching refs:Status
98 EFI_STATUS Status; in UncompressKernel() local
102 Status = gBS->AllocatePages ( in UncompressKernel()
107 if (EFI_ERROR (Status)) { in UncompressKernel()
108 return Status; in UncompressKernel()
255 EFI_STATUS Status; in AllocateRamdisk() local
271 Status = EFI_SUCCESS; in AllocateRamdisk()
274 Status = gBS->AllocatePages ( in AllocateRamdisk()
277 if (EFI_ERROR (Status)) { in AllocateRamdisk()
278 return Status; in AllocateRamdisk()
292 return Status; in AllocateRamdisk()
305 EFI_STATUS Status; in InstallFdt() local
308 Status = gBS->LocateProtocol (&gAbootimgProtocolGuid, NULL, (VOID **) &mAbootimg); in InstallFdt()
309 if (EFI_ERROR (Status)) { in InstallFdt()
310 return Status; in InstallFdt()
313 Status = GetKernelArgs ( in InstallFdt()
317 if (EFI_ERROR (Status)) { in InstallFdt()
318 return Status; in InstallFdt()
325 Status = mAbootimg->AppendArgs (KernelArgs, BOOTIMG_KERNEL_ARGS_SIZE); in InstallFdt()
326 if (EFI_ERROR (Status)) { in InstallFdt()
327 return Status; in InstallFdt()
330 Status = AllocateRamdisk (BootImg, KernelArgs); in InstallFdt()
331 if (EFI_ERROR (Status)) { in InstallFdt()
332 return Status; in InstallFdt()
335 Status = mAbootimg->UpdateDtb (FdtBase, &NewFdtBase); in InstallFdt()
336 if (EFI_ERROR (Status)) { in InstallFdt()
337 return Status; in InstallFdt()
349 Status = gBS->InstallConfigurationTable ( in InstallFdt()
353 return Status; in InstallFdt()
363 EFI_STATUS Status; in GetPartition() local
372 …Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFr… in GetPartition()
373 if (EFI_ERROR (Status)) { in GetPartition()
374 return Status; in GetPartition()
391 Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, &Handle); in GetPartition()
392 if (EFI_ERROR (Status)) { in GetPartition()
393 return Status; in GetPartition()
396 Status = gBS->OpenProtocol ( in GetPartition()
404 if (EFI_ERROR (Status)) { in GetPartition()
405 DEBUG ((EFI_D_ERROR, "Failed to get BlockIo: %r\n", Status)); in GetPartition()
406 return Status; in GetPartition()
409 return Status; in GetPartition()
420 EFI_STATUS Status; in LoadBootImage() local
429 Status = GetPartition (BootPathStr, &BlockIo); in LoadBootImage()
430 if (EFI_ERROR (Status)) { in LoadBootImage()
431 return Status; in LoadBootImage()
434 Status = gBS->AllocatePages ( in LoadBootImage()
439 if (EFI_ERROR (Status)) { in LoadBootImage()
440 return Status; in LoadBootImage()
443 Status = BlockIo->ReadBlocks ( in LoadBootImage()
450 if (EFI_ERROR (Status)) { in LoadBootImage()
451 return Status; in LoadBootImage()
455 Status = GetImgSize (*Buffer, &BootImageSize); in LoadBootImage()
456 if (EFI_ERROR (Status)) { in LoadBootImage()
457 DEBUG ((DEBUG_ERROR, "Failed to get Abootimg Size: %r\n", Status)); in LoadBootImage()
458 return Status; in LoadBootImage()
467 Status = gBS->AllocatePages ( in LoadBootImage()
471 if (EFI_ERROR (Status)) { in LoadBootImage()
472 return Status; in LoadBootImage()
477 Status = BlockIo->ReadBlocks ( in LoadBootImage()
484 if (EFI_ERROR (Status)) { in LoadBootImage()
485 DEBUG ((EFI_D_ERROR, "Failed to read blocks: %r\n", Status)); in LoadBootImage()
486 return Status; in LoadBootImage()
488 return Status; in LoadBootImage()
498 EFI_STATUS Status; in LoadFdtFromBootImage() local
505 Status = AbootimgGetKernelInfo (BootImage, &StoredKernel, &StoredKernelSize); in LoadFdtFromBootImage()
506 if (EFI_ERROR (Status)) { in LoadFdtFromBootImage()
507 …G ((DEBUG_ERROR, "Failed to get kernel information from stored Android Boot Image: %r\n", Status)); in LoadFdtFromBootImage()
508 return Status; in LoadFdtFromBootImage()
511 Status = CheckKernelImageHeader (StoredKernel); in LoadFdtFromBootImage()
512 if (EFI_ERROR (Status)) { in LoadFdtFromBootImage()
513 DEBUG ((DEBUG_ERROR, "Stored kernel image is not raw format: %r\n", Status)); in LoadFdtFromBootImage()
516 Status = UncompressKernel ( in LoadFdtFromBootImage()
522 if (EFI_ERROR (Status)) { in LoadFdtFromBootImage()
523 DEBUG ((DEBUG_ERROR, "Failed to uncompress stored kernel with gzip format: %r\n", Status)); in LoadFdtFromBootImage()
524 return Status; in LoadFdtFromBootImage()
530 Status = GetAttachedFdt (StoredKernel, Fdt); in LoadFdtFromBootImage()
531 if (EFI_ERROR (Status)) { in LoadFdtFromBootImage()
532 DEBUG ((DEBUG_ERROR, "Failed to get attached FDT from the end of stored kernel: %r\n", Status)); in LoadFdtFromBootImage()
533 return Status; in LoadFdtFromBootImage()
535 return Status; in LoadFdtFromBootImage()
552 EFI_STATUS Status; in BootFromRam() local
561 Status = AbootimgGetKernelInfo (Buffer, Kernel, KernelSize); in BootFromRam()
562 if (EFI_ERROR (Status)) { in BootFromRam()
563 DEBUG ((DEBUG_ERROR, "Failed to get kernel information from Android Boot Image: %r\n", Status)); in BootFromRam()
564 return Status; in BootFromRam()
566 Status = CheckKernelImageHeader (*Kernel); in BootFromRam()
567 if (EFI_ERROR (Status)) { in BootFromRam()
571 Status = UncompressKernel ( in BootFromRam()
577 if (EFI_ERROR (Status)) { in BootFromRam()
578 DEBUG ((DEBUG_ERROR, "Failed to uncompress kernel with gzip format: %r\n", Status)); in BootFromRam()
579 return Status; in BootFromRam()
585 Status = GetAttachedFdt (*Kernel, &Fdt); in BootFromRam()
586 if (EFI_ERROR (Status)) { in BootFromRam()
590 Status = LoadBootImage (BootPathStr, &BootImage, &BootImageSize); in BootFromRam()
591 if (EFI_ERROR (Status)) { in BootFromRam()
592 DEBUG ((DEBUG_ERROR, "Failed to load boot image from partition: %r\n", Status)); in BootFromRam()
593 return Status; in BootFromRam()
596 Status = LoadFdtFromBootImage (BootImage, &Fdt); in BootFromRam()
597 if (EFI_ERROR (Status)) { in BootFromRam()
598 return Status; in BootFromRam()
602 Status = GetRamdiskInfo (Buffer, &Ramdisk, &RamdiskSize); in BootFromRam()
605 Status = LoadBootImage (BootPathStr, &BootImage, &BootImageSize); in BootFromRam()
606 if (EFI_ERROR (Status)) { in BootFromRam()
607 DEBUG ((DEBUG_ERROR, "Failed to load boot image from partition: %r\n", Status)); in BootFromRam()
608 return Status; in BootFromRam()
612 Status = GetRamdiskInfo (BootImage, &Ramdisk, &RamdiskSize); in BootFromRam()
613 if (EFI_ERROR (Status)) { in BootFromRam()
614 DEBUG ((DEBUG_ERROR, "Failed to get ramdisk from boot image: %r\n", Status)); in BootFromRam()
615 return Status; in BootFromRam()
617 Status = InstallFdt (BootImage, (UINTN)Fdt, KernelArgs); in BootFromRam()
618 if (EFI_ERROR (Status)) { in BootFromRam()
619 DEBUG ((DEBUG_ERROR, "Failed to install FDT: %r\n", Status)); in BootFromRam()
620 return Status; in BootFromRam()
623 Status = InstallFdt (Buffer, (UINTN)Fdt, KernelArgs); in BootFromRam()
624 if (EFI_ERROR (Status)) { in BootFromRam()
625 DEBUG ((DEBUG_ERROR, "Failed to install FDT: %r\n", Status)); in BootFromRam()
626 return Status; in BootFromRam()
645 EFI_STATUS Status; in BootFromPartition() local
654 Status = LoadBootImage (BootPathStr, &BootImage, &BootImageSize); in BootFromPartition()
655 if (EFI_ERROR (Status)) { in BootFromPartition()
656 DEBUG ((DEBUG_ERROR, "Failed to load boot image from boot partition: %r\n", Status)); in BootFromPartition()
657 return Status; in BootFromPartition()
659 Status = AbootimgGetKernelInfo (BootImage, Kernel, KernelSize); in BootFromPartition()
660 if (EFI_ERROR (Status)) { in BootFromPartition()
661 DEBUG ((DEBUG_ERROR, "Failed to get kernel information from Android Boot Image: %r\n", Status)); in BootFromPartition()
662 return Status; in BootFromPartition()
664 Status = CheckKernelImageHeader (*Kernel); in BootFromPartition()
665 if (EFI_ERROR (Status)) { in BootFromPartition()
666 DEBUG ((DEBUG_ERROR, "The kernel image is not raw format: %r\n", Status)); in BootFromPartition()
669 Status = UncompressKernel ( in BootFromPartition()
675 if (EFI_ERROR (Status)) { in BootFromPartition()
676 DEBUG ((DEBUG_ERROR, "Failed to uncompress kernel with gzip format: %r\n", Status)); in BootFromPartition()
677 return Status; in BootFromPartition()
683 Status = GetAttachedFdt (*Kernel, &Fdt); in BootFromPartition()
684 if (EFI_ERROR (Status)) { in BootFromPartition()
685 DEBUG ((DEBUG_ERROR, "Failed to get attached FDT from the end of raw kernel: %r\n", Status)); in BootFromPartition()
686 return Status; in BootFromPartition()
689 Status = GetRamdiskInfo (BootImage, &Ramdisk, &RamdiskSize); in BootFromPartition()
690 if (EFI_ERROR (Status)) { in BootFromPartition()
691 DEBUG ((DEBUG_ERROR, "Failed to get ramdisk from boot image: %r\n", Status)); in BootFromPartition()
692 return Status; in BootFromPartition()
694 Status = InstallFdt (BootImage, (UINTN)Fdt, KernelArgs); in BootFromPartition()
695 if (EFI_ERROR (Status)) { in BootFromPartition()
696 DEBUG ((DEBUG_ERROR, "Failed to install FDT: %r\n", Status)); in BootFromPartition()
697 return Status; in BootFromPartition()
710 EFI_STATUS Status; in AbootimgBootRam() local
719 Status = gBS->AllocatePages ( in AbootimgBootRam()
724 if (EFI_ERROR (Status)) { in AbootimgBootRam()
725 DEBUG ((DEBUG_ERROR, "Failed to allocate memory for kernel args: %r\n", Status)); in AbootimgBootRam()
726 return Status; in AbootimgBootRam()
731 Status = BootFromRam (Buffer, BootPathStr, FdtPathStr, NewKernelArgs, &Kernel, &KernelSize); in AbootimgBootRam()
732 if (EFI_ERROR (Status)) { in AbootimgBootRam()
733 DEBUG ((DEBUG_ERROR, "Failed to boot from RAM: %r\n", Status)); in AbootimgBootRam()
734 return Status; in AbootimgBootRam()
744 …Status = gBS->LoadImage (TRUE, gImageHandle, (EFI_DEVICE_PATH *)&KernelDevicePath, (VOID*)(UINTN)K… in AbootimgBootRam()
747 Status = gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &ImageInfo); in AbootimgBootRam()
754 Status = gBS->StartImage (ImageHandle, NULL, NULL); in AbootimgBootRam()
766 EFI_STATUS Status; in AbootimgBootPartition() local
780 Status = BootFromPartition (BootPathStr, FdtPathStr, NewKernelArgs, &Kernel, &KernelSize); in AbootimgBootPartition()
781 if (EFI_ERROR (Status)) { in AbootimgBootPartition()
782 DEBUG ((DEBUG_ERROR, "Failed to boot from partition: %r\n", Status)); in AbootimgBootPartition()
783 return Status; in AbootimgBootPartition()
793 …Status = gBS->LoadImage (TRUE, gImageHandle, (EFI_DEVICE_PATH *)&KernelDevicePath, (VOID*)(UINTN)K… in AbootimgBootPartition()
796 Status = gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &ImageInfo); in AbootimgBootPartition()
803 Status = gBS->StartImage (ImageHandle, NULL, NULL); in AbootimgBootPartition()