S32G2 BSP44 Memory map

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32G2 BSP44 Memory map

201 Views
cf-technica
Contributor II

Hi all, 

We're currently working with S32G2 BSP44 including ATF version 2.10.

Although, looking at ATF makefiles, BL2 reserved RAM memory starts at 0x34302000, for developing constraints we must set it from 0x34700000 and end it at 0x347f0000. But, when using this memory range, BL2 does just don't boot. 

We've been trying different BL2_BASE address and we've detected that, when BL2_BASE = 0x34709000 is set, then the system boots (but, unfortunately, due to our memory map we cannot extend it till 0x347f9000). 

Is there any reserved memory region that can not be mapped until 0x34709000 that explains this lack of boot?

Also, in order to fit our BL2 image from 0x34709000 to 0x347f9000, we've tried to reduce S32_IO_BUFFER_SIZE in order to fit our memory map, but, if it's modified from 0x013000 to a smaller value, then u-boot fails when booting. Is there a minimal size for S32_IO_BUFFER_SIZE?

Thanks in advance,

Tags (2)
0 Kudos
Reply
5 Replies

133 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cf-technica 

Thanks for your post.

I will try reproducing the issue and then investigate on it.

1. May I know if you are working on a RDB2 or custom board?

2. SD/eMMC or QSPI boot is used during the test?

 

BR

Chenyin

0 Kudos
Reply

126 Views
cf-technica
Contributor II

Hi Chenyin

Thanks for your fast reply. Is currently a custom board.

In order to test it, we've changed BL2_BASE variable in bl2 Makefile. It only boots if 0x34709000 or higher (for example 0x3470A000) is set, but not for lower values like 0x34700000 or 0x34701000.

Also, we're working on an eMMC boot environment.

0 Kudos
Reply

107 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cf-technica 

Thanks for your confirmation.

I understand your memory constrains is 0x34700000 to 0x347f0000, but usually the BL2 part is not that large, so your custom constrains is for the whole TFA?(including fip part?)

 

BR

Chenyin

0 Kudos
Reply

102 Views
cf-technica
Contributor II
Hi,

Currently BL1 is executed on ROM, while u-boot runs over DDR. So BL2 is the only one that should be executing in that memory range. The strange thing is: why if we boot from 0x34700000 BL2 does not boot, but if we configure BL2_BASE to 0x3470A000 it boots ok?

About the size, I think the problem relies on the 0x13000 value for de S32_IO_BUFFER. If we boot from BL2 from 0x3470A000 and reduce S32_IO_BUFFER to fit 0x347f0000 as the end fro BL2 , then the next step (BL31 or u-boot I do not know) fails to boot and only show the register stack value as an error.
0 Kudos
Reply

35 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cf-technica 

Thanks for your confirmation.

I have some tests on my local RDB2 with BSP44 code base, but do not reproduce the issue you mentioned.

My test is with the following modification: BL2_BASE=0x34700000 BOOTROM_ADMA_RSRVD_BASE=0x347EF000, would you mind testing it again on your  board?

 

BR

