čt 10. 10. 2019 v 11:13 odesílatel Michal Simek <michal.si...@xilinx.com> napsal: > > Function should report error when called in EL3 context. Also report it as > error instead 0 (success). > > Reported-by: Luca Ceresoli <l...@lucaceresoli.net> > Signed-off-by: Michal Simek <michal.si...@xilinx.com> > --- > > Based on https://lists.denx.de/pipermail/u-boot/2019-October/385462.html > series. > --- > drivers/firmware/firmware-zynqmp.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/firmware-zynqmp.c > b/drivers/firmware/firmware-zynqmp.c > index adcef15e22aa..4911734f6c63 100644 > --- a/drivers/firmware/firmware-zynqmp.c > +++ b/drivers/firmware/firmware-zynqmp.c > @@ -156,8 +156,10 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 > arg0, u32 arg1, u32 arg2, > */ > struct pt_regs regs; > > - if (current_el() == 3) > - return 0; > + if (current_el() == 3) { > + printf("%s: Can't call SMC from EL3 context\n", __func__); > + return -EPERM; > + } > > regs.regs[0] = PM_SIP_SVC | api_id; > regs.regs[1] = ((u64)arg1 << 32) | arg0; > -- > 2.17.1 >
Applied. M -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot