[GSoC 2014 : ARM Port] Week #16

Blog post by dnivra on Tue, 2014-08-12 13:28

Over the last week, the patch to prevent the kernel from overwriting the loader was merged into the Haiku source tree. Booting now proceeds until a double spinlock acquire occurs, which causes a KDL. Additionally, the kernel debugger also faults when printing the backtrace because the termination condition to stop retrieving the next stack frame is incorrect. x86 uses debug_memcpy in get_next_frame to determine if the next frame is accessible but using that in ARM causes a faulty memory access in memcpy(I guess the fault handler isn't work properly). Also, using debug_memcpy might not be the right solution since frames from before the kernel _start will be displayed(which aren't valid any longer). For now, I worked around this by checking that the frame pointer of current frame and previous frame do not differ by greater than 0x100000.

I believe that the double spinlock issue has been solved(thanks for the help pdziepak!) and hopefully the patch will be merged soon unless it's felt a better solution is required. Now, the fault is when asserting a particular condition when initializing virtual memory.