[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v6 6/6] 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> --- Changes in v6: - new patch --- xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 18 ++++++++++++++++++ xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h | 11 +++++++++++ 2 files changed, 29 insertions(+) diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c index e0456ae..8ef4157 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. @@ -175,6 +178,21 @@ bool zynqmp_eemi(struct cpu_user_regs *regs) ret = XST_PM_NO_ACCESS; goto done; + case IPI_MAILBOX_OPEN: + case IPI_MAILBOX_RELEASE: + case IPI_MAILBOX_STATUS_ENQUIRY: + case IPI_MAILBOX_NOTIFY: + case IPI_MAILBOX_ACK: + case IPI_MAILBOX_ENABLE_IRQ: + case 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 84b8cbd..2e48c80 100644 --- a/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h +++ b/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h @@ -102,6 +102,17 @@ enum pm_ret_status { XST_PM_ABORT_SUSPEND, }; +/* IPI SMC function numbers enum definition */ +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 */ -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |