-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Queue 2024 Jan 18 #5273
Merged
Merged
Queue 2024 Jan 18 #5273
Conversation
This file contains 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
This is needed to avoid bit operations being applied to signed integers. Suggested-by: László Érsek <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Message-Id: <[email protected]>
… reads Introduce 'Start' and 'End' variables to make it easier to follow the logic and code flow. Also add a ascii art diagram (based on a suggestion by Laszlo). This also fixes the 'Size' calculation for the NorFlashRead() call. Without this patch the code will read only one instead of two P30_MAX_BUFFER_SIZE_IN_BYTES blocks in case '*NumBytes' is smaller than P30_MAX_BUFFER_SIZE_IN_BYTES but 'Offset + *NumBytes' is not, i.e. the update range crosses a P30_MAX_BUFFER_SIZE_IN_BYTES boundary. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Message-Id: <[email protected]>
Replace the two NorFlashWriteBuffer() calls with a loop containing a single NorFlashWriteBuffer() call. With the changes in place the code is able to handle updates larger than two P30_MAX_BUFFER_SIZE_IN_BYTES blocks, even though the patch does not actually change the size limit. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Message-Id: <[email protected]>
Raise the limit for writes without block erase from two to four P30_MAX_BUFFER_SIZE_IN_BYTES blocks. With this in place almost all efi variable updates are handled without block erase. With the old limit some variable updates (with device paths) took the block erase code path. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Message-Id: <[email protected]>
It is possible to find variable entries with State being 0xff, i.e. not updated since flash block erase. This indicates the variable driver could not complete the header write while appending a new entry, and therefore State was not set to VAR_HEADER_VALID_ONLY. This can only happen at the end of the variable list, so treat this as additional "end of variable list" condition. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Message-Id: <[email protected]>
Move the DoErase code block into a separate function, call the function instead of jumping around with goto. Signed-off-by: Gerd Hoffmann <[email protected]> Message-Id: <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]>
…ename Updates the sanitation function names to be lib unique names Cc: Jiewen Yao <[email protected]> Cc: Rahul Kumar <[email protected]> Signed-off-by: Doug Flick [MSFT] <[email protected]> Message-Id: <7b18434c8a8b561654efd40ced3becb8b378c8f1.1705529990.git.doug.edk2@gmail.com> Reviewed-by: Jiewen Yao <[email protected]>
…name Updates the sanitation function names to be lib unique names Cc: Jiewen Yao <[email protected]> Cc: Rahul Kumar <[email protected]> Signed-off-by: Doug Flick [MSFT] <[email protected]> Message-Id: <355aa846a99ca6ac0f7574cf5982661da0d9fea6.1705529990.git.doug.edk2@gmail.com> Reviewed-by: Jiewen Yao <[email protected]>
Adding the new commit titles for the symbol renames Cc: Jiewen Yao <[email protected]> Cc: Rahul Kumar <[email protected]> Signed-off-by: Doug Flick [MSFT] <[email protected]> Message-Id: <5e0e851e97459e183420178888d4fcdadc2f1ae1.1705529990.git.doug.edk2@gmail.com> Reviewed-by: Jiewen Yao <[email protected]>
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.
https://edk2.groups.io/g/devel/message/113915
msgid [email protected]
https://edk2.groups.io/g/devel/message/113966
msgid [email protected]