Skip to content

patina-v12.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 20:14
· 622 commits to refs/heads/main since this release
9298fda

What's Changed

  • patina\_samples: Follow Patina component layout conventions @makubacki (#935)
    Change Details
      ## Description

    Updates the crate to follow Patina component conventions as described in RFC 0009-standardize-component-crate.

    This also positions the crate to more cleanly support new samples being added in the future.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all
    • cargo make doc-open to review patina_samples documentation

    Integration Instructions

    Access the currently provided samples with the following paths:

    • component::hello_world::HelloStruct
    • component::hello_world::GreetingsEnum


  • patina: Remove pi/address\_helpers [Rebase \& FF] @makubacki (#934)
    Change Details
      ## Description

    The align_up() and align_down() function in address_helpers are redundant with the existing and more accessible functions in patina::base. They are removed here in favor of having a single set of alignment functions in patina::base.

    Note: The patina::base functions are not const as a tradeoff for a trait bound clause, that's acknowledged as acceptable for now in this change.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all
    • QEMU Q35 boot

    Integration Instructions

    • The address_helpers module is no longer available. Use the alignment functions in patina::base.


  • Add safety comments for patina\_internal\_device\_path @apop5 (#895)
    Change Details
      ## Description

    Add safety comments for patina_internal_device_path

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Comments only.
    Passed cargo make clippy
    with Makefile.toml modified to include "-W", "clippy::undocumented_unsafe_blocks"

    Integration Instructions

    No integration necessary.




  • patina\_mm: Add missing safety comments @makubacki (#892)
    Change Details
      ## Description

    Adds missing safety comments to the patina_mm crate.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all
    • patina_mm results from cargo clippy --all-targets -- -W clippy::undocumented_unsafe_blocks

    Integration Instructions

    • N/A


  • patina: test: Update how tests are executed @Javagedes (#925)
    Change Details
      ## Description

    Recent changes to how tests were executed and filtered with the enable_patina_test feature resulted in almost no testing actually being performed for the functionality. This pull-request updates how we test the patina-test logic, so that it does not rely on the enable_patina_test feature being enabled.

    It does this in two parts:

    1. Creates a second static collection of patina-tests that only collects fake patina-tests from the local file.
    2. Splits the main logic of TestRunner into two parts. The first collects the patina-tests, and the second runs the patina-tests. This allowed us properly test the patina-test execution process by passing in our second static collection of controlled patina-tests.
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    CI

    Integration Instructions

    N/A




  • chore: Release v12.0.0 @makubacki (#926)
    Change Details
      ## Description

    Updates the version for the 12.0.0 release.

    As of this release, patina_pi is no longer published. The content is now accessible in patina::pi.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • N/A

    Integration Instructions

    • N/A


🚀 Features & ✨ Enhancements

  • patina: Add the BinaryGuid type @makubacki (#929)
    Change Details
      ## Description

    Closes #901

    Adds a new BinaryGuid type that can be directly used in C compatible binary structures in place of r_efi::efi::Guid.

    The guid module documentation is updated to describe when to use this type versus the pre-existing Guid types.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all (which includes unit tests)

    Integration Instructions

    • No special integration is needed. Review the included documentation to understand how to use BinaryGuid.


🐛 Bug Fixes

  • patina\_dxe\_core: Prevent spurious test failures @makubacki (#936)
    Change Details
      ## Description

    Three dispatcher tests in dxe_services.rs added in 1d9a702 were failing intermittently when run in parallel. The tests call dispatch() which depends on the DISPATCHER_CONTEXT global static, but the dxe_services.rs test helper did not reset this context between test runs, causing tests to inherit leftover state from previous tests which could cause tests to fail depending on test dispatch order.

    This change adds a function called reset_dispatcher_context_for_tests to dispatcher.rs to use in the dxe_services.rs test setup to clean state for all dispatch-related tests. It also cleans up repeated functions called throughout unit tests in dxe_services.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Tested by running:

    cargo test --lib --package patina_dxe_core test_dispatch

    In sets of 10 runs 10 times in a row. Before this change failure rate was an average of 60%, after 0%.

    Integration Instructions

    • N/A


  • Change the image handle for the EFI System Table Pointer structure to EfiRuntimeServicesData. @joschock (#931)
    Change Details
      ## Description

    This PR changes the image handle for the allocation for the EFI System Table Pointer structure to be EfiBootServicesData; the prior use of the DXE_CORE_HANDLE caused the region to appear as free in the memory map.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Confirmed windows boot with the change, verified memory map by inspection.

    Integration Instructions

    N/A




  • patina\_debugger: Fix OS lock check for aarch64 @cfernald (#930)
    Change Details
      ## Description

    When the OS lock register is set, certain debug features like single stepping will not be allowed. This has been observed on aarch64 systems where the OS lock is set initially. This fixes a typo on the initial implementation that checked the wrong bit in the system register that shows the status of the OS lock.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • Tested on physical aarch64 system

    Integration Instructions

    N/A




📖 Documentation Updates

  • patina: Add the BinaryGuid type @makubacki (#929)
    Change Details
      ## Description

    Closes #901

    Adds a new BinaryGuid type that can be directly used in C compatible binary structures in place of r_efi::efi::Guid.

    The guid module documentation is updated to describe when to use this type versus the pre-existing Guid types.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all (which includes unit tests)

    Integration Instructions

    • No special integration is needed. Review the included documentation to understand how to use BinaryGuid.


Full Changelog: patina-v12.0.0...v12.1.0