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 4159C940D35 for ; Wed, 20 Sep 2023 00:58:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=H9iGDTmkDAZWb6dJaCSqrqTcyyoSunYwScNpX5+ltdI=; 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=1695171505; v=1; b=n+C9SVlx6s9BrBAGieb95+y/7yiuZLTaDf6kFGIoCZwJR/+XWww4qSiUuLIdlmZwPPUwCYnN Nzgd3miHDAqZraEcYZDxcNRbnCwpz8ujoMCaMUSM2US3HGKXO2vBuWebMxF1WeSayhgbbhZz/Rk N0rJvQvBTGrpkEKSWTlfzgiw= X-Received: by 127.0.0.2 with SMTP id 6dGHYY7687511xFaLobIFmBv; Tue, 19 Sep 2023 17:58:25 -0700 X-Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web11.26931.1695171499837050866 for ; Tue, 19 Sep 2023 17:58:19 -0700 X-Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1c3d8fb23d9so50242115ad.0 for ; Tue, 19 Sep 2023 17:58:19 -0700 (PDT) X-Gm-Message-State: WFuCWLNeHzyEwEvyiwiDGOzmx7686176AA= X-Google-Smtp-Source: AGHT+IHqyLJIGySCJSo2SmUgyeI+JrBvLbndcT4lL5Rddod1HhYO+6QQo4tumCJ27AUgEnpcMtx/Tw== X-Received: by 2002:a17:902:b708:b0:1bc:e6a:205f with SMTP id d8-20020a170902b70800b001bc0e6a205fmr864251pls.20.1695171499168; Tue, 19 Sep 2023 17:58:19 -0700 (PDT) X-Received: from localhost.localdomain ([50.46.253.1]) by smtp.gmail.com with ESMTPSA id 13-20020a170902c24d00b001bb988ac243sm10563576plg.297.2023.09.19.17.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 17:58:18 -0700 (PDT) From: "Taylor Beebe" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v4 21/28] OvmfPkg: Add QemuFwCfgParseString to QemuFwCfgSimpleParserLib Date: Tue, 19 Sep 2023 17:57:44 -0700 Message-ID: <20230920005752.2041-22-taylor.d.beebe@gmail.com> In-Reply-To: <20230920005752.2041-1-taylor.d.beebe@gmail.com> References: <20230920005752.2041-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=n+C9SVlx; 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 (#108883): https://edk2.groups.io/g/devel/message/108883 Mute This Topic: https://groups.io/mt/101469961/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-