LX2160A OCRAM usage

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,620件の閲覧回数
dmitri_lechtchinski
Contributor III

Hello,

I am writing a custom BL2 boot loader using ATF reference code.

I saw that BL1 uses the low addresses of OCRAM in boot process, and also that BL31 uses a portion at the end of OCRAM.

What are the exact areas reserved for BL1/BL31 use? Which area is considered "safe" for BL2 execution?

Thanks,
Dmitri

0 件の賞賛
返信
1 解決策
1,611件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following code in plat/nxp/soc-lx2160a/soc.def, the size of NXP_ROM_RSVD OCRAM memory space is used for bootrom, after this reserved area, all other OCRAM memory space can be used for BL2.

# Location of BL2 on OCRAM
BL2_BASE_ADDR := $(shell echo $$(( $(OCRAM_START_ADDR) + $(NXP_ROM_RSVD) + $(CSF_HDR_SZ) )))
# Covert to HEX to be used by create_pbl.mk
BL2_BASE := $(shell echo "0x"$$(echo "obase=16; ${BL2_BASE_ADDR}" | bc))

# BL2_HDR_LOC is at (OCRAM_ADDR + NXP_ROM_RSVD)
# This value BL2_HDR_LOC + CSF_HDR_SZ should not overalp with BL2_BASE
BL2_HDR_LOC_HDR ?= $(shell echo $$(( $(OCRAM_START_ADDR) + $(NXP_ROM_RSVD) )))
# Covert to HEX to be used by create_pbl.mk
BL2_HDR_LOC := $$(echo "obase=16; ${BL2_HDR_LOC_HDR}" | bc)

In addition, BL31 uses DDR memory space, didn't use OCRAM.

Please refer to the following in plat/nxp/common/include/default/plat_default_def.h.

 #define BL31_BASE NXP_SECURE_DRAM_ADDR

元の投稿で解決策を見る

1 返信
1,612件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following code in plat/nxp/soc-lx2160a/soc.def, the size of NXP_ROM_RSVD OCRAM memory space is used for bootrom, after this reserved area, all other OCRAM memory space can be used for BL2.

# Location of BL2 on OCRAM
BL2_BASE_ADDR := $(shell echo $$(( $(OCRAM_START_ADDR) + $(NXP_ROM_RSVD) + $(CSF_HDR_SZ) )))
# Covert to HEX to be used by create_pbl.mk
BL2_BASE := $(shell echo "0x"$$(echo "obase=16; ${BL2_BASE_ADDR}" | bc))

# BL2_HDR_LOC is at (OCRAM_ADDR + NXP_ROM_RSVD)
# This value BL2_HDR_LOC + CSF_HDR_SZ should not overalp with BL2_BASE
BL2_HDR_LOC_HDR ?= $(shell echo $$(( $(OCRAM_START_ADDR) + $(NXP_ROM_RSVD) )))
# Covert to HEX to be used by create_pbl.mk
BL2_HDR_LOC := $$(echo "obase=16; ${BL2_HDR_LOC_HDR}" | bc)

In addition, BL31 uses DDR memory space, didn't use OCRAM.

Please refer to the following in plat/nxp/common/include/default/plat_default_def.h.

 #define BL31_BASE NXP_SECURE_DRAM_ADDR