public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andrew F. Davis <afd@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] configs: k2x_evm: Adds environment variables for secure devices
Date: Mon, 17 Jul 2017 12:59:13 -0500	[thread overview]
Message-ID: <20170717175915.12898-3-afd@ti.com> (raw)
In-Reply-To: <20170717175915.12898-1-afd@ti.com>

From: Madan Srinivas <madans@ti.com>

Updates the default u-boot environment variables to support secure
boot. On secure devices, a secure boot monitor (sec-bm) needs to
be installed by u-boot.

Signed-off-by: Madan Srinivas <madans@ti.com>
---
 include/configs/k2g_evm.h            |  7 +++++++
 include/configs/ti_armv7_keystone2.h | 10 ++++++++++
 2 files changed, 17 insertions(+)

diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index 95317bb001..3c999df350 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -52,11 +52,18 @@
 	"get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\
 	"name_fs=arago-base-tisdk-image-k2g-evm.cpio\0"
 
+#ifndef CONFIG_TI_SECURE_DEVICE
 #define CONFIG_BOOTCOMMAND						\
 	"run envboot; "							\
 	"run set_name_pmmc init_${boot} init_fw_rd_${boot} "		\
 	"get_pmmc_${boot} run_pmmc get_mon_${boot} run_mon "		\
 	"findfdt get_fdt_${boot} get_kern_${boot} run_kern"
+#else
+#define CONFIG_BOOTCOMMAND						\
+	"run envboot; run run_mon_hs set_name_pmmc init_${boot} "	\
+	"get_pmmc_${boot} run_pmmc findfdt get_fit_${boot};"		\
+	"bootm ${fit_loadaddr}#${name_fdt} "
+#endif
 
 /* SPL SPI Loader Configuration */
 #define CONFIG_SPL_TEXT_BASE		0x0c080000
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index e7706c4818..e7dc522da2 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -252,7 +252,11 @@
 	"addr_secdb_key=0xc000000\0"					\
 	"name_kern=zImage\0"						\
 	"addr_mon=0x87000000\0"						\
+	"addr_non_sec_mon=0x0c087fc0\0"					\
+	"addr_load_sec_bm=0x0c08c000\0"					\
 	"run_mon=mon_install ${addr_mon}\0"				\
+	"run_mon_hs=mon_install ${addr_non_sec_mon} "			\
+			"${addr_load_sec_bm}\0"				\
 	"run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}\0"		\
 	"init_net=run args_all args_net\0"				\
 	"init_nfs=setenv autoload no; dhcp; run args_all args_net\0"	\
@@ -304,9 +308,15 @@
 		"1024k(bootloader)ro,512k(params)ro,-(ubifs)\0"
 
 #ifndef CONFIG_BOOTCOMMAND
+#ifndef CONFIG_TI_SECURE_DEVICE
 #define CONFIG_BOOTCOMMAND						\
 	"run init_${boot} get_mon_${boot} run_mon init_fw_rd_${boot} "	\
 	"get_fdt_${boot} get_kern_${boot} run_kern"
+#else
+#define CONFIG_BOOTCOMMAND						\
+	"run run_mon_hs init_${boot} init_fw_rd_${boot} "		\
+	"get_fit_${boot}; bootm ${fit_loadaddr}#${name_fdt}"
+#endif
 #endif
 
 #define CONFIG_BOOTARGS							\
-- 
2.13.0

  parent reply	other threads:[~2017-07-17 17:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 17:59 [U-Boot] [PATCH 0/4] Add default secure boot env for K2x Andrew F. Davis
2017-07-17 17:59 ` [U-Boot] [PATCH 1/4] configs: k2x_evm: Adds FIT loading environment variables Andrew F. Davis
2017-07-18 17:08   ` Tom Rini
2017-07-26 19:50   ` [U-Boot] [U-Boot, " Tom Rini
2017-07-17 17:59 ` Andrew F. Davis [this message]
2017-07-18 17:08   ` [U-Boot] [PATCH 2/4] configs: k2x_evm: Adds environment variables for secure devices Tom Rini
2017-07-26 19:50   ` [U-Boot] [U-Boot, " Tom Rini
2017-07-17 17:59 ` [U-Boot] [PATCH 3/4] configs: k2x_evm: Reorder default boot command Andrew F. Davis
2017-07-18 17:08   ` Tom Rini
2017-07-26 19:50   ` [U-Boot] [U-Boot, " Tom Rini
2017-07-17 17:59 ` [U-Boot] [PATCH 4/4] arm: mach-keystone: Updates mon_install for K2G HS Andrew F. Davis
2017-07-18 17:08   ` Tom Rini
2017-07-26 19:50   ` [U-Boot] [U-Boot, " Tom Rini
2017-07-18 17:08 ` [U-Boot] [PATCH 0/4] Add default secure boot env for K2x Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170717175915.12898-3-afd@ti.com \
    --to=afd@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox