git: a0a4f5cf1723 - main - Clear the indirect flag in the GICv3 ITS driver
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Oct 2022 16:14:42 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a0a4f5cf17236c7245250d1a9ec6fe39286f4a25 commit a0a4f5cf17236c7245250d1a9ec6fe39286f4a25 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-10-04 11:46:24 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> 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 |