From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: edgar.iglesias@xilinx.com,
Stefano Stabellini <stefanos@xilinx.com>,
saeed.nowshadi@xilinx.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v5 2/7] xen/arm: zynqmp: Forward plaform specific firmware calls
Date: Tue, 11 Dec 2018 19:09:31 +0000 [thread overview]
Message-ID: <0111c167-e7a5-1c90-b815-2cb861f54326@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1812111049030.12259@sstabellini-ThinkPad-X260>
Hi Stefano,
On 11/12/2018 18:50, Stefano Stabellini wrote:
> On Tue, 11 Dec 2018, Julien Grall wrote:
>> Hi Stefano,
>>
>> On 03/12/2018 21:03, Stefano Stabellini wrote:
>>> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>>>
>>> From: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
>>>
>>> Introduce zynqmp_eemi: a function responsible for implementing access
>>> controls over the firmware calls. Only calls that are allowed are
>>> forwarded to the firmware.
>>>
>>> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
>>> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
>>>
>>> ---
>>> Changes in v4:
>>> - fix typo
>>> - add header guard
>>> - add emacs magic
>>> - remove #includes that will only be used later
>>> - add copyright notice to header
>>> - remove SMCCC 1.1 check
>>> ---
>>> xen/arch/arm/platforms/Makefile | 1 +
>>> xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 34
>>> ++++++++++++++++++++++
>>> xen/arch/arm/platforms/xilinx-zynqmp.c | 11 +++++++
>>> xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h | 30
>>> +++++++++++++++++++
>>> 4 files changed, 76 insertions(+)
>>> create mode 100644 xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
>>> create mode 100644 xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h
>>>
>>> diff --git a/xen/arch/arm/platforms/Makefile
>>> b/xen/arch/arm/platforms/Makefile
>>> index a79bdb9..fe8e0c7 100644
>>> --- a/xen/arch/arm/platforms/Makefile
>>> +++ b/xen/arch/arm/platforms/Makefile
>>> @@ -9,3 +9,4 @@ obj-y += sunxi.o
>>> obj-$(CONFIG_ARM_64) += thunderx.o
>>> obj-$(CONFIG_ARM_64) += xgene-storm.o
>>> obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o
>>> +obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
>>> diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
>>> b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
>>> new file mode 100644
>>> index 0000000..369bb3f
>>> --- /dev/null
>>> +++ b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
>>> @@ -0,0 +1,34 @@
>>> +/*
>>> + * xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
>>> + *
>>> + * Xilinx ZynqMP EEMI API
>>> + *
>>> + * Copyright (c) 2018 Xilinx Inc.
>>> + * Written by Edgar E. Iglesias <edgar.iglesias@xilinx.com>
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> + * modify it under the terms and conditions of the GNU General Public
>>> + * License, version 2, as published by the Free Software Foundation.
>>> + *
>>> + * This program is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>>> + * GNU General Public License for more details.
>>> + */
>>> +
>>> +#include <asm/regs.h>
>>> +#include <asm/platforms/xilinx-zynqmp-eemi.h>
>>> +
>>> +bool zynqmp_eemi(struct cpu_user_regs *regs)
>>> +{
>>> + return false;
>>> +}
>>> +
>>> +/*
>>> + * Local variables:
>>> + * mode: C
>>> + * c-file-style: "BSD"
>>> + * c-basic-offset: 4
>>> + * indent-tabs-mode: nil
>>> + * End:
>>> + */
>>> diff --git a/xen/arch/arm/platforms/xilinx-zynqmp.c
>>> b/xen/arch/arm/platforms/xilinx-zynqmp.c
>>> index d8ceded..9c174d2 100644
>>> --- a/xen/arch/arm/platforms/xilinx-zynqmp.c
>>> +++ b/xen/arch/arm/platforms/xilinx-zynqmp.c
>>> @@ -18,6 +18,8 @@
>>> */
>>> #include <asm/platform.h>
>>> +#include <asm/platforms/xilinx-zynqmp-eemi.h>
>>> +#include <asm/smccc.h>
>>> static const char * const zynqmp_dt_compat[] __initconst =
>>> {
>>> @@ -32,8 +34,17 @@ static const struct dt_device_match
>>> zynqmp_blacklist_dev[] __initconst =
>>> { /* sentinel */ },
>>> };
>>> +static bool zynqmp_smc(struct cpu_user_regs *regs)
>>> +{
>>> + if ( !is_64bit_domain(current->domain) )
>>
>> Please document why you only expose eemi to 64-bit domain. What if the user
>> start with 32-bit Dom0?
>
> I'll add a in-code comment saying that only 64-bit guests are supported
> by the current implementation -- the 32 bit EEMI ABI is not yet covered.
64-bit guests is allowed to use both SMC32 and SMC64. There are actually some
call that can only be done using SMC32 convention (see patch #6). So why forbid
32-bit domain when you allow 64-bit using SMC32?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-12-11 19:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 21:02 [PATCH v5 0/7] zynqmp: Add forwarding of platform specific firmware calls Stefano Stabellini
2018-12-03 21:03 ` [PATCH v5 1/7] xen/arm: introduce platform_smc Stefano Stabellini
2018-12-03 21:07 ` Stefano Stabellini
2018-12-11 14:54 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 2/7] xen/arm: zynqmp: Forward plaform specific firmware calls Stefano Stabellini
2018-12-11 15:03 ` Julien Grall
2018-12-11 18:50 ` Stefano Stabellini
2018-12-11 19:09 ` Julien Grall [this message]
2018-12-11 20:19 ` Stefano Stabellini
2018-12-11 20:27 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 3/7] xen/arm: zynqmp: introduce zynqmp specific defines Stefano Stabellini
2018-12-11 15:21 ` Julien Grall
2018-12-11 19:22 ` Stefano Stabellini
2018-12-12 10:29 ` Julien Grall
2018-12-12 23:55 ` Stefano Stabellini
2018-12-13 15:50 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 4/7] xen: introduce mfn_init macro Stefano Stabellini
2018-12-04 10:25 ` Jan Beulich
2018-12-04 19:38 ` Stefano Stabellini
2018-12-05 8:27 ` Jan Beulich
2018-12-12 23:56 ` Stefano Stabellini
2018-12-03 21:03 ` [PATCH v5 5/7] xen/arm: zynqmp: eemi access control Stefano Stabellini
2018-12-11 15:37 ` Julien Grall
2018-12-12 23:57 ` Stefano Stabellini
2018-12-13 15:58 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 6/7] xen/arm: zynqmp: implement zynqmp_eemi Stefano Stabellini
2018-12-11 15:55 ` Julien Grall
2018-12-11 22:23 ` Stefano Stabellini
2018-12-12 10:48 ` Julien Grall
2018-12-12 23:56 ` Stefano Stabellini
2018-12-13 15:59 ` Julien Grall
2018-12-03 21:03 ` [PATCH v5 7/7] xen/arm: zynqmp: Remove blacklist of ZynqMP's PM node Stefano Stabellini
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=0111c167-e7a5-1c90-b815-2cb861f54326@arm.com \
--to=julien.grall@arm.com \
--cc=edgar.iglesias@xilinx.com \
--cc=saeed.nowshadi@xilinx.com \
--cc=sstabellini@kernel.org \
--cc=stefanos@xilinx.com \
--cc=xen-devel@lists.xen.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).