From owner-svn-src-all@freebsd.org Tue Apr 23 03:05:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A927F158BB93; Tue, 23 Apr 2019 03:05:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4098BAA4; Tue, 23 Apr 2019 03:05:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27FE71E6D0; Tue, 23 Apr 2019 03:05:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3N35RTh048292; Tue, 23 Apr 2019 03:05:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3N35Ri5048291; Tue, 23 Apr 2019 03:05:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201904230305.x3N35Ri5048291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 23 Apr 2019 03:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346589 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 346589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F4098BAA4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 03:05:27 -0000 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