summary refs log tree commit diff stats
path: root/hw/avr/atmega.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-03-25 15:26:28 -0700
committerRichard Henderson <richard.henderson@linaro.org>2025-04-22 14:07:12 -0700
commit9f99072fc08e1044700404ae0a5f13a30a0a2a60 (patch)
treea6531c75a82362059a65da7adf881ce3ba04b250 /hw/avr/atmega.h
parent95d4f72d6a667c71adae8a3c8093efe32043d9b4 (diff)
downloadfocaccia-qemu-9f99072fc08e1044700404ae0a5f13a30a0a2a60.tar.gz
focaccia-qemu-9f99072fc08e1044700404ae0a5f13a30a0a2a60.zip
hw/avr: Prepare for TARGET_PAGE_SIZE > 256
If i/o does not cover the entire first page, allocate a portion
of ram as an i/o device, so that the entire first page is i/o.

While memory_region_init_ram_device_ptr is happy to allocate
the RAMBlock, it does not register the ram for migration.
Do this by hand.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/avr/atmega.h')
-rw-r--r--hw/avr/atmega.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/avr/atmega.h b/hw/avr/atmega.h
index a99ee15c7e..9ac4678231 100644
--- a/hw/avr/atmega.h
+++ b/hw/avr/atmega.h
@@ -41,6 +41,7 @@ struct AtmegaMcuState {
     MemoryRegion flash;
     MemoryRegion eeprom;
     MemoryRegion sram;
+    MemoryRegion sram_io;
     DeviceState *io;
     AVRMaskState pwr[POWER_MAX];
     AVRUsartState usart[USART_MAX];