Page MenuHomeFreeBSD

D34546.diff
No OneTemporary

D34546.diff

diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c
--- a/sys/arm64/arm64/gicv3_its.c
+++ b/sys/arm64/arm64/gicv3_its.c
@@ -825,7 +825,7 @@
struct gicv3_its_softc *sc;
int domain, err, i, rid;
uint64_t phys;
- uint32_t iidr;
+ uint32_t ctlr, iidr;
sc = device_get_softc(dev);
@@ -865,6 +865,18 @@
sc->sc_ds = DOMAINSET_RR();
}
+ /*
+ * GIT_CTLR_EN is mandated to reset to 0 on a Warm reset, but we may be
+ * coming in via, for instance, a kexec/kboot style setup where a
+ * previous kernel has configured then relinquished control. Clear it
+ * so that we can reconfigure GITS_BASER*.
+ */
+ ctlr = gic_its_read_4(sc, GITS_CTLR);
+ if ((ctlr & GITS_CTLR_EN) != 0) {
+ ctlr &= ~GITS_CTLR_EN;
+ gic_its_write_4(sc, GITS_CTLR, ctlr);
+ }
+
/* Allocate the private tables */
err = gicv3_its_table_init(dev, sc);
if (err != 0)
@@ -890,8 +902,7 @@
sc->sc_its_cols[cpu] = NULL;
/* Enable the ITS */
- gic_its_write_4(sc, GITS_CTLR,
- gic_its_read_4(sc, GITS_CTLR) | GITS_CTLR_EN);
+ gic_its_write_4(sc, GITS_CTLR, ctlr | GITS_CTLR_EN);
/* Create the LPI configuration table */
gicv3_its_conftable_init(sc);

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 26, 6:09 AM (19 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37271546
Default Alt Text
D34546.diff (1 KB)

Event Timeline