qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liviu Ionescu <ilg@livius.net>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: keithp@keithp.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: Semihosting, arm, riscv, ppc and common code
Date: Thu, 16 Jan 2020 00:02:34 +0200	[thread overview]
Message-ID: <C4EE0480-C366-419B-84F1-3BEB794D1598@livius.net> (raw)
In-Reply-To: <81f25a9e-a52c-ca8d-4d4b-ca36fcee73ed@linaro.org>



> On 15 Jan 2020, at 23:28, Richard Henderson <richard.henderson@linaro.org> wrote:
> 
> For risc-v, the odd nop-full semi-hosting call sequence

That unfortunate call sequence was the least worst compromise that the RISC-V design team could agree on. :-(

The actual problem was that the RISC-V instruction set has a single BREAK op code, without any way to parametrise it, and they refused to spend another op code for an extra BREAK.

> was chosen to work with
> jtag debuggers on real silicon.

Yes, I know at least two, SEGGER J-Link of OpenOCD. 

But again, there is nothing in the silicon related to the odd call sequence or the ABI, everything is implemented in the debuggers. The silicon has only to break to the debugger, then it's up to the debugger to decide if this is a semihosting call or a regular break.

> ... they did have the opportunity to do better, and did not.

I don't know why you present Arm semihosting as a disaster. It is not perfect, but it is functional, and common unit tests use only a small subset of the calls.

And there is no 'window of opportunity', if the RISC-V guys will ever want to reinvent the wheel and come with an official 'RISC-V semihosting' specs, they can do it at any time, and this will have no impact on existing devices, everything will continue to work as before, only the debuggers/emulators will need to be upgraded.

But the only immediate effect such a move will have is that software efforts in test frameworks will be increased, to support another protocol, while the advantages will be minimal.


Regards,

Liviu



  reply	other threads:[~2020-01-15 22:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  6:25 Semihosting, arm, riscv, ppc and common code Benjamin Herrenschmidt
2020-01-14  7:32 ` Liviu Ionescu
2020-01-14  7:53   ` Benjamin Herrenschmidt
2020-01-14  9:51     ` Alex Bennée
2020-01-15  1:14       ` Benjamin Herrenschmidt
2020-01-15 12:01         ` Alex Bennée
2020-01-15 12:30           ` Liviu Ionescu
2020-01-15 21:28           ` Richard Henderson
2020-01-15 22:02             ` Liviu Ionescu [this message]
2020-01-16  2:04               ` Benjamin Herrenschmidt
2020-01-16  7:57                 ` Liviu Ionescu
2020-01-16  6:33           ` Benjamin Herrenschmidt
2020-01-14  9:59 ` Peter Maydell
2020-01-15  1:17   ` Benjamin Herrenschmidt
2020-01-15 13:32     ` Peter Maydell
2020-01-16  2:01       ` Benjamin Herrenschmidt
2020-01-16 11:05         ` Peter Maydell

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=C4EE0480-C366-419B-84F1-3BEB794D1598@livius.net \
    --to=ilg@livius.net \
    --cc=alex.bennee@linaro.org \
    --cc=keithp@keithp.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).