From nobody Tue Oct 04 16:14: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 4MhjTG3vZzz4f9fp; Tue, 4 Oct 2022 16:14:42 +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 4MhjTG3FmGz42Pf; Tue, 4 Oct 2022 16:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900082; 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=Cle3vESDVxf0bpnn3ZwmoCV8fVOuqkY8FDhjKGaeCU0=; b=M0qwdPqKuvlhz+yiLX6AutLbZDwRcMTrwXXZq9y6Gak/hH6KLdT4hMFJCKozreF7KfEYDj epLmcuY6Hd7tvP/e5S06WETDJLbm4suOl5wOzhwDtCe84QciOVU2lAH6MDpt1b3xvSW6Yv h6E3e79+yI7W56UcHZLmHGdfaHSxvPyGIW2/QiT0/MNtPCS1gP7PJAFAMaHbrSf5SPv1Cy hGJAJ8tJUe6R8shb6DRH2914wwaI83cnk7gYpFU9XSKwHXgXfz8xPAn5sm5Bmd8gBFwjcn UdzbVyRg603wfRvqaLQl8ZjnAykPpF1VVYhp0pmqf1sEF8eZJDZ+HKDfI5LdAw== 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 4MhjTG2HSSzcTn; Tue, 4 Oct 2022 16:14: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 294GEgvP036184; Tue, 4 Oct 2022 16:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 294GEgbo036183; Tue, 4 Oct 2022 16:14:42 GMT (envelope-from git) Date: Tue, 4 Oct 2022 16:14:42 GMT Message-Id: <202210041614.294GEgbo036183@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: a0a4f5cf1723 - main - Clear the indirect flag in the GICv3 ITS driver 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: a0a4f5cf17236c7245250d1a9ec6fe39286f4a25 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900082; 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=Cle3vESDVxf0bpnn3ZwmoCV8fVOuqkY8FDhjKGaeCU0=; b=BaR6obpp21cxabABJZ1jVVi/zvj/EgUJTGsiH1Ze+WDZDj3GoyIJQZ1l/u+Pt6CK3r735A Lzlfp2L7mnh5YpNxZc+zbI3DSGdPUunwyifAviXZh2IBUhcwxhTbMfyNZT89/vAa4wgjZm 6f23cmbrToU6lc7jQGYwssE7D+cSmdADbwWXczLsiFtAqJFuAcn5Q2yyBCibNrjVAH8RV4 3pRMNlfrx90iVqslFWOsa1rCOg7W78UbV5hSS3ULQoxKw0FUHUbT/g7+0VH8N3NTVxj93x /qvfqsfCmOkApvd0HbuoY6H14Gybl9Rj5hDbchxERF2we27aR+dPkGRfSeMA4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664900082; a=rsa-sha256; cv=none; b=McZjyEJInaxq36bjl6zfAqB3oyhihOP1eTonMold3pot9n8t5cfsvM7kBVUV7vXHMonxpJ 5pF4vkWMDyzA+QgWN7GuZE2xi9Bgo1ziG3hsICulHHPQllkGuU7BkHY9EAj45fJqYnP1QY zkWO41hhNluPYDwvz0pe9lLrAA0jpysz5s/2Cwn/s11MIJg9DhZ2DatFJruAJ/ozhEmGLK Fb98KPqvOZinkTcDqdBSzXs85ygQ1JkUkbV9JHhwGvV1tc8UmLIzzro8rpFENlV2zCCOxH 0fZRbGsZ5SiHR6YserMsUucfXzmLxbAgKCd71uDB3LKtrq6tazIB8wU4G4oK3A== 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=a0a4f5cf17236c7245250d1a9ec6fe39286f4a25 commit a0a4f5cf17236c7245250d1a9ec6fe39286f4a25 Author: Andrew Turner AuthorDate: 2022-10-04 11:46:24 +0000 Commit: Andrew Turner CommitDate: 2022-10-04 16:14:16 +0000 Clear the indirect flag in the GICv3 ITS driver Summary: The indirect flag tells the hardware to use a flat or two level table. As we only support using the flat table ensure the flag that marks which is in use is set correctly. We can't rely on this being set correctly as some firmware may set the indirect flag, e.g. booting from LinuxBoot. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36873 --- sys/arm64/arm64/gic_v3_reg.h | 3 +++ sys/arm64/arm64/gicv3_its.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/gic_v3_reg.h b/sys/arm64/arm64/gic_v3_reg.h index 94033d28cb01..b52fd0389d7f 100644 --- a/sys/arm64/arm64/gic_v3_reg.h +++ b/sys/arm64/arm64/gic_v3_reg.h @@ -351,6 +351,9 @@ #define GITS_BASER_VALID (1UL << 63) +#define GITS_BASER_INDIRECT_SHIFT 62 +#define GITS_BASER_INDIRECT (1UL << GITS_BASER_INDIRECT_SHIFT) + #define GITS_BASER_TYPE_SHIFT 56 #define GITS_BASER_TYPE(x) \ (((x) & GITS_BASER_TYPE_MASK) >> GITS_BASER_TYPE_SHIFT) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 418817c16194..9c8f87e74f31 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -501,7 +501,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) nitspages = howmany(its_tbl_size, page_size); /* Clear the fields we will be setting */ - reg &= ~(GITS_BASER_VALID | + reg &= ~(GITS_BASER_VALID | GITS_BASER_INDIRECT | GITS_BASER_CACHE_MASK | GITS_BASER_TYPE_MASK | GITS_BASER_ESIZE_MASK | GITS_BASER_PA_MASK | GITS_BASER_SHARE_MASK | GITS_BASER_PSZ_MASK |