Skip to content

patina-v23.1.1

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Sep 16:47
b2933e8

What's Changed

  • SDK: SerDe HOB: Add FV2 and FV3 Support @os-d (#1765)
    Change Details
      ## Description

    The SerDe HOB only supports FV HOBs, not FV2 and FV3 currently. This is used for the readiness tool to evaluate. Because these HOBs contain similar content, they are all squashed into the same SerDe structure. If the nuances between them are needed later, separate ones can be created.

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

    How This Was Tested

    Tested by adding FV checks to the readiness tool that also check FV2 and FV3 HOBs.

    Integration Instructions

    N/A.

      </blockquote>
      <hr>
    </details>
    
  • patina\_dxe\_core: Allow malformed debug directory in TE images [Rebase \& FF] @makubacki (#1764)
    Change Details
      ## Description

    I wasn't able to submit my PR review feedback for #1762 in time. So, I made the changes I was going to propose in the PR.


    patina_dxe_core/pecoff: Minor UefiPeInfo cleanup

    Since commit 48d1fbf removed the PE::parse_with_opts() call in
    from_pe(), setting opts.parse_attribute_certificates no longer
    has an effect, so it's dropped here.

    Also updates the relocation table directory logic to use the same
    pattern as the debug table logic where Some(&reloc_section) is used
    instead of Some(reloc_section).


    patina_dxe_core: Allow malformed debug directory in TE images

    Updates from_te() to match the changes in 48d1fbf.

    After that commit, from_te() still rejects images with a malformed
    debug directory, since goblin::pe::TE::parse() parses it eagerly
    and returns Err.

    This commit refactors from_te() to build the header and sections
    directly, then parse the debug directory separately so a bad entry
    only drops the filename instead of failing the whole image, to match
    the from_pe() change.


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

    How This Was Tested

    • Unit test that corrupts the debug dir size so it does not resolve correctly
    • cargo make all

    Integration Instructions

    • N/A


  • patina\_dxe\_core: pecoff: allow malformed debug directory @Javagedes (#1762)
    Change Details
      ## Description

    The debug directory is an optional directory not required to load and dispatch an image. This commit updates the pecoff parsing such that a malformed debug directory will be skipped instead of outright rejecting the image.

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

    How This Was Tested

    Regression tests on an EFI image that has a malformed debug directory.

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • Dxe Memory Bin: Fix Peak Usage Tracking @os-d (#1758)
    Change Details
      ## Description

    Currently, patina is copying the memory type information HOB values in as the peak usage values in the config table. As a result, the config table is not tracking real usage, only configured usage.

    This commit fixes that by dropping the copy. This requires initializing the table separately, since it was relying on getting a copy from the HOB. This approach follows edk2 and has the stats table and the info table match each other, indexable by memory type in both. The stats table only has its information_index set if the given type has a memory bin associated with it.

    Closes #1757

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

    How This Was Tested

    Tested on Q35. Prior to this change, BdsDxe always reported the HOB values as the current pages. After this change, it reports the accurate peak page usage.

    Integration Instructions

    This is not a breaking change, but it may allow platforms to lower the bin sizes currently configured. A reboot may occur if the PCD is set to reboot on memory type changes.

      </blockquote>
      <hr>
    </details>
    
  • Patina: Gate architecture specific code on UEFI targets @vineelko (#1753)
    Change Details
      ## Description

    Patina: Gate architecture specific code on UEFI targets

    Following the patina-paging PR #223, apply a similar change to the
    Patina repo. This ensures architecture specific code is properly
    guarded and only compiled for the appropriate UEFI targets.

    Note that some external crates intentionally use inline assembly in host
    builds:

    • corosensei includes global_asm! in x86_64_windows.rs conditioned
      on cfg(windows and x86_64).
    • uart_16550 includes a PIO backend that uses inline assembly
      conditioned on cfg(x86_64).

    So this commit is a best effort to keep Patina code free of inline
    assembly when building for host targets.

    NOTE: This PR only addresses the conversion of cfg(not(test)) to
    cfg(target_os = "uefi"). There are still many raw asm! blocks that
    are not flagged by the internal toolchain, so they are being left as-is.

    NIT: Update to the latest MTRR version due to coverage attribute
    changes.

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

    How This Was Tested

    cargo make all with public and internal toolchains(excluding above exceptions).

    Integration Instructions

    NA




  • GCD: Add Better Logs on InvalidStateTransition @os-d (#1751)
    Change Details
      ## Description

    Currently, invalid state transitions in the memory block layer all return the same error code and the GCD just prints/asserts that an invalid state transition occurred, which is not easily debuggable.

    This adds prints to the memory block layer to identify why an invalid state transition occurred. Allocate is expected to fail when testing regions to allocate from, so a print is not added there.

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

    How This Was Tested

    Printing on a system where an invalid state transition was occurring.

    Integration Instructions

    N/A.




📖 Documentation Updates

  • [FCP] RFC: Use cargo-nextest @makubacki (#1693)
    Change Details
      ## Description

    Status: FCP

    Proposes using cargo-nextest for running tests in Patina.

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

    How This Was Tested

    • N/A

    Integration Instructions

    • N/A


Full Changelog: patina-v23.1.0...v23.1.1