From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/6] arm/arm64: add smccc
Date: Mon, 2 Nov 2015 14:03:13 +0000 [thread overview]
Message-ID: <20151102140313.GG2684@leverpostej> (raw)
In-Reply-To: <20151102135633.GA17559@ermac>
> > > +/*
> > > + * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
> > > + * unsigned long a3, unsigned long a4, unsigned long a5,
> > > + * unsigned long a6, unsigned long a7, struct smccc_res *res)
> > > + */
> > > +ENTRY(smccc_smc)
> > > + smc #0
> > > + ldr x4, [sp]
> > > + stp x0, x1, [x4, #SMC_RES_X0_OFFS]
> > > + stp x2, x3, [x4, #SMC_RES_X2_OFFS]
> > > + ret
> > > +ENDPROC(smccc_smc)
> > > +/*
> > > + * void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
> > > + * unsigned long a3, unsigned long a4, unsigned long a5,
> > > + * unsigned long a6, unsigned long a7, struct smccc_res *res)
> > > + */
> > > +ENTRY(smccc_hvc)
> > > + hvc #0
> > > + ldr x4, [sp]
> > > + stp x0, x1, [x4, #SMC_RES_X0_OFFS]
> > > + stp x2, x3, [x4, #SMC_RES_X2_OFFS]
> > > + ret
> > > +ENDPROC(smccc_hvc)
> > > +/**
> > > + * struct smccc_res - Result from SMC/HVC call
> > > + * @a0-a3 result values from registers 0 to 3
> > > + */
> > > +struct smccc_res {
> > > + unsigned long a0;
> > > + unsigned long a1;
> > > + unsigned long a2;
> > > + unsigned long a3;
> > > +};
> >
> > Are there any endianness considerations for this structure?
>
> No, I can't find anything in the ARM SMC Calling Convention document
> indicating that.
The calling conventions have no bearing on the structure, which is our
invention.
We stash register values (which don't have endianness) returned by the
firmeware into the structure in the sequences above (which appear
endian-clean to me).
Thanks,
Mark.
next prev parent reply other threads:[~2015-11-02 14:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 8:21 [PATCH v6 0/6] generic TEE subsystem Jens Wiklander
2015-10-29 8:21 ` [PATCH v6 1/6] arm/arm64: add smccc Jens Wiklander
2015-11-02 11:51 ` Will Deacon
2015-11-02 13:56 ` Jens Wiklander
2015-11-02 14:03 ` Mark Rutland [this message]
2015-11-02 14:45 ` Will Deacon
2015-10-29 8:21 ` [PATCH v6 2/6] drivers: psci: replace psci firmware calls Jens Wiklander
2015-11-02 11:55 ` Will Deacon
2015-11-02 13:08 ` Jens Wiklander
2015-11-02 13:46 ` Will Deacon
2015-10-29 8:21 ` [PATCH v6 3/6] dt/bindings: add bindings for optee Jens Wiklander
2015-11-16 17:01 ` Rob Herring
2015-11-19 9:18 ` Jens Wiklander
2015-11-19 14:30 ` Rob Herring
2015-10-29 8:21 ` [PATCH v6 4/6] tee: generic TEE subsystem Jens Wiklander
2015-10-29 8:21 ` [PATCH v6 5/6] tee: add OP-TEE driver Jens Wiklander
2015-10-29 8:21 ` [PATCH v6 6/6] Documentation: tee subsystem and op-tee driver Jens Wiklander
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=20151102140313.GG2684@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).