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.74532.1669986633032770380 for ; Fri, 02 Dec 2022 05:10:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fk1VeJ37; 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=1669986632; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Et4iTCjrdR6SmwABnbjP2RIL9bDpTBxB0ymMxz5j2oI=; b=Fk1VeJ37jRPVvFwDSvSMFwVtDeEbfhkLz0pET0LaLNQU9FKBp8WDX8TZ/rzA4YuO5oAQCa +0GOMejY09BLnaoSPMDPTHoLhd7ltdXA6wIV9r7OmK539HU9FiBnIrJrijzDWRbq0xZ8jP 4Ywj4B/GBYg/0uUxtHyZ1dAcT5o3Cjk= 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-544-ZF6pSAIDOlC4xVlcKEl9LQ-1; Fri, 02 Dec 2022 08:10:26 -0500 X-MC-Unique: ZF6pSAIDOlC4xVlcKEl9LQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5B6C738012D8; Fri, 2 Dec 2022 13:10:25 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26FED483EFB; Fri, 2 Dec 2022 13:10:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E54291801547; Fri, 2 Dec 2022 14:10:09 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Bob Feng , Yuwei Chen , Erdem Aktas , Jordan Justen , Peter Grehan , Rebecca Cran , Liming Gao , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Min Xu , Brijesh Singh , Oliver Steffen , Pawel Polawski , Tom Lendacky , James Bottomley Subject: [PATCH 07/14] OvmfPkg/PlatformPei: MemTypeInfo: stop using mPlatformInfoHob Date: Fri, 2 Dec 2022 14:10:02 +0100 Message-Id: <20221202131009.3190040-8-kraxel@redhat.com> In-Reply-To: <20221202131009.3190040-1-kraxel@redhat.com> References: <20221202131009.3190040-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Stop using the mPlatformInfoHob global variable in MemTypeInfoInitialization() function. Pass a pointer to the PlatformInfoHob instead. Signed-off-by: Gerd Hoffmann --- OvmfPkg/PlatformPei/Platform.h | 2 +- OvmfPkg/PlatformPei/MemTypeInfo.c | 4 ++-- OvmfPkg/PlatformPei/Platform.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index d0c673c5a346..0c0558f0626c 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -67,7 +67,7 @@ PeiFvInitialization ( VOID MemTypeInfoInitialization ( - VOID + IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ); VOID diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTypeInfo.c index c8fcf1732687..eb37febb31ae 100644 --- a/OvmfPkg/PlatformPei/MemTypeInfo.c +++ b/OvmfPkg/PlatformPei/MemTypeInfo.c @@ -203,12 +203,12 @@ STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mReadOnlyVariable2Notify = { VOID MemTypeInfoInitialization ( - VOID + IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { EFI_STATUS Status; - if (!mPlatformInfoHob.SmmSmramRequire) { + if (!PlatformInfoHob->SmmSmramRequire) { // // EFI_PEI_READ_ONLY_VARIABLE2_PPI will never be available; install // the default memory type information HOB right away. diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 4cd77fd5f84f..85b47e7ed8df 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -373,7 +373,7 @@ InitializePlatform ( } PeiFvInitialization (&mPlatformInfoHob); - MemTypeInfoInitialization (); + MemTypeInfoInitialization (&mPlatformInfoHob); MemMapInitialization (&mPlatformInfoHob); NoexecDxeInitialization (); } -- 2.38.1