Skip to content

IntelFsp2Pkg/Tools/ConfigEditor: Fixed YAML data overwrite issue#11626

Closed
yunhsiax wants to merge 1 commit into
tianocore:masterfrom
yunhsiax:Fix-yaml-data-overwrite-issue
Closed

IntelFsp2Pkg/Tools/ConfigEditor: Fixed YAML data overwrite issue#11626
yunhsiax wants to merge 1 commit into
tianocore:masterfrom
yunhsiax:Fix-yaml-data-overwrite-issue

Conversation

@yunhsiax
Copy link
Copy Markdown
Contributor

@yunhsiax yunhsiax commented Oct 16, 2025

Problem Description:
The condition if force or act_cfg['value'] == '' in _set_field_value() caused valid YAML values
to be wrongly overwritten with binary data.
Since force=True made the condition always true, correct YAML entries like "0xFE02C000" were replaced
by binary values such as "0x01010101", leading to corrupted configurations and incorrect FSP settings.

Solution Implementation:
The condition was updated to if act_cfg['value'] == '', removing the force dependency.
This ensures binary data is used only when the YAML value is empty,
preserving valid configurations and preventing overwrites.

@tianocore-pr-automation
Copy link
Copy Markdown

Pull Request Formatting Issues

⚠️ Remove the following template lines from your PR description:
<_Include a description of the change and why this change was made._>
<_For each item, place an "x" in between [and]if true. Example:[x] (you can also check items in GitHub UI)_>
<_Create the PR as a Draft PR if it is only created to run CI checks._>
<_Delete lines in \<\> tags before creating the PR._>
<_Describe the test(s) that were run to verify the changes._>
<_Describe how these changes should be integrated. Use N/A if nothing is required._>

Address these issues and the validation will automatically re-run when you update your pull request.

Problem Description:
The condition if force or act_cfg['value'] == '' caused valid
YAML values to be overwritten by binary data when force=True,
leading to configuration corruption.

Solution Implementation:
Changed to if act_cfg['value'] == '' so binary data is only used
when the YAML value is empty, preserving valid configurations.

Signed-off-by: JasonX Hsu <jasonx.hsu@intel.com>
@yunhsiax yunhsiax force-pushed the Fix-yaml-data-overwrite-issue branch from 38083af to 0bc14de Compare October 17, 2025 09:47
Copy link
Copy Markdown
Contributor

@tedkuo1 tedkuo1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a right solution for the issue.

@yunhsiax yunhsiax closed this Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants