explain choice of 0xf4 for I/O port (#446)

based on issue 443 comment 400625857
This commit is contained in:
skierpage
2018-06-28 00:05:10 -07:00
committed by Philipp Oppermann
parent 0af14e1d51
commit 795b84a447

View File

@@ -187,8 +187,9 @@ Luckily, there is an escape hatch: QEMU supports a special `isa-debug-exit` devi
-device isa-debug-exit,iobase=0xf4,iosize=0x04
```
The `iobase` specifies on which port address the device should live and the `iosize` specifies the port size (`0x04` means four bytes). Now the guest can write a value to the `0xf4` port and QEMU will exit with [exit status] `(passed_value << 1) | 1`.
The `iobase` specifies on which port address the device should live (`0xf4` is a [generally unused][list of x86 I/O ports] port on the x86's IO bus) and the `iosize` specifies the port size (`0x04` means four bytes). Now the guest can write a value to the `0xf4` port and QEMU will exit with [exit status] `(passed_value << 1) | 1`.
[list of x86 I/O ports]: https://wiki.osdev.org/I/O_Ports#The_list
[exit status]: https://en.wikipedia.org/wiki/Exit_status
To write to the I/O port, we use the [`x86_64`] crate: