public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ardb+tianocore@kernel.org>,
	<mikuback@linux.microsoft.com>, <nathaniel.l.desimone@intel.com>,
	<ankit.sinha@intel.com>, <npham@amperecomputing.com>,
	<loc.ho@amperecomputing.com>, <jose.marinho@arm.com>,
	<Samer.El-Haj-Mahmoud@arm.com>, <Matteo.Carlini@arm.com>,
	<Akanksha.Jain2@arm.com>, <Ben.Adderson@arm.com>, <nd@arm.com>
Subject: [PATCH v1 4/5] PrmPkg: Support AArch64 builds using GCC
Date: Wed, 3 Aug 2022 15:35:46 +0100	[thread overview]
Message-ID: <20220803143547.27772-5-sami.mujawar@arm.com> (raw)
In-Reply-To: <20220803143547.27772-1-sami.mujawar@arm.com>

From: Jose Marinho <jose.marinho@arm.com>

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>
---
 PrmPkg/PrmPkg.ci.yaml |  1 +
 PrmPkg/PrmPkg.dsc     | 24 +++++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/PrmPkg/PrmPkg.ci.yaml b/PrmPkg/PrmPkg.ci.yaml
index babaf2214ec86ff04531ae216d957be8d3487387..2d4d12815d6b43d9ee34469bb85c113375a89381 100644
--- a/PrmPkg/PrmPkg.ci.yaml
+++ b/PrmPkg/PrmPkg.ci.yaml
@@ -46,6 +46,7 @@
     ## options defined .pytool/Plugin/DependencyCheck
     "DependencyCheck": {
         "AcceptableDependencies": [
+            "ArmPkg/ArmPkg.dec",
             "MdeModulePkg/MdeModulePkg.dec",
             "MdePkg/MdePkg.dec",
             "PrmPkg/PrmPkg.dec",
diff --git a/PrmPkg/PrmPkg.dsc b/PrmPkg/PrmPkg.dsc
index d10aa3d547ce954cba951c63008ecc51ec24b548..3fb7490acaff91bf0ba0ea407b27630642f00e1e 100644
--- a/PrmPkg/PrmPkg.dsc
+++ b/PrmPkg/PrmPkg.dsc
@@ -2,6 +2,7 @@
 # Build description file for PrmPkg
 #
 # Copyright (C) Microsoft Corporation
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 
@@ -11,7 +12,7 @@ [Defines]
   PLATFORM_VERSION               = 0.1
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
-  SUPPORTED_ARCHITECTURES        = IA32|X64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|AARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
@@ -28,7 +29,6 @@ [LibraryClasses.common]
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   MemoryAllocationLib|MdeModulePkg/Library/BaseMemoryAllocationLibNull/BaseMemoryAllocationLibNull.inf
-  MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
@@ -38,6 +38,13 @@ [LibraryClasses.common]
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.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]
   #
   # EDK II Packages
@@ -129,7 +136,6 @@ [Components]
   # PRM Sample Modules
   #
   $(PLATFORM_PACKAGE)/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
-  $(PLATFORM_PACKAGE)/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf
   $(PLATFORM_PACKAGE)/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
 
   #
@@ -137,6 +143,18 @@ [Components]
   #
   $(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]
 # Force deprecated interfaces off
   *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


  parent reply	other threads:[~2022-08-03 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 14:35 [PATCH v1 0/5] Add support to build PRM for AARCH64 using GCC Sami Mujawar
2022-08-03 14:35 ` [PATCH v1 1/5] Basetools/GenFw: Allow AARCH64 builds to use the --prm flag Sami Mujawar
2022-08-03 14:35 ` [PATCH v1 2/5] PrmPkg: Enable external visibility on PRM symbols Sami Mujawar
2022-08-03 14:35 ` [PATCH v1 3/5] PrmPkg: Build Prm Samples with GCC for AARCH64 Sami Mujawar
2022-08-03 14:35 ` Sami Mujawar [this message]
2022-08-03 14:35 ` [PATCH v1 5/5] PrmPkg: Add details on AArch64 build to the Readme Sami Mujawar
2022-08-04  4:09 ` [PATCH v1 0/5] Add support to build PRM for AARCH64 using GCC Michael Kubacki
2022-08-08 10:35   ` Sami Mujawar
2022-08-08 22:47     ` [edk2-devel] " Michael Kubacki
2022-08-04 10:32 ` Ard Biesheuvel
2022-08-05 15:08 ` Michael Kubacki
2022-08-08 10:34   ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220803143547.27772-5-sami.mujawar@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox