From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Jim Wilson <jimw@sifive.com>
Cc: John Baldwin <jhb@freebsd.org>,
gdb-patches@sourceware.org, Palmer Dabbelt <palmer@sifive.com>
Subject: Re: [PATCH 2/4] Fall back to a default value of 0 for the MISA register.
Date: Fri, 28 Sep 2018 09:44:00 -0000 [thread overview]
Message-ID: <20180928094355.GS5952@embecosm.com> (raw)
In-Reply-To: <CAFyWVaYEQ_Wx66sCgwtkQg3Z6AgSSdSbr1_0B+MjcnDbn8ApyQ@mail.gmail.com>
* Jim Wilson <jimw@sifive.com> [2018-09-21 10:25:47 -0700]:
> On Fri, Sep 21, 2018 at 2:27 AM Andrew Burgess
> <andrew.burgess@embecosm.com> wrote:
> > Jim: Given that we agree that targets should definitely provide a
> > value for misa, at a minimum just returning the constant 0. But,
> > given that GDB already defaults to 0 in some cases anyway. And the
> > spec is quite clear that 0 is the right default value in the absence
> > of anything better, would you be OK with a patch that does return a
> > default of 0?
>
> The patch to decode an instruction to decide whether to use a
> compressed breakpoint or not solves my main problem. There is also
> the issue of finding FP register size, but since we only support
> rv64gc at the moment, it isn't a serious problem.
I regularly test embeded RiscV against:
rv32im rv32imc rv32imf rv32imfc
rv64im rv64imc rv64imfd rv64imfdc
with the last one of those being closes to rv64gc. The pass rate is
broadly the same against all of these targets, so right now I consider
these equally supported for baremetal.
I understand Linux support might be different.
Thanks,
Andrew
> Also, I think the
> linker kernel may already be passing FP info via auxvec/hwcap, so I
> think we already have an alternate solution for that which just needs
> to be implemented. I haven't looked at that yet. So yes, I think it
> is OK to start defaulting misa to 0.
>
> FYI I have a qemu patch, which I may someday finish, that adds XML
> register support to the RISC-V qemu system-mode port, which allows
> qemu to provide a correct value of misa. We know that misa accesses
> already work with embedded targets via OpenOCD. So it is just linux
> and freebsd that need to worry about misa.
>
> The qemu patch is here, though it looks like github is confused by
> rebasing and the patch isn't readable anymore.
> https://github.com/riscv/riscv-qemu/pull/160
> I'll have to figure out how to fix that.
>
> Jim
next prev parent reply other threads:[~2018-09-28 9:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 23:20 [PATCH 0/4] Initial support for FreeBSD/riscv John Baldwin
2018-09-19 23:21 ` [PATCH 2/4] Fall back to a default value of 0 for the MISA register John Baldwin
2018-09-20 0:09 ` Jim Wilson
2018-09-20 0:40 ` John Baldwin
2018-09-20 20:31 ` John Baldwin
2018-09-20 20:57 ` Jim Wilson
2018-09-20 22:55 ` John Baldwin
2018-09-20 21:51 ` Andrew Burgess
2018-09-20 23:01 ` John Baldwin
2018-09-21 9:27 ` Andrew Burgess
2018-09-21 17:26 ` Jim Wilson
2018-09-28 9:44 ` Andrew Burgess [this message]
2018-09-28 18:25 ` Palmer Dabbelt
2018-09-24 20:35 ` John Baldwin
2018-09-19 23:21 ` [PATCH 3/4] Add FreeBSD/riscv architecture John Baldwin
2018-09-19 23:21 ` [PATCH 1/4] Add helper functions to trad_frame to support register cache maps John Baldwin
2018-09-19 23:29 ` [PATCH 4/4] Add native target for FreeBSD/riscv John Baldwin
2018-09-20 4:19 ` Eli Zaretskii
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=20180928094355.GS5952@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=jimw@sifive.com \
--cc=palmer@sifive.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