From nobody Tue Oct 04 16:29:38 2022 X-Original-To: dev-commits-src-branches@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 4MhjpV3sbsz4fC3k; Tue, 4 Oct 2022 16:29:38 +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 4MhjpV3PLTz44Wp; Tue, 4 Oct 2022 16:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900978; 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=HxnAgT9s/kg61F7w65J6NIN1f4/AUVlR87qbUYthhjg=; b=LCJlMt61kA+4FTS7R3MCLv6fdeU/2llsc/tGrbSIt9JIAlug1wuNLNFnulNwecFGnqFL4F 5dNFlV0fjeEBC3OKBQ/chMSFHQJM9Tyu2FNo7mZcDqGdVzj2AbMuOIVjrBS/FOCPM2ZE74 VXdCJ6iSq5XnLIH4PBlUJ/b39wlE8d0dkgrQCwD07VjuqddSPif/9R/yvYrqYNsXglCrkU 3gs1KUA7QH8pCjFCWM4wfD4+3Yb7XjyyyruyAfcuCE3lG0/LRBsQKdvvLqDnCmwz0kappT jxQe7bAD2zhxuI7z6OOWYkG2h2b2wvampoN9CKqGmDMWDtLERTTWUdVjjFiPTQ== 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 4MhjpV2RMCzcqj; Tue, 4 Oct 2022 16:29:38 +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 294GTcNl049819; Tue, 4 Oct 2022 16:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 294GTcdb049818; Tue, 4 Oct 2022 16:29:38 GMT (envelope-from git) Date: Tue, 4 Oct 2022 16:29:38 GMT Message-Id: <202210041629.294GTcdb049818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Leandro Lupori Subject: git: 9c1f54589173 - stable/13 - powerpc64le: fix boot when using QEMU PowerNV List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: luporl X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9c1f54589173dc7616a866b08be68fce889cc1b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900978; 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=HxnAgT9s/kg61F7w65J6NIN1f4/AUVlR87qbUYthhjg=; b=pLLf5IMqGW3QwSwAuj1dBjvCn7mlD1QJSrWnJMfjf5Nd6Gt/X5PbEb6XYS5Rb0UPgoOQpi Uyz7PS1Ymfc71oWrri/KgGd+HcrOV66JPQKepjv/FButGG/PCIYcwza+d5tMDzCUYaxdOX NhYFm2XjFiEfrG51QN0WagMEYT2BgfbJh0CKMG1yb5qvMHhIOqTw+w5g635Ptzw0Elwf+j PxfQuWJ8lBj7NaIpweSd/UfBvVDTosE+wQ9tAjfOI/JxM/8H4eRLHQnG1fKAKArhG/xUQA Hb39Xorzos2BduHJ7EdveSV+Y9rtP71q0GKdJ+XsxtYpEoeOCktEjvNLUn+5lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664900978; a=rsa-sha256; cv=none; b=ViGRzxvXEIAV3pyYdWrsAvlsCr1zk3BZ6Y++4OhjGN2c4S5BrpCt46Jf4VO2FItbQY0TKC JNJM9uPTEa682WniX7yhTlbz0/OEEGka3rHH6+1AOKUlm0xxjzKR/6zEaTm+j+B1KhXShD 4SGopgD2CIEdNyb+O52jk2O+ijM3jR1G3o+ma/gFKzsRKODDv+qX1U0ndK+PPHAOFON4UP Z8Ke5f/9q0ZIbEDt/L5b3nYtg00T+ISLBi4Flcf2mh02/nd/xpIBlVXuQ2yvRoDTeGeYwG 3AEXlLDtGIuUpGz7q5aLf+Pug1khzC9XVpZvNEJG0/rlggvpCrYtcfuCUxYMLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=9c1f54589173dc7616a866b08be68fce889cc1b1 commit 9c1f54589173dc7616a866b08be68fce889cc1b1 Author: Leandro Lupori AuthorDate: 2021-11-25 19:41:46 +0000 Commit: Leandro Lupori CommitDate: 2022-10-04 16:24:14 +0000 powerpc64le: fix boot when using QEMU PowerNV When using QEMU PowerNV with latest op-build release (v2.7), its kexec transfers control to FreeBSD kernel in BE mode, causing an instant exception on LE kernels. Make kboot able to detect and swap endian to fix this. Reviewed by: imp Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D33104 (cherry picked from commit e141b62d208867fc5bdb5803d05f5496260722ac) --- sys/powerpc/aim/locore64.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S index f0a183c4b331..3eb6e546399c 100644 --- a/sys/powerpc/aim/locore64.S +++ b/sys/powerpc/aim/locore64.S @@ -82,6 +82,9 @@ TOC_ENTRY(trapstk) */ .section ".text.kboot", "x", @progbits kbootentry: +#ifdef __LITTLE_ENDIAN__ + RETURN_TO_NATIVE_ENDIAN +#endif b __start . = kbootentry + 0x40 /* Magic address used in platform layer */ .global smp_spin_sem