Skip to content

Feature/aarch64 support#174

Draft
Flickdm wants to merge 11 commits intomicrosoft:dev/openssl-3.0.15from
Flickdm:feature/aarch64-support
Draft

Feature/aarch64 support#174
Flickdm wants to merge 11 commits intomicrosoft:dev/openssl-3.0.15from
Flickdm:feature/aarch64-support

Conversation

@Flickdm
Copy link
Member

@Flickdm Flickdm commented Jan 27, 2026

Description

<Include a description of the change and why this change was made.>

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?

How This Was Tested

<Describe the test(s) that were run to verify the changes.>

Integration Instructions

<Describe how these changes should be integrated. Use N/A if nothing is required.>

- IntrinsicLib: Add CopyMem.c source for AARCH64 architecture
- CryptRand: Rename DefaultSeed local variable to LocalSeed to avoid
  shadowing the global constant
- CryptRand: Add RngLib include for random seed generation
This change adds AARCH64 architecture support for the OneCryptoBin DXE
driver by implementing a protocol-based approach instead of PE/COFF
export parsing.

Changes:

- Add OneCryptoBinDxe.inf and OneCryptoBinDxeEntry.c for DXE driver
that installs gOneCryptoPrivateProtocolGuid
- Add OneCryptoBinMmEntry.c to separate MM entry point from main binary
- Add OneCryptoBin.h header for shared declarations across entry points
- Refactor OneCryptoBin.c to remove MM-specific code and includes
- Update OneCryptoBinStandaloneMm.inf and OneCryptoBinSupvMm.inf to use
new separate entry point source file
- Update OneCryptoPkg.dec protocol description to document DXE usage
- Reorganize OneCryptoPkg.dsc to support AARCH64 with new
[Components.AARCH64] section and move common components to [Components]
- Add OneCryptoBinDxe.inf for pre-built AARCH64 binary
distribution

The protocol-based approach is needed on AARCH64 because GCC/Clang
toolchains do not generate PE/COFF export tables in the same way as
MSVC, making export parsing unreliable.
architecture-specific file layouts for building release packages.

Changes:

Replace static FILE_LAYOUT with get_file_layout() function that
returns architecture-specific layouts
Add SUPPORTED_ARCHITECTURES list with X64 and AARCH64
AARCH64 layout includes OneCryptoBinDxe and OneCryptoLoaderDxe
X64 layout includes OneCryptoBinSupvMm and OneCryptoLoaderSupvMm
Add architecture validation with descriptive error messages
Update list_layout() to accept arch parameter
- package_onecrypto.py: Update AARCH64 DXE loader path to use
  OneCryptoLoaderDxeByProtocol build output
- package_onecrypto.py: Add multi-architecture packaging support with
  repeatable --arch flag to package X64 and AARCH64 in a single zip
- package_onecrypto.py: Reorganize package structure to
  <target>/<arch>/<folder>/ for multi-arch builds
- package_onecrypto.py: Rename default package to OneCrypto_Drivers_v{version}
- uefi_compress.py: Switch from TianoCompress to LzmaCompress for
  compression analysis
- OneCrypto_ext_dep.json.template: Update source URL to use <ARCH>
  placeholder for architecture-specific packages
- PlatformBuild.py: Update post-build packaging to create single
  multi-architecture package with per-arch reporting
Add OneCryptoLoaderDxeByProtocol driver that uses a protocol-based
approach for AARCH64 platforms instead of PE/COFF export parsing.

- Add OneCryptoLoaderDxeByProtocol.c: DXE driver that consumes
  gOneCryptoPrivateProtocolGuid and produces gOneCryptoProtocolGuid
- Add OneCryptoLoaderDxeByProtocol.inf: Module definition with DEPEX
  on gOneCryptoPrivateProtocolGuid
- Add lazy RNG initialization to avoid boot-time hangs when
  EFI_RNG_PROTOCOL is not immediately available
- OneCryptoPkg.dsc: Add OneCryptoLoaderDxeByProtocol to AARCH64
  components section with required library class mappings
@mu-automation mu-automation bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Jan 27, 2026
This commit adds the ability to export the CryptoEntry for GCC5.
This requires changes to BaseTools in order to export the
symbols from the ELF binary to the resulant PE32 EFI binary.
This is an initial commit while I investigate ways to do this
cleanly.
Update this commit once I find a way to do this cleanly.
Add a 4K Page size for GCC5 Support
Update INF files to use architecture-agnostic [Binaries] sections
instead of [Binaries.X64] or [Binaries.AARCH64]. This enables the
same INF files to work across multiple architectures.

Additionally, add GCC5 linker build options to source-based loader
INF files to set common-page-size=0x1000 for proper alignment.

Files modified:
- OneCryptoBin/Integration/OneCryptoBinDxe.inf
- OneCryptoBin/Integration/OneCryptoBinStandaloneMm.inf
- OneCryptoBin/Integration/OneCryptoBinSupvMm.inf
- OneCryptoLoaders/Integration/OneCryptoLoaderDxe.inf
- OneCryptoLoaders/Integration/OneCryptoLoaderStandaloneMm.inf
- OneCryptoLoaders/Integration/OneCryptoLoaderSupvMm.inf
- OneCryptoLoaders/OneCryptoLoaderDxe.inf
- OneCryptoLoaders/OneCryptoLoaderDxeByProtocol.inf
- OneCryptoLoaders/OneCryptoLoaderStandaloneMm.inf
- OneCryptoLoaders/OneCryptoLoaderSupvMm.inf

Signed-off-by: Doug Flick <dougflick@microsoft.com>
@Flickdm Flickdm force-pushed the feature/aarch64-support branch from ecb8da9 to 06bf8d7 Compare January 31, 2026 01:53
Refactor the build and packaging infrastructure to:
- Move packaging logic from PlatformBuild.py into package_onecrypto.py
  for better separation of concerns
- Add toolchain auto-detection from available build directories
- Support packaging multiple targets (DEBUG/RELEASE) in a single archive
- Add UEFI LzmaCompress analysis to show compressed EFI sizes
- Use root logger for consistent Stuart logging integration
- Build targets as subprocesses for clean environment isolation

The package_onecrypto.py script can now be used standalone or invoked
from PlatformBuild.py, with all output routed through Stuart's logging.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact language:python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant