From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: linux-riscv <linux-riscv@lists.infradead.org>
Cc: michael.opdenacker@rootcommit.com
Subject: SpacemiT k1: Linux crashes setting up smp with mainline U-Boot
Date: Thu, 11 Dec 2025 20:34:11 +0000 (UTC) [thread overview]
Message-ID: <4d2e1302-723e-4f3f-ad28-586e6b4749ed@rootcommit.com> (raw)
Greetings,
I'm trying to boot mainline Linux with *mainline* U-Boot on SpacemiT K1
(Banana Pi F3) and I'm very close!
Since mainline U-Boot supports Banana Pi F3 without mmc for the moment,
I tweaked u-boot.itb to include the Linux kernel and k1-bananapi-f3.dtb
binaries, so that they are loaded into RAM by U-Boot SPL 2022.10spacemit
(sorry, this part with DRAM training is still vendor specific).
Here's what I get so far:
U-Boot 2026.01-rc4 (Dec 10 2025 - 15:28:43 +0000)
DRAM: 4 GiB
Core: 21 devices, 9 uclasses, devicetree: separate
MMC:
Loading Environment from EXT4... In: serial@d4017000
Out: serial@d4017000
Err: serial@d4017000
Net: No ethernet found.
=> setenv bootargs console=ttyS0,115200 earlycon=sbi
=> booti 0x2000000 - 0x5000000
Moving Image from 0x2000000 to 0x200000, end=0x1a7d000
## Flattened Device Tree blob at 05000000
Booting using the fdt blob at 0x5000000
Working FDT set to 5000000
Loading Device Tree to 000000007df41000, end 000000007df49dff ... OK
Working FDT set to 7df41000
Starting kernel ...
[ 0.000000] Booting Linux on hartid 0
[ 0.000000] Linux version 6.18.0-12930-gd358e5254674 (mike@a8)
(Ubuntu clang version 18.1.3 (1ubuntu1), Ubuntu LLD 18.1.3) #24 SMP Thu
Dec 11 20:26:18 CET 2025
[ 0.000000] Machine model: Banana Pi BPI-F3
[ 0.000000] SBI specification v3.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10007
[ 0.000000] SBI TIME extension detected
[ 0.000000] SBI IPI extension detected
[ 0.000000] SBI RFENCE extension detected
[ 0.000000] SBI DBCN extension detected
[ 0.000000] SBI FWFT extension detected
[ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[ 0.000000] printk: legacy bootconsole [sbi0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: 0x0000000000000000..0x000000000003ffff
(256 KiB) nomap non-reusable mmode_resv0@0
[ 0.000000] OF: reserved mem: 0x0000000000040000..0x000000000007ffff
(256 KiB) nomap non-reusable mmode_resv1@40000
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000017fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000007ffff]
[ 0.000000] node 0: [mem 0x0000000000080000-0x000000007fffffff]
[ 0.000000] node 0: [mem 0x0000000100000000-0x000000017fffffff]
[ 0.000000] Initmem setup node 0 [mem
0x0000000000000000-0x000000017fffffff]
[ 0.000000] SBI HSM extension detected
[ 0.000000] riscv: base ISA extensions acdfimv
[ 0.000000] riscv: ELF capabilities acdfimv
[ 0.000000] Ticket spinlock: enabled
[ 0.000000] percpu: Embedded 31 pages/cpu s86808 r8192 d31976 u126976
[ 0.000000] Kernel command line: console=ttyS0,115200 earlycon=sbi
[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 =
589824 bytes
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10,
4194304 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152
bytes, linear)
[ 0.000000] software IO TLB: area num 8.
[ 0.000000] software IO TLB: mapped [mem
0x0000000079f41000-0x000000007df41000] (64MB)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages:
1048576
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to
nr_cpu_ids=8.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay
is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
[ 0.000000] RCU Tasks Trace: Setting shift to 3 and lim to 1
rcu_task_cb_adjust=1 rcu_task_cpu_ids=8.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] riscv-intc: 64 local interrupts mapped
[ 0.000000] riscv: providing IPIs using SBI IPI extension
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on
contention.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff
max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000001] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps
every 4398046511097ns
[ 0.008110] riscv-timer: Timer interrupt in S-mode is available via
sstc extension
[ 0.016005] Console: colour dummy device 80x25
[ 0.020354] Calibrating delay loop (skipped), value calculated using
timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.030683] pid_max: default: 32768 minimum: 301
[ 0.035614] Mount-cache hash table entries: 8192 (order: 4, 65536
bytes, linear)
[ 0.042860] Mountpoint-cache hash table entries: 8192 (order: 4,
65536 bytes, linear)
[ 0.052920] riscv: ELF compat mode unsupported
[ 0.052947] ASID allocator using 16 bits (65536 entries)
[ 0.060752] rcu: Hierarchical SRCU implementation.
[ 0.065510] rcu: Max phase no-delay instances is 1000.
[ 0.070983] Timer migration: 1 hierarchy levels; 8 children per
group; 1 crossnode level
[ 0.079110] EFI services will not be available.
syys 0.083956] smp: Bringing upsysysys: sys: 0xss
1. sys:t:: r y00 xxs01fxdcfe121.0
210c.
b0
m:3
j...
Here, the machine gets back to U-Boot SPL.
If I add "maxcpus=1", the kernel boots to completion (yoohoo!). This
shows there's an issue with SMP setup.
With the same kernel and DTB, this doesn't happen with the SpacemiT
version of U-Boot.
Any clue what could happen here? As anyone experience anything similar?
Note that I'm using the latest mainline kernel (pre 6.19-rc1) and
mainlne U-Boot.
Note that this works exactly the same on Orange Pi RV2 (yoohoo!), so
once this works, I'll sent a patch to mainline U-Boot to support Orange
Pi RV2 too :D
Thanks in advance for your tips
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2025-12-11 20:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 20:34 Michael Opdenacker [this message]
2025-12-12 1:50 ` SpacemiT k1: Linux crashes setting up smp with mainline U-Boot Junhui Liu
2025-12-12 4:37 ` Michael Opdenacker
2025-12-12 5:40 ` Junhui Liu
2025-12-12 6:43 ` Michael Opdenacker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d2e1302-723e-4f3f-ad28-586e6b4749ed@rootcommit.com \
--to=michael.opdenacker@rootcommit.com \
--cc=linux-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox