qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Semihosting, arm, riscv, ppc and common code
@ 2020-01-14  6:25 Benjamin Herrenschmidt
  2020-01-14  7:32 ` Liviu Ionescu
  2020-01-14  9:59 ` Peter Maydell
  0 siblings, 2 replies; 17+ messages in thread
From: Benjamin Herrenschmidt @ 2020-01-14  6:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, keithp, qemu-arm, Alex Bennée

Hi Folks !

So I started "porting" over (read: copying) the arm semihosting code to
ppc to mimmic what Keith did for risv (mostly for picolibc support).

I noticed that the bulk of arm-semi.c (or riscv-semi.c) is trivially
made completely generic by doing a couple of changes:

 - Make most functions take a CPUState instead of the architecture
specific "env"

 - Provide arch helpers to retreive the op, set the result, do the
flen bug hack and possibly a couple of others (I'm not done yet).

There are other archs who do semihosting completely differently but at
least those 3 can share code.

Any objection/comment on the approach ? What I'll probably do is get
things going first with my ppc version (which I made more/less generic
but still located in target/ppc) at which point I can post an RFC so
you get an idea, and we find a good location for it.

From thre we might consider fixing some of the worst crap in there
doing backwards compatible extensions if we care enough :-)

Cheers,
Ben.




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-01-16 11:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).