#osdev 

after a couple of nights of trying, still can't figure out wtf i'm doing wrong when trying to enable virtual memory. I have read through the whole aarch64 and cortex-a72 docs on this subject, tried all combinations of TLBI + DMB + IC + ISB instructions that i can think of. it just seems like all read operations using virtual memory are returning 0 and all write operations are getting lost.

#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.

Show thread

#osdev 

disabling the MMU while updating the mapping seems to fix this issue 馃帀

Show thread

#osdev 

still some weirdness left though: only a few lines in the framebuffer are getting updated after switching to virtual memory.

Show thread
Follow

#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.)

Web 1 0 0

#osdev 

Here is it running (badly, with half of the features not working!) on real hardware:

Show thread
Sign in to participate in the conversation
Vachtnoes

Mastodon is a server for a federated social network: everyone can run a server if they want to, including me. So this is a Mastodon server for me (Vierkantor) and my friends.