From nobody Tue Oct 04 16:29:42 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 4Mhjpb0hY5z4fCRv; Tue, 4 Oct 2022 16:29:43 +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 4MhjpZ73g0z44tv; Tue, 4 Oct 2022 16:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900983; 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=ox3AWi1alS0oEuFABSDmjgP9+e+52hLwLzbOC+c9gAo=; b=dFkGYzoHnUAhy3c6F//km/i7XOK7eKu2xxFnb1tjvLA0VHlXQPVt60mtvKp2aBZxyJeWuf kmxlBZgEU5Vh/ebN13plHXIq5ndSsXL3MFcou8YM8oTlKGdvx5fCUjAACYcFzshqoqzFwJ ucC7W1WmKycGZXxMQoHa7VFumunS7nF8XWiqvXGZsTi1D5YQQ8nE6KCBu8zzT4u24F5N54 HXwC8rg05bqfulTKXIxx6pTeIkC50RVPYH7XT8bmmIYdnYrxXpP6XKtMvll+X01KBQfvVI uq+VJovgtpSa75Ct0V08Jd+RVXjkmtFcbBs2r1EPfpTkj1hy7U1JuJzhV2J02Q== 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 4MhjpZ66njzcvq; Tue, 4 Oct 2022 16:29:42 +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 294GTgJ0049923; Tue, 4 Oct 2022 16:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 294GTgAi049922; Tue, 4 Oct 2022 16:29:42 GMT (envelope-from git) Date: Tue, 4 Oct 2022 16:29:42 GMT Message-Id: <202210041629.294GTgAi049922@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: e429186184fe - stable/13 - powerpc64: tell kernel when radix is not available 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: luporl X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e429186184fee12cf3f2bda8a747370987653a9f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900983; 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=ox3AWi1alS0oEuFABSDmjgP9+e+52hLwLzbOC+c9gAo=; b=mWyjhirA5xE1K73J1bJUYxVTeIuVBAzAK/yLLtO5v8VllNk4c1LWEwgPU2YChgLL96i+1I b8+W1BfmEMavNcMcaOIXJOY9LOImeFl/XWnGtAB5Jx4lu+juPdU00sUkOUR5ZhbHh16kEq Gnl+PJq8j0aQPJzwUXRZPW6OkcW7Q3ynpmWUqD3ivFDx4hVrI51Iu7Z2GPS3vN4ZUhItnf hny/jNKCBKk5UTuU3QmvlaKyh0zVgajNgNIqs4sI506GY5DOZc8wQ9oSMQTA2AaPClOSey M5+68Rn9D+HVU3FXQfc48/atRlTK1ZIyeHkVl5hO9goBS7Nwa9KkH2niDqLsEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664900983; a=rsa-sha256; cv=none; b=QThsX6xP7hdGjwkLTcRh9LgsaiAhESWpGl+XJHEuB4Z0aRi9edPbccFkB/QxM1D6yniMMT q+veNS8VEDBotyLQmPbRdc81OA0BYBwE21gnleSAXqV+4p3VLicTKThIfor6JV7Dg9KLWd OjL1PQkWnzGQEuepLUa1mwNZcBJ57fb+ixGbtLo8jrU80Hq+WWEaePk4vDSKmjChNDCdNn hysmH/DX7fet/41EhWuVTKil+PvqQdrudz83OcIKCunZYbCIytS3rmVCPHRH82WTuNSh3j HQ144JMJ+Px0NFLfPe93qzl+nghRM6Ja3fqnRs40QJb2FjZdGVFDHrF4xvtIQw== 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=e429186184fee12cf3f2bda8a747370987653a9f commit e429186184fee12cf3f2bda8a747370987653a9f Author: Leandro Lupori AuthorDate: 2021-10-22 16:44:21 +0000 Commit: Leandro Lupori CommitDate: 2022-10-04 16:24:15 +0000 powerpc64: tell kernel when radix is not available If CAS detects that radix is not supported, set radix_mmu to 0 to avoid the kernel trying to use it and panic. Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) (cherry picked from commit a23e18ea545675aca7551ef2395f6df40a3acb29) --- stand/powerpc/ofw/cas.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stand/powerpc/ofw/cas.c b/stand/powerpc/ofw/cas.c index 0a12f31d1a1a..e95af42762a5 100644 --- a/stand/powerpc/ofw/cas.c +++ b/stand/powerpc/ofw/cas.c @@ -234,9 +234,15 @@ ppc64_cas(void) } } - if ((var = getenv("radix_mmu")) != NULL && var[0] == '0') + if (!radix_mmu) + /* + * If radix is not supported, set radix_mmu to 0 to avoid + * the kernel trying to use it and panic. + */ + setenv("radix_mmu", "0", 1); + else if ((var = getenv("radix_mmu")) != NULL && var[0] == '0') radix_mmu = 0; - if (radix_mmu) + else ov5[OV5_MMU_INDEX] = OV5_MMU_RADIX; inst = OF_open("/");