qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liviu Ionescu <ilg@livius.net>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: keithp@keithp.com, qemu-arm@nongnu.org,
	QEMU Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Semihosting, arm, riscv, ppc and common code
Date: Wed, 15 Jan 2020 14:30:17 +0200	[thread overview]
Message-ID: <58DE85E5-2A72-4073-AF02-6B944AB05889@livius.net> (raw)
In-Reply-To: <87wo9tkjxz.fsf@linaro.org>



> On 15 Jan 2020, at 14:01, Alex Bennée <alex.bennee@linaro.org> wrote:
> 
> ... AFAIK the main users of arm linux user
> are compiler test cases for M-profile CPUs. 

I confirm, generally unit tests.

But not necessarily, I used QEMU as the main development platform for the Cortex-M port of µOS++, a C/C++ framework/RTOS, and it was very convenient.

> ... Is semihosting even
> going to be a thing on real RiscV/Power silicon?

Even for Arm it is a thing of debuggers and development environments, not of silicon itself, since it requires no special hardware support, a BRK instruction is enough.

From a software point of view it would be beneficial to use the same semihosting protocol on other non-Arm architectures too, even if it is far from perfect.

I pushed hard for adopting the Arm semihosting for RISC-V, and even contributed the semihosting code for OpenOCD RISC-V, but officially the only mention of semihosting in the RISC-V specs is in the notes sections, where it is mentioned how to use the BRK instruction to invoke semihosting calls (RISC-V has a single BREAK instructions, and to make it unique it must be surrounded by some hint NOPs).


Regards,

Liviu



  reply	other threads:[~2020-01-15 12:31 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 [this message]
2020-01-15 21:28           ` Richard Henderson
2020-01-15 22:02             ` Liviu Ionescu
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=58DE85E5-2A72-4073-AF02-6B944AB05889@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 \
    /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).