From nobody Wed Nov 24 15:37:46 2021 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 3E9AF18A7028; Wed, 24 Nov 2021 15:37:47 +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 4HzlWZ46Ldz3GDQ; Wed, 24 Nov 2021 15:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 60ABD4A0E; Wed, 24 Nov 2021 15:37:46 +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 1AOFbkTF052359; Wed, 24 Nov 2021 15:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOFbkmw052358; Wed, 24 Nov 2021 15:37:46 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:37:46 GMT Message-Id: <202111241537.1AOFbkmw052358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 3ff041945054 - main - Fix bracketing in the arm64 minidump code 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff041945054e692672f506a2448d1200133032d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768266; 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=+4cpZbPDCYOyCeuqwvdQGtLIv9WWVPIK+0g76Fu/Moc=; b=LKZKZRdcQL08pfxTMlQeixmexWhs8apasmlmf2k4NQbdwX1jBbzP44K5bJcKQjrikDDGJR mACeVRbS2GX/cce7nfcNAxgT1kt6o3PmU0rnTENcmq7YqHu90fWN/8PsENnDWarQt3NJN0 e0fio02+F6XBWYMHJ9PCWqPU8/vFUhxs9RHLiCLnITprKHeyoTW7Yxjt4j6VfT69hBI0+/ 07Lf4LXJBU6E2H8Bv9Dby2gu1xtHVyxWnf11EdVW+6M+dkyjdx4jFb7Ff8CNdhyg+q+d6Q O7CQAa2JQ6Rr1PF6wfAUCPqLOosF0WiG1KzIJP+j2uz8GF9qFsvUoc93nFEAow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768266; a=rsa-sha256; cv=none; b=VhjeWv3toMl1eaygrjTH6wegGnhWi/KD46gapfVOk/q8QUgxq3lCeCFUqAdsa5iCyODDKv eF3+ObpXsFj3jdxk+SOxFY2m7n+C/G9fU0jxVQRqL2BkATpj0n543KuWoFAfJmpW44tx0o ggVS+c3aiJgzXGXT/J2Y7F6E7p28j6O4dQGIihZk/8mAOPv53TyqSQqqQ0II5HeCCigrfh OI5chXLxUUq7SNNCliVM08QM1U8RyTISYK1BN/jQ1HwZOZuIxspwknEVkROFxnwoJo3bJF h7S7lCq5QzvfhY+418PGyQUSP37nEvoScN07k5AmA1sfY8H4yB4teDLrSJvgxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff041945054e692672f506a2448d1200133032d commit 3ff041945054e692672f506a2448d1200133032d Author: Andrew Turner AuthorDate: 2021-11-23 18:28:28 +0000 Commit: Andrew Turner CommitDate: 2021-11-24 15:31:56 +0000 Fix bracketing in the arm64 minidump code When building with gcc10 it suggests the parentheses are wrong. Set them to be the calculated physical address or'd with page table attributes. Reviewed by: mhorne, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33099 --- sys/arm64/arm64/minidump_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 8383d69fc5f8..ac5a7b271b85 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -303,8 +303,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) for (i = 0; i < Ln_ENTRIES; i++) { for (j = 0; j < Ln_ENTRIES; j++) { - tmpbuffer[j] = pa + i * L2_SIZE + - j * PAGE_SIZE | ATTR_DEFAULT | + tmpbuffer[j] = (pa + i * L2_SIZE + + j * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, @@ -323,7 +323,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Generate fake l3 entries based upon the l1 entry */ for (i = 0; i < Ln_ENTRIES; i++) { - tmpbuffer[i] = pa + (i * PAGE_SIZE) | + tmpbuffer[i] = (pa + i * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE);