Le 02/01/2020 à 11:36, Jason A. Donenfeld a écrit : > On Linux, calling `reboot(RB_AUTOBOOT);` will result in > arch/m68k/mac/misc.c's mac_reset function being called. That in turn > looks at the rombase (or uses 0x40800000 is there's no rombase), adds > 0xa, and jumps to that address. At the moment, there's nothing there, so > the kernel just crashes when trying to reboot. So, this commit adds a > very simple implementation at that location, which just writes to via2 > to power down. > > Signed-off-by: Jason A. Donenfeld <ja...@zx2c4.com> > ---
There are two cleaners solution to do that: 1- catch the jump to the ROM address in QEMU and shutdown the machine, see https://github.com/vivier/qemu-m68k/commit/51cd57d1128059819038b9800455fbf794430c15 2- or as you do, write a fake ROM but use the VIA2 port B bit 3 to shutdown the machine see hw/misc/mac_via.c mos6522_q800_via2_portB_write(). Thanks, Laurent