|
@@ -378,8 +378,14 @@ static MemTxResult gicd_readl(GICv3State *s, hwaddr offset,
|
|
* ITLinesNumber == (num external irqs / 32) - 1
|
|
* ITLinesNumber == (num external irqs / 32) - 1
|
|
*/
|
|
*/
|
|
int itlinesnumber = ((s->num_irq - GIC_INTERNAL) / 32) - 1;
|
|
int itlinesnumber = ((s->num_irq - GIC_INTERNAL) / 32) - 1;
|
|
|
|
+ /*
|
|
|
|
+ * SecurityExtn must be RAZ if GICD_CTLR.DS == 1, and
|
|
|
|
+ * "security extensions not supported" always implies DS == 1,
|
|
|
|
+ * so we only need to check the DS bit.
|
|
|
|
+ */
|
|
|
|
+ bool sec_extn = !(s->gicd_ctlr & GICD_CTLR_DS);
|
|
|
|
|
|
- *data = (1 << 25) | (1 << 24) | (s->security_extn << 10) |
|
|
|
|
|
|
+ *data = (1 << 25) | (1 << 24) | (sec_extn << 10) |
|
|
(0xf << 19) | itlinesnumber;
|
|
(0xf << 19) | itlinesnumber;
|
|
return MEMTX_OK;
|
|
return MEMTX_OK;
|
|
}
|
|
}
|