]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PrmPkg: Support AArch64 builds using GCC
authorJose Marinho <jose.marinho@arm.com>
Fri, 18 Dec 2020 14:01:55 +0000 (14:01 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Aug 2022 22:43:51 +0000 (22:43 +0000)
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>
PrmPkg/PrmPkg.ci.yaml
PrmPkg/PrmPkg.dsc

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