Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2021 09:22:00 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1896a0094317 - main - Use a 64 bit read to access GICR_TYPER
Message-ID:  <202109150922.18F9M0Gk050301@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=1896a0094317c80d46beff5ad42b68215513c996

commit 1896a0094317c80d46beff5ad42b68215513c996
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-09-15 09:13:41 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-09-15 09:13:41 +0000

    Use a 64 bit read to access GICR_TYPER
    
    The GICv3 ITS only needs to implement 32 bit access to the GICR_TYPER
    when the CPU implements AArch32. As this may not always be the case
    use a 64 bit read when checking if the ITS is enabled on the CPU.
    
    PR:             258217
    Reported by:    Olivier Delande <olivier.delande@provenrun.com>
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/gicv3_its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c
index af587247626b..1a0e7a79e76b 100644
--- a/sys/arm64/arm64/gicv3_its.c
+++ b/sys/arm64/arm64/gicv3_its.c
@@ -710,7 +710,7 @@ its_init_cpu(device_t dev, struct gicv3_its_softc *sc)
 		return (0);
 
 	/* Check if the ITS is enabled on this CPU */
-	if ((gic_r_read_4(gicv3, GICR_TYPER) & GICR_TYPER_PLPIS) == 0)
+	if ((gic_r_read_8(gicv3, GICR_TYPER) & GICR_TYPER_PLPIS) == 0)
 		return (ENXIO);
 
 	rpcpu = gicv3_get_redist(dev);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109150922.18F9M0Gk050301>