连接傲腾内存后bootloader无限重启

板子是rock pi 4b v1.4
tf卡安装了官方debian系统
已经在tf卡上更新了最新的bootloader,内核,dtbo,fstab等软件包
板载spi flash是空的

现在的问题是只要在关机状态插上傲腾内存,插上电源,蓝灯就会以大约每两秒一个周期闪烁,系统无法启动。

如果在bootloader完成之后,准备启动内核的时候插上傲腾内存,可以正常进入tf卡里的系统,傲腾内存也可以正常识别。

不管傲腾内存完全是空的还是写入了系统,这个bug都会存在。

将bootloader写入spi flash中,问题依然存在。

armbian系统不存在这个问题,完全正常,但是它们的bootloader不支持nvme启动。

下面是串口输出的日志
`DDR Version 1.20 20190314
In
soft reset
SRX
channel 0
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x3
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0x98
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0x98
MR4=0x81
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
CS = 1
MR0=0x18
MR4=0x1
MR5=0xFF
MR8=0x8
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
Channel 0: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x2020
ch 1 ddrconfig = 0x101, ddrsize = 0x2020
pmugrf_os_reg[2] = 0x3AA1FAA1, stride = 0xD
OUT
Boot1: 2018-06-26, version: 1.14
CPUId = 0x0
ChipType = 0x10, 279
Spi_ChipId = b4016
SpiBootInit:0
mmc0:cmd5,32
SdmmcInit=0 0
BootCapSize=0
UserCapSize=7620MB
FwPartOffset=2000 , 0
StorageInit ok = 21755
SecureMode = 0
SecureInit ret = 0, SecureMode = 0
GPT signature is wrong
LoadTrust Addr:0x1800
LoadTrust Addr:0x1c00
LoadTrust Addr:0x2000
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 1000
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

tag:LOADER error,addr:0x3000
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

Load uboot, ReadLba = 1400
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

tag:LOADER error,addr:0x3400
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

Load uboot, ReadLba = 1800
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

tag:LOADER error,addr:0x3800
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

Load uboot, ReadLba = 1c00
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

tag:LOADER error,addr:0x3c00
hdr 00000000031912c0 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xef390
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):1b26c3f
NOTICE: BL31: Built : 20:53:30, Dec 26 2018
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1181): pd status 3e
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9

U-Boot 2017.09-02680-g674eaa57f0 (Sep 23 2019 - 04:05:05 +0000), Build: jenkins-linux-build-testing-2-43

Model: Rockchip RK3399 rockpi4b Board
PreSerial: 2
DRAM: 3.9 GiB
Relocation Offset is: f5bdf000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd-center init 950000 uV
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
Using default environment

Model: Rockchip RK3399 rockpi4b Board
dcache off
“Synchronous Abort” handler, esr 0x96000210

  • Relocate offset = 00000000f5bdf000

  • ELR(PC) = 0000000000256124

  • LR = 0000000000256114

  • SP = 00000000e9dc92d0

  • ESR_EL2 = 0000000096000210
    EC[31:26] == 100101, Exception from a Data abort, from current exception level
    IL[25] == 1, 32-bit instruction trapped

  • DAIF = 00000000000003c0
    D[9] == 1, DBG masked
    A[8] == 1, ABORT masked
    I[7] == 1, IRQ masked
    F[6] == 1, FIQ masked

  • SPSR_EL2 = 0000000060000349
    D[9] == 1, DBG masked
    A[8] == 1, ABORT masked
    I[7] == 0, IRQ not masked
    F[6] == 1, FIQ masked
    M[4] == 0, Exception taken from AArch64
    M[3:0] == 1001, EL2h

  • SCTLR_EL2 = 0000000030c51830
    I[12] == 1, Icaches enabled
    C[2] == 0, Dcache disabled
    M[0] == 0, MMU disabled

  • HCR_EL2 = 000000000800003a

  • VBAR_EL2 = 00000000f5ddf800

  • TTBR0_EL2 = 00000000f7ff0000

x0 : 00000000e9e03c60 x1 : 0000000000100008
x2 : 00000000f8000000 x3 : 0000000000c000e8
x4 : 00000000fd000000 x5 : 00000000fd000000
x6 : 0000000000000001 x7 : 0000000000000001
x8 : 00000000fa000000 x9 : 0000000000000008
x10: 0000000000000007 x11: 00000000e9dc9c40
x12: 0000000000000cb2 x13: 0000000000000ca0
x14: 00000000e9dc941c x15: 00000000e9dc9c40
x16: 00000000e21620cc x17: 0000000000d3c854
x18: 00000000e9dd6d80 x19: 00000000e9e03c60
x20: 00000000000007b6 x21: 00000000e9dee9f0
x22: 00000000000007d0 x23: 0000000000000002
x24: 0000000000000002 x25: 00000000e9e01b50
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000e9e01bb0 x29: 00000000e9dc94b0

SP:
e9dc92d0: 00000000 00000000 00000000 00000000
e9dc92e0: 00000000 00000000 f5e9b48b 00000000
e9dc92f0: 00000000 00000000 00000000 00000000
e9dc9300: f5e9b4d2 00000000 f5e9b4f8 00000000
e9dc9310: f5e9b545 00000000 f5e9b592 00000000
e9dc9320: f5e9b5d2 00000000 f5e9b612 00000000
e9dc9330: f5e9b64f 00000000 00000000 00000000
e9dc9340: 00000000 00000000 f5e9b68c 00000000
e9dc9350: e9dc94b0 00000000 f5ddfa0c 00000000
e9dc9360: e9e03c60 00000000 004bd004 00014400
e9dc9370: f7ff0000 00000000 0800003a 00000000
e9dc9380: 30c51830 00000000 e9dc92d0 00000000
e9dc9390: 60000349 00000000 f5ddf800 00000000
e9dc93a0: 000003c0 00000000 96000210 00000000
e9dc93b0: f5e35124 00000000 e9e03c60 00000000
e9dc93c0: 00100008 00000000 f8000000 00000000

Call trace:
PC: [< 00256124 >]
LR: [< 00256114 >]

Stack:
[< 00256124 >]
[< 002309e8 >]
[< 00231aac >]
[< 00231da0 >]
[< 00254ec4 >]
[< 0020c904 >]
[< 00229980 >]
[< 00214f1c >]
[< 002150c0 >]
[< 002147cc >]
[< 00228f68 >]
[< 00229980 >]
[< 00214f1c >]
[< 002150c0 >]
[< 002147cc >]
[< 00228ed0 >]
[< 00202bd4 >]
[< 00227b88 >]
[< 00203740 >]
[< 00203984 >]
[< 00202f78 >]
[< 00277c14 >]
[< 00215eec >]
[< 00201b8c >]

NOTE: Please use ./scripts/stacktrace.sh to parse trace info
Resetting CPU …`
(ps:傲腾内存当然不能在rock pi4上作为内存使用,不过它的本质仍然是一个nvme固态硬盘,理论上和其它硬盘一样都能作为系统盘使用。)

确认是不支持的,详见

SPI + NVMe booting(beta)

等 ayufan 大神有时间,来解决这个问题吧。

感谢你的关注。现在我把傲腾内存换成了一个搭载SM2263XT主控的国产杂牌SSD,官方bootloader+Armbian系统运行非常完美

1 Like