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

Re: [Xen-devel] [PATCH v3 5/6] xen/arm: zynqmp: implement zynqmp_eemi



Hi,

On 10/16/2018 07:48 AM, Stefano Stabellini wrote:
On Mon, 15 Oct 2018, Julien Grall wrote:
(Resending the e-mail using a different smtp)

On 15/10/2018 08:32, Julien Grall wrote:
Hi,

On 10/10/2018 11:49 PM, Stefano Stabellini wrote:
On Tue, 28 Aug 2018, Julien Grall wrote:
Hi Stefano,

On 11/08/18 01:01, Stefano Stabellini wrote:
From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxxx>

From: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx>

zynqmp_eemi uses the defined functions and structs to decide whether
to
make a call to the firmware, or to simply return a predefined value.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
---e
    xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 143
+++++++++++++++++++++++++++-
    1 file changed, 142 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
index 62cc15c..1dbdf04 100644
--- a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
+++ b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
@@ -808,7 +808,148 @@ static bool domain_has_mmio_access(struct domain
*d,
      bool zynqmp_eemi(struct cpu_user_regs *regs)
    {
-    return false;
+    struct arm_smccc_res res;
+    bool is_mmio_write = false;
+    uint32_t fid = get_user_reg(regs, 0);
+    uint32_t nodeid = get_user_reg(regs, 1);
+    unsigned int pm_fn = fid & 0xFFFF;

Here you will receive all the function ID for the SIP subsystem. Can you
confirm the EEMI can be accessed from both SMC32 and SMC64 convention?

Yep

Can you point me to the documentation? For instance, CALL_COUNT, UID and
VERSION are only accessible via SMC32.

https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf

I am checking if there is a newer version of it.

I am afraid I can't find the function ID in that documentation nor any mention of the SMC calling convention. I am surprised that EEMI would ignore tops bits of the ID given they convey different information (e.g fast/yielding call, 32/64-bit convention).

Looking at the branch you mentioned earlier on, zynqmp_pm_invoke_fn (drivers/firmware/xilinx/zynqmp.c) is definitely using the SMC64 calling convention as described in the documentation above the function.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.