summary refs log tree commit diff stats
path: root/hw/intc/intc.c
diff options
context:
space:
mode:
authorLuke Starrett <lukes@xsightlabs.com>2022-12-14 14:27:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-15 11:18:19 +0000
commit58dff8f7ea7aadbfacf4416c4988ad7f0f88a4c8 (patch)
tree5a40c91d6aa8fceed9c6f22fc351834f57225081 /hw/intc/intc.c
parent94bc3b067ea2a57771a4621394c1ca362b605d81 (diff)
downloadfocaccia-qemu-58dff8f7ea7aadbfacf4416c4988ad7f0f88a4c8.tar.gz
focaccia-qemu-58dff8f7ea7aadbfacf4416c4988ad7f0f88a4c8.zip
hw/intc/arm_gicv3: Fix GICD_TYPER ITLinesNumber advertisement
The ARM GICv3 TRM describes that the ITLinesNumber field of GICD_TYPER
register:

"indicates the maximum SPI INTID that the GIC implementation supports"

As SPI #0 is absolute IRQ #32, the max SPI INTID should have accounted
for the internal 16x SGI's and 16x PPI's.  However, the original GICv3
model subtracted off the SGI/PPI.  Cosmetically this can be seen at OS
boot (Linux) showing 32 shy of what should be there, i.e.:

    [    0.000000] GICv3: 224 SPIs implemented

Though in hw/arm/virt.c, the machine is configured for 256 SPI's.  ARM
virt machine likely doesn't have a problem with this because the upper
32 IRQ's don't actually have anything meaningful wired. But, this does
become a functional issue on a custom use case which wants to make use
of these IRQ's.  Additionally, boot code (i.e. TF-A) will only init up
to the number (blocks of 32) that it believes to actually be there.

Signed-off-by: Luke Starrett <lukes@xsightlabs.com>
Message-id: AM9P193MB168473D99B761E204E032095D40D9@AM9P193MB1684.EURP193.PROD.OUTLOOK.COM
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/intc.c')
0 files changed, 0 insertions, 0 deletions