Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2017 15:53:26 -0700
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        Outback Dingo <outbackdingo@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Debugging ESR - Any Ideas?
Message-ID:  <20170312225326.GA18784@bluezbox.com>
In-Reply-To: <CAKYr3zynVfS2gM2TNqTJ5M=O-P=ggzQAHEvaBTH%2Bgmk%2BHBgi1A@mail.gmail.com>
References:  <CAKYr3zynVfS2gM2TNqTJ5M=O-P=ggzQAHEvaBTH%2Bgmk%2BHBgi1A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Outback Dingo (outbackdingo@gmail.com) wrote:
> Okay list, any further ideas to debug this?
> 
> U-Boot 2016.09.01-00012-g1c00e8f-dirty (Mar 01 2017 - 13:40:10 -0500)
> 
> SoC:  LS1043AE (0x87920010)
> Clock Configuration:
>       CPU0(A53):1400 MHz  CPU1(A53):1400 MHz  CPU2(A53):1400 MHz
>       CPU3(A53):1400 MHz
>       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     466.667 MHz
> Reset Configuration Word (RCW):
>       00000000: 0810000e 0c000000 00000000 00000000
>       00000010: 45550002 00004002 e0025000 61002000
>       00000020: 00000000 00000000 00000000 00020f78
> 
> >> FreeBSD EFI boot block
>   Loader path: /boot/loader.efi
> 
>   Initializing modules: ZFS UFS
>   Probing 4 block devices.....*. done
>    ZFS found no pools
>    UFS found 1 partition
> Consoles: EFI console
> MMC: block number 0x72c001 exceeds max(0x72c000)
> efipart_readwrite: rw=1, status=9223372036854775815
> MMC: block number 0x72c001 exceeds max(0x72c000)
> efipart_readwrite: rw=1, status=9223372036854775815
> Command line arguments: loader.efi
> Image base: 0xfcc58000
> EFI version: 2.05
> EFI Firmware: Das U-boot (rev 0.00)
> 
> FreeBSD/arm64 EFI loader, Revision 1.1
> (Tue Feb 28 09:17:19 EST 2017 root@FISORLBSD01)
> EFI boot environment
> Loading /boot/defaults/loader.conf
> /boot/kernel/kernel data=0x826f08+0x43b040 syms=[0x8+0x105a20+0x8+0xbed65]
> /
> Hit [Enter] to boot immediately, or any other key for command prompt.
> Booting [/boot/kernel/kernel]...
> Using DTB provided by EFI at 0x88000000.
> "Synchronous Abort" handler, esr 0x86000004
> ELR:     ffff000000001030
> LR:      f4c01028
> 00000000f4c05000: f4c04003
> 00000000f4c05fd0: f4c08003
> 00000000f4c05fd8: f4c09003
> 00000000f4c05fe0: f4c0a003
> 00000000f4c05fe8: f4c0b003
> x0 : ffff000000e2a000 x1 : 0000000004c5d91d
> x2 : 000000000405d11d x3 : 00000000030802e2
> x4 : 00000000fffbc240 x5 : 00000000f4c01024
> x6 : 00000000f4c07000 x7 : 0000000000000001
> x8 : 00000000f4c06000 x9 : 00000000000f4c07
> x10: 0000000000000000 x11: 0000000000000001
> x12: 0000000000000003 x13: 00000000f4c06003
> x14: 0000000000000398 x15: ffff000000001030
> x16: 0000000000000000 x17: 0000000000000000
> x18: 0000000000000000 x19: 00000000f4c00000
> x20: 00000000f4c01000 x21: 0000000000000000
> x22: 000000000000000d x23: 000000000000000e
> x24: 00000000f4c05000 x25: 00000000fcc3e29b
> x26: 00000000f4c04000 x27: 00000000f4c07000
> x28: 00000000f4c00000 x29: 00010000f4c00000
> 
> Resetting CPU ...
> 
> resetting ...

Some additional info/analysis: 

ELR value is virtdone. So what happens must be as follows: loader.efi
works fine, it enumerates devices, loads kernel and passes control to
the kernel. No problem there.  Kernel also runs fine until it enables
MMU and switches to virtual addresses. Once it jumps to VA, exception is
raised. Which means MMU was not initialized properly.

U-Boot has D-cache ON, I tried  disabling dcache using "dcache off"
but after this loader.efi fails with following message:
   Probing 4 block devices...."Synchronous Abort" handler, esr
0x96000021
ELR:     fedc062c
LR:      fedc35d8
00000000fccd9000: deadbeefdeadbeef
...
00000000fccd9ff8: deadbeefdeadbeef
etc..

Kernel is loaded at physical address 0xf4c00000 so alignment is correct.
U-Boot version is 2016.11 with vendor patches. 

-- 
gonzo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170312225326.GA18784>