patina-v4.2.0
What's Changed
-
Cargo.toml: Update scroll to v0.13 @makubacki (#573)
Change Details
## Description
We use goblin 0.10 which has a dependency on scroll v0.13, however Patina specifies scroll v0.12. This leads to duplicate scroll versions being in the crate graph. This moves Patina to v0.13.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
cargo make all
Integration Instructions
- N/A
-
dxe\_services: add free memory space tests @kat-perez (#565)
Change Details
## Description
Add free memory space tests to DXE services
Closes #564 and increases overall coverage +7.75%- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
cargo make coverageIntegration Instructions
N/A
-
dxe\_services: add allocate\_memory\_space unit tests @kat-perez (#566)
Change Details
## Description
Add unit tests to DXE services for allocate memory space function.
Increases unit test coverage +10.13%
Closes #563- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
cargo make coverageIntegration Instructions
N/A
-
patina-dxe-core: Add ARM64 64 KB Runtime Allocation Granularity @os-d (#552)
Change Details
## Description
This patch adds support and unit tests for ARM64 64 KB runtime page allocation granularity, which is required by the UEFI spec to ensure that 16 KB and 64 KB OSes can boot.
Note, this granularity is not tested at all in edk2 and has been a source of many bugs. This is testable in patina with the with_granularity_modulation fn.
This patch also adds debug_asserts to places where the FSB fails; otherwise we lose what the allocator was doing because Rust core module code will receive the
AllocErrorand then call thealloc_error_handler, which panics, but we've lost the stack at that point. We see the top level allocation that failed, but not what failed within the allocator, so debugging is useless at that point. With the debug_asserts, we can see what failed in the allocator and debug from there. There is a concern that in production code we will panic onAllocErrors, but this seems to be a fundamental design of the core Rust code, so I do not think Patina can do anything else.This patch dropped some unit tests that weren't testing anything meaningful and removed a couple of test asserts that cannot be tested now due to debug_asserting in alloc errors.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
Tested by booting Windows and Linux (4KB and 64KB for ARM64) on Q35 and SBSA and viewing the EFI_MEMORY_MAP and MAT table to confirm all runtime types have 4 KB alignment and length on x86 and 64 KB on ARM64.
Integration Instructions
This closes #524 and so allows platforms to boot 16 KB and 64 KB Linuxes.
-
chore: Release @kuqin12 (#561)
Change Details
## Description
Release 4.1.0
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
N/A
Integration Instructions
N/A
🚀 Features & ✨ Enhancements
-
Add performance support for ARM \& non SMM platforms @liqiqiii (#569)
Change Details
## Description
Add performance support for ARM platforms.
ARM doesn't have PEI phase so it doesn't have the hob required. Make the Hob optional.
Make SMM communication protocol Option<> too to make it work for non SMM platforms.- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
Tested with ARM platform, get performance records correctly.
📖 Documentation Updates
-
[REBASE \& FF] Miscellaneous Updates @os-d (#571)
Change Details
## Description
This PR contains a set of small miscellaneous updates.
Update config.toml to reflect latest patina-paging
config.toml was out of date. Update to the latest.
patina_stacktrace: Update PS Script To Handle Serial Log Lines
This commit updates patina_stacktrace's PS parsing script to handle output directly copied from the serial log.
Patina Requirements: Clarify that CpuDxe Must Not Be Used
This commit updates the patina requirements doc to indicate that edk2's CpuDxe is incompatible with Patina.
Patina Debugger: Add GCD Monitor Command
This adds a command to print the GCD for the Patina debugger through a monitor command. It can be invoked from the UefiExt as !monitor gcd or through gdb through monitor gcd.
cspell: Remove Overly Permissive Dictionaries
This commit removes several dictionaries from cspell and ensures that the list of allowed words is the needed list.
The software terms dictionary, in particular, was problematic, because it contained many double wildcards, e.g. Core, so anything with the substring Core in it would pass spell check, even if the word was misspelled.
Removing the extra dictionaries also speeds up the cspell execution, in theory, particularly without all of the wildcards because cspell must do less searching and pattern matching to determine if words are misspelled.
The java and python dictionaries were removed because patina is not implemented in those languages. The rust dictionary is kept because it has no wildcards or explicitly allowed misspellings, instead it contains useful Rust keywords.
A few choices were made across the code base to align spellings, e.g. re-entrancy and reentrancy were both present, so reentrancy was aligned on.
Most of spelling errors were being caught in PR review, which is why there were not any fixed spelling errors, but that made having cspell less valuable. This makes it so a PR will fail. I won't say whose PR I was reviewing when I finally got encouraged to go make this work correctly :).
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
How This Was Tested
Tested the !monitor gcd command in QEMU and the PS script on Windows. Others were non-functional changes. Note that the !monitor gcd command encountered an issue with the UefiExt that is being updated.
Integration Instructions
N/A.
Full Changelog: patina-v4.1.0...v4.2.0