> --- /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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92810): https://edk2.groups.io/g/devel/message/92810 Mute This Topic: https://groups.io/mt/93195502/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-