Closed tkchia closed 1 year ago
(QEMU allows the program to continue. But it is possible that QEMU is wrong here. We probably need to check what an actual x86-64 CPU does.)
It turns out that QEMU's emulation (see target/i386/tcg/seg_helper.c
) is apparently correct, and as far as I can tell, matches the behavior seen on a real CPU (!).
In particular, it is OK to load a zero selector value into %ss
in long mode — while in ring 0. In ring 3 though, loading zero into %ss
will raise a CPU exception.
Thank you!
There are some issues in Blinkenlights currently preventing Amey Narkhede's "Game of Life" (https://github.com/glitzflitz/gameoflife) PC booter program from working (
blinkenlights -r gameoflife.bin
). These issues may need quite a fair amount of work to fully resolve.mov $0,%bx; mov %bx,%ss
for some reason. This causes Blinkenlights to crash the program. (QEMU allows the program to continue.But it is possible that QEMU is wrong here. We probably need to check what an actual x86-64 CPU does.)Thank you!