PrmPkg: Support AArch64 builds using GCC

Add support to build PrmPkg for AArch64 using the GCC compiler.

Add AARCH64 architecture to the list of supported architectures.
Add BaseStackCheck library to allow for Prm module builds on AARCH64.

Also update the CI to add dependency on ArmPkg.

Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Jose Marinho 2020-12-18 14:01:55 +00:00 committed by mergify[bot]
parent 21200d9fe6
commit 57faeb782a
2 changed files with 22 additions and 3 deletions

View File

@ -46,6 +46,7 @@
## options defined .pytool/Plugin/DependencyCheck ## options defined .pytool/Plugin/DependencyCheck
"DependencyCheck": { "DependencyCheck": {
"AcceptableDependencies": [ "AcceptableDependencies": [
"ArmPkg/ArmPkg.dec",
"MdeModulePkg/MdeModulePkg.dec", "MdeModulePkg/MdeModulePkg.dec",
"MdePkg/MdePkg.dec", "MdePkg/MdePkg.dec",
"PrmPkg/PrmPkg.dec", "PrmPkg/PrmPkg.dec",

View File

@ -2,6 +2,7 @@
# Build description file for PrmPkg # Build description file for PrmPkg
# #
# Copyright (C) Microsoft Corporation # Copyright (C) Microsoft Corporation
# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent # SPDX-License-Identifier: BSD-2-Clause-Patent
## ##
@ -11,7 +12,7 @@
PLATFORM_VERSION = 0.1 PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005 DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = IA32|X64 SUPPORTED_ARCHITECTURES = IA32|X64|AARCH64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT SKUID_IDENTIFIER = DEFAULT
@ -28,7 +29,6 @@
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
MemoryAllocationLib|MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.inf MemoryAllocationLib|MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.inf
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
@ -38,6 +38,13 @@
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
[LibraryClasses.IA32, LibraryClasses.X64]
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
[LibraryClasses.AARCH64]
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
[LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_APPLICATION] [LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_APPLICATION]
# #
# EDK II Packages # EDK II Packages
@ -129,7 +136,6 @@
# PRM Sample Modules # PRM Sample Modules
# #
$(PLATFORM_PACKAGE)/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf $(PLATFORM_PACKAGE)/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
$(PLATFORM_PACKAGE)/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf
$(PLATFORM_PACKAGE)/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf $(PLATFORM_PACKAGE)/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
# #
@ -137,6 +143,18 @@
# #
$(PLATFORM_PACKAGE)/Application/PrmInfo/PrmInfo.inf $(PLATFORM_PACKAGE)/Application/PrmInfo/PrmInfo.inf
[Components.IA32, Components.X64]
#
# PRM Sample Modules for IA32 and X64
#
$(PLATFORM_PACKAGE)/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf
[Components.AARCH64]
ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
# Add support for GCC stack protector
MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
[BuildOptions] [BuildOptions]
# Force deprecated interfaces off # Force deprecated interfaces off
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES