git: 39c064581757 - stable/13 - Clear the indirect flag in the GICv3 ITS driver
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Jan 2023 12:37:27 UTC
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=39c0645817579e56683d00d38d3290a2c0b5f2cf commit 39c0645817579e56683d00d38d3290a2c0b5f2cf Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-10-04 11:46:24 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-01-23 12:36:27 +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 (cherry picked from commit a0a4f5cf17236c7245250d1a9ec6fe39286f4a25) --- 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 82fd57cb42e8..afc334b91e7d 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -498,7 +498,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 |