armv8: ls2080a: Declare spin tables as reserved for efi loader
authorAlexander Graf <agraf@suse.de>
Thu, 17 Nov 2016 00:03:00 +0000 (01:03 +0100)
committerAlexander Graf <agraf@suse.de>
Thu, 17 Nov 2016 13:18:56 +0000 (14:18 +0100)
The efi loader code has its own memory map, so it needs to be aware where
the spin tables are located, to ensure that no code writes into those
regions.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/arm/cpu/armv8/fsl-layerscape/fdt.c

index 1a8321b0e4064d9c7f780b18e72d72cd286b2528..0dae5faad81038e6d587a6f386cf65df381bdd8c 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <efi_loader.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <phy.h>
@@ -105,6 +106,11 @@ remove_psci_node:
 
        fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,
                        *boot_code_size);
+#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)
+       efi_add_memory_map((uintptr_t)&secondary_boot_code,
+                          ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
+                          EFI_RESERVED_MEMORY_TYPE, false);
+#endif
 }
 #endif