[GSoC 2022] ARM port and device tree support Phase 1 | Haiku Project

Hello everyone.

It’s been a rough month, I’m having issues with the ARM port and it’s holding me back.

This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/zhihong/2022-07-28_gsoc_2022_arm_port_and_device_tree_support_phase_2/

What have you looked into so far regarding the write page fault crash? I can think of at least 2 or 3 ways it could happen:

  1. Write to a NULL pointer would be the obvious one.
  2. Memory protected operating systems sometimes start the user address space at 0 so is it the first address of execution? (It might not apply to Haiku but it’s something to check.) The do-not-execute bit could be set for that page or it could be compiled from a wrong compiler that sets the start address wrong.
  3. Is the code loading in to the wrong address? This could be caused by a failed allocation during the ELF segment loader leading to a write to NULL also.

Now that I think about it, the memory map usually forbids low address writes to prevent writes to NULL up to the maximum struct offset. That said, the allocator, segment loader and mis-compiling would be the things I would check first.

Let us know what has been tried and if none of these are it. I hope this gets you unstuck.