From nobody Fri Nov 15 12:51:44 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+95796+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+95796+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1667279650; cv=none; d=zohomail.com; s=zohoarc; b=eMc7yYQ2j7Mt0GGSEKJXrPm1Vm6wfUs9IXB51UZ1byLIEupQ8nAz/w9MHTIU2YIu/y3tH8M5/vL5/uu57p/ttB+xIBM27yeWWurXtYlmkNYVRyuCNX+zrLYKUj/4oihSG1zdR2zal0XbepLnGflc1Y/hG7wv0GE3wHhS48/F7LY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667279650; 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=wSHhdfdDc987edeUm/3GwvpXbEWK9YwrrGkfRQRHiG0=; b=RnusYORGQeFGS5nA/+v7xMisW3yBNQP8miRSP705UTOnCJ5UKacpB1r0LPKg9g7jRSY+so1jzOuxLOec8rU/ouzqE22nQhaAARu8Myzl1jRa0ObX2taFXhFRgXetHKk3IOVEQAqF5TdmrutJ2E358OWiICpYe37GA/EoJ21pfOk= 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+95796+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1667279650650880.4841176311551; Mon, 31 Oct 2022 22:14:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qXR6YY1788612xJOMQgNjOtm; Mon, 31 Oct 2022 22:14:10 -0700 X-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:09 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="310162669" X-IronPort-AV: E=Sophos;i="5.95,229,1661842800"; d="scan'208";a="310162669" X-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:09 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="878985473" X-IronPort-AV: E=Sophos;i="5.95,229,1661842800"; d="scan'208";a="878985473" X-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:07 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [edk2-devel] [PATCH V5 03/10] OvmfPkg: Use BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED defined in MdeModulePkg Date: Tue, 1 Nov 2022 13:13:42 +0800 Message-Id: <20221101051349.13-4-min.m.xu@intel.com> In-Reply-To: <20221101051349.13-1-min.m.xu@intel.com> References: <20221101051349.13-1-min.m.xu@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,min.m.xu@intel.com X-Gm-Message-State: 3eyxIaYyZ9QkVosG10q0ohYex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1667279650; bh=Aa7g5yQF4sjul6FhAY6ZJ8BZBN7cTmAvcHWlMN3+fzs=; h=Cc:Date:From:Reply-To:Subject:To; b=mhvQh+Nas+rsghm+D4HyGOecBs1vU+0kLILySPB8VUrCA2RKbAX/cceGNd58vH4VIjH YJU/16r189Nz37arcv0Vi+PZBXM8cUKvCzRT+I+mm6VXVMOqch2ATXT/haKsDs4t70EsV IXANnxdFolrCEmDBs++zCD3258xMm24F+4c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1667279652412100006 Content-Type: text/plain; charset="utf-8" From: Min M Xu RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3937 BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined in MdeModulePkg. The files which use the definition are updated as well. Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Acked-by: Gerd Hoffmann Signed-off-by: Min Xu --- OvmfPkg/Library/PeilessStartupLib/Hob.c | 5 ++--- OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Library/PeilessStartupLib/Hob.c b/OvmfPkg/Library/Peil= essStartupLib/Hob.c index 5fc84a809025..630ce445ebec 100644 --- a/OvmfPkg/Library/PeilessStartupLib/Hob.c +++ b/OvmfPkg/Library/PeilessStartupLib/Hob.c @@ -20,10 +20,9 @@ #include #include #include +#include #include "PeilessStartupInternal.h" =20 -#define EFI_RESOURCE_MEMORY_UNACCEPTED 7 - /** * Construct the HobList in SEC phase. * @@ -92,7 +91,7 @@ ConstructFwHobList ( // while (!END_OF_HOB_LIST (Hob)) { if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - if (Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_MEMORY_= UNACCEPTED) { + if (Hob.ResourceDescriptor->ResourceType =3D=3D BZ3937_EFI_RESOURCE_= MEMORY_UNACCEPTED) { PhysicalEnd =3D Hob.ResourceDescriptor->PhysicalStart + Hob.Res= ourceDescriptor->ResourceLength; ResourceLength =3D Hob.ResourceDescriptor->ResourceLength; =20 diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c b/OvmfPkg/Library/P= latformInitLib/IntelTdx.c index c6d7c8bb6e0e..797f880df035 100644 --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c @@ -20,11 +20,11 @@ #include #include #include +#include #include #include =20 -#define ALIGNED_2MB_MASK 0x1fffff -#define EFI_RESOURCE_MEMORY_UNACCEPTED 7 +#define ALIGNED_2MB_MASK 0x1fffff =20 /** This function will be called to accept pages. Only BSP accepts pages. @@ -211,7 +211,7 @@ ValidateHobList ( EFI_RESOURCE_MEMORY_MAPPED_IO_PORT, EFI_RESOURCE_MEMORY_RESERVED, EFI_RESOURCE_IO_RESERVED, - EFI_RESOURCE_MEMORY_UNACCEPTED + BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED }; =20 if (VmmHobList =3D=3D NULL) { @@ -387,7 +387,7 @@ ProcessHobList ( if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { DEBUG ((DEBUG_INFO, "\nResourceType: 0x%x\n", Hob.ResourceDescriptor= ->ResourceType)); =20 - if (Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_MEMORY_= UNACCEPTED) { + if (Hob.ResourceDescriptor->ResourceType =3D=3D BZ3937_EFI_RESOURCE_= MEMORY_UNACCEPTED) { DEBUG ((DEBUG_INFO, "ResourceAttribute: 0x%x\n", Hob.ResourceDescr= iptor->ResourceAttribute)); DEBUG ((DEBUG_INFO, "PhysicalStart: 0x%llx\n", Hob.ResourceDescrip= tor->PhysicalStart)); DEBUG ((DEBUG_INFO, "ResourceLength: 0x%llx\n", Hob.ResourceDescri= ptor->ResourceLength)); @@ -488,7 +488,7 @@ TransferTdxHobList ( ResourceType =3D Hob.ResourceDescriptor->ResourceType; ResourceAttribute =3D Hob.ResourceDescriptor->ResourceAttribute; =20 - if (ResourceType =3D=3D EFI_RESOURCE_MEMORY_UNACCEPTED) { + if (ResourceType =3D=3D BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) { ResourceType =3D EFI_RESOURCE_SYSTEM_MEMORY; ResourceAttribute |=3D (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RES= OURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_TESTED); } --=20 2.29.2.windows.2 -=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 (#95796): https://edk2.groups.io/g/devel/message/95796 Mute This Topic: https://groups.io/mt/94703255/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-