[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Semihosting, arm, riscv, ppc and common code
From: |
Benjamin Herrenschmidt |
Subject: |
Semihosting, arm, riscv, ppc and common code |
Date: |
Tue, 14 Jan 2020 17:25:59 +1100 |
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.
- Semihosting, arm, riscv, ppc and common code,
Benjamin Herrenschmidt <=
- Re: Semihosting, arm, riscv, ppc and common code, Liviu Ionescu, 2020/01/14
- Re: Semihosting, arm, riscv, ppc and common code, Benjamin Herrenschmidt, 2020/01/14
- Re: Semihosting, arm, riscv, ppc and common code, Alex Bennée, 2020/01/14
- Re: Semihosting, arm, riscv, ppc and common code, Benjamin Herrenschmidt, 2020/01/14
- Re: Semihosting, arm, riscv, ppc and common code, Alex Bennée, 2020/01/15
- Re: Semihosting, arm, riscv, ppc and common code, Liviu Ionescu, 2020/01/15
- Re: Semihosting, arm, riscv, ppc and common code, Richard Henderson, 2020/01/15
- Re: Semihosting, arm, riscv, ppc and common code, Liviu Ionescu, 2020/01/15
- Re: Semihosting, arm, riscv, ppc and common code, Benjamin Herrenschmidt, 2020/01/15
- Re: Semihosting, arm, riscv, ppc and common code, Liviu Ionescu, 2020/01/16