From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.1021.1618450077163313606 for ; Wed, 14 Apr 2021 18:27:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 15 Apr 2021 09:27:42 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Michael D Kinney'" , Cc: "'Zhiguang Liu'" , "'Andrew Fish'" , "'Abner Chang'" References: <20210414032758.1818-1-michael.d.kinney@intel.com> <20210414032758.1818-2-michael.d.kinney@intel.com> In-Reply-To: <20210414032758.1818-2-michael.d.kinney@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbUGF0Y2ggdjIgMS80XSBNZGVQa2cvSW5jbHVkZTogQWxsb3cgQ1BVIHNwZWNpZmljIGRlZmluZXMgdG8gYmUgcHJlZGVmaW5lZA==?= Date: Thu, 15 Apr 2021 09:27:51 +0800 Message-ID: <006501d73196$8d4eb500$a7ec1f00$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLYKg94qY3+gVVZ/wQZudt8hQK8sgKM55D2qJ5xvRA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Michael D Kinney > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA4=D4=C214=C8=D5 11:28 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Liming Gao ; Zhiguang Liu > ; Andrew Fish ; Abner Chang > > =D6=F7=CC=E2: [Patch v2 1/4] MdePkg/Include: Allow CPU specific = defines to be > predefined >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3308 >=20 > 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. >=20 > 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. >=20 > 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. >=20 > * EFI_IMAGE_MACHINE_TYPE_VALUE > * EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE >=20 > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Andrew Fish > Cc: Abner Chang > Signed-off-by: Michael D Kinney > --- > MdePkg/Include/Uefi/UefiBaseType.h | 15 ++++++++++++++- > MdePkg/Include/Uefi/UefiSpec.h | 4 +++- > 2 files changed, 17 insertions(+), 2 deletions(-) >=20 > diff --git a/MdePkg/Include/Uefi/UefiBaseType.h > b/MdePkg/Include/Uefi/UefiBaseType.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_CROSS_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_IMAGE_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. All > 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.EFI" >=20 > +#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 >=20 > // > // The directory within the active EFI System Partition defined for delivery of > capsule to firmware > -- > 2.31.1.windows.1