X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cmd%2Fbootefi.c;h=a45bfd139fc39857b9013f9bb5c5466443f436c6;hb=29d8eb3345fe52d1bb338c541b76684f4c3a3ec6;hp=c19256e00dc9bff711e45d5dd65311a736c27dbe;hpb=eb53a18c9e903e35e8e8d52da96c33b63822881c;p=platform%2Fkernel%2Fu-boot.git diff --git a/cmd/bootefi.c b/cmd/bootefi.c index c19256e..a45bfd1 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -24,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR; static struct efi_device_path *bootefi_image_path; static struct efi_device_path *bootefi_device_path; -/* +/** * Set the load options of an image from an environment variable. * * @handle: the image handle @@ -143,7 +143,7 @@ done: return ret; } -/* +/** * efi_carve_out_dt_rsv() - Carve out DT reserved memory ranges * * The mem_rsv entries of the FDT are added to the memory map. Any failures are @@ -169,8 +169,8 @@ static void efi_carve_out_dt_rsv(void *fdt) pages = efi_size_in_pages(size + (addr & EFI_PAGE_MASK)); addr &= ~EFI_PAGE_MASK; - if (!efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE, - false)) + if (efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE, + false) != EFI_SUCCESS) printf("FDT memrsv map %d: Failed to add to map\n", i); } } @@ -342,7 +342,7 @@ static int do_efibootmgr(void) return CMD_RET_SUCCESS; } -/* +/** * do_bootefi_image() - execute EFI binary * * Set up memory image for the binary to be loaded, prepare device path, and @@ -612,6 +612,16 @@ U_BOOT_CMD( bootefi_help_text ); +/** + * efi_set_bootdev() - set boot device + * + * This function is called when a file is loaded, e.g. via the 'load' command. + * We use the path to this file to inform the UEFI binary about the boot device. + * + * @dev: device, e.g. "MMC" + * @devnr: number of the device, e.g. "1:2" + * @path: path to file loaded + */ void efi_set_bootdev(const char *dev, const char *devnr, const char *path) { struct efi_device_path *device, *image;