Booting Issue using hifive unmatched baord

Hi,

   I am working on hifive unmatched image. I am facing a problem with the EEPROM magic byte issue and have an issue with my kernel is not loading kernel panic is showing. Can anybody know this problem please guide me. I will correct it on my end.

kernel version - 5.10.41
U-boot version - 2021.07

U-Boot SPL 2021.07 (Dec 06 2021 - 06:55:29 +0000)
Trying to boot from MMC1

U-Boot 2021.07 (Dec 06 2021 - 06:55:29 +0000)

CPU: rv64imafdc
Model: SiFive HiFive Unmatched A00
DRAM: 16 GiB
MMC: spi@10050000:mmc@0: 0
Loading Environment from nowhere… OK
EEPROM: Not a SiFive HiFive EEPROM data format - magic bytes don’t match
EEPROM dump: (0x25 bytes)
00: F1 5E 90 45 01 02 00 03 42 00 53 46 31 30 35 53
10: 5A 32 31 32 32 30 30 37 38 34 01 70 B3 D5 92 F9
20: EB 1D AA D1 8E
Invalid ID (f1 5e 90 45)
EEPROM dump: (0x25 bytes)
00: F1 5E 90 45 01 02 00 03 42 00 53 46 31 30 35 53
10: 5A 32 31 32 32 30 30 37 38 34 01 70 B3 D5 92 F9
20: EB 1D AA D1 8E
In: serial@10010000
Out: serial@10010000
Err: serial@10010000
Model: SiFive HiFive Unmatched A00
Net:
Error: ethernet@10090000 address not set.
No ethernet found.

Hit any key to stop autoboot: 0
PCIE-0: Link up (Gen1-x8, Bus0)

Device 0: unknown device
starting USB…
Bus xhci_pci: Register 4000840 NbrPorts 4
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:3…
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
199 bytes read in 12 ms (15.6 KiB/s)
1: demo image on unmatched
Retrieving file: /Image.gz
9388830 bytes read in 8199 ms (1.1 MiB/s)
append: root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon
Retrieving file: /hifive-unmatched-a00.dtb
9833 bytes read in 16 ms (599.6 KiB/s)
Uncompressing Kernel Image
Moving Image from 0x84000000 to 0x80200000, end=81ab1000

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Device Tree to 00000000ffffa000, end 00000000fffff668 … OK

Starting kernel …

[ 0.000000] Linux version 5.10.41 (oe-user@oe-host) (riscv64-oe-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP Mon Dec 6 061
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] earlycon: sifive0 at MMIO 0x0000000010010000 (options ‘’)
[ 0.000000] printk: bootconsole [sifive0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000027fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x000000027fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff]
[ 0.000000] OF: fdt: Error -11 processing FDT
[ 0.000000] software IO TLB: mapped [mem 0x00000000fbffa000-0x00000000ffffa000] (64MB)
[ 0.000000] SBI specification v0.2 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x9
[ 0.000000] SBI v0.2 TIME extension detected
[ 0.000000] SBI v0.2 IPI extension detected
[ 0.000000] SBI v0.2 RFENCE extension detected
[ 0.000000] SBI v0.2 HSM extension detected
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] kernel BUG at arch/riscv/kernel/smpboot.c:94!
[ 0.000000] Kernel BUG [#1]
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.41 #1
[ 0.000000] epc: ffffffe0000052c6 ra : ffffffe00000525e sp : ffffffe001603f40
[ 0.000000] gp : ffffffe0018089b8 tp : ffffffe001613c40 t0 : ffffffe001629bc0
[ 0.000000] t1 : 0000000000000000 t2 : 0000000000000001 s0 : ffffffe001603f80
[ 0.000000] s1 : 0000000000000000 a0 : 0000000000000000 a1 : 0000000200000100
[ 0.000000] a2 : 0000000000000010 a3 : 0000000000000000 a4 : 0000000000000000
[ 0.000000] a5 : 0000000000000001 a6 : 0000000000000030 a7 : ffffffffffffffff
[ 0.000000] s2 : 0000000000000001 s3 : 0000000000000000 s4 : ffffffe001616780
[ 0.000000] s5 : 0000000000000007 s6 : 0000000000000000 s7 : 0000000000000000
[ 0.000000] s8 : 00000000fff6709a s9 : 0000000000000002 s10: 0000000000000000
[ 0.000000] s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000280000000
[ 0.000000] t5 : 0000000000000000 t6 : ffffffe001603c58
[ 0.000000] status: 0000000200000100 badaddr: 0000000000000007 cause: 0000000000000003
[ 0.000000] random: get_random_bytes called from oops_exit+0x30/0x58 with crng_init=0
[ 0.000000] —[ end trace 0000000000000000 ]—
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] —[ end Kernel panic - not syncing: Attempted to kill the idle task! ]—

Is this the same issue in another thread?

Hi Tommy Murphy,

                                                      Yes, We both are working on the same thread. We have loaded the image succussfully. But the same image if we try in another board its booting succssfully. On the particular board kernel panic, we are facing. Is this a hardware-related issue or a software-related issue? Actually, we want to run some applications by using the unmatched board. 

If it’s a software issue which sources do we need to update or modify? Can you give us a solution ASAP?

U-boot version - 2021.07
kernel version - 5.10.11
opensbi version - 0.9

Thanks & Regards,
Sateesh

Could you try running the latest FUSDK 2021.11 release ( Release 2021.11.00 · sifive/meta-sifive · GitHub ) or/and Ubuntu 21.10 ( https://cdimage.ubuntu.com/releases/21.10/release/ubuntu-21.10-preinstalled-server-riscv64+unmatched.img.xz ) ?

The above image seems to be built by OE, but it’s not FUSDK. You are using kernel v5.10.41, but the 1st custom kernel for Unmatched was based on v5.11.X IIRC. I don’t know what patches were backported (or not) on top of your kernel. Vanilla 5.10.41 kernel should not work on HiFive Unmatched.

It’s really strange that your EEPROM SiFive magic (4 bytes) is different. Thus I would suggest to double check this known to work Linux distributions. Note that failing to read EEPROM shouldn’t fail booting into Linux. IIRC the only downside is that networking would not be working on Linux side.

Hi Davidlt,

             I have tested  this prebuilt image https://cdimage.ubuntu.com/releases/21.10/release/ubuntu-21.10-preinstalled-server-riscv64+unmatched.img.xz). its booting fine. But i am facing same issue

EEPROM: Not a SiFive HiFive EEPROM data format - magic bytes don’t match
EEPROM dump: (0x25 bytes)
00: F1 5E 90 45 01 02 00 03 42 00 53 46 31 30 35 53
10: 5A 32 31 32 32 30 30 37 38 34 01 70 B3 D5 92 F9
20: EB 1D AA D1 8E
Invalid ID (f1 5e 90 45)
EEPROM dump: (0x25 bytes)
00: F1 5E 90 45 01 02 00 03 42 00 53 46 31 30 35 53
10: 5A 32 31 32 32 30 30 37 38 34 01 70 B3 D5 92 F9
20: EB 1D AA D1 8E
In: serial@10010000
Out: serial@10010000
Err: serial@10010000
Model: SiFive HiFive Unmatched A00
Net:
Error: ethernet@10090000 address not set.

How can I fix this issue? and have tried custom image but its stuck in kernel level facing kernel panic problem.

Thanks & Regards,
Sateesh

I have no information about the customer image. That’s not something I built, thus I don’t know what features and support it has. I can only tell that vanilla v5.10.X kernels are too old for HiFive Unmatched.

Your EEPROM on the board has corrupted information, which never happened before. Again, that will not block you from booting into Linux.

@Jim are there any instructions how to flash EEPROM?