On December 5, 2009 at 11:31 PM Stefan Reinauer <stepan(a)coresystems.de> wrote:
What does Qemu do when 0xcf9 is sent to bios
The I/O 0xcf9 is the "reset register" on most x86 systems. Writing
certain values to it will cause a hard or soft reset.
Qemu however does not emulate this behavior - as far as I can tell - it
certainly does not while SerialICE is active, because all IO accesses go
to the target (or are caught by LUA)
Basically what's missing in the LUA script to make resets via cf9 work
properly is adding the following to SerialICE_IO_write_filter:
if port == 0xcf9 and data == 0x06 then
return false, data
The serial communication code has been rewritten for the last release to
be quite hick-up safe.. This means Qemu does not get out of sync if the
target reboots, so all that needs to happen after a reboot of the target
is to reboot the VM on the host, too, to let it start at the reset
vector again... Otherwise it'll just try to execute code right after the
out to cf9.. which is usually an endless loop as a safe guard.
Yeh I know what 0xcf9 is, I just was not sure what Qemu did with it.
Sweet! Great work Stefan! I will have to get my head out of my ass and try it