Booting Beagleboard Black
Tom Everett
tom at khubla.com
Tue Jul 23 04:25:49 UTC 2013
ok after:
* adding the auditdistd user
* applying Tim's patch to the source tree
* a full crochet rebuild
I have now booted FreeBSD on the Beaglebone. Thanks everyone for your help.
The final .img file and the full console log are here:
http://files.khubla.com/freebsd-beaglebone/
There was some unfortunate looking logging in the kernel startup, which is
here, and appears to have something to do with pmap.
http://files.khubla.com/freebsd-beaglebone/bootlog.txt
For brevity, here it is:
lock order reversal:
1st 0xc25605ac pmap (pmap) @ /src/FreeBSD/sys/arm/arm/pmap-v6.c:2990
2nd 0xc07ba1e8 pmap pv global (pmap pv global) @
/src/FreeBSD/sys/arm/arm/pmap-v6.c:695
KDB: stack backtrace:
db_trace_self() at db_trace_self
pc = 0xc052442c lr = 0xc022daf8 (db_trace_self_wrapper+0x30)
sp = 0xdc135b08 fp = 0xdc135c20
r10 = 0xc25605ac
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
pc = 0xc022daf8 lr = 0xc03892e8 (kdb_backtrace+0x38)
sp = 0xdc135c28 fp = 0xdc135c30
r4 = 0xc0658d74 r5 = 0xc05a73f1
r6 = 0xc0585a65 r7 = 0xc05a73f1
kdb_backtrace() at kdb_backtrace+0x38
pc = 0xc03892e8 lr = 0xc03a31f4 (witness_checkorder+0xddc)
sp = 0xdc135c38 fp = 0xdc135c88
r4 = 0xc0585c4f
witness_checkorder() at witness_checkorder+0xddc
pc = 0xc03a31f4 lr = 0xc0351b28 (_rw_wlock_cookie+0x7c)
sp = 0xdc135c90 fp = 0xdc135cb8
r4 = 0x000002b7 r5 = 0xc05a73ee
r6 = 0xc07ba1f8 r7 = 0xc07ba1f8
r8 = 0xc07ba1e8 r9 = 0xc25600cc
r10 = 0xc25600d8
_rw_wlock_cookie() at _rw_wlock_cookie+0x7c
pc = 0xc0351b28 lr = 0xc052e500 (pmap_alloc_l2_bucket+0xd0)
sp = 0xdc135cc0 fp = 0xdc135ce8
r4 = 0xc05a73ee r5 = 0x00000000
r6 = 0xc0994d04 r7 = 0xc07ba1f8
r8 = 0x00008000
pmap_alloc_l2_bucket() at pmap_alloc_l2_bucket+0xd0
pc = 0xc052e500 lr = 0xc052e2a0 (pmap_copy+0x150)
sp = 0xdc135cf0 fp = 0xdc135d28
r4 = 0xc25600bc r5 = 0x000d6000
r6 = 0xc05a73ee r7 = 0x00008000
r8 = 0x000ce000 r9 = 0xc098e020
r10 = 0x000ce000
pmap_copy() at pmap_copy+0x150
pc = 0xc052e2a0 lr = 0xc0506738 (vmspace_fork+0x788)
sp = 0xdc135d30 fp = 0xdc135d68
r4 = 0xc25604f0 r5 = 0x00000000
r6 = 0x00008000 r7 = 0xc09a8690
r8 = 0xc2560000 r9 = 0xc09a85a0
r10 = 0x000ce000
vmspace_fork() at vmspace_fork+0x788
pc = 0xc0506738 lr = 0xc0323668 (fork1+0x1a4)
sp = 0xdc135d70 fp = 0xdc135de0
r4 = 0xc2648c80 r5 = 0x00000000
r6 = 0xc2791640 r7 = 0x0000000c
r8 = 0xc255b640 r9 = 0xc255e640
r10 = 0xdc135df4
fork1() at fork1+0x1a4
pc = 0xc0323668 lr = 0xc03234a4 (sys_fork+0x24)
sp = 0xdc135de8 fp = 0xdc135e00
r4 = 0xc255e640 r5 = 0x00000000
r6 = 0xdc135ea8 r7 = 0x00000000
r8 = 0xdc135e58 r9 = 0xc255b640
r10 = 0x00000012
sys_fork() at sys_fork+0x24
pc = 0xc03234a4 lr = 0xc0533e94 (swi_handler+0x284)
sp = 0xdc135e08 fp = 0xdc135ea0
r4 = 0xc255e640 r5 = 0x00000000
swi_handler() at swi_handler+0x284
pc = 0xc0533e94 lr = 0xc0525a8c (swi_entry+0x30)
sp = 0xdc135ea8 fp = 0xbfffe940
r4 = 0x000dfbfc r5 = 0x000c6631
r6 = 0xdc135ea8 r7 = 0x00000002
r8 = 0x000dfbe0 r9 = 0x000c6769
swi_entry() at swi_entry+0x30
pc = 0xc0525a8c lr = 0xc0525a8c (swi_entry+0x30)
sp = 0xdc135ea8 fp = 0xbfffe940
Unable to unwind further
ti_mmchs0: Error: current cmd NULL, already done?
ugen1.2: <vendor 0x0bda> at usbus1
lock order reversal:
1st 0xc25600bc pmap (pmap) @ /src/FreeBSD/sys/arm/arm/pmap-v6.c:2990
2nd 0xc09c80fc vm map (system) (vm map (system)) @
/src/FreeBSD/sys/vm/vm_kern.c:428
KDB: stack backtrace:
db_trace_self() at db_trace_self
pc = 0xc052442c lr = 0xc022daf8 (db_trace_self_wrapper+0x30)
sp = 0xde998960 fp = 0xde998a78
r10 = 0xc25600bc
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
pc = 0xc022daf8 lr = 0xc03892e8 (kdb_backtrace+0x38)
sp = 0xde998a80 fp = 0xde998a88
r4 = 0xc0658d74 r5 = 0xc05a2632
r6 = 0xc0585a65 r7 = 0xc05a73f1
kdb_backtrace() at kdb_backtrace+0x38
pc = 0xc03892e8 lr = 0xc03a31f4 (witness_checkorder+0xddc)
sp = 0xde998a90 fp = 0xde998ae0
r4 = 0xc0585c0b
witness_checkorder() at witness_checkorder+0xddc
pc = 0xc03a31f4 lr = 0xc0340c70 (__mtx_lock_flags+0xa4)
sp = 0xde998ae8 fp = 0xde998b18
r4 = 0x000001ac r5 = 0xc05a262f
r6 = 0x00000101 r7 = 0xc09c810c
r8 = 0x00000000 r9 = 0xc09c80fc
r10 = 0xc09cbc00
__mtx_lock_flags() at __mtx_lock_flags+0xa4
pc = 0xc0340c70 lr = 0xc05016d4 (_vm_map_lock+0x30)
sp = 0xde998b20 fp = 0xde998b28
r4 = 0xc09c8098 r5 = 0x00001000
r6 = 0x00000101 r7 = 0xc07b7b40
r8 = 0xde998bab r9 = 0x00000101
_vm_map_lock() at _vm_map_lock+0x30
pc = 0xc05016d4 lr = 0xc05004c0 (kmem_malloc+0x30)
sp = 0xde998b30 fp = 0xde998b70
r4 = 0xc09c8098
kmem_malloc() at kmem_malloc+0x30
pc = 0xc05004c0 lr = 0xc04fab04 (startup_alloc+0xdc)
sp = 0xde998b78 fp = 0xde998b98
r4 = 0x00001000 r5 = 0xc07b7910
r6 = 0x00000000 r7 = 0xc07b7b40
r8 = 0xde998bab r9 = 0x00000101
r10 = 0xc09cbc00
startup_alloc() at startup_alloc+0xdc
pc = 0xc04fab04 lr = 0xc04f905c (keg_alloc_slab+0xb4)
sp = 0xde998ba0 fp = 0xde998bc8
r4 = 0xc09cbc00 r5 = 0x00000001
r6 = 0x00000000 r7 = 0xc09cbc10
r8 = 0xc04faa28 r9 = 0x00000101
r10 = 0x00000000
keg_alloc_slab() at keg_alloc_slab+0xb4
pc = 0xc04f905c lr = 0xc04f9d68 (keg_fetch_slab+0x148)
sp = 0xde998bd0 fp = 0xde998c08
r4 = 0xc09cbc00 r5 = 0xc09c72e8
r6 = 0x00000001 r7 = 0xc09c7240
r8 = 0x00000000 r9 = 0xc09c72d8
r10 = 0x00000000
keg_fetch_slab() at keg_fetch_slab+0x148
pc = 0xc04f9d68 lr = 0xc04fa15c (zone_fetch_slab+0x64)
sp = 0xde998c10 fp = 0xde998c28
r4 = 0x00000001 r5 = 0xc09c7240
r6 = 0xc09cbc00 r7 = 0xc09cbc00
r8 = 0x00000001 r9 = 0xc098efa8
r10 = 0x00000002
zone_fetch_slab() at zone_fetch_slab+0x64
pc = 0xc04fa15c lr = 0xc04fa1e8 (zone_import+0x4c)
sp = 0xde998c30 fp = 0xde998c70
r4 = 0xc098efac r5 = 0xc05a18d2
r6 = 0x00000001 r7 = 0xc09cbc00
r8 = 0x00000000
zone_import() at zone_import+0x4c
pc = 0xc04fa1e8 lr = 0xc04f7d74 (uma_zalloc_arg+0x2a0)
sp = 0xde998c78 fp = 0xde998cb8
r4 = 0x00000001 r5 = 0xc05a18d2
r6 = 0xc09a5e0c r7 = 0xc04fa19c
r8 = 0xc09c7240 r9 = 0xc09c72f8
r10 = 0xc09a5e00
uma_zalloc_arg() at uma_zalloc_arg+0x2a0
pc = 0xc04f7d74 lr = 0xc052e5e4 (pmap_alloc_l2_bucket+0x1b4)
sp = 0xde998cc0 fp = 0xde998ce8
r4 = 0xc05a73ee r5 = 0xc09949f8
r6 = 0xc09949f4 r7 = 0xc07ba1f8
r8 = 0xc05a73ee r9 = 0xc255faac
r10 = 0xc255fb38
pmap_alloc_l2_bucket() at pmap_alloc_l2_bucket+0x1b4
pc = 0xc052e5e4 lr = 0xc052e2a0 (pmap_copy+0x150)
sp = 0xde998cf0 fp = 0xde998d28
r4 = 0xc255fa9c r5 = 0x20049000
r6 = 0xc05a73ee r7 = 0x2002e000
r8 = 0x0001b000 r9 = 0xc09914b8
r10 = 0x0001b000
pmap_copy() at pmap_copy+0x150
pc = 0xc052e2a0 lr = 0xc0506738 (vmspace_fork+0x788)
sp = 0xde998d30 fp = 0xde998d68
r4 = 0xc2560000 r5 = 0x00000000
r6 = 0x2002e000 r7 = 0xc09a84b0
r8 = 0xc255f9e0 r9 = 0xc09a9f00
r10 = 0x0001b000
vmspace_fork() at vmspace_fork+0x788
pc = 0xc0506738 lr = 0xc0323668 (fork1+0x1a4)
sp = 0xde998d70 fp = 0xde998de0
r4 = 0xc27e3c80 r5 = 0x00000000
r6 = 0xc2791320 r7 = 0x0000000c
r8 = 0xc2791640 r9 = 0xc2648c80
r10 = 0xde998df4
fork1() at fork1+0x1a4
pc = 0xc0323668 lr = 0xc03234a4 (sys_fork+0x24)
sp = 0xde998de8 fp = 0xde998e00
r4 = 0xc2648c80 r5 = 0x00000000
r6 = 0xde998ea8 r7 = 0x00000000
r8 = 0xde998e58 r9 = 0xc2791640
r10 = 0x00000000
sys_fork() at sys_fork+0x24
pc = 0xc03234a4 lr = 0xc0533e94 (swi_handler+0x284)
sp = 0xde998e08 fp = 0xde998ea0
r4 = 0xc2648c80 r5 = 0x00000000
swi_handler() at swi_handler+0x284
pc = 0xc0533e94 lr = 0xc0525a8c (swi_entry+0x30)
sp = 0xde998ea8 fp = 0xbfffec18
r4 = 0x00030998 r5 = 0x2080d020
r6 = 0xde998ea8 r7 = 0x00000002
r8 = 0x00000003 r9 = 0x2080d020
swi_entry() at swi_entry+0x30
pc = 0xc0525a8c lr = 0xc0525a8c (swi_entry+0x30)
sp = 0xde998ea8 fp = 0xbfffec18
Unable to unwind further
On Mon, Jul 22, 2013 at 11:30 AM, hiren panchasara <
hiren.panchasara at gmail.com> wrote:
> On Mon, Jul 22, 2013 at 3:42 AM, Michael Tuexen <tuexen at freebsd.org>
> wrote:
> > On Jul 22, 2013, at 12:11 PM, XiaoQI Ge <ghw at 7axu.com> wrote:
> >
> >> I have used this method successfully loaded the kernel
> >>
> >> Hold the "User Boot" button down, and then plug in the power (USB or
> >> 5V adaptor). Keep holding down the button until you see the bank of 4
> >> LED's light up for a few seconds. You can now release the button.
> >>
> >>
> >> But soon the panic
> > To fix this panic use the following patch
> >
> > Index: sys/vm/vm_map.c
> > ===================================================================
> > --- sys/vm/vm_map.c (revision 253514)
> > +++ sys/vm/vm_map.c (working copy)
> > @@ -239,8 +239,7 @@
> > vm_map_t map;
> >
> > map = (vm_map_t)mem;
> > - map->nentries = 0;
> > - map->size = 0;
> > + memset(map, 0, sizeof(*map));
> > mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF |
> MTX_DUPOK);
> > sx_init(&map->lock, "vm map (user)");
> > return (0);
> >
> > which was posted by Tim yesterday. It fixes the issue for me.
> > (Or disable invariants).
> >
> > Tim: Your patch looks good. Why don't you commit it?
>
> Yes, please :-)
>
> Thanks for finding/fixing that. Appreciate it.
>
> Cheers,
> Hiren
> >
> >
> > Best regards
> > Michael
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>
--
A better world shall emerge based on faith and understanding - Douglas
MacArthur
More information about the freebsd-arm
mailing list