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.26666.1661216588922251921 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=cqN3TBUO; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: ppolawsk@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661216587; 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=88U1LjWMPnwpqw202eL51W3wOUoGuG8vT7oXDxdF/yg=; b=cqN3TBUOVXdIQjIRXjM3UZqvT0gjZrZuTsmPm7SMjbl8ZJm2kOMuYqZ2JMSh5UrgLkhfs6 akZRI1dqbWgE2nwmsYD9f/5qNmqqyAw97GUFewWgzrpsH0NItfGDa3gfL3xwTsIl0EEGV/ GLeluY6zhx+AeuUZmTVlXXLezmUfkzs= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-34-lGberXkqNlum6PgEPdVZ_w-1; Mon, 22 Aug 2022 21:03:06 -0400 X-MC-Unique: lGberXkqNlum6PgEPdVZ_w-1 Received: by mail-lf1-f69.google.com with SMTP id g23-20020ac25397000000b00492e52a1dadso1392067lfh.21 for ; Mon, 22 Aug 2022 18:03:05 -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=bKPNalMa21YX3huW5cqt3khp5fXk8gfmt+iv4HRfKzw=; b=C75qvbhFiTeARzobrUlwOWbq5v2Plr7BBSwoTylRut+/3zOX9Ur46nguN/W/Ydp54w UbbFOEhNSk0mx04KUgD2Dy50xnGDI3G8RU0mfpW1T9OhqBpGh8GNyClcBGs29e672ZMV 3Is3KOcOb7zM7KhwF3MTw7oaWLK8BKqZ3KL7pF8256W/VS/zM1Qsg9d3rP487C9Rjobx QIs/OLCujGonfVLd/h+QAbVQIj4xWuMBEjYAnPFRAh85f3p1duV+qcTbSjTUBCIIZ+71 v3Caj8YPbw9r6cagqhdu08EvWYKs9D27KKgJlJ/H/OEwU03eXsKjtA86iR65Uq6HsM1a sKJQ== X-Gm-Message-State: ACgBeo2rFq8XMakDjaD33RpgRHOOwRJO4YfnOHOzKqzPSc1N565TIpig 3/aN8v2zfwv7liuOv1h9F2bHFR7eu3pQIqNE153vJakdbAbGwm8P8GIKXA61lee+X6bhzGqsHgx EYfkX1ac/WxZbauesIXX/adGjUwW0+fv3i8GorU6TVqT/G1XFkvdAIxF9vRhg/vfFkA== X-Received: by 2002:ac2:5328:0:b0:492:f6c7:6337 with SMTP id f8-20020ac25328000000b00492f6c76337mr228594lfh.194.1661216584534; Mon, 22 Aug 2022 18:03:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gthHxnSM5DXpjPBozBli8V2NlOjjdiCG4M3iEyAmJo6KwUUL4Ak1rOyu0F2EIRF0nnikezg== X-Received: by 2002:ac2:5328:0:b0:492:f6c7:6337 with SMTP id f8-20020ac25328000000b00492f6c76337mr228579lfh.194.1661216584285; Mon, 22 Aug 2022 18:03:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 18:03:03 -0700 (PDT) From: =?UTF-8?B?UGF3ZcWCIFBvxYJhd3NraQ==?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Gerd Hoffmann Subject: [[edk2-devel] PATH v1 3/3] ArmVirtPkg: take PcdResizeXterm from the QEMU command line Date: Tue, 23 Aug 2022 03:02:39 +0200 Message-Id: <39c43cf39467bdf5139eb350cd89cc4ed953626f.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: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Pawe=C5=82 Po=C5=82awski --- ArmVirtPkg/ArmVirtQemu.dsc | 7 = +++- ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf | 33 = +++++++++++++++++++ ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c | 34 = ++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 9369a88858fd..7ed8870474d3 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -285,6 +285,8 @@ gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0=0D !endif=0D =20=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE=0D +=0D [PcdsDynamicHii]=0D gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGui= d|0x0|FALSE|NV,BS=0D =20=0D @@ -387,7 +389,10 @@ MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf=0D MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf=0D MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf= =0D - MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf=0D + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {=0D + =0D + NULL|ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLi= b.inf=0D + }=0D MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D =20=0D MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerL= ib.inf b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.i= nf new file mode 100644 index 000000000000..a51dbd1670a8 --- /dev/null +++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf @@ -0,0 +1,33 @@ +## @file=0D +# Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg= =0D +#=0D +# Copyright (C) 2015-2020, Red Hat, Inc.=0D +# Copyright (c) 2014, Linaro Ltd. All rights reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x00010005=0D + BASE_NAME =3D TerminalPcdProducerLib=0D + FILE_GUID =3D 4a0c5ed7-8c42-4c01-8f4c-7bf258316a96= =0D + MODULE_TYPE =3D BASE=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D NULL=0D + CONSTRUCTOR =3D TerminalPcdProducerLibConstructor=0D +=0D +[Sources]=0D + TerminalPcdProducerLib.c=0D +=0D +[Packages]=0D + MdeModulePkg/MdeModulePkg.dec=0D + MdePkg/MdePkg.dec=0D + OvmfPkg/OvmfPkg.dec=0D +=0D +[LibraryClasses]=0D + DebugLib=0D + PcdLib=0D + QemuFwCfgSimpleParserLib=0D +=0D +[Pcd]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## SOMETIMES_PRODUCES=0D diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerL= ib.c b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c new file mode 100644 index 000000000000..bfd3a6a535f9 --- /dev/null +++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c @@ -0,0 +1,34 @@ +/** @file=0D +* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg= =0D +*=0D +* Copyright (C) 2015-2020, Red Hat, Inc.=0D +* Copyright (c) 2014, Linaro Ltd. All rights reserved.
=0D +*=0D +* SPDX-License-Identifier: BSD-2-Clause-Patent=0D +**/=0D +=0D +#include =0D +#include =0D +#include =0D +=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/org.tianocore.edk2.aavmf/" #TokenName, &Setting))= ) { \=0D + PcdStatus =3D PcdSetBoolS (TokenName, Setting); = \=0D + ASSERT_RETURN_ERROR (PcdStatus); = \=0D + } = \=0D + } while (0)=0D +=0D +RETURN_STATUS=0D +EFIAPI=0D +TerminalPcdProducerLibConstructor (=0D + VOID=0D + )=0D +{=0D + UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);=0D + return RETURN_SUCCESS;=0D +}=0D --=20 2.37.2