From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/7] arm: juno: Fix Juno address variables
Date: Wed, 25 Mar 2020 14:46:56 +0000 [thread overview]
Message-ID: <20200325144702.16288-2-andre.przywara@arm.com> (raw)
In-Reply-To: <20200325144702.16288-1-andre.przywara@arm.com>
The U-Boot documentation explains that variables ending with "_r" hold
addresses in DRAM, while those without that ending point to flash/ROM.
The default variables for the Juno board pointing to the kernel and DTB
load addresses were not complying with this scheme: they lack the
extension, but point to DRAM. This is particularly confusing since the
Juno board features parallel NOR flash, so there *is* a memory mapped
NOR address holding a DTB, for instance.
Fix the variables to use the proper names. On the way adjust the FDT
load address to be situated *before* the kernel, since users happened
to overwrite the DTB by the kernel clearing its .BSS section during
initialisation.
That fixes loading debug kernels, which happened to overwrite the DTB on
certain setups.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
---
include/configs/vexpress_aemv8a.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index 9a9cec414c..edb08b0e68 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -138,35 +138,35 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_name=norkern\0" \
"kernel_alt_name=Image\0" \
- "kernel_addr=0x80080000\0" \
+ "kernel_addr_r=0x80080000\0" \
"initrd_name=ramdisk.img\0" \
- "initrd_addr=0x84000000\0" \
+ "initrd_addr_r=0x88000000\0" \
"fdtfile=board.dtb\0" \
"fdt_alt_name=juno\0" \
- "fdt_addr=0x83000000\0" \
+ "fdt_addr_r=0x80000000\0" \
"fdt_high=0xffffffffffffffff\0" \
"initrd_high=0xffffffffffffffff\0" \
/* Copy the kernel and FDT to DRAM memory and boot */
-#define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr} ; " \
+#define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr_r} ;"\
"if test $? -eq 1; then "\
" echo Loading ${kernel_alt_name} instead of "\
"${kernel_name}; "\
- " afs load ${kernel_alt_name} ${kernel_addr};"\
+ " afs load ${kernel_alt_name} ${kernel_addr_r};"\
"fi ; "\
- "afs load ${fdtfile} ${fdt_addr} ; " \
+ "afs load ${fdtfile} ${fdt_addr_r} ;"\
"if test $? -eq 1; then "\
" echo Loading ${fdt_alt_name} instead of "\
"${fdtfile}; "\
- " afs load ${fdt_alt_name} ${fdt_addr}; "\
+ " afs load ${fdt_alt_name} ${fdt_addr_r}; "\
"fi ; "\
- "fdt addr ${fdt_addr}; fdt resize; " \
- "if afs load ${initrd_name} ${initrd_addr} ; "\
+ "fdt addr ${fdt_addr_r}; fdt resize; " \
+ "if afs load ${initrd_name} ${initrd_addr_r} ; "\
"then "\
- " setenv initrd_param ${initrd_addr}; "\
+ " setenv initrd_param ${initrd_addr_r}; "\
" else setenv initrd_param -; "\
"fi ; " \
- "booti ${kernel_addr} ${initrd_param} ${fdt_addr}"
+ "booti ${kernel_addr_r} ${initrd_param} ${fdt_addr_r}"
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
--
2.14.5
next prev parent reply other threads:[~2020-03-25 14:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 14:46 [PATCH 0/7] Arm Juno board OF_CONTROL upgrade Andre Przywara
2020-03-25 14:46 ` Andre Przywara [this message]
2020-03-26 2:38 ` [PATCH 1/7] arm: juno: Fix Juno address variables Tom Rini
2020-03-26 16:14 ` André Przywara
2020-03-26 16:18 ` Tom Rini
2020-03-26 22:29 ` Linus Walleij
2020-03-25 14:46 ` [PATCH 2/7] uart: pl011: Add proper DM clock support Andre Przywara
2020-03-26 16:20 ` Simon Glass
2020-03-26 17:06 ` André Przywara
2020-03-26 21:30 ` Simon Glass
2020-03-26 22:34 ` Linus Walleij
2020-03-25 14:46 ` [PATCH 3/7] arm: juno: Fix UART clock rate Andre Przywara
2020-03-27 21:17 ` Linus Walleij
2020-03-25 14:46 ` [PATCH 4/7] arm: juno: Enable OF_CONTROL Andre Przywara
2020-03-27 21:22 ` Linus Walleij
2020-03-25 14:47 ` [PATCH 5/7] arm: juno: Use PSCI based reset Andre Przywara
2020-03-27 21:23 ` Linus Walleij
2020-03-25 14:47 ` [PATCH 6/7] arm: juno: enable USB Andre Przywara
2020-03-27 21:24 ` Linus Walleij
2020-03-25 14:47 ` [PATCH 7/7] arm: vexpress64: Remove unneeded CONFIG_ check Andre Przywara
2020-03-27 21:26 ` Linus Walleij
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=20200325144702.16288-2-andre.przywara@arm.com \
--to=andre.przywara@arm.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