]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/aspeed: Reduce regs array size by adding a register sub-region
authorJamin Lin <jamin_lin@aspeedtech.com>
Fri, 7 Mar 2025 03:59:14 +0000 (11:59 +0800)
committerCédric Le Goater <clg@redhat.com>
Sun, 9 Mar 2025 13:36:53 +0000 (14:36 +0100)
commit7ffee511fcf1487e016ae1d11c5e191557a8b804
tree8d38e148263c263112057393891d8d0234eda88b
parentb008465d655ff3ff314fe1ef81031293b582ebaf
hw/intc/aspeed: Reduce regs array size by adding a register sub-region

Currently, the size of the "regs" array is 0x2000, which is too large. So far,
it only uses "GICINT128 to `GICINT134", and the offsets from 0 to 0x1000 are
unused. To save code size and avoid mapping large unused gaps, update to only
map the useful set of registers:

INTC register [0x1000 – 0x1804]

Update "reg_size" to 0x808. Introduce a new class attribute "reg_offset" to set
the start offset of a "INTC" sub-region. Set the "reg_offset" to 0x1000 for INTC
registers.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250307035945.3698802-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/intc/aspeed_intc.c
include/hw/intc/aspeed_intc.h