HiFive unleashed u-boot from uSD

Mitchell Horne mhorne at freebsd.org
Wed Dec 23 15:27:18 UTC 2020


On Tue, Dec 22, 2020 at 7:28 AM Klaus Küchemann
<maciphone2 at googlemail.com> wrote:
>
> Hi,
> small intermediate result,
> manually loaded with some  u-boot prompt-commands  :
> ——————— HiFive unleashed boot from uSD ------
> found 5 disks
> No EFI system partition
> Booting /loader.efi
>
> Consoles: EFI console
>     Reading loader env vars from /efi/freebsd/loader.env
> Setting currdev to disk0p3:
> FreeBSD/riscv EFI loader, Revision 1.1
> (Thu Dec 17 04:39:10 UTC 2020 root at releng1.nyi.freebsd.org)
>
>    Command line arguments: l
>    Image base: 0xfe5ee000
>    EFI version: 2.80
>    EFI Firmware: Das U-Boot (rev 8224.4096)
>    Console: comconsole (0)
>    Load Path: /loader.efi
>    Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(3,GPT,603c063d-4b9f-4590-a5aa-b1e8515ddf2e,0x2822,0xf2eb5)
> Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(3,GPT,603c063d-4b9f-4590-a5aa-b1e8515ddf2e,0x2822,0xf2eb5)
> Setting currdev to disk0p3:
> Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,GPT,603c063d-4b9f-4590-a5aa-b1e8515ddf2e,0x22,0x800)
> Setting currdev to disk0p1:
> Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(2,GPT,603c063d-4b9f-4590-a5aa-b1e8515ddf2e,0x822,0x2000)
> Setting currdev to disk0p2:
> Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(4,GPT,603c063d-4b9f-4590-a5aa-b1e8515ddf2e,0xf56d8,0x75ff907)
> Setting currdev to disk0p4:
> Loading /boot/defaults/loader.conf
> Loading /boot/defaults/loader.conf
> Loading /boot/device.hints
> Loading /boot/loader.conf
> Loading /boot/loader.conf.local
> -
> Loading kernel...
> /boot/kernel/kernel text=0x539d64 text=0x115fc4 data=0xce7c0 data=0x9ac+0x12142c syms=[0x8+0xb38e0+0x8+0xd5516]
> Loading configured modules...
> /boot/kernel/umodem.ko text=0x1ba0 text=0xda0 data=0x600+0x8 syms=[0x8+0x15d8+0x8+0xaab]
> loading required module 'usb'
> /boot/kernel/usb.ko text=0x6d60 text=0x186a0 data=0x1d88+0xb4 syms=[0x8+0x15810+0x8+0x63f8]
> loading required module 'ucom'
> /boot/kernel/ucom.ko text=0x1d59 text=0x2744 data=0x818+0x850 syms=[0x8+0x2e50+0x8+0xf55]
> can't find '/etc/hostid'
> can't find '/boot/entropy'
>
> Hit [Enter] to boot immediately, or any other key for command prompt.
> Booting [/boot/kernel/kernel]...
> Using DTB provided by EFI at 0x87f00000.
> Kernel entry at 0xf660002e...
> Kernel args: (null)
> ---<<BOOT>>---
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2020 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 13.0-CURRENT #0 19ebb3aa230-c255150(main): Thu Dec 17 05:29:12 UTC 2020
>     root at releng1.nyi.freebsd.org:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC riscv
> FreeBSD clang version 11.0.0 (git at github.com:llvm/llvm-project.git llvmorg-11.0.0-0-g176249bd673)
> WARNING: WITNESS option enabled, expect reduced performance.
> t[0] == 0xffffffc000743d10
> t[1] == 0x0000000000010000
> t[2] == 0x0000000000000000
> t[3] == 0x0000000000010000
> t[4] == 0x0000000000000000
> t[5] == 0x0000000000001000
> t[6] == 0x0000000078000000
> s[0] == 0xffffffc000003b30
> s[1] == 0xffffffd000800000
> s[2] == 0x0000000000000101
> s[3] == 0x0000000000000001
> s[4] == 0x0000000000000002
> s[5] == 0xffffffc00053079c
> s[6] == 0xffffffd1f32242c0
> s[7] == 0xffffffd1f3224580
> s[8] == 0x0000000000000000
> s[9] == 0x0000000000000002
> s[10] == 0x0000000000000e7e
> s[11] == 0xffffffd1f3224580
> a[0] == 0xffffffd000800000
> a[1] == 0x0000000000000000
> a[2] == 0x0000000000000fff
> a[3] == 0xffffffd000800000
> a[4] == 0xffffffd000800001
> a[5] == 0x1ffffffffffffff8
> a[6] == 0x0000000000000001
> a[7] == 0x0000000000000000
> ra == 0xffffffc0005308e8
> sp == 0xffffffc000003b20
> gp == 0x0000000000000000
> tp == 0xffffffd1f32f8300
> sepc == 0xffffffc00051b88e
> sstatus == 0x8000000200006100
> panic: Memory access exception at 0xffffffc00051b88e
>
> cpuid = 0
> time = 1
> KDB: stack backtrace:
> (null)() at 0xffffffc00051f4c6
> (null)() at 0xffffffc0000fc6a6
> (null)() at 0xffffffc0002e74a4
> (null)() at 0xffffffc0002a1988
> (null)() at 0xffffffc0002a1780
> (null)() at 0xffffffc00052f7aa
> (null)() at 0xffffffc00051faf8
> (null)() at 0xffffffc0005308e4
> (null)() at 0xffffffc0004dd33a
> (null)() at 0xffffffc0004dea0e
> (null)() at 0xffffffc0004dacf2
> (null)() at 0xffffffc0004da5fa
> (null)() at 0xffffffc0004d93e6
> (null)() at 0xffffffc0004e6454
> (null)() at 0xffffffc000239d16
> (null)() at 0xffffffc0000001ba
> KDB: enter: panic
> [ thread pid 0 tid 0 ]
> Stopped at      0xffffffc0002e726a
> db>
> ——
>
> Regards
> K.K.

Hi Klaus,

This may be tricky to diagnose. There is some hardware errata related
to the Unleashed, so I would like to rule out whether or not this is
the cause.

I've rebuilt u-boot SPL (loader1), so that it won't suppress the
output of OpenSBI. Can you try flashing this version and capturing all
output before the FreeBSD loader?

https://people.freebsd.org/~mhorne/tmp/u-boot-spl.bin

Also, if you could print the device tree from u-boot, that may be helpful.

Cheers,
Mitchell


More information about the freebsd-riscv mailing list