From nobody Thu Mar 28 10:26:58 2024 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- From nobody Thu Mar 28 10:26:58 2024 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+74083+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+74083+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1618370892; cv=none; d=zohomail.com; s=zohoarc; b=mURvzVhgtv7s0z9mvF0IwoZE/NXicY/3wQK6L/XJ3brxOmqp9I953yLTdwaGoh0/yt/FG6McUEdZIErJ183xI5GgvO8X6L6EQMfpOSfGRI0iCAT/jJ/ot+BN50CK/2CipISOKhivuQwOTi3l58aTCHqPL/KOYyT/XdelQKggCzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618370892; 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=UDlDyHqq6cBUnAohzTfd6JQqx9aJEQYTAm8rtdpvP2Y=; b=fZdN67AJXhfBSz0s1z4vI1VfZDsKTPpOAlJzhAtzKmqlWbPOV4nmtiL8QA9ceb3OXgs/Grtuskw4gOoJgEYLPj3YvbJvBxyQIMTKQ6dsWsMLmakeaF5tJuSMLwb9mc5v6kFZhS2ViNryb3vM0o22tuHt4oGQNWU6nxqLo1W3+rA= 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+74083+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 16183708928528.290950505916044; Tue, 13 Apr 2021 20:28:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BWkbYY1788612xwXm4906USy; Tue, 13 Apr 2021 20:28:11 -0700 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.8064.1618370888171322791 for ; Tue, 13 Apr 2021 20:28:08 -0700 IronPort-SDR: H+PA+rcjHfNP1c1deYtPiGabl2S3f8y6y3NjxpTkFmHNv7SF9/Qk1heFA8gNPaM0y5COAui9Lz BOHV4jZ8y6kQ== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679505" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679505" 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:07 -0700 IronPort-SDR: cy74ZsW5jrD2AbnOpUdv/AAdFP6pg/bQlkSIX2837EW5Sh+Xk+/i3VMAzdfkFYB+UrSkFNBp5W HJRfF+nIbZ6w== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124852" 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: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang , Andrew Fish , Abner Chang Subject: [edk2-devel] [Patch v2 2/4] CryptoPkg/Library/Include: Allow CPU specific defines to be predefined Date: Tue, 13 Apr 2021 20:27:56 -0700 Message-Id: <20210414032758.1818-3-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: dIYbqVTXHkn6miTIQ5m2Hgtdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1618370891; bh=QHCTIhwmilfjf+addeExzpxsZ4NO2TUKjoYCiKe1orU=; h=Cc:Date:From:Reply-To:Subject:To; b=fIDTfY6ZPC6l5mvU8s9tVJubgju8DB0Q5NJ2OZuezsJvKZ2aeAHVfnGzAxkyKJqcPnu iQPABLCZDegj0WqW4/ZRx5bdRauPMyxgCJNriCovWmyvblV/VZULFFD0tYbB1T7EA6tkQ AJ6lijg0VHV89nRZ8SGC2RCVw2AZG1fSk+c= 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 assume a fixed set of CPU architectures. Update SIXTY_FOUR_BIT and THIRTY_TWO_BIT defines in the CryptoPkg to allow one of them to be predefined on the EDK II build command line using /D flag or in DSC file [BuildOptions] sections. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Reviewed-by: Jian J Wang --- CryptoPkg/Library/Include/CrtLibSupport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/= Include/CrtLibSupport.h index 7a82f1d40633..b1dff03bdc0c 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -2,7 +2,7 @@ Root include file of C runtime library to support building the third-par= ty cryptographic library. =20 -Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights = reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -44,6 +44,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #define CONFIG_HEADER_BN_H =20 +#if !defined(SIXTY_FOUR_BIT) && !defined (THIRTY_TWO_BIT) #if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA= 64) || defined(MDE_CPU_RISCV64) // // With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs @@ -56,6 +57,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #else #error Unknown target architecture #endif +#endif =20 // // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h --=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 (#74083): https://edk2.groups.io/g/devel/message/74083 Mute This Topic: https://groups.io/mt/82083398/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- From nobody Thu Mar 28 10:26:58 2024 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+74084+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+74084+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1618370894; cv=none; d=zohomail.com; s=zohoarc; b=aRkR3BqHp3XLbGJgUhTO4vRIMD690mcd/EPJm+34l5FFwxgAsiKLRnu7Puo6gJRd2t1rrOYDr6attCcx8l4PVZj7FPdFWoo/K4XKkgY1LVK/t7TPWPKpuVHSpGFqo2ZZANel+KsJYeDqeWy7OkHusMXG7N2KALuTxYUV4lT3yZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618370894; 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=Dbb7WHYui00PkH6119Mkajs9iesT09Vnf68qUK/Oei8=; b=EqJ8Pr+ky0Qa/fNp99XKZLt4qE9xVqLf44MHq6dcNk2ZVx1l1XQ3COHm8bsIog/FxSkz32c4qXko3fqe8ATVHWSn54w+25ARSg0Ono9zEtwmAcHRwH7oiIt8IAa4IVyA4md+oS9YP1w+9k6agyEEu+8WXvsO3VlBP/LxrgEXPlM= 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+74084+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 1618370894085493.59427885279615; Tue, 13 Apr 2021 20:28:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vzeeYY1788612xvaMMs8mp2W; Tue, 13 Apr 2021 20:28:13 -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: aVKB0B3Sc6kkVuOSqAe/YwBvHo4K04PCJtof2LkHWxZb4t7mZmljuzsnQ1eHkR/0wYrPziOIor VZeLcS2F2n1Q== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679509" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679509" 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:07 -0700 IronPort-SDR: yojgtPg77bGjQYH63D2m9omjJTKjhIG1pUUbrUgUOnYkcHiJRXGAC9+C/FfyhT/f7H9c8JhMaH 8EKa5AHtAIDA== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124855" 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:07 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Andrew Fish , Abner Chang Subject: [edk2-devel] [Patch v2 3/4] BaseTools/Source/C: Remove CPU architecture assumptions Date: Tue, 13 Apr 2021 20:27:57 -0700 Message-Id: <20210414032758.1818-4-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: iKAzzaM0mRLYzyp0eFNftpBux1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1618370893; bh=cHjdgYfJeueqy/fWEVMF2jG5oEqdDUVcER6waOD5hpA=; h=Cc:Date:From:Reply-To:Subject:To; b=o07Be7YjqRmxX4IdhJZpjMUucVvHf86M6yETXxHgfZF+lLuBP7CWmcm6UKBpbGic2V1 iR9djXRmItU2bPi2CAJ/hflWulE0Tj4jDtkvBNx4I9agLQJ4QIWp2G1KkzT0Xt2RVl+V3 YIzUYq0WnXZVxf/E4IkwH5l6+3deK4DSF18= 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 assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * GenFw Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Source/C/GenFw/Elf32Convert.c | 5 ++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/G= enFw/Elf32Convert.c index 7f351287a93c..2485b2cb7ad9 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -1,7 +1,7 @@ /** @file Elf32 Convert solution =20 -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=20 @@ -143,8 +143,7 @@ InitializeElf32 ( return FALSE; } if (!((mEhdr->e_machine =3D=3D EM_386) || (mEhdr->e_machine =3D=3D EM_AR= M) || (mEhdr->e_machine =3D=3D EM_RISCV))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machi= ne."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 mac= hine."); } if (mEhdr->e_version !=3D EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURREN= T (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/G= enFw/Elf64Convert.c index 4ed6b4477ea9..d097db863243 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -1,7 +1,7 @@ /** @file Elf64 convert solution =20 -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=20 @@ -162,8 +162,7 @@ InitializeElf64 ( return FALSE; } if (!((mEhdr->e_machine =3D=3D EM_X86_64) || (mEhdr->e_machine =3D=3D EM= _AARCH64) || (mEhdr->e_machine =3D=3D EM_RISCV64))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machi= ne."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 mac= hine."); } if (mEhdr->e_version !=3D EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURREN= T (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); --=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 (#74084): https://edk2.groups.io/g/devel/message/74084 Mute This Topic: https://groups.io/mt/82083399/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- From nobody Thu Mar 28 10:26:58 2024 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+74085+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+74085+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1618370889; cv=none; d=zohomail.com; s=zohoarc; b=PlZWMbiRKXSz/ymIOHajTuE8ZEvdBFWF8M9O3FdCxlwr66YmEW1z6yaAnq3D06lw72Kfg9BtOMIS+LhqeKkDH+H+SBNvnB4K09WOCNXcNEGyA8oB7rcHRsXS4Kr/nwoLstPVmueW4yed6WVh4RN5kvqDwgs0IeUqR8UOhNPpHgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618370889; 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=jMN1QWzpuVIsVzEjdgs0QO33ceYSzUOKUTJwNaDeUgI=; b=aVO+6PsZmXbcS0ZGRG0HhyNA2cb6hSYBZOBsy6dJJuX6fAXGk2ENVjPptxK+fuklu7H+EjIASvqcfm9V+4QrvIAb14AJM2+cY1B08he1K/HTR+gTRccsuysfZiRcdtAb2XOsScjAqWr2VFLI5dajUVe8mlduGlWnWsB7PzWNplA= 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+74085+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 161837088990443.86884665365187; Tue, 13 Apr 2021 20:28:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id U0baYY1788612xQZQL8pycpu; Tue, 13 Apr 2021 20:28:09 -0700 X-Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web10.8064.1618370888171322791 for ; Tue, 13 Apr 2021 20:28:08 -0700 IronPort-SDR: dovu8CFP0GNZJgAMB/CT5BlLKomFeO5ef/k+t3NZiJ7ljSe3+NGhUmujmTcPPm2BOsv8wkhPcq 6dn/V6H8lAtw== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679512" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679512" 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:07 -0700 IronPort-SDR: e7f/y2nBhAsjlLiSofUBHPlicuP8MB/R/S1DTs1cyKw7GOPBHKZuhi9oPEvvGlIue1ukAM67vh EpQ10NpMnOdg== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124859" 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:07 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Andrew Fish , Abner Chang Subject: [edk2-devel] [Patch v2 4/4] BaseTools/Source/Python: Remove CPU architecture assumptions Date: Tue, 13 Apr 2021 20:27:58 -0700 Message-Id: <20210414032758.1818-5-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: w8NOLZjq9ktevQ90JIKtSMzIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1618370889; bh=RtlmrfBkfNpWgtO5/XuTizIWYmjTANiEQocoqfr1Qpk=; h=Cc:Date:From:Reply-To:Subject:To; b=mTjSJsYDrY2a5GzL3uFJS82N+ztmClJu6GAeRCXnrZUDzgULvF/hiXBgFaNKLMjzWK2 1/LHPvRHRNjL853omIt1M85GjmxGQzm+ujZSaXYUxp58WxmAoZLTDFfj2SCO4qKtHGZyC F0p5ExyMA648KTBlQElzY173SDAirYCHMoQ= 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 assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * Build * GenFds * TargetTool Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 +--- BaseTools/Source/Python/TargetTool/TargetTool.py | 4 ++-- BaseTools/Source/Python/build/buildoptions.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index ea2401b0e4fc..5c8263f9bcc9 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1,7 +1,7 @@ ## @file # parse FDF file # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -3504,8 +3504,6 @@ class FdfParser: raise Warning.Expected("'.'", self.FileName, self.CurrentLineN= umber) =20 Arch =3D self._SkippedChars.rstrip(TAB_SPLIT) - if Arch.upper() not in ARCH_SET_FULL: - raise Warning("Unknown Arch '%s'" % Arch, self.FileName, self.= CurrentLineNumber) =20 ModuleType =3D self._GetModuleType() =20 diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/S= ource/Python/TargetTool/TargetTool.py index 8e0ca387c356..71222e3cc899 100644 --- a/BaseTools/Source/Python/TargetTool/TargetTool.py +++ b/BaseTools/Source/Python/TargetTool/TargetTool.py @@ -1,7 +1,7 @@ ## @file # Target Tool Parser # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -197,7 +197,7 @@ def RangeCheckCallback(option, opt_str, value, parser): =20 def MyOptionParser(): parser =3D OptionParser(version=3D__version__, prog=3D"TargetTool.exe"= , usage=3D__usage__, description=3D__copyright__) - parser.add_option("-a", "--arch", action=3D"append", type=3D"choice", = choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', '0'], dest=3D"TARGET_ARC= H", + parser.add_option("-a", "--arch", action=3D"append", dest=3D"TARGET_AR= CH", help=3D"ARCHS is one of list: IA32, X64, ARM, AARCH64 or EBC, whic= h replaces target.txt's TARGET_ARCH definition. To specify more archs, plea= se repeat this option. 0 will clear this setting in target.txt and can't co= mbine with other value.") parser.add_option("-p", "--platform", action=3D"callback", type=3D"str= ing", dest=3D"DSCFILE", callback=3DSingleCheckCallback, help=3D"Specify a DSC file, which replace target.txt's ACTIVE_PLAT= FORM definition. 0 will clear this setting in target.txt and can't combine = with other value.") diff --git a/BaseTools/Source/Python/build/buildoptions.py b/BaseTools/Sour= ce/Python/build/buildoptions.py index 094af4e2a8dd..39d92cff209d 100644 --- a/BaseTools/Source/Python/build/buildoptions.py +++ b/BaseTools/Source/Python/build/buildoptions.py @@ -2,7 +2,7 @@ # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.=
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -40,7 +40,7 @@ class MyOptionParser(): =20 def GetOption(self): Parser =3D OptionParser(description=3D__copyright__, version=3D__v= ersion__, prog=3D"build.exe", usage=3D"%prog [options] [all|fds|genc|genmak= e|clean|cleanall|cleanlib|modules|libraries|run]") - Parser.add_option("-a", "--arch", action=3D"append", type=3D"choic= e", choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', 'RISCV64'], dest=3D"= TargetArch", + Parser.add_option("-a", "--arch", action=3D"append", dest=3D"Targe= tArch", help=3D"ARCHS is one of list: IA32, X64, ARM, AARCH64, RISCV64= or EBC, which overrides target.txt's TARGET_ARCH definition. To specify mo= re archs, please repeat this option.") Parser.add_option("-p", "--platform", action=3D"callback", type=3D= "string", dest=3D"PlatformFile", callback=3DSingleCheckCallback, help=3D"Build the platform specified by the DSC file name argu= ment, overriding target.txt's ACTIVE_PLATFORM definition.") --=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 (#74085): https://edk2.groups.io/g/devel/message/74085 Mute This Topic: https://groups.io/mt/82083400/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-