mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/intc/aspeed: Introduce dynamic allocation for regs array
Currently, the size of the "regs" array is 0x2000, which is too large. To save code size and avoid mapping large unused gaps, will update it to only map the useful set of registers. This update will support multiple sub-regions with different sizes. To address the redundant size issue, replace the static "regs" array with a dynamically allocated "regs" memory. Introduce a new "aspeed_intc_unrealize" function to free the allocated "regs" memory. 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-4-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
0cffaace05
commit
563afea0ae
2 changed files with 12 additions and 2 deletions
|
@ -27,7 +27,7 @@ struct AspeedINTCState {
|
|||
MemoryRegion iomem;
|
||||
MemoryRegion iomem_container;
|
||||
|
||||
uint32_t regs[ASPEED_INTC_NR_REGS];
|
||||
uint32_t *regs;
|
||||
OrIRQState orgates[ASPEED_INTC_NR_INTS];
|
||||
qemu_irq output_pins[ASPEED_INTC_NR_INTS];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue