From: "Gerd Hoffmann" <kraxel@redhat.com>
To: "Paweł Poławski" <ppolawsk@redhat.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Sami Mujawar <sami.mujawar@arm.com>
Subject: Re: [[edk2-devel] PATH v1 3/3] ArmVirtPkg: take PcdResizeXterm from the QEMU command line
Date: Thu, 25 Aug 2022 11:43:38 +0200 [thread overview]
Message-ID: <20220825094338.po2tzpk37rtsitf5@sirius.home.kraxel.org> (raw)
In-Reply-To: <39c43cf39467bdf5139eb350cd89cc4ed953626f.1661215864.git.ppolawsk@redhat.com>
> --- /dev/null
> +++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c
> @@ -0,0 +1,34 @@
> +/** @file
> +* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg
> +*
> +* Copyright (C) 2015-2020, Red Hat, Inc.
> +* Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
> +*
> +* SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include <Library/DebugLib.h>
> +#include <Library/PcdLib.h>
> +#include <Library/QemuFwCfgSimpleParserLib.h>
> +
> +#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \
> + do { \
> + BOOLEAN Setting; \
> + RETURN_STATUS PcdStatus; \
> + \
> + if (!RETURN_ERROR (QemuFwCfgParseBool ( \
> + "opt/org.tianocore.edk2.aavmf/" #TokenName, &Setting))) { \
> + PcdStatus = PcdSetBoolS (TokenName, Setting); \
> + ASSERT_RETURN_ERROR (PcdStatus); \
> + } \
> + } while (0)
> +
> +RETURN_STATUS
> +EFIAPI
> +TerminalPcdProducerLibConstructor (
> + VOID
> + )
> +{
> + UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);
> + return RETURN_SUCCESS;
> +}
Oh, we have two variants of that code, with different fw_cfg file names
even.
I think we should:
(1) Move this library to OvmfPkg.
(2) Change the fw_cfg name to be consistent with other cases we have
in the edk2 source tree (see OvmfPkg/Library/PxeBcPcdProducerLib),
i.e. read from 'opt/org.tianocore/ResizeXterm'.
(3) Use the library for both OvmfPkg and ArmVirtPkg instead of having
OVMF set the PCD in platform init code.
take care,
Gerd
prev parent reply other threads:[~2022-08-25 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 1:02 [[edk2-devel] PATH v1 0/3] Enable support for terminal resize Paweł Poławski
2022-08-23 1:02 ` [[edk2-devel] PATH v1 1/3] MdeModulePkg: TerminalDxe: set xterm resolution on mode change Paweł Poławski
2022-08-25 9:27 ` Gerd Hoffmann
2022-08-23 1:02 ` [[edk2-devel] PATH v1 2/3] OvmfPkg: take PcdResizeXterm from the QEMU command line Paweł Poławski
2022-09-05 11:58 ` Ard Biesheuvel
2022-08-23 1:02 ` [[edk2-devel] PATH v1 3/3] ArmVirtPkg: " Paweł Poławski
2022-08-25 9:43 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220825094338.po2tzpk37rtsitf5@sirius.home.kraxel.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox