Hello Sergey, I think I have made some progress and I have reached a point where I have safely enabled the MMU but I am not sure.
I am booting GNU Mach with this command qemu-system-aarch64 -machine virt -cpu cortex-a53 -m 1G -nographic -kernel ./gnumach -s -S and it reaches a point where it tries to reach a variable named percpu_array that is not mapped correctly, maybe gdb -batch -ex "file ./gnumach.elf" -ex "target remote localhost:1234" -ex "set architecture aarch64" -ex "break *0x200" -ex "continue" -ex "x/10i 0x40000000" -ex "print &percpu_array" -ex "x/gx 0xbb0c0" 0x0000000040000000 in ?? () The target architecture is set to "aarch64". Breakpoint 1 at 0x200 Breakpoint 1, 0x0000000000000200 in ?? () 0x40000000: ldr x0, 0x40000018 0x40000004: mov x1, xzr 0x40000008: mov x2, xzr 0x4000000c: mov x3, xzr 0x40000010: ldr x4, 0x40000020 0x40000014: br x4 0x40000018: stxrh w0, w0, [x0] 0x4000001c: udf #0 0x40000020: .inst 0x40200000 ; undefined 0x40000024: udf #0 $1 = (struct percpu (*)[1]) 0xbb0c0 <percpu_array> 0xbb0c0 <percpu_array>: Cannot access memory at address 0xbb0c0 [Inferior 1 (process 1) detached] Trying to get an answer from this dilemma, I have produced this commit https://github.com/aculnaig/gnumach/commit/e02cce5c5a02a1aa63799421b7e2a2619c760238 but I am not entirely sure I have followed the right approach. Can you take a look whenever you have time ? Sincerely, Gianluca
