Skip to content

patina-v5.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 19:25
· 857 commits to refs/heads/main since this release

What's Changed

  • [REBASE\&FF] Add component HOB consumption example @Javagedes (#586)
    Change Details
      ## Description

    Adds an example of how to consume HOBs in a component.

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

    How This Was Tested

    CI

    Integration Instructions

    N/A




  • add dxe\_services unit tests: remove\_memory\_space and get\_memory\_descriptor @kat-perez (#588)
    Change Details
      ## Description

    Add unit tests to DXE services for remove_memory_space and get_memory_descriptor functions. Increases coverage to 25.58%

    Closes #587

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

    How This Was Tested

    cargo make coverage
    

    Integration Instructions

    N/A




  • driver\_services: add unit tests @kat-perez (#555)
    Change Details
      ## Description
    • add tests for get_platform_override, authenticate_connect, core_disconnect_controller, and disconnect_controller

    • increases coverage for driver_services from 50.95% to 87.26%

    • closes #245

    • Impacts functionality?

    • Impacts security?

    • Breaking change?

    • Includes tests?

    • Includes documentation?

    How This Was Tested

    cargo make coverage

    Integration Instructions

    N/A




  • Update to the 2024 Edition [Rebase \& FF] @makubacki (#577)
    Change Details
      ## Description

    Closes #572


    error.rs: Fix match ergonomics

    In the 2024 edition of Rust, binding modifiers may only be written
    when the default binding method mode is move. This removes the
    redundant explicit ref binding.


    Fix temporary value dropped while still in use errors

    Assign the value of pointers to a temporary variable to extend its
    lifetime to make it clear that the temporary value is not dropped
    before the borrow is finished.


    Add missing unsafe blocks

    The 2024 edition requires unsafe to be used even within unsafe
    functions. This is a large set of changes for that.


    Update to 2024 edition

    Updates the edition to 2024 with fmt changes with that change.


    Add missing unsafe blocks to tests

    Updates test to mark unsafe code for the 2024 edition.


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

    How This Was Tested

    • cargo make all

    Integration Instructions

    Note: Interoperable with the 2021 edition.




  • patina\_dxe\_core: Prevent empty component dispatch warning messages @makubacki (#581)
    Change Details
      ## Description

    If all components are dispatched, some empty warning messagees are printed intended to be the header for the list of components that were not dispatched. This change prevents those messages to prevent someone reading the log from being confused about potentially undispatched components.

    The below messages are shown when all components are dispatched.


    BEFORE

    INFO - Finished Dispatching Local Drivers
    WARN - Components not dispatched:
    WARN - ---- ------------
    WARN - name failed_param
    INFO - Depex evaluation complete, scheduled 1 drivers
    

    AFTER

    INFO - Finished Dispatching Local Drivers
    INFO - Depex evaluation complete, scheduled 1 drivers
    
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • Q35 and physical platform boot with no components skipped
    • Q35 and physical platform boot with a component skipped

    Integration Instructions

    N/A




  • Makefile.toml: Add check\_tests subtask to check @makubacki (#580)
    Change Details
      ## Description

    This allows cargo make check to include test code. Since cargo make check is already run as the Rust Analyzer check command (as defined in .vscode/settings.json), this also allows the errors reported by Rust Analyzer in the Problems pane of VS Code to include test code errors when saving files.

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

    How This Was Tested

    • cargo make check
    • View issues in the problem pane of VS Code detected by Rust Analyzer.

    Integration Instructions

    N/A




  • chore: Release 4.2.0 @makubacki (#574)
    Change Details
      ## Description

    Patina 4.2.0 release.

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

    How This Was Tested

    N/A

    Integration Instructions

    N/A




⚠️ Breaking Changes

  • Add dynamic configuration provider for Performance component [Rebase \& FF] @makubacki (#589)
    Change Details
      ## Description

    Closes #578


    patina_sdk: Add bitwise OR support to Measurement

    To ease performing bitwise operations on Measurement values add
    support for various bitwise OR combinations.


    components/patina_performance: Add config provider component

    Add a new component called performance_config_provider that a
    platform can optionally use to convert configuration HOB information
    to a configuration consumed by the patina_performance component.

    Prior to this, the patina_performance component only supported
    static configuration when invoking the Patina DXE Core start()
    call. This is a problem because the performance component needs to
    be included in the Patina DXE Core binary depending on whether the
    platform has enabled performance measurements. So, the reality is
    that a single Patina DXE Core binary needs a dynamic interface to
    determine whether to activate the main Patina Performance component.

    Platform Integration Detail: Most platforms control performance
    enabling via a PCD. If the platform opts into using the
    performance_config_provider component, it should produce the config
    GUID HOB ({fd87f2d8-112d-4640-9c00-d37d2a1fb75d}) in PEI with the
    HOB contents set according to platform PCD values.


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

    How This Was Tested

    • cargo make all
    • Boot with performance dynamically enabled and disabled in QEMU Patina FW

    Integration Instructions

    • Review the instructions for changing how the Performance component is configured
    • Review whether performance_config_provider is necessary in your Patina DXE Core build and how to integrate it via the mardown file.


  • patina\_performance: Refactor and clean up [Rebase \& FF] @makubacki (#585)
    Change Details
      ## Description

    A "wave" of cleanup and reorganization of code in patina_performance. This does not solve all debt in the code and will have future iterations of changes. It is the most essential refactoring needed to minimize functional disruption, better support current code organization guidelines, and improve maintainability of the code for upcoming future changes.


    Move content from patina_performance to patina_sdk

    A lot of content in the patina_performance component is not solely
    within the scope of the component. It makes understanding and
    maintaining the component more difficult and places like
    patina_dxe_core have dependencies on the component module to access
    content that should be in a more broadly accessible area.

    This change moves content out of patina_performance to resolve these
    issues and support an upcoming refactor of the component.

    Note: This also makes some additional clean up and changes such as
    restructuring the namespace, increasing documentation, and some
    minor code changees. However, this is not meant to resolve all of
    the work that should be done to refactor the performance code. For
    example, the code depends on atomic globals for maintaining some
    state. An alternative solution would be cleaner. This change simply
    collects those static globals into a globals module so they are
    clearly visible as such.


    Refactor patina_performance per crate organization guidelines

    Updates the content of patina_performance to follow the most recent
    organization format as defined in RFC 9.

    https://github.com/OpenDevicePartnership/patina/blob/main/docs/src/rfc/text/0009-standardize-component-crate.md#standard-crate-layout


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

    How This Was Tested

    • cargo make all
    • Boot with BLD_*_TRACE_ENABLE=TRUE in the patina-qemu build with the Performance component present in the Q35 Patina DXE Core binary

    Integration Instructions

    Review updated documentation and changes in content locations to integrate these changes. At this time, it is expected that a very small population of platforms are using the performance code, so, in practice, the overall impact should be relatively minimal.




🐛 Bug Fixes

  • patina\_sdk: Fix typo in hardware interrupt protocol V2 GUID @cfernald (#591)
    Change Details
      ## Description

    As defined, the definition for the hardware interrupt protocol V2 is 32898322-2D1A-474A-BAAA-F3F7CF569470, but should be 32898322-2DA1-474A-BAAA-F3F7CF569470 where the 0x2D1A should be 0x2DA1. This causes DEPEX issues on certain platforms.

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

    How This Was Tested

    Tested on SBSA & physical platform

    Integration Instructions

    N/A




📖 Documentation Updates

  • Add dynamic configuration provider for Performance component [Rebase \& FF] @makubacki (#589)
    Change Details
      ## Description

    Closes #578


    patina_sdk: Add bitwise OR support to Measurement

    To ease performing bitwise operations on Measurement values add
    support for various bitwise OR combinations.


    components/patina_performance: Add config provider component

    Add a new component called performance_config_provider that a
    platform can optionally use to convert configuration HOB information
    to a configuration consumed by the patina_performance component.

    Prior to this, the patina_performance component only supported
    static configuration when invoking the Patina DXE Core start()
    call. This is a problem because the performance component needs to
    be included in the Patina DXE Core binary depending on whether the
    platform has enabled performance measurements. So, the reality is
    that a single Patina DXE Core binary needs a dynamic interface to
    determine whether to activate the main Patina Performance component.

    Platform Integration Detail: Most platforms control performance
    enabling via a PCD. If the platform opts into using the
    performance_config_provider component, it should produce the config
    GUID HOB ({fd87f2d8-112d-4640-9c00-d37d2a1fb75d}) in PEI with the
    HOB contents set according to platform PCD values.


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

    How This Was Tested

    • cargo make all
    • Boot with performance dynamically enabled and disabled in QEMU Patina FW

    Integration Instructions

    • Review the instructions for changing how the Performance component is configured
    • Review whether performance_config_provider is necessary in your Patina DXE Core build and how to integrate it via the mardown file.


  • patina\_performance: Refactor and clean up [Rebase \& FF] @makubacki (#585)
    Change Details
      ## Description

    A "wave" of cleanup and reorganization of code in patina_performance. This does not solve all debt in the code and will have future iterations of changes. It is the most essential refactoring needed to minimize functional disruption, better support current code organization guidelines, and improve maintainability of the code for upcoming future changes.


    Move content from patina_performance to patina_sdk

    A lot of content in the patina_performance component is not solely
    within the scope of the component. It makes understanding and
    maintaining the component more difficult and places like
    patina_dxe_core have dependencies on the component module to access
    content that should be in a more broadly accessible area.

    This change moves content out of patina_performance to resolve these
    issues and support an upcoming refactor of the component.

    Note: This also makes some additional clean up and changes such as
    restructuring the namespace, increasing documentation, and some
    minor code changees. However, this is not meant to resolve all of
    the work that should be done to refactor the performance code. For
    example, the code depends on atomic globals for maintaining some
    state. An alternative solution would be cleaner. This change simply
    collects those static globals into a globals module so they are
    clearly visible as such.


    Refactor patina_performance per crate organization guidelines

    Updates the content of patina_performance to follow the most recent
    organization format as defined in RFC 9.

    https://github.com/OpenDevicePartnership/patina/blob/main/docs/src/rfc/text/0009-standardize-component-crate.md#standard-crate-layout


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

    How This Was Tested

    • cargo make all
    • Boot with BLD_*_TRACE_ENABLE=TRUE in the patina-qemu build with the Performance component present in the Q35 Patina DXE Core binary

    Integration Instructions

    Review updated documentation and changes in content locations to integrate these changes. At this time, it is expected that a very small population of platforms are using the performance code, so, in practice, the overall impact should be relatively minimal.




Full Changelog: patina-v4.2.0...v5.0.0