mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
M68k pull request 20220109
Add virt compat machine type for 7.0 fix q800 -bios parameter fix VRAM refresh fix M68K_FEATURE_UNALIGNED_DATA feature -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmHayd8SHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L748rHQP/R8XM6EYG02+6AWuxrQzMtorSyCRkeWP 2BcvXOM9FEweMA7ZGJ0e1Y5/IDpEAs0L8fJBKUpbFvf8eYg7BwNS+8OGPWbYFwxg JuNUfTwr+66h2Q1sHTENSf87WdaczDqUS16xUPPtKFKsoctnS1Jx9r1MK0PEaYUl 63b6cYma9dzKL1vSdNDCHBvv5CmFDSqX4uKJFdmPmQTRSVOCFIMf3TnAIX2jJTQ+ +YLiKZG2ulma+xAjjy0qSiN+eeT7wcdc66iRadPcH2NMaQhpA+EJAlOr4qQpDi47 YK8R1AKIoAuHyoykgnjuAJB+19qAQZtYzRXh4R6WivAtUAUhZKNlghIFuUHo8f5z uHbDifRpthbzipDCoCQYaIcKj6Sv0L8gSvWNND4gluY6wR7awudF++3zRl3kXhQ8 yzhdOaO032xcMvtbLpxWHafp6ZawAdylmnA2hJS2F/Pn0ceBxmDd8TETLIVdr38D 2CnHc43zZQI4KWNfHTgnNjJ4K1o2YUWQk2wSxYRgU3fQtCgjuMlwq04wsxw+n3Dd TYLgUcjpZ2MRf1BmwWXbwI8q8BYeB0LCWCoevobYgjnq5QNY7NHEWGIRWoP6LSqU 0eA1tF37a48rHQmTFzJIpPIxidIXZZMV8gFEr4yVnMKCTePEa79pTmzTcdN6haJ4 h6XHvttK3hDW =cIYi -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-7.0-pull-request' into staging M68k pull request 20220109 Add virt compat machine type for 7.0 fix q800 -bios parameter fix VRAM refresh fix M68K_FEATURE_UNALIGNED_DATA feature # gpg: Signature made Sun 09 Jan 2022 11:41:19 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier/tags/m68k-for-7.0-pull-request: target/m68k: don't word align SP in stack frame if M68K_FEATURE_UNALIGNED_DATA feature enabled macfb: fix VRAM dirty memory region logging q800: fix segfault with invalid MacROM hw: m68k: Add virt compat machine type for 7.0 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
de3f5223fa
@ -661,9 +661,9 @@ static bool macfb_common_realize(DeviceState *dev, MacfbState *s, Error **errp)
|
|||||||
|
|
||||||
memory_region_init_ram(&s->mem_vram, OBJECT(dev), "macfb-vram",
|
memory_region_init_ram(&s->mem_vram, OBJECT(dev), "macfb-vram",
|
||||||
MACFB_VRAM_SIZE, &error_abort);
|
MACFB_VRAM_SIZE, &error_abort);
|
||||||
|
memory_region_set_log(&s->mem_vram, true, DIRTY_MEMORY_VGA);
|
||||||
s->vram = memory_region_get_ram_ptr(&s->mem_vram);
|
s->vram = memory_region_get_ram_ptr(&s->mem_vram);
|
||||||
s->vram_bit_mask = MACFB_VRAM_SIZE - 1;
|
s->vram_bit_mask = MACFB_VRAM_SIZE - 1;
|
||||||
memory_region_set_coalescing(&s->mem_vram);
|
|
||||||
|
|
||||||
s->vbl_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, macfb_vbl_timer, s);
|
s->vbl_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, macfb_vbl_timer, s);
|
||||||
macfb_update_mode(s);
|
macfb_update_mode(s);
|
||||||
|
@ -672,12 +672,13 @@ static void q800_init(MachineState *machine)
|
|||||||
|
|
||||||
/* Remove qtest_enabled() check once firmware files are in the tree */
|
/* Remove qtest_enabled() check once firmware files are in the tree */
|
||||||
if (!qtest_enabled()) {
|
if (!qtest_enabled()) {
|
||||||
if (bios_size < 0 || bios_size > MACROM_SIZE) {
|
if (bios_size <= 0 || bios_size > MACROM_SIZE) {
|
||||||
error_report("could not load MacROM '%s'", bios_name);
|
error_report("could not load MacROM '%s'", bios_name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = rom_ptr(MACROM_ADDR, MACROM_SIZE);
|
ptr = rom_ptr(MACROM_ADDR, bios_size);
|
||||||
|
assert(ptr != NULL);
|
||||||
stl_phys(cs->as, 0, ldl_p(ptr)); /* reset initial SP */
|
stl_phys(cs->as, 0, ldl_p(ptr)); /* reset initial SP */
|
||||||
stl_phys(cs->as, 4,
|
stl_phys(cs->as, 4,
|
||||||
MACROM_ADDR + ldl_p(ptr + 4)); /* reset initial PC */
|
MACROM_ADDR + ldl_p(ptr + 4)); /* reset initial PC */
|
||||||
|
@ -304,10 +304,17 @@ type_init(virt_machine_register_types)
|
|||||||
} \
|
} \
|
||||||
type_init(machvirt_machine_##major##_##minor##_init);
|
type_init(machvirt_machine_##major##_##minor##_init);
|
||||||
|
|
||||||
static void virt_machine_6_2_options(MachineClass *mc)
|
static void virt_machine_7_0_options(MachineClass *mc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
DEFINE_VIRT_MACHINE(6, 2, true)
|
DEFINE_VIRT_MACHINE(7, 0, true)
|
||||||
|
|
||||||
|
static void virt_machine_6_2_options(MachineClass *mc)
|
||||||
|
{
|
||||||
|
virt_machine_7_0_options(mc);
|
||||||
|
compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
|
||||||
|
}
|
||||||
|
DEFINE_VIRT_MACHINE(6, 2, false)
|
||||||
|
|
||||||
static void virt_machine_6_1_options(MachineClass *mc)
|
static void virt_machine_6_1_options(MachineClass *mc)
|
||||||
{
|
{
|
||||||
|
@ -415,7 +415,10 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
|
|||||||
oldsr = sr;
|
oldsr = sr;
|
||||||
env->aregs[7] = sp;
|
env->aregs[7] = sp;
|
||||||
cpu_m68k_set_sr(env, sr &= ~SR_M);
|
cpu_m68k_set_sr(env, sr &= ~SR_M);
|
||||||
sp = env->aregs[7] & ~1;
|
sp = env->aregs[7];
|
||||||
|
if (!m68k_feature(env, M68K_FEATURE_UNALIGNED_DATA)) {
|
||||||
|
sp &= ~1;
|
||||||
|
}
|
||||||
do_stack_frame(env, &sp, 1, oldsr, 0, retaddr);
|
do_stack_frame(env, &sp, 1, oldsr, 0, retaddr);
|
||||||
} else {
|
} else {
|
||||||
do_stack_frame(env, &sp, 0, oldsr, 0, retaddr);
|
do_stack_frame(env, &sp, 0, oldsr, 0, retaddr);
|
||||||
|
Loading…
Reference in New Issue
Block a user