Skip to content

Releases: microsoft/mu_basecore

dev-v2024050004.0.1

21 Mar 01:34
324c815
Compare
Choose a tag to compare

What's Changed

  • Complete MockBootServicesTableLib.cpp @VivianNK (#1304)
    Change Details
      ## Description

    Completed the MockUefiBootServicesTableLib.cpp with missing functions. Also created a EFI_SYSTEM_TABLE instance with MockSimpleTextIn and MockSimpleTextOut

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Local CI ran

    Integration Instructions

    N/A




  • StandaloneMmPkg: Add Google Mock Library for StandaloneMmMemLib @SeolforHsieh (#1287)
    Change Details
      ## Description

    Added StandaloneMmMemLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added StandaloneMmMemLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • MdePkg: Add all mock functions in the MockMmServicesTableLib @SeolforHsieh (#1279)
    Change Details
      ## Description

    Add all mock functions in the MockMmServicesTableLib

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Fill all functions in the MockMmServicesTableLib and able to successfully
    include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • MdePkg: Add Google Mock Protocol for MmCommunication2 @SeolforHsieh (#1288)
    Change Details
      ## Description

    Added MockMmCommunication2 to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockMmCommunication2 to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • [CHERRY-PICK] VS22 linker changes from edk2 [Rebase \& FF] @makubacki (#1284)
    Change Details
      ## Description

    Cherry picks a commit upstreamed (reworked from Mu original) and a similar commit made upstream to eliminate Mu delta.


    [NEW] MdeModulePkg/HiiDatabaseDxe: Avoid struct assignment

    Struct assignments are not permitted in EDK2, as they may be converted
    by the compiler into calls to the 'memcpy' intrinsic, which is not
    guaranteed to be available in EDK2.

    So replace the assignment with a call to CopyMem (), and -while at it-
    replace the loop with a single CopyMem () call, as the loop operates on
    items that are contiguous in memory.


    [NON-FUNCTIONAL REFACTOR] MdeModulePkg/HiiDatabaseDxe: Prevent linker error

    Prevent an issue where memcpy() instrinsic is being used after
    recent MSVC linker update in windows-2022 VM image from 14.31.31103
    to 14.32.31326.


    [DROP MU_CHANGE TAGS] MdePkg/BaseMemoryLib: Prevent potential VS2022 linker failure

    After updating between various VS2022 versions such as 17.4 to
    17.5, , linker failures began to appear in several modules because
    memset is an unresolved symbol.

    The following functions in BaseMemoryLib/MemLibGeneric.c have their
    loop pattern replaced with the memset intrinsic function:

    • InternalMemSetMem16()
    • InternalMemSetMem32()
    • InternalMemSetMem64()

    An example of an error related to InternalMemSetMem64() in
    VariableSmmRuntimeDxe is shown below:

    INFO - BaseMemoryLib.lib(MemLibGeneric.obj) : error LNK2001:
             unresolved external symbol memset
    INFO - <...>\VariableSmmRuntimeDxe.dll : fatal error LNK1120:
             1 unresolved externals
    

    This was reproduced in several environments including:

    Note: This image (with 17.4) does not have this issue
    https://github.com/actions/runner-images/blob/win22/20230219.1/images/win/Windows2022-Readme.md

    This change updates the type cast for the destination buffer to be
    a pointer to volatile data to prevent this optimization with a
    relatively minimum delta to prior implementation.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • VS22 build and CI.
    • QEMU boot.

    Integration Instructions

    • N/A


🐛 Bug Fixes

  • [CHERRY-PICK] DebugMacroCheck: Do not show progress bar with zero items @makubacki (#1296)
    Change Details
      ## Description

    In the case that the total provided to the _show_progress() function is zero, do not show a progress bar to prevent aborts ZeroDivisionError when calculating the progress percentage.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Test progress bar with zero and non-zero total

    Integration Instructions

    • N/A


  • MdeModulePkg/SmmCorePerformanceLib: Remove offset from comm buffer dest space @makubacki (#1285)
    Change Details
      ## Description

    A check validates that if perf records are being written to the comm buffer (not a buffer pointed to from the comm buffer) that enough space is available after the SMM_BOOT_RECORD_COMMUNICATE header in the comm buffer for the boot record size requested. That check currently removes the offset from the boot record size but that is not needed since the offset is applied to the source buffer and the record size is what is copied into the destination (comm buffer).

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Send multiple rounds of perf data across the comm buffer using offsets across the calls.

    Integration Instructions

    • N/A


  • ShellPkg: Removed EmptyParamList and SfoParamList from MockShellLib.cpp @v-bhavanisu (#1280)
    Change Details
      ## Description

    Removed EmptyParamList and SfoParamList from MockShellLib.cpp, since these are already defined as externs under ShellLib.h.

    Please refer to edk2 PR, where they suggested to remove EmptyParamList and SfoParamList, since it was giving GCC build Error.
    tianocore/edk2#10582

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockShellLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A




Full Changelog: dev-v2024050004.0.0...dev-v2024050004.0.1

release-v2024050004.0.1

21 Mar 01:34
Compare
Choose a tag to compare

What's Changed

  • Complete MockBootServicesTableLib.cpp @VivianNK (#1304)
    Change Details
      ## Description

    Completed the MockUefiBootServicesTableLib.cpp with missing functions. Also created a EFI_SYSTEM_TABLE instance with MockSimpleTextIn and MockSimpleTextOut

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Local CI ran

    Integration Instructions

    N/A




  • StandaloneMmPkg: Add Google Mock Library for StandaloneMmMemLib @SeolforHsieh (#1287)
    Change Details
      ## Description

    Added StandaloneMmMemLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added StandaloneMmMemLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • MdePkg: Add all mock functions in the MockMmServicesTableLib @SeolforHsieh (#1279)
    Change Details
      ## Description

    Add all mock functions in the MockMmServicesTableLib

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Fill all functions in the MockMmServicesTableLib and able to successfully
    include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • MdePkg: Add Google Mock Protocol for MmCommunication2 @SeolforHsieh (#1288)
    Change Details
      ## Description

    Added MockMmCommunication2 to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockMmCommunication2 to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • [CHERRY-PICK] VS22 linker changes from edk2 [Rebase \& FF] @makubacki (#1284)
    Change Details
      ## Description

    Cherry picks a commit upstreamed (reworked from Mu original) and a similar commit made upstream to eliminate Mu delta.


    [NEW] MdeModulePkg/HiiDatabaseDxe: Avoid struct assignment

    Struct assignments are not permitted in EDK2, as they may be converted
    by the compiler into calls to the 'memcpy' intrinsic, which is not
    guaranteed to be available in EDK2.

    So replace the assignment with a call to CopyMem (), and -while at it-
    replace the loop with a single CopyMem () call, as the loop operates on
    items that are contiguous in memory.


    [NON-FUNCTIONAL REFACTOR] MdeModulePkg/HiiDatabaseDxe: Prevent linker error

    Prevent an issue where memcpy() instrinsic is being used after
    recent MSVC linker update in windows-2022 VM image from 14.31.31103
    to 14.32.31326.


    [DROP MU_CHANGE TAGS] MdePkg/BaseMemoryLib: Prevent potential VS2022 linker failure

    After updating between various VS2022 versions such as 17.4 to
    17.5, , linker failures began to appear in several modules because
    memset is an unresolved symbol.

    The following functions in BaseMemoryLib/MemLibGeneric.c have their
    loop pattern replaced with the memset intrinsic function:

    • InternalMemSetMem16()
    • InternalMemSetMem32()
    • InternalMemSetMem64()

    An example of an error related to InternalMemSetMem64() in
    VariableSmmRuntimeDxe is shown below:

    INFO - BaseMemoryLib.lib(MemLibGeneric.obj) : error LNK2001:
             unresolved external symbol memset
    INFO - <...>\VariableSmmRuntimeDxe.dll : fatal error LNK1120:
             1 unresolved externals
    

    This was reproduced in several environments including:

    Note: This image (with 17.4) does not have this issue
    https://github.com/actions/runner-images/blob/win22/20230219.1/images/win/Windows2022-Readme.md

    This change updates the type cast for the destination buffer to be
    a pointer to volatile data to prevent this optimization with a
    relatively minimum delta to prior implementation.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • VS22 build and CI.
    • QEMU boot.

    Integration Instructions

    • N/A


🐛 Bug Fixes

  • [CHERRY-PICK] DebugMacroCheck: Do not show progress bar with zero items @makubacki (#1296)
    Change Details
      ## Description

    In the case that the total provided to the _show_progress() function is zero, do not show a progress bar to prevent aborts ZeroDivisionError when calculating the progress percentage.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Test progress bar with zero and non-zero total

    Integration Instructions

    • N/A


  • ShellPkg: Removed EmptyParamList and SfoParamList from MockShellLib.cpp @v-bhavanisu (#1280)
    Change Details
      ## Description

    Removed EmptyParamList and SfoParamList from MockShellLib.cpp, since these are already defined as externs under ShellLib.h.

    Please refer to edk2 PR, where they suggested to remove EmptyParamList and SfoParamList, since it was giving GCC build Error.
    tianocore/edk2#10582

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockShellLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A




release-v2024050003.1.0

14 Feb 00:46
Compare
Choose a tag to compare

What's Changed

  • MdePkg: Add Google Mock Library for SmmMemLib @SeolforHsieh (#1265)
    Change Details
      ## Description

    Added MockSmmMemLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockSmmMemLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • BaseTools/ClangPdbToolChain: Improve CLANG\_BIN guidance @makubacki (#1278)
    Change Details
      ## Description

    Explain whether the default path or a user provided path was used. If the default path is used and not present, then indicate so and give the shell variable name to set to a custom installation bin directory.


    Before

    image

    After

    image


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Test with clang path set to a valid and invalid path.

    Integration Instructions

    • N/A


  • [CHERRY-PICK] Fix lcov 2.0 in HostBasedUnitTestRunner [Rebase \& FF] @makubacki (#1274)
    Change Details
      ## Description

    Fixes issues encountered with lcov 2.0 after moving to the new Ubuntu 24.04 image. Already encountered in the edk2 Fedora container. Commits made there after the 2411 stable tag are cherry-picked here.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Container build with code coverage enabled in Ubuntu 24.04

    Integration Instructions

    • N/A


  • Added MockShellCommandLib @v-bhavanisu (#1264)
    Change Details
      ## Description

    Added MockShellCommandLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockShellCommandLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A




  • [REBASE \& FF] MpDxe: Produce MpServices protocol as a standalone Mp dxe driver @vineelko (#1253)
    Change Details
      ## Description

    This PR creates a fork of MP services functionality into a standalone Dxe driver. It is necessary to bring up platforms which do not rely on UEFI C based CpuDxe code. Existing Cpu Dxe and its MP services code remains the same.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Q35 Qemu boots.

    Integration Instructions

    No changes needed.

      </blockquote>
      <hr>
    </details>
    
  • [Cherry-Pick] MdePkg: Add rest mock functions for Mock UefiRuntimeServicesTableLib @v-frankchou (#1256)
    Change Details
      ## Description Add rest mock functions for Mock UefiRuntimeServicesTableLib for google test.
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested in module integrated with this MockUefiRuntimeServicesTableLib and the result is passed.

    Integration Instructions

    Include the MockUefiRuntimeServicesTableLib.inf in the LibraryClasses section of a dsc file.

      </blockquote>
      <hr>
    </details>
    
  • [CHERRY-PICK] Move UFS spec headers into MdePkg/IndustryStandard files and update to UFS 4.0 @zurcher (#1254)
    Change Details
      # Description

    (Cherry-pick from edk2. Commits should be applied as-is and not merged into a single commit.)

    The spec-based header definitions for UFS drivers are currently in two identical private header files. This change set moves the definitions into the IndustryStandard folder with two separate files tracking relevant UFS spec documents. This will allow for future spec updates to be made in a single location, and allows for other drivers to access these definitions.
    Additionally, this set updates Ufs.h to the UFS 4.0 spec.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added UfsBlockIoPei and UfsPassThruDxe to OvmfPkg, and built successfully.

    Integration Instructions

    Drivers can now include <IndustryStandard/Ufs.h> to interact with UFS interfaces such as <Protocol/UfsDeviceConfig.h>.




🚀 Features & ✨ Enhancements

  • MdeModulePkg/UefiBootManagerLib: Register var policy on notify @makubacki (#1276)
    Change Details
      ## Description

    Variable policy is currently set in the constructor. In some system designs, variable policy might not be running when the constructor of this library is executed. To make the policy registration process more robust, move registration to a protocol notify.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Verify notify is called on variable policy protocol installation and register policy successfully.
    • Verify subsequent calls to the protocol gracefully exit by recognizing EFI_ALREADY_STARTED is returned from RegisterBasicVariablePolicy().

    Integration Instructions

    N/A




dev-v2024050004.0.0

14 Feb 00:46
27eb6af
Compare
Choose a tag to compare

What's Changed

  • MdePkg: Add Google Mock Library for SmmMemLib @SeolforHsieh (#1265)
    Change Details
      ## Description

    Added MockSmmMemLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockSmmMemLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • BaseTools/ClangPdbToolChain: Improve CLANG\_BIN guidance @makubacki (#1278)
    Change Details
      ## Description

    Explain whether the default path or a user provided path was used. If the default path is used and not present, then indicate so and give the shell variable name to set to a custom installation bin directory.


    Before

    image

    After

    image


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Test with clang path set to a valid and invalid path.

    Integration Instructions

    • N/A


  • [CHERRY-PICK] Fix lcov 2.0 in HostBasedUnitTestRunner [Rebase \& FF] @makubacki (#1274)
    Change Details
      ## Description

    Fixes issues encountered with lcov 2.0 after moving to the new Ubuntu 24.04 image. Already encountered in the edk2 Fedora container. Commits made there after the 2411 stable tag are cherry-picked here.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Container build with code coverage enabled in Ubuntu 24.04

    Integration Instructions

    • N/A


  • Added MockShellCommandLib @v-bhavanisu (#1264)
    Change Details
      ## Description

    Added MockShellCommandLib to be used by Googletests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Added MockShellCommandLib to GoogleTests and able to successfully include its functions

    Integration Instructions

    N/A




  • [Cherry-Pick][Rebase \& FF] Adding TPM ACPI table shell viewer and FF-A definition @kuqin12 (#1263)
    Change Details
      ## Description

    This change adds the patch series from EDK2 to support viewing the TPM ACPI table from UEFI shell. And also updated the ACPI definition according to ACPI spec.

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    N/A

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • [REBASE \& FF] MpDxe: Produce MpServices protocol as a standalone Mp dxe driver @vineelko (#1253)
    Change Details
      ## Description

    This PR creates a fork of MP services functionality into a standalone Dxe driver. It is necessary to bring up platforms which do not rely on UEFI C based CpuDxe code. Existing Cpu Dxe and its MP services code remains the same.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Q35 Qemu boots.

    Integration Instructions

    No changes needed.

      </blockquote>
      <hr>
    </details>
    
  • Add resource descriptor hob v2 for memory attributes usage @kuqin12 (#1258)
    Change Details
      ## Description

    This change adds the implementation of supporting "resource descriptor hob type 2", which will extends the existing definition of resource descriptor hob with an attribute field.

    This field can be used to provide the actual attributes needs to be set for the memory region, instead of relying on the state of the system.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    This change was tested on QEMU Q35 and SBSA systems and booted to Windows.

    Integration Instructions

    For platforms needing to propagate specific memory attributes (especially the cache attributes) to the DXE phase, BuildResourceDescriptorWithCacheHob should be used to produce resource descriptors (v2).




  • BaseTools/OverrideValidation: Sort files prior to hashing. @apop5 (#1145)
    Change Details
      ## Description

    Override validation allows hashing a directory through the -t parameter.

    When generating an override validation hash for a directory, it was found that the order of the files can be different when running under linux vs under windows.

    To address this discrepancy, a new module hash has been crated ModuleHash2Cal, which sorts the files prior to hashing.

    Since existing projects use hashes based on ModuleHashCal, when performing override validation checking, check against the original ModuleHashCal and the ModuleHash2Cal prior to generating an override validation failure.

    Generating a new hash value will only use the ModuleHash2Cal.
     

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

    How This Was Tested

    Tested changes on a project using existing project (to ensure backward compatibility)
    Tested changes on the project under linux that was failing

    Tested latest modifications on mu_feature_mm_supv to ensure no regression.

    Integration Instructions

    N/A




  • [Cherry-Pick] MdePkg: Add rest mock functions for Mock UefiRuntimeServicesTableLib @v-frankchou (#1256)
    Change Details
      ## Description Add rest mock functions for Mock UefiRuntimeServicesTableLib for google test.
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested in module integrated with this MockUefiRuntimeServicesTableLib and the result is passed.

    Integration Instructions

    Include the MockUefiRuntimeServicesTableLib.inf in the LibraryClasses section of a dsc file.

      </blockquote>
      <hr>
    </details>
    
  • [CHERRY-PICK] Move UFS spec headers into MdePkg/IndustryStandard files and update to UFS 4.0 @zurcher (#1254)
    Change Details
    ...
Read more

release-v2024050003.0.1

14 Jan 19:03
Compare
Choose a tag to compare

What's Changed

  • [Rebase \& FF] STM Support @kenlautner (#1251)
    Change Details
      ## Description

    Adds SMM Transfer Monitor (STM) infrastructure changes.

    Cherry-picks the following commits:
    c851695 - BaseTools: Add the GenStm C tool

    9b6df1c - MdeModulePkg/TpmMeasurementLibNull: Add MM_CORE_STANDALONE

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tool tested and is confirmed to function correctly.

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • Added MockHiiLib, MockShellLib, MockHiiDatabase protocol @v-bhavanisu (#1248)
    Change Details
      ## Description

    Added MockHiiLib, MockShellLib, MockHiiDatabase protocol to be used by GoogleTests

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Consumed these mocks in Googletests of other repos and build successful

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    

🐛 Bug Fixes

  • [CHERRY-PICK] StandaloneMmPkg: Call PeCoffLoaderUnloadImage When Unloading Image @os-d (#1252)
    Change Details
      ## Description

    Today, StandaloneMmCore calls PeCoffLoaderRelocateImage() when loading images, which calls PeCoffLoaderRelocateImageExtraAction(). On AARCH64, this sets the image memory protections accordingly, RO + E on code sections, RW + NX on data sections.

    However, if an image fails to start (i.e. its entry point returns a failure) StandaloneMmCore does not call the corresponding PeCoffLoaderUnloadImage, which calls PeCoffLoaderUnloadImageExtraAction, which on AARCH64 undoes the memory protections on the image, setting the whole memory region back to RW + NX. The core then frees this memory and the next allocation attempts to use it, which results in a data abort if a read only memory region is attempted to be written to. Theoretically, other instances of the PeCoffExtraActionLib could take other actions and so regardless of architecture, the contract with the PeCoffLoader should be maintained.

    This patch calls PeCoffLoaderUnloadImage when an image's entry point returns a failure, before freeing the image memory. This meets the contract and follows the DXE core behavior.

    Cherry-picked (with a little massaging due to uncherry-picked changes in edk2) from: tianocore/edk2@21cbba1

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested on an AARCH64 platform where a Standalone MM driver was returning an error, causing the system to crash. With this patch, the system can boot.

    Integration Instructions

    N/A.

      </blockquote>
      <hr>
    </details>
    

dev-v2024050003.0.1

14 Jan 19:03
Compare
Choose a tag to compare

What's Changed

  • [Rebase \& FF] STM Support @kenlautner (#1251)
    Change Details
      ## Description

    Adds SMM Transfer Monitor (STM) infrastructure changes.

    Cherry-picks the following commits:
    c851695 - BaseTools: Add the GenStm C tool

    9b6df1c - MdeModulePkg/TpmMeasurementLibNull: Add MM_CORE_STANDALONE

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tool tested and is confirmed to function correctly.

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • Added MockHiiLib, MockShellLib, MockHiiDatabase protocol @v-bhavanisu (#1248)
    Change Details
      ## Description

    Added MockHiiLib, MockShellLib, MockHiiDatabase protocol to be used by GoogleTests

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Consumed these mocks in Googletests of other repos and build successful

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    

🐛 Bug Fixes

  • [CHERRY-PICK] StandaloneMmPkg: Call PeCoffLoaderUnloadImage When Unloading Image @os-d (#1252)
    Change Details
      ## Description

    Today, StandaloneMmCore calls PeCoffLoaderRelocateImage() when loading images, which calls PeCoffLoaderRelocateImageExtraAction(). On AARCH64, this sets the image memory protections accordingly, RO + E on code sections, RW + NX on data sections.

    However, if an image fails to start (i.e. its entry point returns a failure) StandaloneMmCore does not call the corresponding PeCoffLoaderUnloadImage, which calls PeCoffLoaderUnloadImageExtraAction, which on AARCH64 undoes the memory protections on the image, setting the whole memory region back to RW + NX. The core then frees this memory and the next allocation attempts to use it, which results in a data abort if a read only memory region is attempted to be written to. Theoretically, other instances of the PeCoffExtraActionLib could take other actions and so regardless of architecture, the contract with the PeCoffLoader should be maintained.

    This patch calls PeCoffLoaderUnloadImage when an image's entry point returns a failure, before freeing the image memory. This meets the contract and follows the DXE core behavior.

    Cherry-picked (with a little massaging due to uncherry-picked changes in edk2) from: tianocore/edk2@21cbba1

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested on an AARCH64 platform where a Standalone MM driver was returning an error, causing the system to crash. With this patch, the system can boot.

    Integration Instructions

    N/A.

      </blockquote>
      <hr>
    </details>
    

Full Changelog: dev-v2024050003.0.0...v2024050003.0.1

dev-v2024050003.0.0

20 Dec 16:51
6953cfe
Compare
Choose a tag to compare

What's Changed

  • Update shared crypto to v1.0.1 @makubacki (#1247)
    Change Details
      ## Description

    Includes a change to fix the conditional syntax in Standalone MM include FDF files.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Local build and CI
    • Integration on a platform that uses shared crypto (and Standalone MM shared crypto)

    Integration Instructions

    • No changes from v1.0.0 integration instructions


  • Createa Mock for PciRootBridgeIoProtocol, MockPciPlatformProtocol \& add mock function under MockUefiBootServiceTableLib @v-boscochen (#1213)
    Change Details
      ## Description

    Add mock functions under MockUefiBootServiceTableLib , and Create Mock for PciRootBridgeIoProtocol

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Unit tests component can call these mock functions success

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • BaseTools: Disable Second DLINK step for WHOLEARCHIVE @os-d (#1243)
    Change Details
      ## Description

    Project Mu does not use WHOLEARCHIVE, due to issues in silicon partner code when it is enabled. In order to support WHOLEARCHIVE, edk2 added a second dlink step in the build rules to get the benefit of identifying duplicate symbols without needing the space expansion. This is an extra linking step for each module and so does increase build time. Without WHOLEARCHIVE, this is an unneeded step on Mu, so it is disabled here.

    This additional linking step just is a test to verify that there are not duplicate symbols, the actual FW build is not changed here, that is what the second DLINK step does, without the DLINK2_FLAGS where WHOLEARCHIVE is set. HOST_APPLICATIONs still require WHOLEARCHIVE for the actual build, as GoogleTest requires it or could miss some unit tests, due to the complexities of a C++ build in the edk2 build system. UnitTestFrameworkPkgHost.dsc.inc sets this in the DLINK_FLAGS, not DLINK2_FLAGS, so this is still respected.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    CI build

    Integration Instructions

    N/A.

      </blockquote>
      <hr>
    </details>
    
  • Create Mock for SafeIntLib @TsunFeng (#1235)
    Change Details
      ## Description

    Create Mock for SafeIntLib

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Unit tests component can call these mock functions success

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • Add mock for protocol MockFirmwareVolumeBlock under MdePkg @Rasheed-Yusuf (#1216)
    Change Details
      ## Description

    Add Mock for Firmware Volume Block Protocol in MdePkg

    Signed-off-by: rasheed yusuf v-ryusuf@microsoft.com
    Cc: Maintainer Shruti Gupta shrugupt@microsoft.com
    Cc: Reviewer Shruti Gupta shrugupt@microsoft.com

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Consumed in a GoogleTest

    Integration Instructions

    N/A




  • Add Mock for Mock Smm Sw Dispatch2 Protocol @Rasheed-Yusuf (#1217)
    Change Details
      ## Description

    Add Mock for Mock Smm Sw Dispatch2 Protocol

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Incorporated into GoogleTest

    Integration Instructions

    N/A




⚠️ Breaking Changes

  • Update shared crypto to v1.0.0 @makubacki (#1245)
    Change Details
      ## Description

    Major Changes:

    • Note: Shared Crypto now follows straightforward semantic versioning. The version number is incremented based on the type of changes made to the shared crypto binaries. The version number is not tied to the version of the underlying crypto provider.

    • Note: Prior to adopting semantic versioning in the 1.0.0 release, the version number followed a form of YYYY.MM.PATCH. The 1.0.0 release was the first to use semantic versioning and proceeds any of those versions.


    See https://github.com/microsoft/mu_crypto_release/releases/tag/v1.0.0 for the detailed set of changes.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Use shared crypto ext dep on a platform already using it
    • Integration on a X64 MM Supervisor Standalone MM platform
    • Integration on a X64 non-MM Supervisor Standalone MM platform

    Integration Instructions

    Breaking Change - Standalone MM Integration

    Two options are now provided for Standalone MM. It is important to select the option based on the Standalone MM core used on your platform:

    Since the MM Supervisor currently does not support AARCH64, only a X64 MM Supervisor Standalone MM binary is available. A platform should not have both STANDALONEMM_CRYPTO_SERVICES and STANDALONEMM_MMSUPV_CRYPTO_SERVICES set to non-NONE values.




Full Changelog: dev-v2024050002.0.0...v2024050003.0.0

release-v2024050003.0.0

20 Dec 16:48
Compare
Choose a tag to compare

What's Changed

Note: The following change was included in the dev-v2024050003.0.0 release but not the release-v2024050003.0.0 release. It will be in the next release-v<ver> release.

  • Update shared crypto to v1.0.1 @makubacki (#1247)
    Change Details
      ## Description

    Includes a change to fix the conditional syntax in Standalone MM include FDF files.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Local build and CI
    • Integration on a platform that uses shared crypto (and Standalone MM shared crypto)

    Integration Instructions

    • No changes from v1.0.0 integration instructions



  • Createa Mock for PciRootBridgeIoProtocol, MockPciPlatformProtocol \& add mock function under MockUefiBootServiceTableLib @v-boscochen (#1213)
    Change Details
      ## Description

    Add mock functions under MockUefiBootServiceTableLib , and Create Mock for PciRootBridgeIoProtocol

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Unit tests component can call these mock functions success

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • BaseTools: Disable Second DLINK step for WHOLEARCHIVE @os-d (#1243)
    Change Details
      ## Description

    Project Mu does not use WHOLEARCHIVE, due to issues in silicon partner code when it is enabled. In order to support WHOLEARCHIVE, edk2 added a second dlink step in the build rules to get the benefit of identifying duplicate symbols without needing the space expansion. This is an extra linking step for each module and so does increase build time. Without WHOLEARCHIVE, this is an unneeded step on Mu, so it is disabled here.

    This additional linking step just is a test to verify that there are not duplicate symbols, the actual FW build is not changed here, that is what the second DLINK step does, without the DLINK2_FLAGS where WHOLEARCHIVE is set. HOST_APPLICATIONs still require WHOLEARCHIVE for the actual build, as GoogleTest requires it or could miss some unit tests, due to the complexities of a C++ build in the edk2 build system. UnitTestFrameworkPkgHost.dsc.inc sets this in the DLINK_FLAGS, not DLINK2_FLAGS, so this is still respected.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    CI build

    Integration Instructions

    N/A.

      </blockquote>
      <hr>
    </details>
    
  • Create Mock for SafeIntLib @TsunFeng (#1235)
    Change Details
      ## Description

    Create Mock for SafeIntLib

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Unit tests component can call these mock functions success

    Integration Instructions

    N/A

      </blockquote>
      <hr>
    </details>
    
  • Add mock for protocol MockFirmwareVolumeBlock under MdePkg @Rasheed-Yusuf (#1216)
    Change Details
      ## Description

    Add Mock for Firmware Volume Block Protocol in MdePkg

    Signed-off-by: rasheed yusuf v-ryusuf@microsoft.com
    Cc: Maintainer Shruti Gupta shrugupt@microsoft.com
    Cc: Reviewer Shruti Gupta shrugupt@microsoft.com

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Consumed in a GoogleTest

    Integration Instructions

    N/A




  • Add Mock for Mock Smm Sw Dispatch2 Protocol @Rasheed-Yusuf (#1217)
    Change Details
      ## Description

    Add Mock for Mock Smm Sw Dispatch2 Protocol

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

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Incorporated into GoogleTest

    Integration Instructions

    N/A




⚠️ Breaking Changes

  • Update shared crypto to v1.0.0 @makubacki (#1245)
    Change Details
      ## Description

    Major Changes:

    • Note: Shared Crypto now follows straightforward semantic versioning. The version number is incremented based on the type of changes made to the shared crypto binaries. The version number is not tied to the version of the underlying crypto provider.

    • Note: Prior to adopting semantic versioning in the 1.0.0 release, the version number followed a form of YYYY.MM.PATCH. The 1.0.0 release was the first to use semantic versioning and proceeds any of those versions.


    See https://github.com/microsoft/mu_crypto_release/releases/tag/v1.0.0 for the detailed set of changes.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    • Use shared crypto ext dep on a platform already using it
    • Integration on a X64 MM Supervisor Standalone MM platform
    • Integration on a X64 non-MM Supervisor Standalone MM platform

    Integration Instructions

    Breaking Change - Standalone MM Integration

    Two options are now provided for Standalone MM. It is important to select the option based on the Standalone MM core used on your platform:

    Since the MM Supervisor currently does not support AARCH64, only a X64 MM Supervisor Standalone MM binary is available. A platform should not have both STANDALONEMM_CRYPTO_SERVICES and STANDALONEMM_MMSUPV_CRYPTO_SERVICES set to non-NONE values.




Full Changelog: dev-v2024050002.0.0...v2024050003.0.0

release-v2024050002.0.0

11 Dec 20:19
Compare
Choose a tag to compare

What's Changed

  • [SQUASH ON REBASE] Remove Windows ARM BaseTools Build @os-d (#1242)
    Change Details
      ## Description

    The Windows ARM BaseTools build is not used any longer, it used to work on Windows ARM64, but that support is not there anymore. Windows ARM64 is built for BaseTools instead and there are no current Windows ARM hosts, nor likely ever to be any more.

    This commit removes the GitHub workflow, which was not removed in the first commit removing the publishing flow.

    This can be squashed with the original commit adding CI (or the commit adding these BaseTool builds, if separate).

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Workflow change.

    Integration Instructions

    N/A.




  • Add MockVariablePolicyHelperLib @kanechen66 (#1238)
    Change Details
      ## Description

    Provide MockVariablePolicyHelperLib for GoogleTest.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested in module integrated with this MockVariablePolicyHelperLib and pass

    Integration Instructions

    N/A




⚠️ Breaking Changes

  • [SQUASH ON REBASE] Remove Windows ARM BaseTools Build @os-d (#1241)
    Change Details
      ## Description

    The Windows ARM BaseTools build is not used any longer, it used to work on Windows ARM64, but that support is not there anymore. Windows ARM64 is built for BaseTools instead and there are no current Windows ARM hosts, nor likely ever to be any more. The Windows ARM pipeline is also failing due to a change in VS, so this fixes a pipeline break.

    This can be squashed with the original commit adding CI (or the commit adding these BaseTools builds, if separate).

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Dropping pipeline.

    Integration Instructions

    This is listed as a breaking change because a formerly published package is no longer published, but this package is not used by any consumer, so it is safe to backport to the release branch. It will fix the same pipeline error there.




Full Changelog: dev-v2024050001.0.1...v2024050002.0.0

dev-v2024050002.0.0

11 Dec 20:19
Compare
Choose a tag to compare

What's Changed

  • [SQUASH ON REBASE] Remove Windows ARM BaseTools Build @os-d (#1242)
    Change Details
      ## Description

    The Windows ARM BaseTools build is not used any longer, it used to work on Windows ARM64, but that support is not there anymore. Windows ARM64 is built for BaseTools instead and there are no current Windows ARM hosts, nor likely ever to be any more.

    This commit removes the GitHub workflow, which was not removed in the first commit removing the publishing flow.

    This can be squashed with the original commit adding CI (or the commit adding these BaseTool builds, if separate).

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Workflow change.

    Integration Instructions

    N/A.




  • Add MockVariablePolicyHelperLib @kanechen66 (#1238)
    Change Details
      ## Description

    Provide MockVariablePolicyHelperLib for GoogleTest.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Tested in module integrated with this MockVariablePolicyHelperLib and pass

    Integration Instructions

    N/A




⚠️ Breaking Changes

  • [SQUASH ON REBASE] Remove Windows ARM BaseTools Build @os-d (#1241)
    Change Details
      ## Description

    The Windows ARM BaseTools build is not used any longer, it used to work on Windows ARM64, but that support is not there anymore. Windows ARM64 is built for BaseTools instead and there are no current Windows ARM hosts, nor likely ever to be any more. The Windows ARM pipeline is also failing due to a change in VS, so this fixes a pipeline break.

    This can be squashed with the original commit adding CI (or the commit adding these BaseTools builds, if separate).

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?
    • Backport to release branch?

    How This Was Tested

    Dropping pipeline.

    Integration Instructions

    This is listed as a breaking change because a formerly published package is no longer published, but this package is not used by any consumer, so it is safe to backport to the release branch. It will fix the same pipeline error there.




Full Changelog: dev-v2024050001.0.1...v2024050002.0.0