Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102020434
D44033.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44033.id.diff
View Options
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
@@ -680,6 +680,8 @@
{
/* note: we assume the ITS children are serialized by the parent */
static void *conf_table;
+ device_t gicv3;
+ uint32_t ctlr;
/*
* The PROPBASER is a singleton in our parent. We only set it up the
@@ -691,13 +693,20 @@
return;
}
- /*
- * Just allocate contiguous pages. We'll configure the PROPBASER
- * register later in its_init_cpu_lpi().
- */
- conf_table = contigmalloc(LPI_CONFTAB_SIZE,
- M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR,
- LPI_CONFTAB_ALIGN, 0);
+ gicv3 = device_get_parent(sc->dev);
+ ctlr = gic_r_read_4(gicv3, GICR_CTLR);
+ if ((ctlr & GICR_CTLR_LPI_ENABLE) != 0) {
+ panic("gicv3 already enabled, can't reprogram.");
+ } else {
+
+ /*
+ * Otherwise just allocate contiguous pages. We'll configure the
+ * PROPBASER register later in its_init_cpu_lpi().
+ */
+ conf_table = contigmalloc(LPI_CONFTAB_SIZE,
+ M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR,
+ LPI_CONFTAB_ALIGN, 0);
+ }
sc->sc_conf_base = conf_table;
/* Set the default configuration */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 3:26 PM (19 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14515667
Default Alt Text
D44033.id.diff (1 KB)
Attached To
Mode
D44033: gicv3: Panic if the gicv3 already running
Attached
Detach File
Event Timeline
Log In to Comment