qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/nios2: Pass semihosting arg to exit


From: Peter Maydell
Subject: Re: [PATCH] target/nios2: Pass semihosting arg to exit
Date: Tue, 1 Aug 2023 16:33:25 +0100

On Tue, 1 Aug 2023 at 16:28, Keith Packard <keithp@keithp.com> wrote:
>
>
> > Yeah, the closest to a "standard" we have for nios2 is that
> > I asked the Codesourcery folks to document it in the libgloss
> > sources and put the URL to it in a comment at the top of
> > nios2-semi.c, given that there's no official spec and the
> > original and main guest-side user is libgloss.
> > m68k is in a similar position only without the URL
> > in our source file :-)
>
> Yeah, we had the same ask when getting risc-v semihosting merged. For
> that, I actually pushed through an "official" risc-v standard. I kinda
> wish I'd used the m68k model instead of the arm model as that provides
> simple POSIX semantics...

Yeah, there's a lot of stuff in the Arm semihosting API
that I wouldn't put in there for a from-new version
that didn't need to handle legacy guests. Notably the
"errno" concept is badly underspecified and/or broken.
On an architecture with a decent number of registers
it would probably also make sense to use them rather
than having every single call put its args in memory.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]