From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7759C7803CE for ; Mon, 9 Oct 2023 00:08:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YiXNK+v6YdIHV2mXaGWtNGvslM/LVh+8BV9YOszyTPU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1696810096; v=1; b=hb4wxF1k3Ino9bRrvVO0/wkekM+HRyNW/I5LT4Bc8kV7TYtWqsvkfioRKQibVDmtJP08D0eU yvhYsgUfBzIHvHWo26bvcB7jpw7KmaA4zxuIVFWGAQoBWO2SrZP0c2eA/0XpX+X4QqQPe1ACy/0 V4aOApNSNkEXutIareHP281A= X-Received: by 127.0.0.2 with SMTP id ZxHMYY7687511xTO6U201WuK; Sun, 08 Oct 2023 17:08:16 -0700 X-Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by mx.groups.io with SMTP id smtpd.web10.50230.1696810089546339038 for ; Sun, 08 Oct 2023 17:08:09 -0700 X-Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-1dd54aca17cso3024774fac.3 for ; Sun, 08 Oct 2023 17:08:09 -0700 (PDT) X-Gm-Message-State: 0msI7A6lUJ0EukpDFMOWPxpFx7686176AA= X-Google-Smtp-Source: AGHT+IF+s7Vka3ojST8eVPuUx1rIGvPFn3ABTM3R1TbFiczkYkwhpHlKtapyIHEpFGnIrELgqy4VCw== X-Received: by 2002:a05:6870:b6a8:b0:1d5:21cd:7067 with SMTP id cy40-20020a056870b6a800b001d521cd7067mr17746472oab.29.1696810088648; Sun, 08 Oct 2023 17:08:08 -0700 (PDT) X-Received: from localhost.localdomain ([50.46.253.1]) by smtp.gmail.com with ESMTPSA id t20-20020a62ea14000000b0068fcc7f6b00sm5048320pfh.74.2023.10.08.17.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 17:08:08 -0700 (PDT) From: "Taylor Beebe" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v5 21/28] OvmfPkg: Add QemuFwCfgParseString to QemuFwCfgSimpleParserLib Date: Sun, 8 Oct 2023 17:07:33 -0700 Message-ID: <20231009000742.1792-22-taylor.d.beebe@gmail.com> In-Reply-To: <20231009000742.1792-1-taylor.d.beebe@gmail.com> References: <20231009000742.1792-1-taylor.d.beebe@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,taylor.d.beebe@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=hb4wxF1k; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io QemuFwCfgParseString allows reading strings from the fw_cfg file. This function is needed for parsing the memory protection profile name. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann --- OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParser.c | 11 +++++++++++ OvmfPkg/Include/Library/QemuFwCfgSimpleParserLib.h | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParser.c b/OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParser.c index c9e0091b82d1..63c8711a9f2e 100644 --- a/OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParser.c +++ b/OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParser.c @@ -426,3 +426,14 @@ QemuFwCfgParseUintn ( *Value = (UINTN)Uint64; return RETURN_SUCCESS; } + +RETURN_STATUS +EFIAPI +QemuFwCfgParseString ( + IN CONST CHAR8 *FileName, + IN OUT UINTN *BufferSize, + OUT CHAR8 *Buffer + ) +{ + return QemuFwCfgGetAsString (FileName, BufferSize, Buffer); +} diff --git a/OvmfPkg/Include/Library/QemuFwCfgSimpleParserLib.h b/OvmfPkg/Include/Library/QemuFwCfgSimpleParserLib.h index bcbf3bc4fc96..ea9fcf7b402e 100644 --- a/OvmfPkg/Include/Library/QemuFwCfgSimpleParserLib.h +++ b/OvmfPkg/Include/Library/QemuFwCfgSimpleParserLib.h @@ -125,4 +125,12 @@ QemuFwCfgParseUintn ( OUT UINTN *Value ); +RETURN_STATUS +EFIAPI +QemuFwCfgParseString ( + IN CONST CHAR8 *FileName, + IN OUT UINTN *BufferSize, + OUT CHAR8 *Buffer + ); + #endif // QEMU_FW_CFG_SIMPLE_PARSER_LIB_H_ -- 2.42.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109426): https://edk2.groups.io/g/devel/message/109426 Mute This Topic: https://groups.io/mt/101843365/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-