#osdev
hmm, `at s1e1r' indicates that some physical addresses are not being translated correctly. even though it is being translated correctly in QEMU. argh. time for bed.
#osdev
still some weirdness left though: only a few lines in the framebuffer are getting updated after switching to virtual memory.
#osdev
Some more twiddling of bits in system registers later, and it seems everything works, finally! 🎉
(I suspect some system registers were not consistently being set when the machine powers up? e.g. some reserved-as-0 bits being set as 1. In any case, QEMU is much more forgiving of weirdness in the MMU, which is nice for setting expectations, not so nice for debugging wtf is going on when you're still bringing the system up.)
#osdev
Here is it running (badly, with half of the features not working!) on real hardware:
#osdev
disabling the MMU while updating the mapping seems to fix this issue 🎉