- /*
- * Special case for efi payload not loaded from disk, such as
- * 'bootefi hello' or for example payload loaded directly into
- * memory via JTAG, etc:
- */
+#ifdef CONFIG_CMD_BOOTEFI_HELLO
+ if (!strcmp(image_opt, "hello")) {
+ char *saddr;
+
+ saddr = env_get("loadaddr");
+ size = __efi_helloworld_end - __efi_helloworld_begin;
+
+ if (saddr)
+ addr = simple_strtoul(saddr, NULL, 16);
+ else
+ addr = CONFIG_SYS_LOAD_ADDR;
+
+ image_buf = map_sysmem(addr, size);
+ memcpy(image_buf, __efi_helloworld_begin, size);
+
+ device_path = NULL;
+ image_path = NULL;
+ } else
+#endif
+ {
+ size_str = env_get("filesize");
+ if (size_str)
+ size = simple_strtoul(size_str, NULL, 16);
+ else
+ size = 0;
+
+ addr = simple_strtoul(image_opt, NULL, 16);
+ /* Check that a numeric value was passed */
+ if (!addr && *image_opt != '0')
+ return CMD_RET_USAGE;
+
+ image_buf = map_sysmem(addr, size);
+
+ device_path = bootefi_device_path;
+ image_path = bootefi_image_path;
+ }
+