From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com []) by mx.groups.io with SMTP id smtpd.web11.4376.1617863574613824727 for ; Wed, 07 Apr 2021 23:32:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) IronPort-SDR: UhWAWZT7ZIvyo0ViLqYXSs5iUHPbGd8hSlEWrkIHrWKpOZa9cm/XOOrEYjW7oPUpESAGYJHE8t uY9/wsf+cKnA== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="254810020" X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="254810020" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 23:32:53 -0700 IronPort-SDR: rG4Q6addvQGttWXIrP3gJVXsOoESqyAgqy3OsanBzGrRHNVTrj1xhnNsbG99qRg/8s/CNUtEXK vvTnikfX1mvg== X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="530488468" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.252.133.10]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 23:32:48 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Zhiguang Liu , Andrew Fish , Abner Chang Subject: [Patch 1/3] MdePkg/Include: Allow CPU specific defines to be predefined Date: Wed, 7 Apr 2021 23:32:38 -0700 Message-Id: <20210408063240.877-2-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210408063240.877-1-michael.d.kinney@intel.com> References: <20210408063240.877-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Update the following 3 DEFINES to allow them to be predefined on the EDK II build command line using /D flags or in DSC file [BuildOptions] sections. * EFI_IMAGE_MACHINE_TYPE_SUPPORTED * EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED * EFI_REMOVABLE_MEDIA_FILE_NAME Cc: Liming Gao Cc: Zhiguang Liu Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney --- MdePkg/Include/Uefi/UefiBaseType.h | 4 +++- MdePkg/Include/Uefi/UefiSpec.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 934fc07285d9..92ffeb4c63d5 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -1,7 +1,7 @@ /** @file Defines data types and constants introduced in UEFI. -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
@@ -248,6 +248,7 @@ typedef union { #define EFI_IMAGE_MACHINE_RISCV64 0x5064 #define EFI_IMAGE_MACHINE_RISCV128 0x5128 +#if !defined(EFI_IMAGE_MACHINE_TYPE_SUPPORTED) #if defined (MDE_CPU_IA32) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ @@ -294,5 +295,6 @@ typedef union { #else #error Unknown Processor Type #endif +#endif #endif diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 2b1b72d86286..8aeaebc44fd8 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -5,7 +5,7 @@ If a code construct is defined in the UEFI 2.7 specification it must be included by this include file. -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -2211,6 +2211,7 @@ typedef struct { #define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI" #define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI" +#if !defined(EFI_REMOVABLE_MEDIA_FILE_NAME) #if defined (MDE_CPU_IA32) #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 #elif defined (MDE_CPU_X64) @@ -2225,6 +2226,7 @@ typedef struct { #else #error Unknown Processor Type #endif +#endif // // The directory within the active EFI System Partition defined for delivery of capsule to firmware -- 2.31.1.windows.1