From nobody Tue Jul 23 09:52:09 2024 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 4WSsrB21Sfz5Rdp2; Tue, 23 Jul 2024 09:52:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WSsr96BxQz4v1y; Tue, 23 Jul 2024 09:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721728329; 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=Wjr92QKcP8inrdc12oJQUk7BC8rFR0qdL9mBN7603x0=; b=IMRcVWeQfmvihmJsv63eby5YRIqy5pehLilQYTrhHYScRBd3dpywCy0D7H/s4bgrNCVYM5 X2fDN3LxJi0ZfVDBNurivZ/hvraXYxM3gcAavah2xZWBXyo5FKWWgIkJmtQ8m+MjnpVLfl lxbVdkB2MB6/wXLHoVf9dmPW0grOnA5PpxGTEMT0pZuV5jHP031T+nvSauVSG0EQdLZxUK WSifEtrcMHmSZD9HztxsPvkHtOhwieJxtic4TOqS7gW8IbVXjxZVHlGSjicZg+oQMjCahi V4QJBpQSvq4N3ZWH3gZRlXNd8jfJi1afJhTMT8vCLgxLOqWDCb0Ac724AT/mQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721728329; a=rsa-sha256; cv=none; b=l21s8txc82BK4sgDmxUmb2/SyOxz+1M2wwB4hJEkH+qwdbDn52+T0Mb8d/ypiDGBoJO+cp J5DgrrtMh56p3k0kgO0xoCXYBJ4v509mLe9ZcGTmr0bd0wsodJVSU2nujLjKxTXu4rDnMf KSFiYSS37X87O51ol93c+pGlHly6bE+FGMAZL2LxOVbMGSD58ZHXClCZifMyBYjrLopwlp 6HLW8aM6nFlH+tjpycxzBGtN4nqAXKsX2ieXlc60xcr2+5ydxktyPapVB2nEtKAO3L/hAm bBBj1onDFvgdouge/pxPd+kKf4+IFXP9dQDDGEpnAyH2UA5Dq0QYqQJNm/XjtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721728329; 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=Wjr92QKcP8inrdc12oJQUk7BC8rFR0qdL9mBN7603x0=; b=pqN21m13j/k6jcoEAPaOGxTsBeKSptKlAue1RvzyMsGWl8by03wW6vI6tU2Z3iyzKZkYiA YVy0KPdls70MxzbLADZXRUP/x8XjvAAKKmceYzkdJ1Hqx45V7A5dbNN8H8VzQME/tM43e/ LTi09TVgznfzhzOdLP302LAoZWMV4siMhAS6+Y23OsxqGlXKamWa0AwSPAoHIPyjjl16yZ ZPmnh/Kt/7kXpdqr0LHSbTumG8m1bEf43qUkdMup1dqtZ2oPd5+auap6jpcufHlq6BzT3B VezFm4VN+DzdX7VKf8L5AHQr1YGOvr6+yTeXY4QxiO8ZQ6uMjIwPeke7RwSs3A== 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 4WSsr95qJgzPBx; Tue, 23 Jul 2024 09:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46N9q9UN061080; Tue, 23 Jul 2024 09:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46N9q9Zg061077; Tue, 23 Jul 2024 09:52:09 GMT (envelope-from git) Date: Tue, 23 Jul 2024 09:52:09 GMT Message-Id: <202407230952.46N9q9Zg061077@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: 57ef7935eb11 - main - arm64: Fix the gicv3 check in locore.S 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 57ef7935eb114e98e7e554c5ffbded68fd038c04 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=57ef7935eb114e98e7e554c5ffbded68fd038c04 commit 57ef7935eb114e98e7e554c5ffbded68fd038c04 Author: Andrew Turner AuthorDate: 2024-07-23 09:18:08 +0000 Commit: Andrew Turner CommitDate: 2024-07-23 09:25:05 +0000 arm64: Fix the gicv3 check in locore.S In locore.S we need to configure access to the GICv3. To check if it's available we read the id_aa64pfr0_el1 register, however we then only check if a GICv3.0 or 4.0 is present. If the system has a GICv4.1 this check would fail. Move to checking if the GICV3+ is not absent so this will still work if the field is updated again. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45530 --- sys/arm64/arm64/locore.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 2680669c61f8..3dcb01fd2a6e 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -389,9 +389,8 @@ LENTRY(enter_kernel_el) mrs x2, id_aa64pfr0_el1 /* Extract GIC bits from the register */ ubfx x2, x2, #ID_AA64PFR0_GIC_SHIFT, #ID_AA64PFR0_GIC_BITS - /* GIC[3:0] == 0001 - GIC CPU interface via special regs. supported */ - cmp x2, #(ID_AA64PFR0_GIC_CPUIF_EN >> ID_AA64PFR0_GIC_SHIFT) - b.ne 2f + /* GIC[3:0] != 0000 - GIC CPU interface via special regs. supported */ + cbz x2, 2f mrs x2, icc_sre_el2 orr x2, x2, #ICC_SRE_EL2_EN /* Enable access from insecure EL1 */