-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support xml hash check #421
Conversation
198da6c
to
8c7fd7e
Compare
@kanechen66 thanks for putting up this PR. I think this should be both marked as impacting functionality (this is a new feature) and a breaking change (a config blob that previously could be written to a system now cannot be) |
SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf
Outdated
Show resolved
Hide resolved
SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf
Outdated
Show resolved
Hide resolved
SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf
Outdated
Show resolved
Hide resolved
SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf
Outdated
Show resolved
Hide resolved
c4d3b36
to
05d3f94
Compare
looks like the pipeline won't gen ConfigProfilesGenerated.h include the hash and variable name/guid so the pipeline fails. Will need to find another way to fix this. |
d135b1d
to
4be9867
Compare
4be9867
to
2403993
Compare
The purpose is to help users to known whether they are using the correct config xml for bios on SUT
bd35f53
to
f708446
Compare
f708446
to
f85e97a
Compare
Description
Currently, there is no version check btwn loaded xml and bios.
To prevent user loading the wrong xml for BIOS running on SUT.
This PR makes the below changes.
Calc all xml node hash during bios build and put the hash/guid/var_name in generated header.
BIOS can uses this guid and hash saves to a varialbe call
When configeditor loads an xml file, it calc the hash of loaded xml file and tries to find the xml hash from bios variable and then compare the hash.
if the hash in bios and loaded xml is different, it will show a warning message to user
![image](https://private-user-images.githubusercontent.com/183732802/385201883-f1ba6de7-aa3d-46c9-a008-7db4722ba096.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NDYwNDEsIm5iZiI6MTczOTY0NTc0MSwicGF0aCI6Ii8xODM3MzI4MDIvMzg1MjAxODgzLWYxYmE2ZGU3LWFhM2QtNDZjOS1hMDA4LTdkYjQ3MjJiYTA5Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxODU1NDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYzNhNTU2MTA1NmIwZDk0MWQ3ZTQ4OTRmNmZkNTNhOTEzMjgwZWIzNDA4ZmRkMDJlYWU5ZWQyODk5YzMzZjY4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.5C4C6k6_Fygd1X-V2wfCxPxGlSP1s4GvoaV5kSB78b4)
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
Tested on BIOS with variable contains hash and make sure the warning msg will pop upt when the hash is different
Integration Instructions
To have warning msg for hash mismatch, platform BIOS include SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf so that it will set variable with xml hash