日安
我们有一款基于 LS1046 的定制板(设计与 ls1046ardb 非常相似),带有 DDR4(8GBytes,非 ECC)模块 8ATF1G64AZ-3G2R1。
板和 DDR4 模块成功通过了 CodeWarrior QCVS 工具的校准程序。
RCW 和 ATF 是从恩智浦的 git 中克隆出来的,并经过移植以适应我们的板。
我们假设从 QSPI 启动并使用 BL1-> BL2-> BL31-> BL33 (Uboot) 方案,没有 OPTEE 也没有安全启动。(SN_EN=0 in RCW)
我们在启动 atf 时遇到了问题:
VERBOSE: NUM of cluster = 0x1, Cores per cluster = 0x4
INFO:已配置 SMMU 缓存解锁。
信息:应用了勘误 A008850 早期阶段的 SoC 变通办法信息:应用了勘误 A010539 的 SoC 变通方案
信息:RCW 启动 SRC 是 QSPI
信息:应用了 DDR 的 SoC 变通方案勘误 A008511
信息:应用了 DDR 的 SoC 变通方法勘误 A009942
信息:应用了 DDR 的 SoC 变通方案勘误 A010165
详细:配置为 mult=1 的通用延迟计时器而且 div=25 VERBOSE:平台时钟 400000000 VERBOSE:DDR PLL1 1600000000 VERBOSE:DDR PLL2 400000000
VERBOSE:DDR PLL2 400000000
A009803
信息:时基 13 ms VERBOSE:解析 DIMM SPD (s)
VERBOSE:控制器 0 VERBOSE:DIMM 0 VERBOSE:addr 0x51
VERBOSE:在写入芯片之前 54
VERBOSE:在写入芯片之前 81 VERBOSE:在写入芯片之前 55
VERBOSE:写入之前 addr VERBOSE:写入之前 addr
VERBOSE:在写入芯片之前 81 VERBOSE:在写入芯片之前 55
VERBOSE:在写入之前 addr
VERBOSE:在写入芯片之前芯片 81 VERBOSE:在写入之前 addr
VERBOSE:校验和 0x847953d8 VERBOSE:n_ranks 1
VERBOSE:rank_density 0x2000000000
VERBOSE:容量 0x2000000000 VERBOSE:死亡
密度 0x5
VERBOSE:primary_sdram_width 64 VERBOSE:ec_sdram_width 0 VERBOSE:package_3ds 0
VERBOSE:rdimm 0 VERBOSE:mirrored_dimm 0 VERBOSE:mirrored_dimm 0
VERBOSE:rc0x0 VERBOSE:n_row_addr 16
VERBOSE:n_col_addr 10 BOSE:bank_addr_bits 0 VERBOSE:bank_group_bits 2
VERBOSE:edc_config 0 VERBOSE:burst_lengths_bitmask 0xc
VERBOSE:tckmin_x_ps 625 VERBOSE:tckmax_ps 1600
VERBOSE:caslat_x 0x17ffc00 VERBOSE:taa_ps 13cd750
VERBOSE _ps 13750 VERBOSE:trp_ps 13750
VERBOSE:tras_ps 32000 VERBOSE:trc_ps 45750
VERBOSE:trfc1_ps 350000 VERBOSE:trfc2_ps 26
0000
VERBOSE:trfc4_ps 160000 VERBOSE:tfaw_ps 21000 VERBOSE:trdl_ps 2500
VERBOSE:trcdl_ps 5000 VERBOSE:trfc_slr_ps 0
VERBOSE:twr_ps 15000 VERBOSE:refresh_rate_ps 7800000
VERBOSE:dq_mapping 0x16 VERBOSE:dq_mapping 0x16 VERBOSE:dq_mapping 0x36 VERBOSE:dq_mapping 0x16
VERBOSE:dq_mapping 0x16 VERBOSE:dq_mapping 0x16
VERBOSE:dq_mapping 0x16 VERBOSE: dq_mapping 0x36 VERBOSE:dq_mapping 0x0 VERBOSE:dq_mapping 0x0
VERBOSE:dq_mapping 0x36 VERBOSE:dq_mapping 0x16 详细:dq_mapping 0x36 详细:dq_mapping 0x36
详细内容:dq_mapping 0x36
详细内容:dq_mapping 0x36 详细内容:dq_mapping 0x36 详细内容:dq_mapping 0x36 详细内容:dq_mapping 0x36
详细内容:dq_mapping 0x36 详细内容:dq_mapping 0xx16
VERBOSE:dq_mapping 0x36 VERBOSE:dq_mapping_ors 1
VERBOSE:使用控制器 0 完成 VERBOSE:cal cs VERBOSE:cs_in_use = 1
VERBOSE:cs_on_dimm [0] = 1
注意:UDIMM 8ATF1G64AZ-3G2R1
信息:解析 SPD 570 毫秒之后的时间
VERBOSE:综合配置详细:cs 0
VERBOSE:odt_rd_cfg 0x0 VERBOSE:odt_wr_cfg 0x4
VERBOSE:odt_rt_norm 0x3 VERBOSE:odt_rt_wr 0x0 VERBOSE:auto_precharge 0 VERBOSE:cfg 0 VERBOSE:cfg 0x0 VERBOSE:cfg 0x0 VERBOSE:odt_rt_cfg 0x0
VERBOSE:odt_rgg 0x0
VERBOSE tt_norm 0
x0
VERBOSE:odt_rt_wr 0x0 VERBOSE:auto_precharge 0 VERBOSE:cs 2 VERBOSE:odt_rd_cfg 0x0
VERBOSE:odt_cfg 0x0 VERBOSE:odt_rt_norm 0x0
VERBOSE:odt_rt_wr 0x0 VERBOSE:aut
o_precharge 0 VERBOSE:cs 3 VERBOSE:odt_rd_cfg 0x0 VERBOSE:odt_wr_cfg 0x0
VERBOSE:odt_rtt_norm 0x0 VERBOSE:odt_rt_wr 0x0
VERBOSE:auto_precharge 0 VERBOSE:auto_precharge 0 VERBOSE:auto_precharge 0 VERBOSE:ctlr_init_ecc 0
VERBOSE:ap_en 0 BOSE:ctlr_intlv 0 VERBOSE:ctlr_intlv_mode 0 VERBOSE:ba_intlv 0x
0
VERBOSE:data_bus_used 0 VERBOSE:otf_burst_chop_en 1
VERBOSE:burst_length 0x6 VERBOSE:dbw_cap_shift 0 VERBOSE:分配绑定地址 VERBOSE:ctlr_intlv 0
VERBOSE:ctlr_intlv 0 VERBOSE:等级密度 0x20000000 详细:CS 0
VERBOSE:base_addr 0x0 VERBOSE SE:尺寸
0x20000000 VERBOSE:base 0x0
VERBOSE:按分配计算的内存总数为 0x2000000000
详细:计算控制器寄存器详细:跳过此速度的 CL 掩码 0x400 VERBOSE:跳过 caslat 0x400
VERBOSE:cs_use = 0x1
VERBOSE:cs0 VERBOSE:_config = 0x80040422
VERBOSE:cs [0] .bnds
= 0x1ff
VERBOSE: sdram_cfg[0] = 0xc5000008
VERBOSE: sdram_cfg[1] = 0x401140
VERBOSE: sdram_cfg[2] = 0x0
VERBOSE: timing_cfg[0] = 0x91550018
VERBOSE:
VERBOSE: timing_cfg[2] = 0x490111
VERBOSE: timing_cfg[3] = 0x1111000
VERBOSE: timing_cfg[4] = 0x220002
VERBOSE: timing_cfg[5] = 0x3401400
VERBOSE:VERBOSE: timing_cfg[6] = 0x0
VERBOSE: timing_cfg[7] = 0x23300000
VERBOSE: timing_cfg[8] = 0x2334800
VERBOSE: timing_cfg[9] = 0x0
VERBOSE: dq_map[0] = 0x5b65b658
VERBOSE:dq_map[1] = 0xd96d96d8
VERBOSE: dq_map[2] = 0x5b65b658
VERBOSE: dq_map[3] = 0xd8000001
VERBOSE: sdram_mode[0] = 0x3030211
VERBOSE:sdram_mode[1] = 0x0
VERBOSE: sdram_mode[9] = 0x4000000
VERBOSE: sdram_mode[8] = 0x500
VERBOSE: sdram_mode[2] = 0x30211
VERBOSE: sdram_mode[3] = 0x0
VERBOSE:
VERBOSE: sdram_mode[11] = 0x4000000
VERBOSE: sdram_mode[4] = 0x30211
VERBOSE: sdram_mode[5] = 0x0
VERBOSE: sdram_mode[12] = 0x400
VERBOSE:SDRAM_MODE[13] = 0x4000000
VERBOSE: SDRAM_MODE[6] = 0x30211
VERBOSE: SDRAM_MODE[7] = 0x0
VERBOSE: SDRAM_MODE[14] = 0x400
VERBOSE: SDRAM_MODE[15] = 0x4000000
VERBOSE:eor = 0x40000000
VERBOSE: interval = 0x18600000
VERBOSE: zq_cntl = 0x8a090705
VERBOSE: ddr_sr_cntr = 0x0
VERBOSE: clk_cntl = 0x4000000
VERBOSE: cdr[0] = 0x4000000 0x80000000
VERBOSE: cdr[1] = 0x80
VERBOSE: wrlvl_cntl[0] = 0x8675f61f
VERBOSE: wrlvl_cntl[1] = 0x3e3e3e3e
VERBOSE: wrlvl_cntl[2] = 0x3e3e3e26
VERBOSE: debug[28] = 0x46
INFO:对控制器编程前的时间为 821 ms
VERBOSE:对控制器寄存器编程
VERBOSE:读取 debug[9] 为 0x10101010
VERBOSE:读取 debug[10] 为 0x10101010
VERBOSE:读取 debug[11] 为 0x10101010读取 debug[11] 为 0x10101010
VERBOSE: 读取 debug[12] 为 0x10101010
VERBOSE: cpo_min 0x10
VERBOSE: cpo_max 0x10
VERBOSE: debug[28] 0x700046
VERBOSE: 最佳 cpo_sample 0x37
注意:8 GB DDR4,64 位,CL=11,ECC 关闭
信息:DDR 驱动程序使用的时间 1259 毫秒信息:应用了勘误 A008850 后阶段的 SoC 变通方法
信息:RCW
BOOT SRC 是 QSPI 详细内容:这张 BL 图片看到的内存:0x100000000-0x1000b000 VERBOSE:只读数据区域:0x1000b0000-0x10000
f000 VERBOSE:DRAM 区域 0:0x800000000-0xfbdffff
VERBOSE:安全 DRAM 区域 0:0xf
be000000-0xffffff mmap:va: 0x1000000 pa: 0x1000000 大小:0xf000000 attr: 0x40000000
va: 0x100000000 pa: 0x100000000 尺寸:0xb000 特性:0x2 粒度:0x40000000 va: 0x1000b000 pa: 0x1000b000 尺寸:0x4000 特性:0x42 粒度:0x40000000 va: 0x10000000 pa: 0x100000000 尺寸:0x19000 特性:0x40000000 va: 0x40000000 pa: 0x40000000 尺寸:0x800000 特性:0xa 粒度:0x40000000 va: 0x80000000 pa: 0x80000000 尺寸:0x7be00000 特性:0x1a 粒度:0x40000000 VA: 0xfbe00000 pa: 0xfbe00000 尺寸:0x420000 attrs: 0x420000 xa 粒度:0x40000
000
VERBOSE: Translation tables state:
VERBOSE: Xlat regime:EL3
VERBOSE: Max allowed PA: 0xffffffffffff
VERBOSE: Max allowed VA: 0xffffffffffff
VERBOSE: Max mapped PA: 0xffffffff
VERBOSE: Max mapped VA: 0xffffffffff
VERBOSE: Initial lookup level: 0
VERBOSE: Entries @initial lookup level: 2
VERBOSE: Used 5 sub-tables out of 6 (spare. 1):
[LV0] VA:0x0 size:0x8000000000
[LV1] VA:0x0 size:0x40000000
[LV2] VA:0x0 size:0x200000
[LV2] (省略 7 个无效描述符)
[LV2] VA:0x1000000 PA:0x1000000 size:0x200000 DEV-RW-XN-S
[LV2] VA:0x1200000 PA:0x1200000 size:0x200000 DEV-RW-XN-S
....................................
...... skip some mmu init .........
....................................
[LV2] VA:0xfa00000 PA:0xfa00000 size:0x200000 DEV-RW-XN-S
[LV2] VA:0xfc00000 PA:0xfc00000 size:0x200000 DEV-RW-XN-S
[LV2] VA:0xfe00000 PA:0xfe00000 size:0x200000 DEV-RW-XN-S
[LV2] VA:0x10000000 size:0x200000
....................................
...... 跳过一些 mmu init .........
....................................
[LV3] VA:0x10013000 PA:0x10013000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10014000 PA:0x10014000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10015000 PA:0x10015000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10016000 PA:0x10016000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10017000 PA:0x10017000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10018000 PA:0x10018000 size:0x1000 MEM-RW-XN-S
[LV3] VA:0x10019000 size:0x1000
[LV3] (省略 486 个无效描述符)
[LV2] VA:0x10200000 size:0x200000
[LV2] (省略 382 个无效描述符)
[LV1] VA:0x40000000 size:0x40000000
[LV2] VA:0x40000000 PA:0x40000000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0x40200000 PA:0x40200000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0x40400000 PA:0x40400000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0x40600000 PA:0x40600000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0x40800000 size:0x200000
[LV2] (507 invalid descriptors omitted)
[LV1] VA:0x80000000 PA:0x80000000 size:0x40000000 MEM-RW-XN-NS
[LV1] VA:0xc0000000 size:0x40000000
[LV2] VA:0xc0000000 PA:0xc0000000 size:0x200000 MEM-RW-XN-NS
[LV2] VA:0xc0200000 PA:0xc0200000 size:0x200000 MEM-RW-XN-NS
....................................
...... 跳过一些 mmu init .........
....................................
[LV2] VA:0xfbe00000 PA:0xfbe00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfc000000 PA:0xfc000000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfc200000 PA:0xfc200000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfc400000 PA:0xfc400000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfc600000 PA:0xfc600000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfc800000 PA:0xfc800000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfca00000 PA:0xfca00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfcc00000 PA:0xfcc00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfce00000 PA:0xfce00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfd000000 PA:0xfd000000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfd200000 PA:0xfd200000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfd400000 PA:0xfd400000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfd600000 PA:0xfd600000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfd800000 PA:0xfd800000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfda00000 PA:0xfda00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfdc00000 PA:0xfdc00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfde00000 PA:0xfde00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfe000000 PA:0xfe000000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfe200000 PA:0xfe200000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfe400000 PA:0xfe400000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfe600000 PA:0xfe600000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfe800000 PA:0xfe800000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfea00000 PA:0xfea00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfec00000 PA:0xfec00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xfee00000 PA:0xfee00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xff000000 PA:0xff000000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xff200000 PA:0xff200000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xff400000 PA:0xff400000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xff600000 PA:0xff600000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xff800000 PA:0xff800000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xffa00000 PA:0xffa00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xffc00000 PA:0xffc00000 size:0x200000 MEM-RW-XN-S
[LV2] VA:0xffe00000 PA:0xffe00000 size:0x200000 MEM-RW-XN-S
[LV1] VA:0x100000000 size:0x40000000
[LV1] (省略 507 个无效描述符)
[LV0] VA:0x8000000000 size:0x8000000000
NOTICE: BL2: v2.12.0(debug):lf-6.12.20-2.0.0-7-gcd1afe6cd-dirty
注意:BL2:版本:2025 年 12 月 25 日 13:34:49
信息:配置 TrustZone 控制器
VERBOSE:TrustZone:配置区域 0(TZC 接口 base=0x1500000 sec_attr=0x0,ns_devs=0x0)
VERBOSE:TrustZone:配置区域(TZC 接口基础:0x1500000,region_no = 1)...
VERBOSE:TrustZone:... base = fbe00000,top = ffdfffff,
VERBOSE:TrustZone:... sec_attr = 0x3,ns_devs = 0x0)
VERBOSE:TrustZone:配置区域(TZC 接口基础:0x1500000,region_no = 2)...
VERBOSE:TrustZone:... base = ffe00000,top = ffffffff,
VERBOSE:TrustZone:... sec_attr = 0x3,ns_devs = 0xffffffff)
VERBOSE:TrustZone:配置区域(TZC 接口基础:0x1500000,region_no = 3)...
VERBOSE:TrustZone:... base = 80000000,top = fbdfffff,
VERBOSE:TrustZone:... sec_attr = 0x3,ns_devs = 0xffffffff)
VERBOSE:TrustZone:配置区域(TZC 接口基础:0x1500000,region_no = 4)...
VERBOSE:TrustZone:... base = 880000000,top = 9ffffffff,
VERBOSE:TrustZone:... sec_attr = 0x3,ns_devs = 0xffffffff)
信息:BL2:正在进行平台设置
信息:BL2:正在加载图片 ID 3
VERBOSE:FIP 标头看起来不错。
VERBOSE:使用 FIP
信息:在地址 0xfbe00000 处加载图片 id=3
我们卡在这里了--据我所知,BL2 在将 BL31 加载到 0xfbe00000 时挂掉了。
进一步调查发现,在执行 io_read(image_handle,image_base,image_size,&bytes_read)过程中,
,特别是在调用 dev->funcs->read(entity,buffer,length,length_read)时,bl2 在 static int load_image(unsigned int image_id, image_info_t *image_data)中卡住了;
您能就如何解决这个问题提供一些建议吗?
附加 LS1046ARDB LSDK2108 冗余信息:
信息: 配置 TrustZone 控制器
VERBOSE:TrustZone:配置区域 0(TZC 接口 Base=0x1500000 sec_attr=0x0,ns_devs=0x0)
VERBOSE: TrustZone : Configuring region (TZC Interface Base: 0x1500000, region_no = 1)...
VERBOSE: TrustZone : ... base = fbe00000, top = ffdfffff、
VERBOSE: TrustZone : ... sec_attr = 0x3, ns_devs = 0x0)
VERBOSE:TrustZone:配置区域(TZC 接口基础:0x1sd-mmc 读取完成。
信息: 图像 id=3 已加载:0xfbe00000 - 0xfbe0a62d
信息: BL2:加载图像 ID 5
看来您的 TZC 与 LSDK2108 不一样。
谢谢!
请您解释一下您的观点 -"似乎您的 TZC 与 LSDK2108" 不一样是什么意思?
ATF 的所有内容都取自恩智浦 QorIQ 官方仓库-https://github.com/nxp-qoriq/atf
默认分支 - lf_v2.10。
第一眼看上去一切正常--在 DDR 区域内创建了 4 个内存区域。
Bl2 成功从 QSPI 读取 Bl31 映像并尝试加载到安全内存区 - INFO:正在加载地址为 0xfbe00000 的 id=3 图像,但由于不明原因加载失败。根据你在 ls1046ardb 中的日志,在 ardb 板上 bl31 我正在加载到相同的地址,但加载成功。
那么问题是为什么在我们的板上将 bl31 加载到同一个地址失败而在 ls1046ardb 上成功加载到同一个地址却失败了?