Date: Thu, 3 Jan 2019 21:07:48 +0800 From: AudioONE <audioone.official@gmail.com> To: freebsd-arm@freebsd.org Subject: Re: i.MX6 DualLite stuck at early boot Message-ID: <CAL5b%2BC2wZUmsnGGD6Ni_uExNaJMrLe=N%2Bz78qzdA6y1hhh-kLQ@mail.gmail.com> In-Reply-To: <CAL5b%2BC1D0-V=kvQH3L7c0HJMJA7QU18bjJyYxpjPBkKG7LS%2BZQ@mail.gmail.com> References: <CAL5b%2BC1D0-V=kvQH3L7c0HJMJA7QU18bjJyYxpjPBkKG7LS%2BZQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
no luck to set sp_enabled = 0, any ideas? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208381 > okay....... after days and days mind storm(mind fuck), finally, I can > enter DDB, here is what I did in [reinit_mmu], maybe can help someone. > > > ============================== > > ASENTRY_NP(reinit_mmu) > push {r4-r11, lr} > mov r4, r0 > mov r5, r1 > mov r6, r2 > > + /* Only for Cortex-A9 Errdata Fix */ > + mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register > + orr r0, r0, #1 << 4 @ set bit #4 > + orr r0, r0, #1 << 6 @ set bit #6 > + orr r0, r0, #1 << 11 @ set bit #11 > + orr r0, r0, #1 << 21 @ set bit #21 > + mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register > + DSB > + ISB > > . > . > . > . > #else > bl dcache_inv_pou_all > #endif > mcr CP15_ICIALLU > + mcr CP15_TLBIALL /* Flush TLB */ > + mcr CP15_BPIALL /* Flush Branch predictor */ > DSB > ISB > > > /* Set auxiliary register */ > mrc CP15_ACTLR(r7) > . > . > . > > END(reinit_mmu) > ============================== > > my new problem is OS panic at same address "FAR=0000ec10"(after reset the > eval-board many times), what does it mean? something wrong with FDT? I use > wandboard-dual dts file(1 GB memory) > > > U-Boot 2016.05 (Dec 31 2018 - 22:57:28 +0800) > > CPU: Freescale i.MX6DL rev1.2 at 792 MHz > Reset cause: POR > Board: MX6DL-Armadillo2 > DRAM: 1 GiB > WARNING: Caches not enabled > MMC: FSL_SDHC: 0 > *** Warning - bad CRC, using default environment > > In: serial > Out: serial > Err: serial > Net: FEC > Error: FEC address not set. > > Hit any key to stop autoboot: 0 > reading tarker > ** Unable to read file tarker ** > reading tmpker > ** Unable to read file tmpker ** > Booting BSD loader > reading ubldr.bin > 185536 bytes read in 40 ms (4.4 MiB/s) > ## Starting application at 0x12000000 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @0x4fd703e0 > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > (root@freebsd-x250, Sat Dec 15 17:17:42 HKT 2018) > > DRAM: 1024MB > Number of U-Boot devices: 2 > U-Boot env: loaderdev not set, will probe all devices. > Found U-Boot device: disk > Probing all disk devices... > Checking unit=0 slice=<auto> partition=<auto>... good. > Booting from disk0s2: > / > /boot/kernel/kernel data=0x580b24+0xb74dc - > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel]... > Kernel entry at 0x0x12200100... > Kernel args: (null) > initarm: console initialized > arg1 kmdp = 0xc2639000 > boothowto = 0x00000000 > dtbp = 0xc254af08 > lastaddr1: 0x1283a000 > loader passed (static) kenv: > loader_envp = 0xc2638000 > c2638000 LINES=24 > c2638009 console=uboot > c2638017 currdev=disk0s2: > c2638028 kerflag= > c2638031 kernelname=/boot/kernel/kernel > c2638050 loaddev=disk0s2: > c2638061 prompt=loader> > c2638070 twiddle_divisor=1 > imx_wdog_init_last_reset > ARM Debug Architecture v7 > 4 watchpoints and 6 breakpoints supported > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2016 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.0-RELEASE-p1 #180 r309528M: Thu Jan 3 10:42:45 HKT 2019 > root@4160059805-freebsd-xeon:/mnt/dev/bsdbuild/arm.armv6/mnt/dev/11/sys/IMX6 > arm > FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM > 3.8.0) > WARNING: WITNESS option enabled, expect reduced performance. > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > subsystem 1000000 > 0xc23e0b88(0)... Fatal kernel mode data abort: 'Translation Fault (L1)' > on read > trapframe: 0xc2713d18 > FSR=00000005, FAR=0000ec10, spsr=600000d3 > r0 =12998000, r1 =c2ffc010, r2 =00000001, r3 =c261c07c > r4 =00000006, r5 =c261c074, r6 =00000000, r7 =2a600000 > r8 =c2ffc059, r9 =00000000, r10=c260ba28, r11=c2713dd8 > r12=c2ffc014, ssp=c2713da8, slr=0000ec10, pc =c23fa450 > > [ thread pid 0 tid 0 ] > Stopped at 0xc23fa450 > db> bt > Tracing pid 0 tid 0 td 0xc2617190 > KDB: reentering > KDB: stack backtrace: > KDB: reentering > KDB: stack backtrace: > blahblahblah..... > blahblahblah..... > blahblahblah..... > blahblahblah..... > KDB: reentering > KDB: stack backtrace: > KDB: reentering > KDB: stack backtrace: > panic: pmap_fault: pm_pt1 abort > cpuid = 0 > Uptime: 1s > > > > > hi guys > > > > > I've got a small brand eval-board which built with MCIMX6U6AVM08AC and > running FreeBSD 11.0.1(I have tried HEAD version, 12.0-BETA3, it didn't > work too), ubldr stage is fine but it stucked at "reinit_mmu" > function(FreeBSD might be have assembly printf for debug environment, > because aseeembly code just like a blackbox when you without JTAG debugger > in hand ) > > > > ====================================== > > Booting from disk0s2: > > / > > /boot/kernel/kernel data=0x57b564+0x58a9c > syms=[0x4+0x6e9d0+0x4+0x77ada] > > Hit [Enter] to boot immediately, or any other key for command prompt. > > Booting [/boot/kernel/kernel]... > > Kernel entry at 0x0x12200100... > > Kernel args: (null) > > EARL_DEBUG: pmap_kern_ttb 0x1290004a, actlr_mask 0xc1, actlr_set 0x41 > > (nothing) > > ====================================== > > > > > > > > when I trace the code to "reinit_mmu" function, commented code like > this, kernel panic and reported "Asynchronous External Abort". Am I the > only one who meet this WEIRD case? I got AM3352/AM3354/Zynq7 platforms, > they works fine with kernel 11.0.1. Is it something different between i.MX6 > Dual(Wandboard) and i.MX6 DualLite? > > > > /* Enable caches. */ > > mrc CP15_SCTLR(r7) > > // it will be stucked if don't commented this code > > /* orr r7, #CPU_CONTROL_DC_ENABLE //DEBUG > > orr r7, #CPU_CONTROL_IC_ENABLE //DEBUG > > orr r7, #CPU_CONTROL_BPRD_ENABLE //DEBUG */ > > mcr CP15_SCTLR(r7) > > DSB > > > > mcr CP15_TTBR0(r4) /* Set new TTB */ > > DSB > > ISB > > > > // it will be stucked if don't commented this code > > /* mcr CP15_TLBIALL /// Flush TLB //DEBUG */ > > mcr CP15_BPIALL /* Flush Branch predictor */ > > DSB > > ISB > > > > > > > > > > U-Boot 2016.05 (Dec 16 2018 - 13:09:25 +0800) > > > > CPU: Freescale i.MX6DL rev1.2 at 792 MHz > > Reset cause: POR > > Board: MX6DL-Armadillo2 > > DRAM: 1 GiB > > WARNING: Caches not enabled > > MMC: FSL_SDHC: 0 > > *** Warning - bad CRC, using default environment > > > > In: serial > > Out: serial > > Err: serial > > Net: FEC > > Error: FEC address not set. > > > > Hit any key to stop autoboot: 0 > > reading ubldr.bin > > 185536 bytes read in 40 ms (4.4 MiB/s) > > ## Starting application at 0x12000000 ... > > Consoles: U-Boot console > > Compatible U-Boot API signature found @0x4fd703e0 > > > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > > (root@freebsd-x250, Sat Dec 15 17:17:42 HKT 2018) > > > > DRAM: 1024MB > > Number of U-Boot devices: 2 > > U-Boot env: loaderdev not set, will probe all devices. > > Found U-Boot device: disk > > Probing all disk devices... > > Checking unit=0 slice=<auto> partition=<auto>... good. > > Booting from disk0s2: > > / > > /boot/kernel/kernel data=0x57b564+0x58a9c > syms=[0x4+0x6e9d0+0x4+0x77ada] > > Hit [Enter] to boot immediately, or any other key for command prompt. > > Booting [/boot/kernel/kernel]... > > Kernel entry at 0x0x12200100... > > Kernel args: (null) > > EARL_DEBUG: pmap_kern_ttb 0x1290004a, actlr_mask 0xc1, actlr_set 0x41 > > EARL_DEBUG: cpu_setup pass > > EARL_DEBUG: init_param1 pass > > initarm: console initialized > > arg1 kmdp = 0xc26bc000 > > boothowto = 0x00000000 > > dtbp = 0xc2547eb8 > > lastaddr1: 0x128bd000 > > loader passed (static) kenv: > > loader_envp = 0xc26bb000 > > c26bb000 LINES=24 > > c26bb009 console=uboot > > c26bb017 currdev=disk0s2: > > c26bb028 kerflag= > > c26bb031 kernelname=/boot/kernel/kernel > > c26bb050 loaddev=disk0s2: > > c26bb061 prompt=loader> > > c26bb070 twiddle_divisor=1 > > EARL_DEBUG: platform_late_init pass > > Fatal kernel mode data abort: 'Asynchronous External Abort' on write > > trapframe: 0xc257c688 > > FSR=00001c06, FAR=Invalid, spsr=600000d3 > > r0 =00000100, r1 =600001d3, r2 =600000d3, r3 =30c52079 > > r4 =00000000, r5 =c257c7e4, r6 =c25b3280, r7 =c25b3280 > > r8 =c2578058, r9 =00000000, r10=c25ce154, r11=c257c7d8 > > r12=c2577c24, ssp=c257c718, slr=c244b3c0, pc =c244b3d4 > > > > panic: Fatal abort > > cpuid = 0 > > Uptime: 1s >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAL5b%2BC2wZUmsnGGD6Ni_uExNaJMrLe=N%2Bz78qzdA6y1hhh-kLQ>