Chenyin

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2297217%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32G2%20BSP44%20Memory%20map%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2297217%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3EWe're%20currently%20working%20with%20S32G2%20BSP44%20including%20ATF%20version%202.10.%3C%2FP%3E%3CP%3EAlthough%2C%20looking%20at%20ATF%20makefiles%2C%20BL2%20reserved%20RAM%20memory%20starts%20at%26nbsp%3B0x34302000%2C%20for%20developing%20constraints%20we%20must%20set%20it%20from%26nbsp%3B0x34700000%20and%20end%20it%20at%26nbsp%3B0x347f0000.%20But%2C%20when%20using%20this%20memory%20range%2C%20BL2%20does%20just%20don't%20boot.%26nbsp%3B%3C%2FP%3E%3CP%3EWe've%20been%20trying%20different%20BL2_BASE%20address%20and%20we've%20detected%20that%2C%20when%20BL2_BASE%20%3D%26nbsp%3B0x34709000%20is%20set%2C%20then%20the%20system%20boots%20(but%2C%20unfortunately%2C%20due%20to%20our%20memory%20map%20we%20cannot%20extend%20it%20till%26nbsp%3B0x347f9000).%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20reserved%20memory%20region%20that%20can%20not%20be%20mapped%20until%26nbsp%3B0x34709000%20that%20explains%20this%20lack%20of%20boot%3F%3C%2FP%3E%3CP%3EAlso%2C%20in%20order%20to%20fit%20our%20BL2%20image%20from%200x34709000%20to%200x347f9000%2C%20we've%20tried%20to%20reduce%26nbsp%3BS32_IO_BUFFER_SIZE%20in%20order%20to%20fit%20our%20memory%20map%2C%20but%2C%20if%20it's%20modified%20from%26nbsp%3B0x013000%20to%20a%20smaller%20value%2C%20then%20u-boot%20fails%20when%20booting.%20Is%20there%20a%20minimal%20size%20for%20S32_IO_BUFFER_SIZE%3F%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G2%20BSP44%20Memory%20map%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F251219%22%20target%3D%22_blank%22%3E%40cf-technica%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20post.%3C%2FP%3E%0A%3CP%3EI%20will%20try%20reproducing%20the%20issue%20and%20then%20investigate%20on%20it.%3C%2FP%3E%0A%3CP%3E1.%20May%20I%20know%20if%20you%20are%20working%20on%20a%20RDB2%20or%20custom%20board%3F%3C%2FP%3E%0A%3CP%3E2.%20SD%2FeMMC%20or%20QSPI%20boot%20is%20used%20during%20the%20test%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G2%20BSP44%20Memory%20map%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F251219%22%20target%3D%22_blank%22%3E%40cf-technica%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20confirmation.%3C%2FP%3E%0A%3CP%3EI%20understand%20your%20memory%20constrains%20is%200x34700000%20to%200x347f0000%2C%20but%20usually%20the%20BL2%20part%20is%20not%20that%20large%2C%20so%20your%20custom%20constrains%20is%20for%20the%20whole%20TFA%3F(including%20fip%20part%3F)%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298278%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G2%20BSP44%20Memory%20map%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298278%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3ECurrently%20BL1%20is%20executed%20on%20ROM%2C%20while%20u-boot%20runs%20over%20DDR.%20So%20BL2%20is%20the%20only%20one%20that%20should%20be%20executing%20in%20that%20memory%20range.%20The%20strange%20thing%20is%3A%20why%20if%20we%20boot%20from%200x34700000%20BL2%20does%20not%20boot%2C%20but%20if%20we%20configure%20BL2_BASE%20to%200x3470A000%20it%20boots%20ok%3F%3CBR%20%2F%3E%3CBR%20%2F%3EAbout%20the%20size%2C%20I%20think%20the%20problem%20relies%20on%20the%200x13000%20value%20for%20de%20S32_IO_BUFFER.%20If%20we%20boot%20from%20BL2%20from%200x3470A000%20and%20reduce%20S32_IO_BUFFER%20to%20fit%200x347f0000%20as%20the%20end%20fro%20BL2%20%2C%20then%20the%20next%20step%20(BL31%20or%20u-boot%20I%20do%20not%20know)%20fails%20to%20boot%20and%20only%20show%20the%20register%20stack%20value%20as%20an%20error.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298084%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G2%20BSP44%20Memory%20map%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298084%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Chenyin%3C%2FP%3E%3CP%3EThanks%20for%20your%20fast%20reply.%26nbsp%3BIs%20currently%20a%20custom%20board.%3C%2FP%3E%3CP%3EIn%20order%20to%20test%20it%2C%20we've%20changed%20BL2_BASE%20variable%20in%20bl2%20Makefile.%20It%20only%20boots%20if%26nbsp%3B0x34709000%20or%20higher%20(for%20example%26nbsp%3B0x3470A000)%20is%20set%2C%20but%20not%20for%20lower%20values%20like%26nbsp%3B0x34700000%20or%26nbsp%3B0x34701000.%3C%2FP%3E%3CP%3EAlso%2C%20we're%20working%20on%20an%20eMMC%20boot%20environment.%3C%2FP%3E%3C%2FLINGO-BODY%3E