From: Ulrich Hecht <uli@fpond.eu>
To: cip-dev@lists.cip-project.org,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Florian Bezdeka <florian.bezdeka@siemens.com>,
Chris Paterson <Chris.Paterson2@renesas.com>,
Hung Tran <hung.tran.jy@renesas.com>
Cc: Pavel Machek <pavel@denx.de>
Subject: Re: [cip-dev] ldconfig segfault on RZ/Five was Re: Preparing isar-cip-core for RZ/Five
Date: Thu, 13 Oct 2022 10:36:33 +0200 (CEST) [thread overview]
Message-ID: <1263180941.78238.1665650193479@webmail.strato.com> (raw)
In-Reply-To: <OSZPR01MB7019463C819F66866FBCED43AA229@OSZPR01MB7019.jpnprd01.prod.outlook.com>
> On 10/12/2022 11:50 AM CEST Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> I did a quick test with the patches pointed by Florian but unfortunately ldconfig still fails.
I did some experiments on RZ/Five with this issue, and I'm almost positive that there is something wrong (or doesn't work as documented) with the icache handling on this SoC.
1. The issue only affects non-PIE executables (there are very few of those, basically just ldconfig, gcc, cpp and gcov* on the Debian system), and it occurs very early during the execution of the program. According to the datasheet, the cache on the ax45mp-1c core is virtually indexed, so it is unlikely that a PIE executable will ever hit anything in the cache when newly loaded, but it is much more likely with non-PIE executables.
2. Setting a breakpoint before the illegal/segfaulting instruction doesn't work, and what is executed is clearly not what we're seeing through the dcache (the offending instructions are neither illegal, nor are they able to cause segfaults), so instruction fetches must see something different.
3. Neither manually calling __vdso_flush_icache() from gdb (which executes a "fence.i" instruction) nor patching a "fence.i" into the ldconfig binary seem to do anything. According to the ax45mp-1c datasheet "fence.i" should flush the dcache and invalidate the icache.
My educated guess is that, in spite of the claims in the core manual, the "fence.i" instruction is not implemented, or not implemented correctly. (The datasheet does acknowledge that "fence", without the ".i", is a nop.)
The RISC-V ISA manual says that "fence.i" is part of the optional "Zifencei" extension, which I don't see mentioned in the core datasheet anywhere. (And at least at first glance, I couldn't find any other mechanism to invalidate the icache there either.)
CU
Uli
next prev parent reply other threads:[~2022-10-13 8:36 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 18:36 Preparing isar-cip-core for RZ/Five Jan Kiszka
2022-10-03 20:12 ` Chris Paterson
2022-10-04 7:15 ` Jan Kiszka
2022-10-04 18:28 ` Jan Kiszka
2022-10-04 19:36 ` Jan Kiszka
2022-10-04 19:47 ` Jan Kiszka
2022-10-05 18:21 ` Pavel Machek
2022-10-06 6:29 ` Jan Kiszka
2022-10-06 6:49 ` Jan Kiszka
2022-10-06 7:07 ` Jan Kiszka
2022-10-06 7:08 ` Prabhakar Mahadev Lad
2022-10-06 7:26 ` Jan Kiszka
2022-10-06 11:43 ` Pavel Machek
2022-10-06 11:51 ` Jan Kiszka
2022-10-06 22:07 ` ldconfig segfault on RZ/Five was " Pavel Machek
2022-10-06 22:32 ` Pavel Machek
2022-10-07 8:18 ` Jan Kiszka
2022-10-07 10:19 ` Pavel Machek
2022-10-08 8:27 ` Jan Kiszka
2022-10-09 8:29 ` Jan Kiszka
2022-10-09 8:42 ` [cip-dev] " Biju Das
2022-10-11 9:30 ` Jan Kiszka
2022-10-11 10:34 ` Biju Das
2022-10-11 18:51 ` Florian Bezdeka
2022-10-11 20:15 ` Jan Kiszka
2022-10-11 20:48 ` Prabhakar Mahadev Lad
2022-10-12 9:50 ` Prabhakar Mahadev Lad
2022-10-13 8:36 ` Ulrich Hecht [this message]
2022-10-13 10:35 ` Pavel Machek
2022-10-13 21:47 ` Pavel Machek
2022-11-29 18:57 ` Prabhakar Mahadev Lad
2022-12-10 7:23 ` Jan Kiszka
2022-12-10 20:25 ` Pavel Machek
2022-12-12 13:51 ` Prabhakar Mahadev Lad
2022-12-12 13:24 ` Prabhakar Mahadev Lad
2022-10-09 19:20 ` Chris Paterson
2022-10-05 5:43 ` [cip-dev] " Biju Das
2022-10-04 22:30 ` Prabhakar Mahadev Lad
2022-10-05 5:45 ` Jan Kiszka
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=1263180941.78238.1665650193479@webmail.strato.com \
--to=uli@fpond.eu \
--cc=Chris.Paterson2@renesas.com \
--cc=cip-dev@lists.cip-project.org \
--cc=florian.bezdeka@siemens.com \
--cc=hung.tran.jy@renesas.com \
--cc=jan.kiszka@siemens.com \
--cc=pavel@denx.de \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.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