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.129.124]) by mx.groups.io with SMTP id smtpd.web10.26667.1661216589096269359 for ; Mon, 22 Aug 2022 18:03:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z3WyKzff; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: ppolawsk@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661216588; 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=OPmKzpwJl20lD2CpmRgSFo3j0VOP3aa3slgvKGCEqco=; b=Z3WyKzffgMlW80/uFr22k5ABUAHhhBCUqFuhrfbsv1jYmj+F54J3xrTzg9b6z9cByzJ9jO 4SboqHuY+lqJaxpBpRst92FNxseOqi3iFcpDGkhhjI6f+lUGB1YbXuJf7bMtkwqA2zqdbW loEJlcNlmrox638eMnkumgMz1nduyaA= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-437-Suxmd7aRNiCI3Pvz_SA-dg-1; Mon, 22 Aug 2022 21:03:05 -0400 X-MC-Unique: Suxmd7aRNiCI3Pvz_SA-dg-1 Received: by mail-lf1-f71.google.com with SMTP id h15-20020a056512220f00b00492bda6c536so3845996lfu.14 for ; Mon, 22 Aug 2022 18:03:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Gr0wwhxYY7OLNXSB35MKDR9ICTXeexARe1cfeE2w1r0=; b=uY7qy3VzKJB61xh4icvO/CipQXIA+bZwmOCctUIBuewk8MJfamx3RkIrNG5qa1Lmc5 EQBPlxl/N35D1ZtHBDr4fn4X5dWWEhodEWtX5Tbwl/ijA//KoIgSs3lsUWSYqQtoOtFP +yQimcdZWfr7KagODiwweOzFppLid4Pl8zwVCbaBXpAcidx+1MYCFAtVJFdCghJvHq4V 4Ek4rH2VTrs3MsybTYvJ1vw+9aAX2EcdKqBll9hd5/rC52aLVpoy6cMgzR2ont6AoT7y paiH0ZKP+i7nxtin5uxiZhFFnisrp2amqCVoTdLblok4FBEnWoQozobjQrgsj+SmAhkd Qr+Q== X-Gm-Message-State: ACgBeo3Vnfwysoe+oepOQbCn2s3JR9cpDT/1CYK205omtLen5nMmr1tf GKjVApdUmdRCuFc1NP2Vm5tRdxRD1DBXgQZuDFp1dxfscolOxhJ1GbXPp25DRr1i/yoPAXtF5cP M7uiqFRcHc9O07z72MnkvLvlwrRPHrNkinz03LG8AovC+vUMMjTx3B79Fix1LPpMPrg== X-Received: by 2002:a05:6512:234e:b0:492:cfc4:c4f9 with SMTP id p14-20020a056512234e00b00492cfc4c4f9mr5793739lfu.358.1661216583360; Mon, 22 Aug 2022 18:03:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR4hRDnquT2hz2c6wmrNV8bQK3870ShhrMohHatzmoCtwI5Oy2RuW0dDFe+0GFH3VTOF1RcbOQ== X-Received: by 2002:a05:6512:234e:b0:492:cfc4:c4f9 with SMTP id p14-20020a056512234e00b00492cfc4c4f9mr5793726lfu.358.1661216583087; Mon, 22 Aug 2022 18:03:03 -0700 (PDT) Return-Path: Received: from czapka.. ([93.177.91.185]) by smtp.gmail.com with ESMTPSA id q23-20020a056512211700b0048b045a5c3asm2197406lfr.201.2022.08.22.18.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 18:03:02 -0700 (PDT) From: =?UTF-8?B?UGF3ZcWCIFBvxYJhd3NraQ==?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [[edk2-devel] PATH v1 2/3] OvmfPkg: take PcdResizeXterm from the QEMU command line Date: Tue, 23 Aug 2022 03:02:38 +0200 Message-Id: <22a5fedd5f16c24712d62270780bd73cd922af11.1661215864.git.ppolawsk@redhat.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Laszlo Ersek 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]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0=0D diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.ds= c index f0d700f14477..bac05b72f2da 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -573,6 +573,7 @@ # ($(SMM_REQUIRE) =3D=3D FALSE)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D !if $(SMM_REQUIRE) =3D=3D FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX6= 4.dsc index 71b1cf8e7090..f6945f6598b6 100644 --- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc +++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc @@ -464,6 +464,7 @@ # ($(SMM_REQUIRE) =3D=3D FALSE)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0=0D diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.ds= c index 52498bbe90a8..89c3dfce98ba 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -562,7 +562,7 @@ # only set when=0D # ($(SMM_REQUIRE) =3D=3D FALSE)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D -=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0=0D 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)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D !if $(SMM_REQUIRE) =3D=3D FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D 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)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D !if $(SMM_REQUIRE) =3D=3D FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D 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)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D !if $(SMM_REQUIRE) =3D=3D FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0=0D diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/Plat= formPei.inf index 3cd83e6ec3e5..47adfd0fbb90 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -99,6 +99,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode=0D gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack=0D diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.= c index 009db67ee60a..83d40b8a51f5 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -41,6 +41,18 @@ =20=0D #include "Platform.h"=0D =20=0D +#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \=0D + do { \=0D + BOOLEAN Setting; \=0D + RETURN_STATUS PcdStatus; \=0D + \=0D + if (!RETURN_ERROR (QemuFwCfgParseBool ( \=0D + "opt/ovmf/" #TokenName, &Setting))) { \=0D + PcdStatus =3D PcdSetBoolS (TokenName, Setting); \=0D + ASSERT_RETURN_ERROR (PcdStatus); \=0D + } \=0D + } while (0)=0D +=0D EFI_HOB_PLATFORM_INFO mPlatformInfoHob =3D { 0 };=0D =20=0D EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] =3D {=0D @@ -387,6 +399,7 @@ InitializePlatform ( MemTypeInfoInitialization ();=0D MemMapInitialization (&mPlatformInfoHob);=0D NoexecDxeInitialization ();=0D + UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);=0D }=0D =20=0D InstallClearCacheCallback ();=0D --=20 2.37.2