From nobody Sun Feb 8 09:12:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+74082+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+74082+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1618370888; cv=none; d=zohomail.com; s=zohoarc; b=OKhNIwWfG/R+XvRUzeISI56m+xnwzergQVvC6o2BTPWWu/cSJqsZ5ZHEK74jwyszJZrPrvPsQZhRMDRdkv0LW2CbtzEa0DJ/JUoX5fJNx6Zp/pHslWZBa8aa3hUzZO6HhRbTSiU37SXSc6Ma2GJn7BXAv2V/EB+RjMqbeKFHnxs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618370888; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=X9xcqAP26FJMa9otfoY0VtPyv1IsQa9vXanWHqz4lw8=; b=VrAOYjweUx/WpGWtBGJyI8WYzG0UXFW9kdgxp+GEj6CVLBDBL+mPlaK6QtCZ2BD/Bcc9kraGEtcQkqlPyFy9K4niEIhBRyfnlc556WO2rB+GR13oNIBPgMBVHXC7fok1Fg0qTB7E57QvdwL5lDdCdbuyvyN4CL+D73f8u8kzTBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+74082+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1618370888942245.92783835031457; Tue, 13 Apr 2021 20:28:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3RtfYY1788612xqlhCriBcUF; Tue, 13 Apr 2021 20:28:08 -0700 X-Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web08.8028.1618370887686814136 for ; Tue, 13 Apr 2021 20:28:08 -0700 IronPort-SDR: XObi11oXSMA7Ox2VTDbyLdv0A831EECDgH6wtznyGmEkhk5ctqqYPZJVRmREUeJp6jO3bTv4Fy LeqAzKe3Coxg== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679503" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679503" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:06 -0700 IronPort-SDR: +y38iRaMrPcWrUr8TLynAjeAmCbQtpN6e7dXeD0iB2yV5JVDqwUVal40+T/Atc4vVVI+h3S1gO wETZ8KHAspEg== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124847" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.231.15]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:06 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Zhiguang Liu , Andrew Fish , Abner Chang Subject: [edk2-devel] [Patch v2 1/4] MdePkg/Include: Allow CPU specific defines to be predefined Date: Tue, 13 Apr 2021 20:27:55 -0700 Message-Id: <20210414032758.1818-2-michael.d.kinney@intel.com> In-Reply-To: <20210414032758.1818-1-michael.d.kinney@intel.com> References: <20210414032758.1818-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: YsqEh0tBqG6WC0BP6X4JyJTfx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1618370888; bh=pIwTBsSLkY16EG+k7d/A/54msDI42bKOqqnEUzWJDlU=; h=Cc:Date:From:Reply-To:Subject:To; b=sQBOxwpi8xY4EihS/wjjpOwjvK6/SXYMsnqdrGJWDSdJ+sKUqIMmlwHboRxW0WAplCk UCJ6EQbKeKLdzaYSxIvP4tSDsGHkIlNSh8tRhAVMx/a3r4zOz1Z8EO9mfWOtNNhQROwVH 6UEmSOs8nA+P1Cuq9kCI6fdgEbAQaSWv4+0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assumes a fixed set of CPU architectures. Update EFI_REMOVABLE_MEDIA_FILE_NAME to allow it to be predefined in tools_def.txt or a DSC file [BuildOptions] section using a *_*_*_CC_FLAGS statement. Add support for the following two defines. If neither are defines, then preserve the current behavior. If either is defined, then compare these 16-bit values to Machine in the EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) and EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) macros. * EFI_IMAGE_MACHINE_TYPE_VALUE * EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE Cc: Liming Gao Cc: Zhiguang Liu Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Reviewed-by: Abner Chang Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiBaseType.h | 15 ++++++++++++++- MdePkg/Include/Uefi/UefiSpec.h | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiB= aseType.h index 934fc07285d9..45e2aa63bb34 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. =20 -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.
=20 @@ -248,6 +248,7 @@ typedef union { #define EFI_IMAGE_MACHINE_RISCV64 0x5064 #define EFI_IMAGE_MACHINE_RISCV128 0x5128 =20 +#if !defined(EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined(EFI_IMAGE_MACHINE_C= ROSS_TYPE_VALUE) #if defined (MDE_CPU_IA32) =20 #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ @@ -294,5 +295,17 @@ typedef union { #else #error Unknown Processor Type #endif +#else +#if defined (EFI_IMAGE_MACHINE_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) =3D=3D EFI_IM= AGE_MACHINE_TYPE_VALUE) +#else +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE) +#endif +#if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) =3D=3D = EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) +#else +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#endif +#endif =20 #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. =20 -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. Al= l rights reserved.
=20 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.E= FI" =20 +#if !defined(EFI_REMOVABLE_MEDIA_FILE_NAME) #if defined (MDE_CPU_IA32) #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA= 32 #elif defined (MDE_CPU_X64) @@ -2225,6 +2226,7 @@ typedef struct { #else #error Unknown Processor Type #endif +#endif =20 // // The directory within the active EFI System Partition defined for delive= ry of capsule to firmware --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#74082): https://edk2.groups.io/g/devel/message/74082 Mute This Topic: https://groups.io/mt/82083397/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-