S32G ATF DTB flash partitions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32G ATF DTB flash partitions

ソリューションへジャンプ
780件の閲覧回数
liuchi
Contributor III

Dear engineers:
I am using the S32G274A RDB2 development board. In the ATF dtb, I adjusted the flash partitions. I plan to add a new user partition.
When I added this user partition configuration, the Uboot startup would fail. As shown in the picture.
When I disabled the user partition configuration, Uboot could start normally.
The partitioning is done in 64K byte alignment.
Are there any other points that need attention? We are very much looking forward to your responses.

liuchi_0-1752051233884.pngliuchi_1-1752051251853.png

 

タグ(2)
0 件の賞賛
返信
1 解決策
636件の閲覧回数
liuchi
Contributor III

This issue has been resolved. After modifying the dtb flash partition, both bl2_w_dtb.s32 and fip.bin need to be updated, not just bl2_w_dtb.s32.

元の投稿で解決策を見る

8 返答(返信)
637件の閲覧回数
liuchi
Contributor III

This issue has been resolved. After modifying the dtb flash partition, both bl2_w_dtb.s32 and fip.bin need to be updated, not just bl2_w_dtb.s32.

640件の閲覧回数
Joey_z
NXP Employee
NXP Employee

hi,liuchi

Thank you for your question.

I think you should pay more attention to the setting of the address. You can refer to the picture setting to add partition.

Joey_z_0-1752457578102.png

Joey_z_1-1752457742569.png

Hope it can help you.

BR

Joey

 

0 件の賞賛
返信
756件の閲覧回数
RandyKrakora
NXP Employee
NXP Employee

Assume you booting from QSPI?

Do you have your entire QSPI memory layout we could see? It seems somehow bl31 is in a place unknown to the atf.

 

-Randy

