How to clean DDR in a specific range on ATF?

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

How to clean DDR in a specific range on ATF?

180 Views
Jeff-CF-Huang
Contributor II

Hi Sir,

We want to clean DDR in ATF, but there is only a ddr_init function available in arm-trusted-firmware/drivers/nxp/s32/ddr.

Best regards,

Jeff Huang

0 Kudos
Reply
5 Replies

115 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Jeff-CF-Huang 

Thanks for pointing it out.

There is indeed TFA level libc functions implemented,  I have checked the code in TFA and it seems included in the S32 support.

Yes, you may try using memset directly. I do not see other specific APIs implemented from our BSP perspective.

 

BR

Chenyin

0 Kudos
Reply

121 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Jeff-CF-Huang 

Thanks for your reply.

I do not find related description from BSP related document, from my experience, there is mmio_write_32 APIs existed in TF-A, you may try using it to modify the DDR range per your request.

 

BR

Chenyin

0 Kudos
Reply

118 Views
Jeff-CF-Huang
Contributor II

Hi Chenyin,

Are you suggesting using mmio_write to achieve the same effect as memset(dest, 0, size)?

I don’t believe that’s an efficient approach.

Is there any NXP-specific method for handling the memory controller instead?

 

Best regards,

Jeff Huang

0 Kudos
Reply

158 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Jeff-CF-Huang 

Thanks for your post.

May I know what is your meaning of "clean"? to set it to all zeros?

 

BR

Chenyin

0 Kudos
Reply

150 Views
Jeff-CF-Huang
Contributor II
Hi Chenyin,

Yes.

Best regards,
Jeff Huang
0 Kudos
Reply