All of lore.kernel.org
 help / color / mirror / Atom feed
* Semihosting, arm, riscv, ppc and common code
@ 2020-01-14  6:25 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 33+ messages in thread
From: Benjamin Herrenschmidt @ 2020-01-14  6:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, keithp, qemu-arm, Paolo Bonzini

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] 33+ messages in thread

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

Thread overview: 33+ 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  6:25 ` Benjamin Herrenschmidt
2020-01-14  7:32 ` Liviu Ionescu
2020-01-14  7:32   ` Liviu Ionescu
2020-01-14  7:53   ` Benjamin Herrenschmidt
2020-01-14  7:53     ` Benjamin Herrenschmidt
2020-01-14  9:51     ` Alex Bennée
2020-01-14  9:51       ` Alex Bennée
2020-01-15  1:14       ` Benjamin Herrenschmidt
2020-01-15  1:14         ` Benjamin Herrenschmidt
2020-01-15 12:01         ` Alex Bennée
2020-01-15 12:01           ` Alex Bennée
2020-01-15 12:30           ` Liviu Ionescu
2020-01-15 12:30             ` Liviu Ionescu
2020-01-15 21:28           ` Richard Henderson
2020-01-15 22:02             ` Liviu Ionescu
2020-01-15 22:02               ` Liviu Ionescu
2020-01-16  2:04               ` Benjamin Herrenschmidt
2020-01-16  2:04                 ` Benjamin Herrenschmidt
2020-01-16  7:57                 ` Liviu Ionescu
2020-01-16  7:57                   ` Liviu Ionescu
2020-01-16  6:33           ` Benjamin Herrenschmidt
2020-01-16  6:33             ` Benjamin Herrenschmidt
2020-01-14  9:59 ` Peter Maydell
2020-01-14  9:59   ` Peter Maydell
2020-01-15  1:17   ` Benjamin Herrenschmidt
2020-01-15  1:17     ` Benjamin Herrenschmidt
2020-01-15 13:32     ` Peter Maydell
2020-01-15 13:32       ` Peter Maydell
2020-01-16  2:01       ` Benjamin Herrenschmidt
2020-01-16  2:01         ` Benjamin Herrenschmidt
2020-01-16 11:05         ` Peter Maydell
2020-01-16 11:05           ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.