* riscv disassembler error with pmpcfg0
[not found] <183897139.5301881.1712168206289.ref@mail.yahoo.com>
@ 2024-04-03 18:16 ` Eric DeVolder
2024-05-14 5:19 ` Alistair Francis
0 siblings, 1 reply; 3+ messages in thread
From: Eric DeVolder @ 2024-04-03 18:16 UTC (permalink / raw)
To: qemu-devel@nongnu.org
I've been using QEMU8 to collect instruction information on U-Boot + OpenSBI.
I'm running QEMU in this fashion to collect the information:
# qemu-system-riscv64 -plugin file=qemu/build/contrib/plugins/libexeclog.so -singlestep -d plugin,nochain -D execlog.txt ...
When examining the instruction trace in execlog, I've noticed that the disassembly for pmpcfg0 is erroneous, for example:
0, 0x5456, 0x3a002573, "csrrs a0,pmpcfg3,zero"
the CSR encoded in the instruction above is 0x3a0, which is pmpcfg0 (which also matches the code I'm examining).
For the Uboot+OpenSBI code I'm examining, pmpcfg0/3 is the only one that appears to have a problem.
I also checked QEMU9 and it behaves as described above as well.
I'm willing to provide a fix if I can get some advice/pointers on how this disassembly statement is generated...I did take a quick look but it didn't appear obvious how...
Thanks,
eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: riscv disassembler error with pmpcfg0
2024-04-03 18:16 ` riscv disassembler error with pmpcfg0 Eric DeVolder
@ 2024-05-14 5:19 ` Alistair Francis
2024-05-16 11:30 ` Eric DeVolder
0 siblings, 1 reply; 3+ messages in thread
From: Alistair Francis @ 2024-05-14 5:19 UTC (permalink / raw)
To: Eric DeVolder; +Cc: qemu-devel@nongnu.org
On Thu, Apr 4, 2024 at 5:02 AM Eric DeVolder <eric_devolder@yahoo.com> wrote:
>
> I've been using QEMU8 to collect instruction information on U-Boot + OpenSBI.
>
> I'm running QEMU in this fashion to collect the information:
>
> # qemu-system-riscv64 -plugin file=qemu/build/contrib/plugins/libexeclog.so -singlestep -d plugin,nochain -D execlog.txt ...
>
> When examining the instruction trace in execlog, I've noticed that the disassembly for pmpcfg0 is erroneous, for example:
>
> 0, 0x5456, 0x3a002573, "csrrs a0,pmpcfg3,zero"
>
> the CSR encoded in the instruction above is 0x3a0, which is pmpcfg0 (which also matches the code I'm examining).
>
> For the Uboot+OpenSBI code I'm examining, pmpcfg0/3 is the only one that appears to have a problem.
>
> I also checked QEMU9 and it behaves as described above as well.
>
> I'm willing to provide a fix if I can get some advice/pointers on how this disassembly statement is generated...I did take a quick look but it didn't appear obvious how...
Thanks for pointing this out. This should fix the issue for you:
https://patchew.org/QEMU/20240514051615.330979-1-alistair.francis@wdc.com/
Alistair
>
> Thanks,
> eric
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: riscv disassembler error with pmpcfg0
2024-05-14 5:19 ` Alistair Francis
@ 2024-05-16 11:30 ` Eric DeVolder
0 siblings, 0 replies; 3+ messages in thread
From: Eric DeVolder @ 2024-05-16 11:30 UTC (permalink / raw)
To: Alistair Francis; +Cc: qemu-devel@nongnu.org
Thank you!
Eric
On Tuesday, May 14, 2024 at 12:19:55 AM CDT, Alistair Francis <alistair23@gmail.com> wrote:
On Thu, Apr 4, 2024 at 5:02 AM Eric DeVolder <eric_devolder@yahoo.com> wrote:
>
> I've been using QEMU8 to collect instruction information on U-Boot + OpenSBI.
>
> I'm running QEMU in this fashion to collect the information:
>
> # qemu-system-riscv64 -plugin file=qemu/build/contrib/plugins/libexeclog.so -singlestep -d plugin,nochain -D execlog.txt ...
>
> When examining the instruction trace in execlog, I've noticed that the disassembly for pmpcfg0 is erroneous, for example:
>
> 0, 0x5456, 0x3a002573, "csrrs a0,pmpcfg3,zero"
>
> the CSR encoded in the instruction above is 0x3a0, which is pmpcfg0 (which also matches the code I'm examining).
>
> For the Uboot+OpenSBI code I'm examining, pmpcfg0/3 is the only one that appears to have a problem.
>
> I also checked QEMU9 and it behaves as described above as well.
>
> I'm willing to provide a fix if I can get some advice/pointers on how this disassembly statement is generated...I did take a quick look but it didn't appear obvious how...
Thanks for pointing this out. This should fix the issue for you:
https://patchew.org/QEMU/20240514051615.330979-1-alistair.francis@wdc.com/
Alistair
>
> Thanks,
> eric
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-16 11:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <183897139.5301881.1712168206289.ref@mail.yahoo.com>
2024-04-03 18:16 ` riscv disassembler error with pmpcfg0 Eric DeVolder
2024-05-14 5:19 ` Alistair Francis
2024-05-16 11:30 ` Eric DeVolder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).