From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.2818.1667279643333273629 for ; Mon, 31 Oct 2022 22:14:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ewZwySd6; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667279652; x=1698815652; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+fdu1qHZfxI32X8WdhcJRv8OlfGDbp4CQcgN+oS4nYA=; b=ewZwySd6pabqjZ/C4qKCSMVJxmhHEZs9hkr7EXbPptHqI+dGFfLbgVu1 v5Q4IXblZmNbofNpLzZM8fVXkZgd0KDfX1ftbI3uc3d6xMxIszA+wzvo/ EP3BUmf45T0n9I8ETsSUViuMdDxGSKFstN8Ma4r7ee+sJHZcCam0Sp5bW nxOmXoWITkZzcCUU8iZLt1OsX8F99mA9vsKIgZv+vjJNQOcYw34qpATLL Sa1vtt18KgpNDFIkuCov01fu/pusoHX27Hu/ImHoPlbmNT8BKyz+T0wUo EjDM0MogWNI0raj85xBxud5LKgLDHQRHYuaJmJtBVeMv4yTeNtoSt/EX7 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="310162707" X-IronPort-AV: E=Sophos;i="5.95,229,1661842800"; d="scan'208";a="310162707" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 22:14:11 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="878985488" X-IronPort-AV: E=Sophos;i="5.95,229,1661842800"; d="scan'208";a="878985488" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.119]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 22:14:09 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Michael D Kinney , Liming Gao , Zhiguang Liu , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH V5 04/10] MdePkg: Add UEFI Unaccepted memory definition Date: Tue, 1 Nov 2022 13:13:43 +0800 Message-Id: <20221101051349.13-5-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20221101051349.13-1-min.m.xu@intel.com> References: <20221101051349.13-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937 Plase refer to: UEFI Spec v2.9 Table 7-5 Memory Type Usage before ExitBootServices() Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Reviewed-by: Jiewen Yao Acked-by: Gerd Hoffmann Reviewed-by: Liming Gao Signed-off-by: Min Xu --- MdeModulePkg/Include/Pi/PrePiDxeCis.h | 25 +++++++++++++++++++++++++ MdePkg/Include/Pi/PiDxeCis.h | 10 +++++++++- MdePkg/Include/Uefi/UefiMultiPhase.h | 5 +++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 MdeModulePkg/Include/Pi/PrePiDxeCis.h diff --git a/MdeModulePkg/Include/Pi/PrePiDxeCis.h b/MdeModulePkg/Include/Pi/PrePiDxeCis.h new file mode 100644 index 000000000000..113ac37924cc --- /dev/null +++ b/MdeModulePkg/Include/Pi/PrePiDxeCis.h @@ -0,0 +1,25 @@ +/** @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 accepted +/// by a corresponding call to the underlying isolation architecture. +/// +/// This memory region has not been defined in PI spec, so it is defined in +/// PrePiDxeCis.h. And it is defined in the format of captial letters +/// because only capital letters are allowed to be used for #define declarations. +/// +/// After this memory region is defined in PI spec, it should be a value in +/// EFI_GCD_MEMORY_TYPE in PiDxeCis.h. +/// +#define EFI_GCD_MEMORY_TYPE_UNACCEPTED 7 + +#endif diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h index d0f2ed0e58df..27b219aa3ffa 100644 --- a/MdePkg/Include/Pi/PiDxeCis.h +++ b/MdePkg/Include/Pi/PiDxeCis.h @@ -56,7 +56,15 @@ typedef enum { /// system. If all memory has the same reliability, then this bit is not used. /// EfiGcdMemoryTypeMoreReliable, - EfiGcdMemoryTypeMaximum + // /// + // /// A memory region that describes system memory that has not been accepted + // /// by a corresponding call to the underlying isolation architecture. + // /// + // /// Please be noted: + // /// EfiGcdMemoryTypeUnaccepted is defined in PrePiDxeCis.h because it has not been + // /// defined in PI spec. + // EfiGcdMemoryTypeUnaccepted, + EfiGcdMemoryTypeMaximum = 8 } EFI_GCD_MEMORY_TYPE; /// diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h b/MdePkg/Include/Uefi/UefiMultiPhase.h index 22bae43e36e8..7884913371a9 100644 --- a/MdePkg/Include/Uefi/UefiMultiPhase.h +++ b/MdePkg/Include/Uefi/UefiMultiPhase.h @@ -103,6 +103,11 @@ typedef enum { /// however it happens to also support byte-addressable non-volatility. /// EfiPersistentMemory, + /// + /// A memory region that describes system memory that has not been accepted + /// by a corresponding call to the underlying isolation architecture. + /// + EfiUnacceptedMemoryType, EfiMaxMemoryType } EFI_MEMORY_TYPE; -- 2.29.2.windows.2