Skip to content

[Bug]: Improve Transparency of DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED Behavior in Project Mu #1294

@makubacki

Description

@makubacki

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

The behavior of the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit in PcdDebugProperyMask was changed in #768 to effectively ignore the value in Project Mu.

It broke with RP on free memory because it would try to clear free memory which was now unmapped. But it had also been on our radar to drop because you see bugs that only exist in release and not debug because of this macro, due to memory being cleared in one scenario and not the other.


The PCD serves as a configuration interface for this functionality, and it is currently not clear how the value is ignored in Project Mu.

Expected Behavior

It should be obvious to a developer that the usage of the bit is different from its edk2 interface. Ideally, the PCD description in MdePkg.dec should be updated to state the Project Mu behavior and a build assert or runtime assert occur if DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED is set to ensure the developer is aware of the change in Mu behavior.

Steps To Reproduce

dev/202405 branch @ f82d14c does not have the changes needed.

Build Environment

N/A

Version Information

dev/202405 - 82d14c76e8417abd010e3983346fb3ac4f82fe5

Urgency

Low

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:needs-ownerNeeds an issue owner to be assignedstate:needs-triageNeeds to triaged to determine next stepsstate:staleHas not been updated in a long timetype:bugSomething isn't workingurgency:lowLittle to no impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions