From: Antony Pavlov <antonynpavlov@gmail.com>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: barebox@lists.infradead.org, Peter Mamonov <pmamonov@gmail.com>,
Oleksij Rempel <o.rempel@pengutronix.de>
Subject: MIPS: relocation issue
Date: Tue, 28 Jan 2020 09:46:29 +0300 [thread overview]
Message-ID: <20200128094629.4fb7c2bcad814990c7997eb2@gmail.com> (raw)
Hi!
Since 28ed10d6a6 ("MIPS: relocation: add relocation support")
iomem output on memory regions is invalid,
all the code that rely on registered sdram memory regions
after relocation can fail. E.g. the memtest commands fails
on barebox.
How to reproduce the problem ov v2020.01.0:
$ wget https://www.barebox.org/download/barebox-2020.01.0.tar.bz2
...
$ tar fx barebox-2020.01.0.tar.bz2
$ cd barebox-2020.01.0
$ export ARCH=mips
$ export CROSS_COMPILE=mips-linux-gnu-
$ make qemu-malta_defconfig
$ sed -i "s/^.*CONFIG_CMD_MEMTEST.*/CONFIG_CMD_MEMTEST=y/" .config
$ make
$ qemu-system-mips -nodefaults -M malta -m 256 -nographic -serial stdio -monitor null -bios barebox-flash-image
...
barebox@qemu malta:/ memtest
Start iteration 1 of 1.
Testing memory space: 0xa0865000 -> 0xafffffff:
Starting data line test.
Check for address bits stuck high.
Check for address bits stuck low or shorted.
Starting moving inversions test of RAM:
Fill with address, compare, fill with inverted address, compare again
[########################################## ]
FAILURE (read/write): expected 0x03cca9f2, actual 0xa08126c4 at address 0xafb8f7c4.
Ooops, TLB miss on load or ifetch!
$ 0 : 00000000 00000000 fffffffb a085c900
$ 4 : a0407e90 0000000a b80003f8 00000001
$ 8 : a0858f28 00000000 00000053 00000008
$12 : 00000000 00000000 0000005c 00000001
$16 : 03ccab3c 03ccab3d a0825c48 00000000
$20 : 00000000 00000001 a0853518 a085352c
$24 : 00000018 a08124b8
$28 : 00000000 8fb8fcf8 a0860000 03ccab3e
Hi : 0000000a
Lo : 00000000
epc : 03ccab3e
ra : 03ccab3e
Status: 00000002
Cause : 00000408
Config: 80008482
### ERROR ### Please RESET the board ###
memtest for qemu-malta can be repaired by disabling relocation, e.g.
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index c1cd2d9dd5..95b6596dde 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -34,7 +34,7 @@ EXPORT(_start)
move a0, s0
move a1, s1
move a2, s2
- la v0, relocate_code
+ la v0, main_entry
jal v0
nop
Additional testing on real hardware has to be done.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-01-28 6:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 6:46 Antony Pavlov [this message]
2020-01-28 9:34 ` Oleksij Rempel
2020-01-28 10:49 ` Peter Mamonov
2020-01-28 11:03 ` Oleksij Rempel
2020-01-28 11:10 ` Peter Mamonov
2020-01-30 8:26 ` maeling list issue Oleksij Rempel
2020-01-30 11:14 ` Sascha Hauer
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=20200128094629.4fb7c2bcad814990c7997eb2@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=linux@rempel-privat.de \
--cc=o.rempel@pengutronix.de \
--cc=pmamonov@gmail.com \
/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