IntelFsp2Pkg/Tools/ConfigEditor: Fixed YAML data overwrite issue#11626
Closed
yunhsiax wants to merge 1 commit into
Closed
IntelFsp2Pkg/Tools/ConfigEditor: Fixed YAML data overwrite issue#11626yunhsiax wants to merge 1 commit into
yunhsiax wants to merge 1 commit into
Conversation
Pull Request Formatting Issues
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>
38083af to
0bc14de
Compare
tedkuo1
suggested changes
Oct 23, 2025
Contributor
tedkuo1
left a comment
There was a problem hiding this comment.
This should be a right solution for the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.