Date: Tue, 03 Sep 2019 14:08:19 -0000 From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346589 - head/sys/powerpc/pseries Message-ID: <201904230305.x3N35Ri5048291@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Tue Apr 23 03:05:26 2019 New Revision: 346589 URL: https://svnweb.freebsd.org/changeset/base/346589 Log: powerpc64/pseries: Fix hypervisor call with extra arguments Some hypervisor calls, such as H_SEND_LOGICAL_LAN, take more arguments than are traditionally passed in registers. The HCALL ABI will accept these arguments in r11 and r12. With ELFv2 ABI, these arguments are 2 double-words lower than ELFv1 ABI, as two double-words in the stack frame are no longer used, and therefore removed from the frame. Fix the offsets for loading the registers for the HCALL. This fixes the phyp_llan driver with ELFv2 kernel. Submitted by: alfredo.junior_eldorado.org.br Differential Revision: https://reviews.freebsd.org/D20008 Modified: head/sys/powerpc/pseries/phyp-hvcall.S Modified: head/sys/powerpc/pseries/phyp-hvcall.S ============================================================================== --- head/sys/powerpc/pseries/phyp-hvcall.S Tue Apr 23 02:53:53 2019 (r346588) +++ head/sys/powerpc/pseries/phyp-hvcall.S Tue Apr 23 03:05:26 2019 (r346589) @@ -36,8 +36,13 @@ ASENTRY(phyp_hcall) mflr %r0 std %r0,16(%r1) +#if defined(_CALL_ELF) && _CALL_ELF == 2 + ld %r11,96(%r1) /* Last couple args into volatile regs*/ + ld %r12,104(%r1) +#else ld %r11,112(%r1) /* Last couple args into volatile regs*/ ld %r12,120(%r1) +#endif hc /* invoke the hypervisor */ ld %r0,16(%r1) mtlr %r0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904230305.x3N35Ri5048291>