From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web11.23996.1662379144638733893 for ; Mon, 05 Sep 2022 04:59:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jKxumbSI; spf=pass (domain: kernel.org, ip: 145.40.73.55, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id C87E3CE11FD for ; Mon, 5 Sep 2022 11:59:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24FDAC433D6 for ; Mon, 5 Sep 2022 11:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662379140; bh=UyBnjkCgIwnpGlb/PwVgR0VcvZm/FZ9Zm/1fZqM4grQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jKxumbSIfiZ+ydx2rvduZ4gHjV80R3epNc138GXHwLGvDsxm/ufEUv40N0lQT6+lb 53hCnQ1BmOXpNwa/auELVZEk+MOxfUBswzDxEd83Jes1OIBT2BEwhaOG3jqPFCf5UN 6qBDFiCvYfIFccNI5ja6YaAKApHanBJzFNb6OA1QP0LtHd14lKvbL0VJfbmxaARxiH IHD66PtblWLXIgliUeBQqNMpMx/TQLPoGr9sxKyKrvQsSD2uctz8arHKz1RIea14zT DSWZkSWqTdYnXbbEo+AIbKxAlUv3+rE31cFHQAPCzc0lG4yM0VLCawHek9GowLrlQO yr4MnRUTXc8dQ== Received: by mail-lf1-f43.google.com with SMTP id q7so12818534lfu.5 for ; Mon, 05 Sep 2022 04:59:00 -0700 (PDT) X-Gm-Message-State: ACgBeo2k9KXhXjuFXI28NFQW1tv2EdHpFlFhg9G1ujY8cebwQbnfql6m YJr+sN69jl4FPgh+89cYgqmka5YVm82G8umiQH4= X-Google-Smtp-Source: AA6agR6kFHPjdVIw7IlCTYTcqDu6E65zwE3OUaccKoWrFISN2NEgnwvUABDJUtXfg4Dr+gKaqLw0eUmVPkwO1TugTGs= X-Received: by 2002:a05:6512:150e:b0:492:d9fd:9bdf with SMTP id bq14-20020a056512150e00b00492d9fd9bdfmr15611356lfb.583.1662379138123; Mon, 05 Sep 2022 04:58:58 -0700 (PDT) MIME-Version: 1.0 References: <22a5fedd5f16c24712d62270780bd73cd922af11.1661215864.git.ppolawsk@redhat.com> In-Reply-To: <22a5fedd5f16c24712d62270780bd73cd922af11.1661215864.git.ppolawsk@redhat.com> From: "Ard Biesheuvel" Date: Mon, 5 Sep 2022 13:58:47 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [[edk2-devel] PATH v1 2/3] OvmfPkg: take PcdResizeXterm from the QEMU command line To: =?UTF-8?B?UGF3ZcWCIFBvxYJhd3NraQ==?= Cc: devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 23 Aug 2022 at 03:03, Pawe=C5=82 Po=C5=82awski wrote: > > From: Laszlo Ersek > <--- insert explanatory text here ---> > Signed-off-by: Laszlo Ersek > > Pawel: Updated commit message for re-submission > > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > > Signed-off-by: Pawe=C5=82 Po=C5=82awski > --- > OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + > OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + > OvmfPkg/IntelTdx/IntelTdxX64.dsc | 1 + > OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/PlatformPei/PlatformPei.inf | 1 + > OvmfPkg/PlatformPei/Platform.c | 13 +++++++++++++ > 9 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc > index 90e8a213ef77..20f9f0fd2424 100644 > --- a/OvmfPkg/AmdSev/AmdSevX64.dsc > +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc > @@ -475,6 +475,7 @@ > [PcdsDynamicDefault] > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0 > diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.= dsc > index f0d700f14477..bac05b72f2da 100644 > --- a/OvmfPkg/CloudHv/CloudHvX64.dsc > +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc > @@ -573,6 +573,7 @@ > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > !if $(SMM_REQUIRE) =3D=3D FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdx= X64.dsc > index 71b1cf8e7090..f6945f6598b6 100644 > --- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc > +++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc > @@ -464,6 +464,7 @@ > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0 > diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.= dsc > index 52498bbe90a8..89c3dfce98ba 100644 > --- a/OvmfPkg/Microvm/MicrovmX64.dsc > +++ b/OvmfPkg/Microvm/MicrovmX64.dsc > @@ -562,7 +562,7 @@ > # only set when > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > - > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0 > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 725a01ae9a20..22ea7e109c21 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -584,6 +584,7 @@ > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > !if $(SMM_REQUIRE) =3D=3D FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index adc813ba2e1e..3d832080f3b9 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -592,6 +592,7 @@ > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > !if $(SMM_REQUIRE) =3D=3D FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 6e68f60dc90f..16cfa4c362cb 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -611,6 +611,7 @@ > # ($(SMM_REQUIRE) =3D=3D FALSE) > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE > !if $(SMM_REQUIRE) =3D=3D FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 > diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/Pl= atformPei.inf > index 3cd83e6ec3e5..47adfd0fbb90 100644 > --- a/OvmfPkg/PlatformPei/PlatformPei.inf > +++ b/OvmfPkg/PlatformPei/PlatformPei.inf > @@ -99,6 +99,7 @@ > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved > + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm > gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode > gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable > gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack > diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platfor= m.c > index 009db67ee60a..83d40b8a51f5 100644 > --- a/OvmfPkg/PlatformPei/Platform.c > +++ b/OvmfPkg/PlatformPei/Platform.c > @@ -41,6 +41,18 @@ > > #include "Platform.h" > > +#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \ > + do { \ > + BOOLEAN Setting; \ > + RETURN_STATUS PcdStatus; \ > + \ > + if (!RETURN_ERROR (QemuFwCfgParseBool ( \ > + "opt/ovmf/" #TokenName, &Setting))) { \ > + PcdStatus =3D PcdSetBoolS (TokenName, Setting); \ > + ASSERT_RETURN_ERROR (PcdStatus); \ > + } \ > + } while (0) > + > EFI_HOB_PLATFORM_INFO mPlatformInfoHob =3D { 0 }; > > EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] =3D { > @@ -387,6 +399,7 @@ InitializePlatform ( > MemTypeInfoInitialization (); > MemMapInitialization (&mPlatformInfoHob); > NoexecDxeInitialization (); > + UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm); > } > > InstallClearCacheCallback (); > -- > 2.37.2 >