From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: edgar.iglesias@xilinx.com,
Stefano Stabellini <stefanos@xilinx.com>, nd <nd@arm.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH v3 4/6] xen/arm: zynqmp: eemi access control
Date: Wed, 17 Oct 2018 15:26:54 +0100 [thread overview]
Message-ID: <35d6f7b5-8ca3-dfec-9857-0f1db79723b6@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1810172201590.3835@sstabellini-ThinkPad-X260>
Hi Stefano,
On 17/10/2018 15:03, Stefano Stabellini wrote:
> On Tue, 16 Oct 2018, Julien Grall wrote:
>> Hi,
>>
>> Sorry I forgot to answer to the rest of the e-mail.
>>
>> On 10/16/2018 03:39 AM, Stefano Stabellini wrote:
>>> On 15/10/2018 08:25, Julien Grall wrote:
>>>>>>> + bool hwdom_access; /* HW domain gets access regardless. */
>>>>>>> +};
>>>>>>> +
>>>>>>> +/*
>>>>>>> + * This table maps a node into a memory address.
>>>>>>> + * If a guest has access to the address, it has enough control
>>>>>>> + * over the node to grant it access to EEMI calls for that node.
>>>>>>> + */
>>>>>>> +static const struct pm_access pm_node_access[] = {
>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>> +
>>>>>>> +/*
>>>>>>> + * This table maps reset line IDs into a memory address.
>>>>>>> + * If a guest has access to the address, it has enough control
>>>>>>> + * over the affected node to grant it access to EEMI calls for
>>>>>>> + * resetting that node.
>>>>>>> + */
>>>>>>> +#define XILPM_RESET_IDX(n) (n - XILPM_RESET_PCIE_CFG)
>>>>>>> +static const struct pm_access pm_reset_access[] = {
>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>> +
>>>>>>> +/*
>>>>>>> + * This table maps reset line IDs into a memory address.
>>>>>>> + * If a guest has access to the address, it has enough control
>>>>>>> + * over the affected node to grant it access to EEMI calls for
>>>>>>> + * resetting that node.
>>>>>>> + */
>>>>>>> +static const struct {
>>>>>>> + paddr_t start;
>>>>>>> + paddr_t size;
>>>>>>> + uint32_t mask; /* Zero means no mask, i.e all bits. */
>>>>>>> + enum pm_node_id node;
>>>>>>> + bool hwdom_access;
>>>>>>> + bool readonly;
>>>>>>> +} pm_mmio_access[] = {
>>>>>>
>>>>>> Those 3 arrays contains a lot of hardcoded value. Can't any of this be
>>>>>> detected from the device-tree?
>>>>>
>>>>> No, the information is not available on device tree unfortunately. >
>>>>>
>>>>>> I would be interested to know how this is going to work with upstream
>>>>>> Linux.
>>>>>> Do you hardcode all the values there as well?
>>>>>
>>>>> Yes: the IDs are specified on an header file, see
>>>>> include/linux/firmware/xlnx-zynqmp.h on the zynq/firmware branch of the
>>>>> arm-soc tree. In addition to the IDs, we also have the memory addresses
>>>>> in Xen to do the permission checks.
>>>>
>>>> I am afraid this is not linux upstream. Can you point to the code in
>>>> Linus's
>>>> git or explain the state of the review?
>>>
>>> It hasn't been pulled into Linux yet, I was told it has already been
>>> reviewed and is queued in arm-soc for upstreaming at the next merge
>>> window, which should be imminent.
>>
>> Looking at that branch, I can see some DT bindings at least for the clock. I
>> also don't see any hardcoded value for device so far in that series. Is it
>> going to be sent separately?
>
> If you look at include/linux/firmware/xlnx-zynqmp.h, you'll see some
> hardcode values, specifically enum pm_api_id matches numerically the
> enum by the same name this series introduces in
> xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h
I don't think we are talking the same things. I am talking about
pm_node_id/pm_node_reset (not pm_api_id). I don't see such code in Linux
at the moment and a bit surprised that no DT bindings will be used to
link the value with a device.
So my question stands, how Linux will use pm_node_id/pm_node_reset? Can
you point to code if that exists.
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-10-17 14:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-11 0:01 [PATCH v3 0/6] zynqmp: Add forwarding of platform specific firmware calls Stefano Stabellini
2018-08-11 0:01 ` [PATCH v3 1/6] xen/arm: introduce platform_smc Stefano Stabellini
2018-08-23 15:37 ` Julien Grall
2018-08-23 23:40 ` Stefano Stabellini
2018-08-11 0:01 ` [PATCH v3 2/6] xen/arm: zynqmp: Forward plaform specific firmware calls Stefano Stabellini
2018-08-23 15:41 ` Julien Grall
2018-08-23 23:56 ` Stefano Stabellini
2018-08-24 9:01 ` Julien Grall
2018-10-10 21:50 ` Stefano Stabellini
2018-08-11 0:01 ` [PATCH v3 3/6] xen/arm: zynqmp: introduce zynqmp specific defines Stefano Stabellini
2018-08-11 0:01 ` [PATCH v3 4/6] xen/arm: zynqmp: eemi access control Stefano Stabellini
2018-08-28 16:05 ` Julien Grall
2018-10-10 22:35 ` Stefano Stabellini
2018-10-15 7:25 ` Julien Grall
2018-10-15 13:00 ` Julien Grall
2018-10-16 2:39 ` Stefano Stabellini
2018-10-16 13:23 ` Julien Grall
2018-10-17 13:58 ` Stefano Stabellini
2018-10-16 13:29 ` Julien Grall
2018-10-17 14:03 ` Stefano Stabellini
2018-10-17 14:26 ` Julien Grall [this message]
2018-08-11 0:01 ` [PATCH v3 5/6] xen/arm: zynqmp: implement zynqmp_eemi Stefano Stabellini
2018-08-28 16:29 ` Julien Grall
2018-10-10 22:49 ` Stefano Stabellini
2018-10-15 7:32 ` Julien Grall
2018-10-15 13:01 ` Julien Grall
2018-10-16 6:48 ` Stefano Stabellini
2018-10-16 13:44 ` Julien Grall
2018-08-11 0:01 ` [PATCH v3 6/6] 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=35d6f7b5-8ca3-dfec-9857-0f1db79723b6@arm.com \
--to=julien.grall@arm.com \
--cc=edgar.iglesias@xilinx.com \
--cc=nd@arm.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).