From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: socfpga: do not reboot via SRAM
Date: Wed, 10 Jul 2019 21:06:40 +0200 [thread overview]
Message-ID: <20190710190640.6726-1-simon.k.r.goldschmidt@gmail.com> (raw)
This removes the code that enables the Boot ROM to just jump to SRAM
instead of loading SPL from the original boot source on warm reboot.
The reason for removing this is that it is insecure: SRAM might be
overwritten at the time the warm reboot is done. Instead, use the default
behaviour of loading SPL from the configured boot source medium.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---
Changes in v2:
- remove the compatibility code restoring the old "reboot from SRAM"
behaviour via an env var callback as it turned out such a hack should
not be included by default
- (v1 patch subject was: "arm: socfpga: control reboot from SRAM via env
callback")
arch/arm/mach-socfpga/misc_gen5.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 71547d81ab..38bff8a450 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/io.h>
#include <errno.h>
+#include <environment.h>
#include <fdtdec.h>
#include <linux/libfdt.h>
#include <altera.h>
@@ -182,15 +183,6 @@ int arch_early_init_r(void)
{
int i;
- /*
- * Write magic value into magic register to unlock support for
- * issuing warm reset. The ancient kernel code expects this
- * value to be written into the register by the bootloader, so
- * to support that old code, we write it here instead of in the
- * reset_cpu() function just before resetting the CPU.
- */
- writel(0xae9efebc, &sysmgr_regs->romcodegrp_warmramgrp_enable);
-
for (i = 0; i < 8; i++) /* Cache initial SW setting regs */
iswgrp_handoff[i] = readl(&sysmgr_regs->iswgrp_handoff[i]);
--
2.20.1
next reply other threads:[~2019-07-10 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 19:06 Simon Goldschmidt [this message]
2019-07-12 4:00 ` [U-Boot] [PATCH v2] arm: socfpga: do not reboot via SRAM Marek Vasut
2019-07-12 5:20 ` Simon Goldschmidt
2019-07-12 5:25 ` Marek Vasut
2019-07-12 6:00 ` Simon Goldschmidt
2019-07-12 10:02 ` Marek Vasut
2019-07-12 10:35 ` Simon Goldschmidt
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=20190710190640.6726-1-simon.k.r.goldschmidt@gmail.com \
--to=simon.k.r.goldschmidt@gmail.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