From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] Revert "ARM: Use armlinux_bootparams address for DTB"
Date: Wed, 7 Aug 2013 11:45:34 +0200 [thread overview]
Message-ID: <1375868734-32357-1-git-send-email-s.hauer@pengutronix.de> (raw)
This patch placed the flattened devicetree to armlinux_bootparams.
armlinux_bootparams normally is at SDRAM_START + 0x100. The kernels
initial page tables are normally at SDRAM_START + 0x4000, so the
flattened devicetree gets overwritten once it exceeds 0x3f00 bytes
which is quite common.
Revert this patch for now once a better solution can be found
This reverts commit 0c4108f9173ece75d96f19b447ef6464bdfdf187.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/lib/armlinux.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index d962997..40a63ea 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -261,24 +261,16 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
unsigned long initrd_size, void *oftree)
{
void (*kernel)(int zero, int arch, void *params) = adr;
+ void *params = NULL;
int architecture;
if (oftree) {
- if (armlinux_bootparams) {
- struct fdt_header *header = oftree;
-
- memcpy(armlinux_bootparams, oftree,
- fdt32_to_cpu(header->totalsize));
- } else {
- armlinux_bootparams = oftree;
- }
-
- printf("booting Linux kernel with devicetree at 0x%p\n",
- armlinux_bootparams);
+ printf("booting Linux kernel with devicetree\n");
+ params = oftree;
} else {
setup_tags(initrd_address, initrd_size, swap);
+ params = armlinux_bootparams;
}
-
architecture = armlinux_get_architecture();
shutdown_barebox();
@@ -296,10 +288,10 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
"mov r2, %1\n"
"bx %2\n"
:
- : "r" (architecture), "r" (armlinux_bootparams), "r" (kernel)
+ : "r" (architecture), "r" (params), "r" (kernel)
: "r0", "r1", "r2"
);
#else
- kernel(0, architecture, armlinux_bootparams);
+ kernel(0, architecture, params);
#endif
}
--
1.8.4.rc1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-08-07 9:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 9:45 Sascha Hauer [this message]
2013-08-07 9:55 ` Alexander Shiyan
2013-08-07 10:11 ` Sascha Hauer
2013-08-07 10:34 ` Alexander Shiyan
2013-08-08 7:17 ` Alexander Shiyan
2013-08-09 6:58 ` Sascha Hauer
2013-08-09 7:02 ` Alexander Shiyan
2013-08-09 8:02 ` Sascha Hauer
2013-08-07 11:37 ` Maxime Ripard
2013-08-07 12:06 ` Alexander Shiyan
2013-08-07 12:40 ` Maxime Ripard
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=1375868734-32357-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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