Backport 27453 ([rom_ext] Boot services refactor and unit tests)#29322
Merged
pamaury merged 8 commits intolowRISC:masterfrom Feb 21, 2026
Merged
Backport 27453 ([rom_ext] Boot services refactor and unit tests)#29322pamaury merged 8 commits intolowRISC:masterfrom
pamaury merged 8 commits intolowRISC:masterfrom
Conversation
1a46fc6 to
a372c04
Compare
timothytrippel
approved these changes
Feb 19, 2026
cfrantz
approved these changes
Feb 19, 2026
In preparation for fuzzing efforts, all boot services related code in rom_ext has been refactored into a seperate library. This will allow unit tests, and fuzz tests, to run this code directly on the host by removing device dependencies. The majority of code changes in this commit are due to moving code from one file to another. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 00f8e09)
This change converts the owner_verify library into a dual library, with support for running both on device and host targets. Additionally, this change adds the required mocks to allow hosts to run owner_verify. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 1bea491)
This change expands the existing Manifest mock to include support for three additional methods: manifest_ext_get_spx_key, manifest_ext_get_spx_signature, and manifest_ext_get_isfb. Future unit tests will use each of these methods. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit f33ad61)
When running on a host target, the rescue type is undefined, as it is currently only defined on a per device basis. This change adds a NULL rescue type to be used by future unit tests. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 2f612aa)
This change adds conditional compilation flags to dbg_print related functions to better support on host unit tests. Additionally, to support existing dbg_print unit tests, a unit test specific flag was added. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 4e66840)
This change adds 7 initial tests for boot services with basic parameters for each. These tests serve as a starting point for more complex unit tests and fuzzing tests related to boot services. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 4228a37)
This change fills out the BootSvcEnterRescue, BootSvcOwnershipUnlock, and BootSvcOwnershipActivate unit tests with the required inputs to pass. Signed-off-by: Ellis Sarza-Nguyen <sarzanguyen@google.com> (cherry picked from commit 116c226)
Adds additional equality checks, formats all unit tests, and ensures similar checks are present in all 7 boot service handler related unit tests. Signed-off-by: Collin MacDonald <cmacd@google.com> (cherry picked from commit 36e8bf1)
a372c04 to
387e96b
Compare
Contributor
Author
|
Ci failures are unrelated |
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.
Backport #27453, depends on #29321, only review last 8 commits.