patina-v8.1.0
What's Changed
-
Update FV protocol implementations to make business logic more rusty @joschock (#729)
Change Details
## Description
Refactors fv.rs routines to split FFI APIs for the FV protocols from the FV business logic so that the business logic can use more idiomatic rust. Closes #715.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
Unit tests for FV module continue to pass.
Integration Instructions
N/A.
-
.github/ci-workflow.yml: Run CI on feature and major branches @makubacki (#735)
Change Details
## Description
Run CI on "feature" branches and the "major" branch so changes are compatible with the requirements to merge to main.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
- PR into a "feature/test" branch and a "major" branch on fork and confirm the workflows start
Integration Instructions
- N/A
-
[REBASE \& FF] dxe\_core: Introduce 32 bit memory prioritization option \& resolve allocator issues @cfernald (#732)
Change Details
## Description
This pull request adds functionality for prioritize allocating 32-bit address for platforms that need to support buggy external code. This change includes a few incidental changes details below for consistency and fixes related to this functionality.
Introduce a prioritize_32_memory option for the core & GCD
Some platforms may encounter issues using the Patina default top-down allocation strategy as it will prioritize high memory and some components may not properly handle 64 bit addresses. This could be because of fixed memory sizes or use of 32 bit variables to store addresses.
This new routine will attempt tp priorritize 32 bit memory when used. This specifically applies to top down allocations as bottom up will inherently prioritize low memory and address allocations are not applicable.
Switch TopDown to use max address for PI spec
The PI specified allocation type for TopDown specifies a max address and not a min address for both memory and IO in section 7 as "EfiGcdAllocateMaxAddressSearchTopDown". The correct definition was used, but converted into an inverse type. This commit resolves this inconsistency and converts all top down searches to use a max instead of a min.
Change ALLOCATE_MAX_ADDRESS to still use TopDown allocations
For consistency this commit changes MAX_ADDRESS allocations to also use TopDown but with the max address set. This ensures that low memory is reserved for when it is actually needed and prevents fragmenting memory.
Additionally, this change removed a condition in the allocate_pages_should_allocate_pages test as it incorrectly assumes MAX_ADDRESS follows a bottom up scheme.
CLOSES #191
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
- Q35 OS Boot
- SBSA OS Boot
- Intel platform OS Boot.
Integration Instructions
N/A
-
Set RUSTC\_BOOTSTRAP for rust analyzer tests @cfernald (#730)
Change Details
## Description
Bootstrap is not generally needed anymore, but to use the "Run test" or "Debug" options that are available through rust analyzer, it needs to be set for that environment.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
N/A
Integration Instructions
N/A
-
chore: Release @Javagedes (#728)
Change Details
## Description
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
N/A
Integration Instructions
N/A
🚀 Features & ✨ Enhancements
-
ParamFunction: Support Additional Self Types @Javagedes (#745)
Change Details
## Description
This commit enhances the blanket
ParamFunctiontrait implementation to support functions that take&Self::Inand&mut Self::Inin addition toSelf::In.What this translates to is that struct / enum components using the
#[derive(IntoComponent)]macro can now define entry point functions that take&selfor&mut selfas their first parameter (in addition toself). This enhancement paves the way for future support of multi-callable dependency injectable types, including but not limited to components.Additionally, this commit introduces a custom error message when a function is being used as a
ParamFunctionbut does not meet the function signature requirements. This should help users quickly identify and rectify issues with their function signatures.Improves the error message when the function you declare as your entry point does not meet the requirements of being a
ParamFunction
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
CI continues to pass. Existing components continue to execute as expected.
Integration Instructions
N/A - But users may now have functions with the interface
&selfor&mut self
🐛 Bug Fixes
-
dxe\_core: Move runtime event handling into runtime module @cfernald (#738)
Change Details
## Description
This commit moves the handling of runtime events into the runtime.rs module and allocates them out of runtime memory. Runtime events, by definition and standard, are intended to be allocated in runtime memory and handled by a runtime driver. Since Patina handles the set_virtual_address_map itself, it must try to isolate that logic as much as possible from leveraging boot services resources.
This commit specifically resolves an issue on Windows where the set virtual address map is not called from the full firmware context. In this seperate context, the runtime services memory is mapped, but newer boot services data allocations may not be mapped. Moving the allocations to runtime memory works around potential access violations when traversing the tree that contains events that may have been allocated from a later heap.
CLOSES #337
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
Boot to Windows on Q35
Integration Instructions
N/A
📖 Documentation Updates
-
RFC Amendment: Add feature branch merge criteria to release process @makubacki (#748)
Change Details
## Description
Resolves #743
Status: FCP
Adds a section that describes the criteria for work on a feature branch to be merged to the main branch.
The goal is to provide clarity so feature owners can plan how to organize their work to support the requirements and the process of adding new features is consistent over time for Patina consumers.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
cargo make all
Integration Instructions
- N/A
-
Add Patina Rust version update policy @makubacki (#742)
Change Details
## Description
-
Adds Rust version update guidance to README.md.
-
Adds a new workflow to help ensure Rust version update guidance is not forgotten when the Rust version is updated.
-
Impacts functionality?
-
Impacts security?
-
Breaking change?
-
Includes tests?
-
Includes documentation?
How This Was Tested
- Run workflow on a fork checking:
- Workflow does not run when
rust-toolchain.tomlis not modified - Workflow runs when
rust-toolchain.tomlis modified - Comment is left on the PR when expected
- Old and New versions in the PR are correct per the PR changes
- A comment is not left if one was already left on the PR
Example
An example of the comment posted when the toolchain version is modified:
Integration Instructions
- N/A
-
-
README.md: Add high-level roadmap @makubacki (#733)
Change Details
## Description
Provide a brief roadmap of Patina's upcoming priorities.
This is in the readme as it is intended to be easy-to-find on a user's first visit to the project.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
cargo make all
Integration Instructions
- N/A
Full Changelog: patina-v8.0.0...v8.1.0