Created attachment 153912 [details] locore-v6.diff If define SOCDEV_PA/SOCDEV_VA and VA is located at last 63pages, build_pagetables break after L1 table. As a result kernel symbol is broken, and the kernel will crash. L1 table is overflow by r3 is passed as fixed 64 pages. /usr/src/sys/arm/arm/locore-v6.S 128 /* Map 64MiB, preserved over calls to build_pagetables */ 129 mov r3, #64 137 #if defined(SOCDEV_PA) && defined(SOCDEV_VA) 138 /* Create the custom map used for early_printf(). */ 139 ldr r1, =SOCDEV_PA 140 ldr r2, =SOCDEV_VA 141 bl build_pagetables 142 #endif 342 build_pagetables: 356 mov r4, r3 357 1: 358 str r1, [r0, r2] 359 add r2, r2, #4 360 add r1, r1, #(PTE1_SIZE) 361 adds r4, r4, #-1 362 bhi 1b Attached patch stop at end of L1 table.
A commit references this bug: Author: mmel Date: Tue Nov 10 11:45:42 UTC 2015 New revision: 290647 URL: https://svnweb.freebsd.org/changeset/base/290647 Log: ARM: Improve robustness of locore_v6.S and fix errors. - boot page table is not allocated in data section, so must be cleared before use - map only one section (1 MB) for SOCDEV mapping (*) - DSB must be used for ensuring of finishing TLB operations - Invalidate BTB when appropriate PR: 198360 Reported by: Daisuke Aoyama <aoyama at peach.ne.jp> (*) Approved by: kib (mentor) Changes: head/sys/arm/arm/locore-v6.S
closing with mmel@'s blessings.