Feature/aarch64 support#174
Draft
Flickdm wants to merge 11 commits intomicrosoft:dev/openssl-3.0.15from
Draft
Conversation
- 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
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>
ecb8da9 to
06bf8d7
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.>