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.web10.74422.1669986626185334527 for ; Fri, 02 Dec 2022 05:10:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dopheRzr; 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=1669986625; 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=MPDqzy+bqnFv3aDGIEJ4dKxPLnj+6CX2dozvLuetAog=; b=dopheRzr/2HWnqJlBu+Gwr6wkcnQQ11QuvcggIJYWKBazZR3GlxhKIYx5JCn2UP4nR3IBf RrNAKCx8DoMpoybyONYbq6GbmNpUlGf8F9qw3pTTbx/eJ1x3Pu1uXSModS5ENGL4lErlz8 nwRb/Cg0K++OXn62szgoSyjdfyI5TR4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-36MYzbvkOH-2fM8Dz5yonw-1; Fri, 02 Dec 2022 08:10:24 -0500 X-MC-Unique: 36MYzbvkOH-2fM8Dz5yonw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 38F07185A7A9; Fri, 2 Dec 2022 13:10:22 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA4541402BDC; Fri, 2 Dec 2022 13:10:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D965D1801544; 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 04/14] OvmfPkg/PlatformPei: PeiFv: stop using mPlatformInfoHob Date: Fri, 2 Dec 2022 14:09:59 +0100 Message-Id: <20221202131009.3190040-5-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.7 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 PeiFvInitialization() function. Pass a pointer to the PlatformInfoHob instead. Signed-off-by: Gerd Hoffmann --- OvmfPkg/PlatformPei/Platform.h | 2 +- OvmfPkg/PlatformPei/Fv.c | 6 +++--- OvmfPkg/PlatformPei/Platform.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index f245025fb46f..b13f45ecdb69 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -62,7 +62,7 @@ MaxCpuCountInitialization ( EFI_STATUS PeiFvInitialization ( - VOID + IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob ); VOID diff --git a/OvmfPkg/PlatformPei/Fv.c b/OvmfPkg/PlatformPei/Fv.c index e40c5922206b..fcf14c88faa7 100644 --- a/OvmfPkg/PlatformPei/Fv.c +++ b/OvmfPkg/PlatformPei/Fv.c @@ -22,7 +22,7 @@ **/ EFI_STATUS PeiFvInitialization ( - VOID + IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { BOOLEAN SecureS3Needed; @@ -37,7 +37,7 @@ PeiFvInitialization ( BuildMemoryAllocationHob ( PcdGet32 (PcdOvmfPeiMemFvBase), PcdGet32 (PcdOvmfPeiMemFvSize), - mPlatformInfoHob.S3Supported ? EfiACPIMemoryNVS : EfiBootServicesData + PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : EfiBootServicesData ); // @@ -45,7 +45,7 @@ PeiFvInitialization ( // BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize)); - SecureS3Needed = mPlatformInfoHob.S3Supported && mPlatformInfoHob.SmmSmramRequire; + SecureS3Needed = PlatformInfoHob->S3Supported && PlatformInfoHob->SmmSmramRequire; // // Create a memory allocation HOB for the DXE FV. diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index f2c1e2b213cb..9646a1fa63b0 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -372,7 +372,7 @@ InitializePlatform ( ReserveEmuVariableNvStore (); } - PeiFvInitialization (); + PeiFvInitialization (&mPlatformInfoHob); MemTypeInfoInitialization (); MemMapInitialization (&mPlatformInfoHob); NoexecDxeInitialization (); -- 2.38.1