[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] xen/zynqmp: add IPI calls virtualization
commit 7183e86a29c3fe15078eb0b8c11d3e556c22effa Author: Stefano Stabellini <sstabellini@xxxxxxxxxx> AuthorDate: Tue Dec 18 15:32:50 2018 -0800 Commit: Julien Grall <julien.grall@xxxxxxx> CommitDate: Wed Dec 19 13:48:51 2018 +0000 xen/zynqmp: add IPI calls virtualization ZynqMP IPI mailbox calls are a small set of EEMI sister calls, often used in conjunction with EEMI related functionalities. Unfortunately they are not part of the EEMI spec, or any other public spec, but the implementation is upstream in ATF: https://github.com/ARM-software/arm-trusted-firmware/blob/master/plat/xilinx/zynqmp/ipi_mailbox_service/ipi_mailbox_svc.h And patches are close to getting into Linux: https://patchwork.kernel.org/cover/10689501/ Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxx> --- xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 18 ++++++++++++++++++ xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h | 15 +++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c index 80e990cbeb..2053ed7ac5 100644 --- a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c +++ b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c @@ -25,6 +25,9 @@ * EEMI firmware API: * https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf * + * IPI firmware API: + * https://github.com/ARM-software/arm-trusted-firmware/blob/master/plat/xilinx/zynqmp/ipi_mailbox_service/ipi_mailbox_svc.h + * * Power domain node_ids identify the area of effect of the power * management operations. They are the first parameter passed to power * management EEMI calls. @@ -153,6 +156,21 @@ bool zynqmp_eemi(struct cpu_user_regs *regs) ret = XST_PM_NO_ACCESS; goto done; + case IPI_MAILBOX_FID(IPI_MAILBOX_OPEN): + case IPI_MAILBOX_FID(IPI_MAILBOX_RELEASE): + case IPI_MAILBOX_FID(IPI_MAILBOX_STATUS_ENQUIRY): + case IPI_MAILBOX_FID(IPI_MAILBOX_NOTIFY): + case IPI_MAILBOX_FID(IPI_MAILBOX_ACK): + case IPI_MAILBOX_FID(IPI_MAILBOX_ENABLE_IRQ): + case IPI_MAILBOX_FID(IPI_MAILBOX_DISABLE_IRQ): + if ( !is_hardware_domain(current->domain) ) + { + gprintk(XENLOG_WARNING, "IPI mailbox: fn=%u No access", pm_fn); + ret = XST_PM_NO_ACCESS; + goto done; + } + goto forward_to_fw; + default: gprintk(XENLOG_WARNING, "zynqmp-pm: Unhandled PM Call: %u\n", fid); return false; diff --git a/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h b/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h index 2fbf150b39..72aadf7a44 100644 --- a/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h +++ b/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h @@ -99,6 +99,21 @@ enum pm_ret_status { XST_PM_ABORT_SUSPEND, }; +/* IPI SMC function numbers enum definition and fids */ +#define IPI_MAILBOX_FID(fid) ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_CONV_32, \ + ARM_SMCCC_OWNER_SIP, \ + fid) +enum ipi_api_id { + IPI_MAILBOX_OPEN = 0x1000, + IPI_MAILBOX_RELEASE, + IPI_MAILBOX_STATUS_ENQUIRY, + IPI_MAILBOX_NOTIFY, + IPI_MAILBOX_ACK, + IPI_MAILBOX_ENABLE_IRQ, + IPI_MAILBOX_DISABLE_IRQ, +}; + extern bool zynqmp_eemi(struct cpu_user_regs *regs); #endif /* __ASM_ARM_PLATFORMS_ZYNQMP_H */ -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |