We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a question about FVP (Fixed Virtual Platform) and its memory initialization behavior. Specifically, I noticed that unused memory in FVP is not set to 0, but instead contains non-zero values like 0xcfdfdfdfdfdfdfcf.
0
For example, when reading a non-used memory area in FVP, the values appear as non-zero by default. This behavior can lead to issues, such as:
.bss
Given that FVP operates in a virtualized memory environment, I’m wondering why it doesn’t simply initialize all memory to zero. Is there a specific design rationale or technical limitation for this behavior?
I'm not sure which specific FVP you are using, but enter the command:
<fvp_executable> --list-params > params.txt
bp.dram.fill1=3755990991 # (int , init-time) default = '0xdfdfdfcf' : Fill pattern 1, initialise memory at start of simulation with alternating fill1, fill2 pattern bp.dram.fill2=3487555551 # (int , init-time) default = '0xcfdfdfdf' : Fill pattern 2, initialise memory at start of simulation with alternating fill1, fill2 pattern
-C bp.dram.fill1=0
See also https://developer.arm.com/documentation/100966/1127/Getting-Started-with-Fixed-Virtual-Platforms/Configuring-the-model
Thanks you very much, I successfully clear the memory of the OS's bss section.
I have tested these configurations one by one and confirmed that the memory region where my kernel put is seems to be controlled by bp.s_dram. However, I’m still unsure about why this is the case.
bp.s_dram
Could it be related to the security settings of the memory regions? For example, I understand that "P security memory regions block access from both Secure and Non-secure domains." And my kernel is put in `P` memory region, Could it be that regions blocking Non-secure access are controlled by bp.s_dram? Actually I didn't find any description of what there fill params mean.
P
UPDATE:
I set bp.secrue_memory=0, and the three DRAM regions is still controlled by bp.s_dram.fill1 & fill2, so that may not associate with security of the memory region.