Why Doesn’t FVP Initialize Unused Memory to Zero (e.g., 0xcfdfdfdfdfdfdfcf)?

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.

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:

  • If the OS running on FVP does not explicitly clear the .bss section, global variables in the OS could end up initialized with these non-zero default values.
  • This, in turn, may cause unexpected behavior or bugs during execution.

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?

Parents
  • 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.

    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.

    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.

Reply
  • 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.

    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.

    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.

Children
No data