From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.5336.1654073604124777248 for ; Wed, 01 Jun 2022 01:53:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UollsdSs; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654073603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ChKGNlGLPiGEki9gV7Pk6mAGchTVtqOdTfmsux4yEFA=; b=UollsdSs826ANNnPZ1u/Oz8C3LeZ2XTRP23Ky4AFl6huzoYsNLNp+XuHwLNHKMgx17WeMJ TWHgmE+DyhvDxDM5mmoqvI5gJxrQe8FguhpzVJ8ntMYX0PFnbwoCUZCkWsMGUBL70TsGYk PENFdMNIjjFwfR1wCPgTn9HskIodP5o= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-278-X3n2nHGBPWOp-HJyxFrw2g-1; Wed, 01 Jun 2022 04:53:22 -0400 X-MC-Unique: X3n2nHGBPWOp-HJyxFrw2g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EFAC838149B3; Wed, 1 Jun 2022 08:53:21 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9C672166B26; Wed, 1 Jun 2022 08:53:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 39B6E1800623; Wed, 1 Jun 2022 10:53:20 +0200 (CEST) Date: Wed, 1 Jun 2022 10:53:20 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, min.m.xu@intel.com Cc: Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [edk2-devel] [PATCH 2/2] OvmfPkg: Search EFI_RESOURCE_MEMORY_UNACCEPTED for Fw hoblist Message-ID: <20220601085320.qqqrovk7nczezeot@sirius.home.kraxel.org> References: <4a4fc3a0e4084dbadcacac95b11d246c6b3b7539.1654007213.git.min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <4a4fc3a0e4084dbadcacac95b11d246c6b3b7539.1654007213.git.min.m.xu@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 31, 2022 at 10:31:17PM +0800, Min Xu wrote: > In current TDVF implementation all unaccepted memory passed in Hoblist > are tagged as EFI_RESOURCE_MEMORY_UNACCEPTED. They're all accepted before > they can be accessed. After accepting memory region, the Hob ResourceType > is unchanged (still be EFI_RESOURCE_MEMORY_UNACCEPTED). > > TDVF Config-B skip PEI phase and it tries to find a memory region which > is the largest one below 4GB. Then this memory region will be used as the > firmware hoblist. > > So we should walk thru the input hoblist and search for the memory region > with the type of EFI_RESOURCE_MEMORY_UNACCEPTED. > > Because EFI_RESOURCE_MEMORY_UNACCEPTED has not been officially in PI spec. > So it cannot be defined in MdePkg/Include/Pi/PiHob.h. As a temporary > solution it is defined in Hob.c. > > There is a patch-set for lazy-accept very soon. In that patch-set > EFI_RESOURCE_MEMORY_UNACCEPTED will be defined in MdeModulePkg. Acked-by: Gerd Hoffmann take care, Gerd