From owner-freebsd-arm@freebsd.org Sun Mar 12 23:18:10 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AA78D0AE00 for ; Sun, 12 Mar 2017 23:18:10 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 505BA1004 for ; Sun, 12 Mar 2017 23:18:09 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from [127.0.0.1] (helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cnCMh-0004tv-JV; Sun, 12 Mar 2017 15:53:28 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id v2CMrRkJ018842; Sun, 12 Mar 2017 15:53:27 -0700 (PDT) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Sun, 12 Mar 2017 15:53:26 -0700 From: Oleksandr Tymoshenko To: Outback Dingo Cc: freebsd-arm@freebsd.org Subject: Re: Debugging ESR - Any Ideas? Message-ID: <20170312225326.GA18784@bluezbox.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD/11.0-RELEASE-p2 (amd64) User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: 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: [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 23:18:10 -0000 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