0 件の賞賛
返信
753件の閲覧回数
liuchi
Contributor III
NOTICE: Reset status: Power-On Reset
NOTICE: BL2: v2.10.7(release):bsp43.0-2.10.7-dirty
NOTICE: BL2: Built : 02:04:42, Jul 9 2025
NOTICE: BL2: Booting BL31
PANIC in EL3.
x30 = 0x00000000ff6133e8
x0 = 0x00000000ff630000
x1 = 0x00000000ff630000
x2 = 0x00000000ff624110
x3 = 0x00000000ffffffc8
x4 = 0x00000000edfe0dd0
x5 = 0x0000000000000000
x6 = 0x0000000000000100
x7 = 0x000000000000000d
x8 = 0x00000000ff620000
x9 = 0x0000000034302000
x10 = 0x0000000000032000
x11 = 0x0000000000000000
x12 = 0x0000000000000000
x13 = 0x00000000ff616240
x14 = 0x00000000ff615c70
x15 = 0x0000000000000034
x16 = 0x0000000000000004
x17 = 0x0000000000000001
x18 = 0x00000000401cc000
x19 = 0x00000000ff616ed8
x20 = 0x00000000ff630000
x21 = 0x0000000000000000
x22 = 0x0000000000000000
x23 = 0x0000000000000000
x24 = 0x0000000000000000
x25 = 0x0000000000000000
x26 = 0x0000000000000000
x27 = 0x0000000000000000
x28 = 0x0000000000000000
x29 = 0x00000000ff624110
scr_el3 = 0x0000000000000238
sctlr_el3 = 0x0000000030cd183f
cptr_el3 = 0x0000000080000400
tcr_el3 = 0x000000008081351c
daif = 0x00000000000002c0
mair_el3 = 0x00000000004404ff
spsr_el3 = 0x00000000000003cd
elr_el3 = 0x00000000ff600000
ttbr0_el3 = 0x00000000ff634e00
esr_el3 = 0x0000000000000000
far_el3 = 0x0000000000000000
spsr_el1 = 0x0000000000000000
elr_el1 = 0x0000000000000000
spsr_abt = 0x0000000000000000
spsr_und = 0x0000000000000000
spsr_irq = 0x0000000000000000
spsr_fiq = 0x0000000000000000
sctlr_el1 = 0x0000000000c50838
actlr_el1 = 0x0000000000000000
cpacr_el1 = 0x0000000000300000
csselr_el1 = 0x0000000000000000
sp_el1 = 0x0000000000000000
esr_el1 = 0x0000000000000000
ttbr0_el1 = 0x0000000000000000
ttbr1_el1 = 0x0000000000000000
mair_el1 = 0x44e048e000098aa4
amair_el1 = 0x0000000000000000
tcr_el1 = 0x0000000000000000
tpidr_el1 = 0x0000000000000000
tpidr_el0 = 0x0000000000000000
tpidrro_el0 = 0x0000000000000000
par_el1 = 0x0000000000000000
mpidr_el1 = 0x0000000080000000
afsr0_el1 = 0x0000000000000000
afsr1_el1 = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1 = 0x0000000000000000
cntp_ctl_el0 = 0x0000000000000000
cntp_cval_el0 = 0x0000000000000000
cntv_ctl_el0 = 0x0000000000000000
cntv_cval_el0 = 0x0000000000000000
cntkctl_el1 = 0x0000000000000000
sp_el0 = 0x00000000ff624110
isr_el1 = 0x0000000000000000
dacr32_el2 = 0x0000000000000000
ifsr32_el2 = 0x0000000000000000
cpuectlr_el1 = 0x0000000000000040
cpumerrsr_el1 = 0x0000000000000000
l2merrsr_el1 = 0x0000000013385ec8
cpuactlr_el1 = 0x00001000090ca000
这是具体的错误日志
&qspi {

macronix_memory: mx25uw51245g@0 {

compatible = "jedec,spi-nor";

spi-max-frequency = <200000000>;

spi-tx-bus-width = <8>;

spi-rx-bus-width = <8>;

reg = <0>;

partitions {

compatible = "fixed-partitions";

address-cells = <1>;

size-cells = <1>;

flashimage@0 {

label = "Flash-Image";

reg = <0x0 0x4000000>;

};

boot@0 {

label = "BL2";

reg = <0x0 0xd0000>;

};

fip@d0000 {

label = "FIP";

reg = <0xd0000 0x1d0000>;

};

boot-env@2a0000 {

label = "U-Boot-Env";

reg = <0x2a0000 0x10000>;

};

kernel@2b0000 {

label = "Kernel";

reg = <0x2b0000 0x10d0000>;

};

dtb@1380000 {

label = "DTB";

reg = <0x1380000 0x30000>;

};

rootfs@13b0000 {

label = "Rootfs";

reg = <0x13b0000 0x1f10000>;

};

};

};

};

&macronix_memory {

partitions {

pfe@32c0000 {

label = "PFE-Firmware";

reg = <0x32c0000 0x950000>;

};

user@0x3c10000 {

label = "User";

reg = <0x3c10000 0xA0000>;

};

};

};


This is QSPI memory layout, the user partitions is the new partition
0 件の賞賛
返信
691件の閲覧回数
RandyKrakora
NXP Employee
NXP Employee

I reproduced the issue here, talking to our linux team to determine the cause and fix.

 

-Randy Krakora

0 件の賞賛
返信
762件の閲覧回数
RandyKrakora
NXP Employee
NXP Employee

One thing to be aware of:

According to the S32G Reference Manual, the APP code header must be glued to the application code. This is the reason why .code is always placed 0x40 bytes after .app_code. Therefore, BootROM will assume that everything after the APP header represents code that has to be loaded in SRAM and booted according to other fields part of the IVT. Here is a snippet from the Boot chapter:

RandyKrakora_0-1752069373804.png

 

 

0 件の賞賛
返信
758件の閲覧回数
liuchi
Contributor III
Thank you for your reply. However, my issue should have nothing to do with IVT. Because ATF has been activated, it was only due to the DTB problem that the system crashed.
0 件の賞賛
返信
747件の閲覧回数
liuchi
Contributor III
yes. Yeah, there's a problem with the dtb
0 件の賞賛
返信