]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
armv8: LS1046AQDS: Add NOR Secure Boot Target
authorSumit Garg <sumit.garg@nxp.com>
Thu, 23 Mar 2017 08:18:17 +0000 (13:48 +0530)
committerYork Sun <york.sun@nxp.com>
Mon, 17 Apr 2017 16:03:30 +0000 (09:03 -0700)
Add NOR secure boot target. Also enable sec init.

Signed-off-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/ls1046aqds/MAINTAINERS
board/freescale/ls1046aqds/ls1046aqds.c
configs/ls1046aqds_SECURE_BOOT_defconfig [new file with mode: 0644]

index b4549ae138de9b3ed46a03dfcd13698a112166b5..6737d558ce0d9805220a0d8aa02fb3e74f0a3795 100644 (file)
@@ -8,3 +8,7 @@ F:      configs/ls1046aqds_nand_defconfig
 F:     configs/ls1046aqds_sdcard_ifc_defconfig
 F:     configs/ls1046aqds_sdcard_qspi_defconfig
 F:     configs/ls1046aqds_qspi_defconfig
+
+M:     Sumit Garg <sumit.garg@nxp.com>
+S:     Maintained
+F:     configs/ls1046aqds_SECURE_BOOT_defconfig
index 69fc15b681501144e5366a125f08ccb7a801e9cf..58ce75acf6c1f69abef52734a6b8a04d61a9026a 100644 (file)
@@ -22,6 +22,7 @@
 #include <fsl_csu.h>
 #include <fsl_esdhc.h>
 #include <fsl_ifc.h>
+#include <fsl_sec.h>
 #include <spl.h>
 
 #include "../common/vid.h"
@@ -266,6 +267,24 @@ int board_init(void)
        if (adjust_vdd(0))
                printf("Warning: Adjusting core voltage failed.\n");
 
+#ifdef CONFIG_SECURE_BOOT
+       /*
+        * In case of Secure Boot, the IBR configures the SMMU
+        * to allow only Secure transactions.
+        * SMMU must be reset in bypass mode.
+        * Set the ClientPD bit and Clear the USFCFG Bit
+        */
+       u32 val;
+       val = (in_le32(SMMU_SCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);
+       out_le32(SMMU_SCR0, val);
+       val = (in_le32(SMMU_NSCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);
+       out_le32(SMMU_NSCR0, val);
+#endif
+
+#ifdef CONFIG_FSL_CAAM
+       sec_init();
+#endif
+
        return 0;
 }
 
diff --git a/configs/ls1046aqds_SECURE_BOOT_defconfig b/configs/ls1046aqds_SECURE_BOOT_defconfig
new file mode 100644 (file)
index 0000000..dc16fa0
--- /dev/null
@@ -0,0 +1,39 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1046AQDS=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_SECURE_BOOT=y
+CONFIG_BOOTDELAY=10
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GREPENV=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_SYS_NS16550=y
+CONFIG_DM_SPI=y
+CONFIG_FSL_DSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_RSA=y