From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 26638D80122 for ; Sat, 20 Apr 2024 02:32:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=/2KtiMwRYY3PmP+80ZW3lBoCQ+WIJSqijmrh98yRatU=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1713580319; v=1; b=3VLgmd81VrcCxnHzCp0rClMvkKMLe89TAvW5cepFjrONsVHbLhK+42yjttTQFOfwy7zkpGUt QIOzM8E5+vISeh0azOaKeAT0yITzEpzHuB2P+D0/URbbUjKU7V07ajT4Hqo0Ic357J6beGRm0fN UXLJM+mY85cwdSZYA0/jKrVw2Cus2kMeCbZbPCY3WIIYrmxGIiBtNxsr7Z+eO9i5sy0LB2vvetS m9RB6m5ugqlHys9Npy0xKP0eJqLBPAaiHzs0KyCnuZ8o4kq+m255vO4JZJgGbpkJlRo63OODdV1 RPhVxP67H+HjmMusER6vm+iLGXKDa0+a20Yw1lLzOX9Lg== X-Received: by 127.0.0.2 with SMTP id kMUUYY7687511xtrj8pcUJPO; Fri, 19 Apr 2024 19:31:59 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.104]) by mx.groups.io with SMTP id smtpd.web11.188.1713563182920876623 for ; Fri, 19 Apr 2024 14:46:23 -0700 X-Received: from BL3PR10MB6161.namprd10.prod.outlook.com (2603:10b6:208:3bc::16) by SJ1PR10MB5977.namprd10.prod.outlook.com (2603:10b6:a03:488::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.43; Fri, 19 Apr 2024 21:46:21 +0000 X-Received: from BL3PR10MB6161.namprd10.prod.outlook.com ([fe80::78e5:e1a1:9770:f20a]) by BL3PR10MB6161.namprd10.prod.outlook.com ([fe80::78e5:e1a1:9770:f20a%5]) with mapi id 15.20.7472.042; Fri, 19 Apr 2024 21:46:21 +0000 From: "Sachin Ganesh via groups.io" To: "devel@edk2.groups.io" CC: "gaoliming@byosoft.com.cn" , "zhiguang.liu@intel.com" , "michael.d.kinney@intel.com" , "ardb+tianocore@kernel.org" , "kraxel@redhat.com" , "jiewen.yao@intel.com" , "erdemaktas@google.com" , "min.m.xu@intel.com" , "thomas.lendacky@amd.com" , Felix Polyudov , Dhanaraj V , Sachin Ganesh Subject: [edk2-devel] [PATCH 4/7] MdeModulePkg: Use newly defined Unaccepted Memory Type Thread-Topic: [PATCH 4/7] MdeModulePkg: Use newly defined Unaccepted Memory Type Thread-Index: AQHakqMEQAopg8+PoUGtqokwOUjxOA== Date: Fri, 19 Apr 2024 21:46:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL3PR10MB6161:EE_|SJ1PR10MB5977:EE_ x-ms-office365-filtering-correlation-id: fc5875d5-2b29-4567-a964-08dc60ba26f4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: x91ogjffzRQpjiU44RLuNfkAdDd436DQH2CAO3/WSj7BT7yGeRjaGBaAYPAdauc/qiPWVi5khM9qinw7OtAidc+nE4idQKQBdYgxN7iQNXgrlHNGRuqamrYpI2V8RTSRGxQl1TYM3ex298PnmHLTKZAiectFjeFNuePCA8FxVjmYyKv7XSld036dje10UAl4a+3+12hfwd6Bzm5LQL2k9XS9SnUsyq8KmTaL3rwUp/7yATMVAjSxQ69sk3smoV/apmkdmpm9cI9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TAi?= =?iso-8859-1?Q?8W0re9jrsX1vaIb3NrBWIQ/q/QspI+D4uiAmqRe1aYmfhdwEtWgKW880VZ?= =?iso-8859-1?Q?LN2YpyiStskYXP8aSfpJKUgqJtI0y1IFR+bQyBB63be6MO7GhWC480MpkO?= =?iso-8859-1?Q?9yOmU9QWYu13II5cYUYOAq2kbK8EjYWZnwXsTSZPi0UkfsOTg2CGDUFf/2?= =?iso-8859-1?Q?Fyv69oxK6Z5mqE+63cAY6h0KgUi64USI/WlbsNLSTZEGzHjfEo49YdpcsZ?= =?iso-8859-1?Q?zmoQzPBWEV0OyMA5SELCF1+rGTf9fJpf+HMa/4IvEvaJuP4Q8MLKkQ8Odh?= =?iso-8859-1?Q?RgkkdCMvVaX7pgjF44H27bBn93vpFIttqF?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL3PR10MB6161.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc5875d5-2b29-4567-a964-08dc60ba26f4 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2024 21:46:21.3491 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3Fn0MRh3kBydAn2hJDnYeSjnX+xhESwWE0ZXrxaC3WIitUNvKnoKo4WUTMYUAMUYXgSk25VcRjyPUGH3BDMPNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR10MB5977 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 19 Apr 2024 19:31:56 -0700 Resent-From: sachinganesh@ami.com Reply-To: devel@edk2.groups.io,sachinganesh@ami.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: GpEk3SpV6H7UL4qbJq7YAWiJx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=3VLgmd81; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 10 +++---- MdeModulePkg/Core/Dxe/Mem/Page.c | 38 +++++++++++++-------------- MdeModulePkg/Include/Pi/PrePiDxeCis.h | 25 ------------------ MdeModulePkg/Include/Pi/PrePiHob.h | 20 -------------- 4 files changed, 24 insertions(+), 69 deletions(-) delete mode 100644 MdeModulePkg/Include/Pi/PrePiDxeCis.h delete mode 100644 MdeModulePkg/Include/Pi/PrePiHob.h diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gc= d.c index c450d1bf25..fe1bbd6974 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -8,8 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include -#include +#include +#include #include "DxeMain.h" #include "Gcd.h" #include "Mem/HeapGuard.h" @@ -105,7 +105,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mGcdMemoryT= ypeNames[] =3D { "MMIO ", // EfiGcdMemoryTypeMemoryMappedIo "PersisMem", // EfiGcdMemoryTypePersistent "MoreRelia", // EfiGcdMemoryTypeMoreReliable - "Unaccepte", // EFI_GCD_MEMORY_TYPE_UNACCEPTED + "Unaccepte", // EfiGcdMemoryTypeUnaccepted "Unknown " // EfiGcdMemoryTypeMaximum }; @@ -2669,8 +2669,8 @@ CoreInitializeGcdServices ( case EFI_RESOURCE_MEMORY_RESERVED: GcdMemoryType =3D EfiGcdMemoryTypeReserved; break; - case BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED: - GcdMemoryType =3D EFI_GCD_MEMORY_TYPE_UNACCEPTED; + case EFI_RESOURCE_MEMORY_UNACCEPTED: + GcdMemoryType =3D EfiGcdMemoryTypeUnaccepted; break; case EFI_RESOURCE_IO: GcdIoType =3D EfiGcdIoTypeIo; diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/P= age.c index 26584648c2..5a51d9df1a 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -9,7 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "DxeMain.h" #include "Imem.h" #include "HeapGuard.h" -#include +#include // // Entry for tracking the memory regions for each memory type to coalesce = similar memory types @@ -70,23 +70,23 @@ EFI_PHYSICAL_ADDRESS mDefaultMaximumAddress =3D MAX_AL= LOC_ADDRESS; EFI_PHYSICAL_ADDRESS mDefaultBaseAddress =3D MAX_ALLOC_ADDRESS; EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1] = =3D { - { EfiReservedMemoryType, 0 }, - { EfiLoaderCode, 0 }, - { EfiLoaderData, 0 }, - { EfiBootServicesCode, 0 }, - { EfiBootServicesData, 0 }, - { EfiRuntimeServicesCode, 0 }, - { EfiRuntimeServicesData, 0 }, - { EfiConventionalMemory, 0 }, - { EfiUnusableMemory, 0 }, - { EfiACPIReclaimMemory, 0 }, - { EfiACPIMemoryNVS, 0 }, - { EfiMemoryMappedIO, 0 }, - { EfiMemoryMappedIOPortSpace, 0 }, - { EfiPalCode, 0 }, - { EfiPersistentMemory, 0 }, - { EFI_GCD_MEMORY_TYPE_UNACCEPTED, 0 }, - { EfiMaxMemoryType, 0 } + { EfiReservedMemoryType, 0 }, + { EfiLoaderCode, 0 }, + { EfiLoaderData, 0 }, + { EfiBootServicesCode, 0 }, + { EfiBootServicesData, 0 }, + { EfiRuntimeServicesCode, 0 }, + { EfiRuntimeServicesData, 0 }, + { EfiConventionalMemory, 0 }, + { EfiUnusableMemory, 0 }, + { EfiACPIReclaimMemory, 0 }, + { EfiACPIMemoryNVS, 0 }, + { EfiMemoryMappedIO, 0 }, + { EfiMemoryMappedIOPortSpace, 0 }, + { EfiPalCode, 0 }, + { EfiPersistentMemory, 0 }, + { EfiGcdMemoryTypeUnaccepted, 0 }, + { EfiMaxMemoryType, 0 } }; // // Only used when load module at fixed address feature is enabled. True me= ans the memory is alreay successfully allocated @@ -2083,7 +2083,7 @@ CoreGetMemoryMap ( MemoryMap =3D MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, S= ize); } - if (MergeGcdMapEntry.GcdMemoryType =3D=3D EFI_GCD_MEMORY_TYPE_UNACCEPT= ED) { + if (MergeGcdMapEntry.GcdMemoryType =3D=3D EfiGcdMemoryTypeUnaccepted) = { // // Page Align GCD range is required. When it is converted to EFI_MEM= ORY_DESCRIPTOR, // it will be recorded as page PhysicalStart and NumberOfPages. diff --git a/MdeModulePkg/Include/Pi/PrePiDxeCis.h b/MdeModulePkg/Include/P= i/PrePiDxeCis.h deleted file mode 100644 index 9be71d2618..0000000000 --- a/MdeModulePkg/Include/Pi/PrePiDxeCis.h +++ /dev/null @@ -1,25 +0,0 @@ -/** @file - Include file matches things in PI. - -Copyright (c) 2022, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef MDE_MODULEPKG_PRE_PI_DXE_CIS_H_ -#define MDE_MODULEPKG_PRE_PI_DXE_CIS_H_ - -/// -/// A memory region that describes system memory that has not been accepte= d -/// by a corresponding call to the underlying isolation architecture. -/// -/// This memory region has not been defined in PI spec, so it is defined i= n -/// PrePiDxeCis.h. And it is defined in the format of captial letters -/// because only capital letters are allowed to be used for #define declar= ations. -/// -/// After this memory region is defined in PI spec, it should be a value i= n -/// EFI_GCD_MEMORY_TYPE in PiDxeCis.h. -/// -#define EFI_GCD_MEMORY_TYPE_UNACCEPTED 6 - -#endif diff --git a/MdeModulePkg/Include/Pi/PrePiHob.h b/MdeModulePkg/Include/Pi/P= rePiHob.h deleted file mode 100644 index ac575e5972..0000000000 --- a/MdeModulePkg/Include/Pi/PrePiHob.h +++ /dev/null @@ -1,20 +0,0 @@ -/** @file - HOB related definitions which has not been officially published in PI. - -Copyright (c) 2022, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef MDE_MODULEPKG_PRE_PI_HOB_H_ -#define MDE_MODULEPKG_PRE_PI_HOB_H_ - -// -// BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined for unaccepted memory. -// But this defitinion has not been officially in the PI spec. Base -// on the code-first we define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED at -// MdeModulePkg/Include/Pi/PrePiHob.h. -// -#define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED 0x00000007 - -#endif -- 2.24.1.windows.2 -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . -=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 (#118044): https://edk2.groups.io/g/devel/message/118044 Mute This Topic: https://groups.io/mt/105630623/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-