From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH qemu v14] spapr: Implement Open Firmware client interface
Date: Wed, 10 Mar 2021 15:11:19 +1100 [thread overview]
Message-ID: <YEhG55fkPxHpQPfW@yekko.fritz.box> (raw)
In-Reply-To: <19bc153a-027c-d5ca-6849-ae33315c62af@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 2934 bytes --]
On Tue, Mar 09, 2021 at 06:28:44PM +1100, Alexey Kardashevskiy wrote:
>
>
> On 09/03/2021 16:29, David Gibson wrote:
>
>
> > > > > +struct ClientArchitectureSupportClass {
> > > > > + InterfaceClass parent;
> > > > > + target_ulong (*cas)(CPUState *cs, target_ulong vec);
> > > > > + void (*quiesce)(void);
> > > >
> > > > Is there actually any real connection of quiesce behaviour to cas
> > > > behaviour? Basically, I'm wondering if this is not so much about
> > > > client-architecture-support fundamentally as just about
> > > > machine-specific parts of the VOF behaviour. Which would be fine, but
> > > > suggests a different name for the interface.
> > >
> > > The most canonical way would be having 2 interfaces.
> >
> > Why? I don't see any reason these shouldn't be a single interface, it
> > just has a bad name.
>
> I renamed it to SpaprVofInterface for now.
It doesn't really have anything to do with PAPR, though. Well, I
guess the CAS part does, but quiesce doesn't. I'd suggest
"VofMachineInterface" - it represents where VOF needs to interact with
machine type specifics.
> > [snip]
> > > > > +typedef int size_t;
> > > > > +typedef void client(void);
> > > > > +
> > > > > +/* globals */
> > > > > +extern void _prom_entry(void); /* OF CI entry point (i.e. this firmware) */
> > > > > +
> > > > > +void do_boot(unsigned long addr, unsigned long r3, unsigned long r4);
> > > > > +
> > > > > +/* libc */
> > > > > +int strlen(const char *s);
> > > > > +int strcmp(const char *s1, const char *s2);
> > > > > +void *memcpy(void *dest, const void *src, size_t n);
> > > > > +int memcmp(const void *ptr1, const void *ptr2, size_t n);
> > > > > +void *memmove(void *dest, const void *src, size_t n);
> > > > > +void *memset(void *dest, int c, size_t size);
> > > > > +
> > > > > +/* Prom */
> > > > > +typedef unsigned long prom_arg_t;
> > > > > +int call_prom(const char *service, int nargs, int nret, ...);
> > > >
> > > > AIUI this isn't so much about calling the PROM, since this *is* the
> > > > PROM code, but rather about calling the parts that are implemented on
> > > > the qemu side. Different names might clarify that.
> > >
> > > "call_ci"?
> >
> > Works for me.
>
> call_ci() it is then.
>
> About builtins such as memcmp() - turns out these are not really builtins as
> they are not inlined and gcc/ld still want to link against libc which is
> trickier for such firmware (not quite sure how to do this and keep it small
> and not pull other libc stuff in), gcc just knows about them a bit more.
> This is different from, for example, __builtin_ctz which is inlined. So I am
> keeping my libc.o for now.
>
>
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-03-10 4:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 5:41 [PATCH qemu v14] spapr: Implement Open Firmware client interface Alexey Kardashevskiy
2021-02-24 5:48 ` no-reply
2021-03-02 2:17 ` David Gibson
2021-03-02 3:35 ` David Gibson
2021-03-02 7:21 ` Alexey Kardashevskiy
2021-03-02 9:37 ` BALATON Zoltan
2021-03-09 5:33 ` David Gibson
2021-03-09 5:29 ` David Gibson
2021-03-09 7:28 ` Alexey Kardashevskiy
2021-03-09 14:00 ` BALATON Zoltan
2021-03-10 1:55 ` Alexey Kardashevskiy
2021-03-10 2:40 ` David Gibson
2021-03-10 4:52 ` Alexey Kardashevskiy
2021-03-10 4:11 ` David Gibson [this message]
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=YEhG55fkPxHpQPfW@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).