From nobody Fri Mar 04 19:18:06 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2BB0C19E9F1E; Fri, 4 Mar 2022 19:18:07 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K9Hgg0hpnz4npK; Fri, 4 Mar 2022 19:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646421487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19MidIKhlNss9OPbtPODKS12AbX3E+HGGYxdaQs+oqE=; b=F+JpEPv6QeGRLeN8FUsmLP7l1vNY5nLZvzZatP+kU8LaSt8gOq5hre1bemIVE+Pr0FxeGi rH2aHQK6TngflA0AipnkTzn+ZtwZdsJdcgyCYqocZDrxQhhKxxodFZxM2yFNLb6SuDJ6oS vbgx4AZQgmPRasFFgD/lgYy1nrQxJ6GRKiyMy6ZFj7X4Vn8sUhGtRSNXaOKHLWfX6aBMsc PALYzDl33CrPMm8p3isPYZPa/wxWkpPdJ/EDovhZzcq595CZ7YXkQSjhuqVYSybbzxewoN c34jj1ZNAfJecPJ5LP+IrRM1joFKgBbhqggWridazQZpsvHNc0CwClbdx+bznw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC1A112280; Fri, 4 Mar 2022 19:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 224JI6UL028410; Fri, 4 Mar 2022 19:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 224JI61n028409; Fri, 4 Mar 2022 19:18:06 GMT (envelope-from git) Date: Fri, 4 Mar 2022 19:18:06 GMT Message-Id: <202203041918.224JI61n028409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: ed726c3e34d8 - stable/13 - powerpc64: fix loader regression List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed726c3e34d8e6b26b2b64367a0ab6d850cb4912 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646421487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19MidIKhlNss9OPbtPODKS12AbX3E+HGGYxdaQs+oqE=; b=xssrN40bVfIFGjn3Vj+VhmX6u9OQygAko9PfkH+itOSLoT4XDm3GpzcPdsaz0f3jcf8CRJ 7cGwoUZA8uKaFPWr16UUeBd8msjW3khKU5RCDyEpzoAYpM/SABpFKmjJFkEwdJxPCoPVWs +CCJx33riFLTRROreoiAah098CQ3K8V9vydDzsodx+x1XT/HkbcBWR5o1hRPNdbP9uSfi9 7VbJzH+g832xIMH/jnuuIOimU9nEysI9IqARd6jEZAYwEEFsK1kJszZw063A57Ydzy9sbB 9mdYQke6PUv42viJ2z9FHG2U8sYafeRhLVg38r4bYpX6HdW8VV8Fw15Vd/rmeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646421487; a=rsa-sha256; cv=none; b=lQBCwt2RJ+AcPEYTSGgU+VVeCqbudOXBCZfqsPYul6Ku5zkt4cb4LHk3KyzdXhjs1ucICN gQcO/F029QVevjfOwmRw0xPVhgtho+/WhXV5iDqgMmi88DMsanQBQvg6Tjgbqa6H5ak52q PJiM+XUJDp+6v/fQiPduM7OCniFQno4A1GHkCJI7l06ntHRZnKBtak3ZmPk5DG6xWHJBCh cAkErKBP4/JXqZSeRcQmkOUN5FKbdJwe06XcFY5OyYkIlSpr/j/AjWGpXymNnJfjzNix0I Wu77DhSJwuNxG+tZOWeQlKBl7FopqZ/nsAvNYUEziyQMcFZDUWaErp3GPmMnaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=ed726c3e34d8e6b26b2b64367a0ab6d850cb4912 commit ed726c3e34d8e6b26b2b64367a0ab6d850cb4912 Author: Leandro Lupori AuthorDate: 2021-09-21 20:22:42 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2022-03-04 22:18:22 +0000 powerpc64: fix loader regression After b4cb3fe0e39a, loader started crashing on PowerPC64, with a Program Exception (700) error. The problem was that archsw was used before being initialized, with the new mount feature. This change fixes the issue by initializing archsw earlier, before setting currdev, that triggers the mount. Reviewed by: tsoome MFC after: 1 month X-MFC-With: b4cb3fe0e39a Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32027 (cherry picked from commit 680ca739458ba8cba221ea74794c2cd9771c77f8) --- stand/powerpc/ofw/main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/stand/powerpc/ofw/main.c b/stand/powerpc/ofw/main.c index d30be975ac41..81195d3f2444 100644 --- a/stand/powerpc/ofw/main.c +++ b/stand/powerpc/ofw/main.c @@ -168,6 +168,17 @@ main(int (*openfirm)(void *)) */ cons_probe(); + archsw.arch_getdev = ofw_getdev; + archsw.arch_copyin = ofw_copyin; + archsw.arch_copyout = ofw_copyout; + archsw.arch_readin = ofw_readin; +#ifdef CAS + setenv("cas", "1", 0); + archsw.arch_autoload = ppc64_autoload; +#else + archsw.arch_autoload = ofw_autoload; +#endif + /* Set up currdev variable to have hooks in place. */ env_setenv("currdev", EV_VOLATILE, "", ofw_setcurrdev, env_nounset); @@ -214,17 +225,6 @@ main(int (*openfirm)(void *)) if (!(mfmsr() & PSL_DR)) setenv("usefdt", "1", 1); - archsw.arch_getdev = ofw_getdev; - archsw.arch_copyin = ofw_copyin; - archsw.arch_copyout = ofw_copyout; - archsw.arch_readin = ofw_readin; -#ifdef CAS - setenv("cas", "1", 0); - archsw.arch_autoload = ppc64_autoload; -#else - archsw.arch_autoload = ofw_autoload; -#endif - interact(); /* doesn't return */ OF_exit();