]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/bootm-fdt.c
virt-dt: Allow reservation of secure region when in a RAM carveout
[karo-tx-uboot.git] / arch / arm / lib / bootm-fdt.c
index 49ba6916398c5a80342160e663f06003bd6524b1..0eb10a86874371936bbfaf6ca2cb74523c32c616 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <asm/armv7.h>
 #include <asm/psci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -31,6 +32,11 @@ int arch_fixup_fdt(void *blob)
        for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
                start[bank] = bd->bi_dram[bank].start;
                size[bank] = bd->bi_dram[bank].size;
+#ifdef CONFIG_ARMV7_NONSEC
+               ret = armv7_apply_memory_carveout(&start[bank], &size[bank]);
+               if (ret)
+                       return ret;
+#endif
        }
 
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);