mu_rust_pi

Platform Initialization (PI) Specification Definitions and Support Code

OTHER License

Stars
1
Committers
7

Bot releases are visible (Hide)

mu_rust_pi - v4.0.0

Published by github-actions[bot] 25 days ago

What's Changed

Updates the crate version in anticipation of a v4.0 tagged release.

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

How This Was Tested

  • N/A

Integration Instructions

  • N/A

⚠️ Breaking Changes

Add definitions for PI Status Codes from PI Spec 1.8A, Volume 3: Shared Architectural Elements, Chapter 6.6.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
    Changes namespace for status code value definitions
  • Includes tests?
  • Includes documentation?

How This Was Tested

Built an external project using some items defined in this module.

Integration Instructions

N/A


🚀 Features & ✨ Enhancements

Add definitions for PI Status Codes from PI Spec 1.8A, Volume 3: Shared Architectural Elements, Chapter 6.6.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
    Changes namespace for status code value definitions
  • Includes tests?
  • Includes documentation?

How This Was Tested

Built an external project using some items defined in this module.

Integration Instructions

N/A


Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v3.0.2...v4.0.0

mu_rust_pi - v3.0.2

Published by github-actions[bot] about 1 month ago

What's Changed

  • Add a test for section metadata correctness
  • fix a bug in GUID_DEFINED section parsing.
  • Impacts functionality?
    • bugfix
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Added unit test to verify SectionMetadata correctness.

Integration Instructions

N/A

  </blockquote>
  <hr>
</details>

Add CompressionType defines per PI spec 1.9 3.2.5.2

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

How This Was Tested

N/A - only const definitions, no functional code.

Integration Instructions

N/A

  </blockquote>
  <hr>
</details>

Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v3.0.1...v3.0.2

mu_rust_pi - v3.0.1 Latest Release

Published by github-actions[bot] about 1 month ago

What's Changed

📖 Documentation Updates

Adds a definition for MEMORY_TYPE_INFO_HOB_GUID and related structure.

  • Impacts functionality?
    Adds support for a new struct.
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?
    Standard rust docs

How This Was Tested

Verified new structure definition locally.

Integration Instructions

N/A

  </blockquote>
  <hr>
</details>

Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v3.0.0...v3.0.1

mu_rust_pi - v3.0.0

Published by github-actions[bot] about 2 months ago

What's Changed

  • Cargo.toml:
    • Add nightly feature to supress unexpected_cfgs warning
  • change 'default_features' to 'default-features' as the new convention is required for Rust 2024 edition
  • files.rs:
    • Add allow(dead_code) for the Header2 struct to supress dead_code warning.

For details on how to complete to complete these options and their meaning refer to CONTRIBUTING.md.

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

How This Was Tested

  • All warnings were properly supressed.
  • Verified these changes are compatibley with Rust toolchain 1.76.

Integration Instructions

N/A


⚠️ Breaking Changes

This patch adds support for accessing the data for Guid Extension HOB types.

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

How This Was Tested

Unit tests, also incorporated into prototype code and confirmed can access data as expected.

Integration Instructions

Code using the previous definition of Hob::GuidHob(&'a GuidHob) will need to be adjusted to use Hob::GuidHob(&'a GuidHob, &'a [u8])

  </blockquote>
  <hr>
</details>

Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v2.0.1...v3.0.0

mu_rust_pi - v2.0.1

Published by github-actions[bot] 2 months ago

What's Changed

Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v2.0.0...v2.0.1

What's Changed

New Contributors

Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v2.0.0...v2.0.1

mu_rust_pi - v2.0.0

Published by github-actions[bot] 3 months ago

What's Changed

⚠️ Breaking Changes

This PR is a significant refactor of the FFS support to allow for section extraction and caching. A significant change of the design is to adjust the FFS Section implementation so that the backing data for the section is always on the heap. Since encapsulation sections are extracted into buffers on the heap while non-encapsulation sections come from the slice that backs the FV/FFS that contains the sections, unifying the data model by copying all section data to the hep significantly simplifies the ownership model for the memory used in the implementation.

FirmwareVolume and File instances are still tied to the slice reference used to initialize them, and do not incur heap allocations when instantiating them.

This PR also adds section extraction capability - when enumerating Sections from a File, the caller can provide an implementation of the SectionExtractor trait to provide support for section extraction, and the PR includes an example implementation for extracting Brotli-compressed section as a demonstration of that capability.

  • Impacts functionality?
    • Adds caching and section extraction.
  • Impacts security?
    • Adds more rigorous validation of FFS structures and headers.
  • Breaking change?
    • Significantly refactors API used to access FFS.
  • Includes tests?
    • Includes unit test cases for new implementation.
    • Includes Brotli example of custom section extraction support.
  • Includes documentation?
    • Standard rustdocs

How This Was Tested

Unit tests and Brotli example execute as expected.

Integration Instructions

Consumers of the FFS abstractions will need to be modified to support the new API.


🔐 Security Impacting

This PR is a significant refactor of the FFS support to allow for section extraction and caching. A significant change of the design is to adjust the FFS Section implementation so that the backing data for the section is always on the heap. Since encapsulation sections are extracted into buffers on the heap while non-encapsulation sections come from the slice that backs the FV/FFS that contains the sections, unifying the data model by copying all section data to the hep significantly simplifies the ownership model for the memory used in the implementation.

FirmwareVolume and File instances are still tied to the slice reference used to initialize them, and do not incur heap allocations when instantiating them.

This PR also adds section extraction capability - when enumerating Sections from a File, the caller can provide an implementation of the SectionExtractor trait to provide support for section extraction, and the PR includes an example implementation for extracting Brotli-compressed section as a demonstration of that capability.

  • Impacts functionality?
    • Adds caching and section extraction.
  • Impacts security?
    • Adds more rigorous validation of FFS structures and headers.
  • Breaking change?
    • Significantly refactors API used to access FFS.
  • Includes tests?
    • Includes unit test cases for new implementation.
    • Includes Brotli example of custom section extraction support.
  • Includes documentation?
    • Standard rustdocs

How This Was Tested

Unit tests and Brotli example execute as expected.

Integration Instructions

Consumers of the FFS abstractions will need to be modified to support the new API.


📖 Documentation Updates

This PR is a significant refactor of the FFS support to allow for section extraction and caching. A significant change of the design is to adjust the FFS Section implementation so that the backing data for the section is always on the heap. Since encapsulation sections are extracted into buffers on the heap while non-encapsulation sections come from the slice that backs the FV/FFS that contains the sections, unifying the data model by copying all section data to the hep significantly simplifies the ownership model for the memory used in the implementation.

FirmwareVolume and File instances are still tied to the slice reference used to initialize them, and do not incur heap allocations when instantiating them.

This PR also adds section extraction capability - when enumerating Sections from a File, the caller can provide an implementation of the SectionExtractor trait to provide support for section extraction, and the PR includes an example implementation for extracting Brotli-compressed section as a demonstration of that capability.

  • Impacts functionality?
    • Adds caching and section extraction.
  • Impacts security?
    • Adds more rigorous validation of FFS structures and headers.
  • Breaking change?
    • Significantly refactors API used to access FFS.
  • Includes tests?
    • Includes unit test cases for new implementation.
    • Includes Brotli example of custom section extraction support.
  • Includes documentation?
    • Standard rustdocs

How This Was Tested

Unit tests and Brotli example execute as expected.

Integration Instructions

Consumers of the FFS abstractions will need to be modified to support the new API.


Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v1.0.0...v2.0.0

mu_rust_pi - v1.0.0

Published by github-actions[bot] 4 months ago

What's Changed

Format only. Formatting changes from running with nightly rustfmt to fully apply all rules specified in rustfmt.toml. No functional changes.

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

How This Was Tested

No functional change.

Integration Instructions

N/A


⚠️ Breaking Changes

This is a refactor of the FFS support to add support for large files/sections (i.e. EFI_FIRMWARE_FILESYSTEM_3). The previous implementation only supported small (less than 16MB) files/sections (i.e. EFI_FIRMWARE_FILESYSTEM_2).

  • Impacts functionality?
    • Adds support for FFS 3.
  • Impacts security?
  • Breaking change?
    • Significant refactor of API for accessing FFS objects.
  • Includes tests?
    • Added tests to verify FFS 3 large files.
  • Includes documentation?
    • updated rustdocs

How This Was Tested

Unit tests pass.

Integration Instructions

Consumers of the affected modules will need to update to use the new APIs.


📖 Documentation Updates

This is a refactor of the FFS support to add support for large files/sections (i.e. EFI_FIRMWARE_FILESYSTEM_3). The previous implementation only supported small (less than 16MB) files/sections (i.e. EFI_FIRMWARE_FILESYSTEM_2).

  • Impacts functionality?
    • Adds support for FFS 3.
  • Impacts security?
  • Breaking change?
    • Significant refactor of API for accessing FFS objects.
  • Includes tests?
    • Added tests to verify FFS 3 large files.
  • Includes documentation?
    • updated rustdocs

How This Was Tested

Unit tests pass.

Integration Instructions

Consumers of the affected modules will need to update to use the new APIs.


Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/v0.1.0...v1.0.0

mu_rust_pi - v0.1.0

Published by github-actions[bot] 5 months ago

What's Changed

The primary focus is to provide rust types and constants to build
a PI Specification compliant firmware, functionality is allowed to
be implemented around those types as well. Code implementation must
be applicable to any PI spec compliant firmware that may need the
associated functionality.

Refer to the Platform Initialization (PI) Specification for more
background on the specification https://uefi.org/specs/PI/1.8A/.

The PI Specification describes a number of boot phases and concepts
used across those boot phases referred to as "Shared Architectural
Elements". The implementation predominantly focuses on the DXE phase
at this time. This includes shared elements used in other stages such
as the HOBs and firmware storage. Contributions to expand coverage of
the specification are welcome.

The overall structure and design of the crate is subject to breaking
changes at this time. The code is being shared for wider feedback and
collaboration that might result in fundamental changes to the
organization of content. These details will be documented and managed
using appropriately versioned releases of the crate to reflect the
degree of change.


Full Changelog: https://github.com/microsoft/mu_rust_pi/compare/...v0.1.0