[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/22] macfb: increase number of registers saved in MacfbState
From: |
Mark Cave-Ayland |
Subject: |
[PULL 15/22] macfb: increase number of registers saved in MacfbState |
Date: |
Wed, 9 Mar 2022 11:08:24 +0000 |
The MacOS toolbox ROM accesses a number of addresses between 0x0 and 0x200
during
initialisation and resolution changes. Whilst the function of many of these
registers is unknown, it is worth the minimal cost of saving these extra values
as
part of migration to help future-proof the migration stream for the q800 machine
as it starts to stabilise.
Note this is a migration break, but since there are upcoming incompatible
changes
for the q800 machine (and migration does not even succeed without these patches)
then this is not an issue.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220305155530.9265-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/display/macfb.c | 8 ++++++++
include/hw/display/macfb.h | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/hw/display/macfb.c b/hw/display/macfb.c
index fb54b460c1..dfdae90144 100644
--- a/hw/display/macfb.c
+++ b/hw/display/macfb.c
@@ -537,6 +537,10 @@ static uint64_t macfb_ctrl_read(void *opaque,
case DAFB_MODE_SENSE:
val = macfb_sense_read(s);
break;
+ default:
+ if (addr < MACFB_CTRL_TOPADDR) {
+ val = s->regs[addr >> 2];
+ }
}
trace_macfb_ctrl_read(addr, val, size);
@@ -592,6 +596,10 @@ static void macfb_ctrl_write(void *opaque,
macfb_invalidate_display(s);
}
break;
+ default:
+ if (addr < MACFB_CTRL_TOPADDR) {
+ s->regs[addr >> 2] = val;
+ }
}
trace_macfb_ctrl_write(addr, val, size);
diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h
index 6d9f0f7869..55a50d3fb0 100644
--- a/include/hw/display/macfb.h
+++ b/include/hw/display/macfb.h
@@ -48,7 +48,8 @@ typedef struct MacFbMode {
uint32_t offset;
} MacFbMode;
-#define MACFB_NUM_REGS 8
+#define MACFB_CTRL_TOPADDR 0x200
+#define MACFB_NUM_REGS (MACFB_CTRL_TOPADDR / sizeof(uint32_t))
typedef struct MacfbState {
MemoryRegion mem_vram;
--
2.20.1
- [PULL 05/22] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass, (continued)
- [PULL 05/22] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass, Mark Cave-Ayland, 2022/03/09
- [PULL 07/22] mos6522: add register names to register read/write trace events, Mark Cave-Ayland, 2022/03/09
- [PULL 06/22] mos6522: use device_class_set_parent_reset() to propagate reset to parent, Mark Cave-Ayland, 2022/03/09
- [PULL 08/22] mos6522: add "info via" HMP command for debugging, Mark Cave-Ayland, 2022/03/09
- [PULL 09/22] mos6522: record last_irq_levels in mos6522_set_irq(), Mark Cave-Ayland, 2022/03/09
- [PULL 11/22] mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs, Mark Cave-Ayland, 2022/03/09
- [PULL 10/22] mac_via: make SCSI_DATA (DRQ) bit live rather than latched, Mark Cave-Ayland, 2022/03/09
- [PULL 12/22] macio/pmu.c: remove redundant code, Mark Cave-Ayland, 2022/03/09
- [PULL 13/22] macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState, Mark Cave-Ayland, 2022/03/09
- [PULL 14/22] macfb: don't use special irq_state and irq_mask variables in MacfbState, Mark Cave-Ayland, 2022/03/09
- [PULL 15/22] macfb: increase number of registers saved in MacfbState,
Mark Cave-Ayland <=
- [PULL 19/22] esp: introduce esp_pdma_cb() function, Mark Cave-Ayland, 2022/03/09
- [PULL 16/22] macfb: add VMStateDescription fields for display type and VBL timer, Mark Cave-Ayland, 2022/03/09
- [PULL 17/22] macfb: set initial value of mode control registers in macfb_common_realize(), Mark Cave-Ayland, 2022/03/09
- [PULL 18/22] esp: introduce esp_set_pdma_cb() function, Mark Cave-Ayland, 2022/03/09
- [PULL 21/22] esp: include the current PDMA callback in the migration stream, Mark Cave-Ayland, 2022/03/09
- [PULL 22/22] esp: recreate ESPState current_req after migration, Mark Cave-Ayland, 2022/03/09
- [PULL 20/22] esp: convert ESPState pdma_cb from a function pointer to an integer, Mark Cave-Ayland, 2022/03/09
- Re: [PULL 00/22] q800-updates-for-7.0 queue 20220309, Laurent Vivier, 2022/03/09
- Re: [PULL 00/22] q800-updates-for-7.0 queue 20220309, Peter Maydell, 2022/03/10