]> git.sur5r.net Git - u-boot/blobdiff - cmd/bootefi.c
arm: socfpga: Remove unused passing parameter of socfpga_bridges_reset
[u-boot] / cmd / bootefi.c
index 97a0fc9c7ca3c638c8ed85674d153930235e8856..771300ee94b739e36f16f2c6eed98e539e9b23c0 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <dm/device.h>
+#include <dm.h>
 #include <efi_loader.h>
 #include <errno.h>
 #include <libfdt.h>
@@ -133,7 +133,13 @@ static void *copy_fdt(void *fdt)
                               &new_fdt_addr) != EFI_SUCCESS) {
                /* If we can't put it there, put it somewhere */
                new_fdt_addr = (ulong)memalign(4096, fdt_size);
+               if (efi_allocate_pages(1, EFI_BOOT_SERVICES_DATA, fdt_pages,
+                                      &new_fdt_addr) != EFI_SUCCESS) {
+                       printf("ERROR: Failed to reserve space for FDT\n");
+                       return NULL;
+               }
        }
+
        new_fdt = (void*)(ulong)new_fdt_addr;
        memcpy(new_fdt, fdt, fdt_totalsize(fdt));
        fdt_set_totalsize(new_fdt, fdt_size);
@@ -246,7 +252,7 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt)
 
                /* Move into EL2 and keep running there */
                armv8_switch_to_el2((ulong)entry, (ulong)&loaded_image_info,
-                                   (ulong)&systab, (ulong)efi_run_in_el2,
+                                   (ulong)&systab, 0, (ulong)efi_run_in_el2,
                                    ES_TO_AARCH64);
 
                /* Should never reach here, efi exits with longjmp */
@@ -321,7 +327,7 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
        char devname[32] = { 0 }; /* dp->str is u16[32] long */
        char *colon;
 
-#if defined(CONFIG_BLK) || defined(CONFIG_ISO_PARTITION)
+#if defined(CONFIG_BLK) || CONFIG_IS_ENABLED(ISO_PARTITION)
        desc = blk_get_dev(dev, simple_strtol(devnr, NULL, 10));
 #endif
 
@@ -338,7 +344,7 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
 
        colon = strchr(devname, ':');
 
-#ifdef CONFIG_ISO_PARTITION
+#if CONFIG_IS_ENABLED(ISO_PARTITION)
        /* For ISOs we create partition block devices */
        if (desc && (desc->type != DEV_TYPE_UNKNOWN) &&
            (desc->part_type == PART_TYPE_ISO)) {