From patchwork Wed Jan 16 21:22:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 155772 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1152800jaa; Wed, 16 Jan 2019 13:22:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN48cYJ4y2VnhQgFLTsNrkxYChr0a+/3ul8OFcr+DW+KSZjyf1H+50EWtw8wY4bAwLEOdRyH X-Received: by 2002:a62:5f07:: with SMTP id t7mr11889992pfb.108.1547673757124; Wed, 16 Jan 2019 13:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547673757; cv=none; d=google.com; s=arc-20160816; b=B7Y6zfkQ+Gq8mqzo6mVQ6vUTflf3cCE2dI7u750Uhk93gB5+aPgMthzsZs1e7SL8rT qA9EUcbZFJRo7tW+X4IFYg4yeolvz/fJVsb/sNbM+nU+fkP8x6Q27TKCSJTUXP+Bjx8a HJkAC1H8/ygsSL85QUYXT8RmCw232Gqi6GlZDXOXL0IiEKfB7SFcZiKodwSpqpze3uAf mEAFjgX8ZS+GflYN4bTlOdgNKe3OBpusDWm0Xv99AJmfZ1fXlRcnRUBdS5akR6F6EZIp KOGbkiE0uzfOpmTO5DQLs3vol9CUjuGOay15f7l6TpfE/dyy5+WywNXJVt56+/jRQ8wo 18rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=4JLNdYArQzk2AeGP2gYCAlRRaBWllanXRyPgT4En1rA=; b=Lfc4Ces3YNQ5+efhld4xtf2kilJhNqBRfTkQDjtBlbqLsMgAxtma9HJUVICzQV67Ye 8cmL/E209sHzyKS/JLX9OaA4hjvV8mO2Jk/30FBTviQzfjil3aqWZAMrHbQmWkcw4PvM 8cqlMMEVdNwjXd7FE1cVPVZMR9CtmTuNC3LK4P7oOjg2lrox8UZxgoKf8gwR48zlsfH0 ySq77g38l+4asXgfT3pKKJJs4lKiIULWsJQe/hQDKLHL3YHoV0jYLMKmT8ptq4Iir3tJ uS4kSH4vtCZTheybitrA2lgkxBLwTKrs7lZ5GoOpRfsLr4JckpK/sbTT3Y1snMQoFjnA 8a5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NpVTf4YA; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id g59si3754225plb.302.2019.01.16.13.22.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 13:22:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NpVTf4YA; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D127A211B81AC; Wed, 16 Jan 2019 13:22:33 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5DDC7211B81A7 for ; Wed, 16 Jan 2019 13:22:32 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id f188so3575991wmf.5 for ; Wed, 16 Jan 2019 13:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0R72tN1VSaB3kI7K5vSfequ++HPRsGDdRzl6rEtlYtE=; b=NpVTf4YAJ6xweJx2h6ipgln8setAGmG5nMHf8w9gvOvIIWS5UcnFcKWMYo2uKshxva QYy+yAQwCVq1VlHMIu/Kh886C9Foi/d+RM/Ix/ZRh00uXdJ5TiJVEr8aCc1fNs6WWDpm VxiMJ+KdM7kgvxXYtlbfiFTMr9LfeJj80fNww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0R72tN1VSaB3kI7K5vSfequ++HPRsGDdRzl6rEtlYtE=; b=nmzu3NapeJo9drNo5X8A3prglH7ipWPJ4Mu8NuZ1Jx4eb+5TjYYdi4l9P0YNV+2jBT LT7QBnNYOShYRf+y+TgwQV3KU7q5X+0AHC9w62wfiKzu5DgjxokdBSbXUzC/N/im0vSV Bu+hFSrGb7Sm1kfoHlJziZfscPWh8ShQeZwnyDlgdQRQKsI7RR3B2uqTCjvL9BP1fkLV kkNF+bNY9BZxA7mPCoTaPKiyHhrkAB7F4/akJ6r5Vy6ixyktLZw0RPBcC3ll47MAsKXf uNPvTlhMFHmPQxRJz++YeNo0E81Y3cfIzkawyPloeIdMMz8GWUzBrc1LYXs18bSeQiHy KGTw== X-Gm-Message-State: AJcUukcuLN6GKHCHPX7hvh6gMffl+LrdhsVpeBivHjv1px0CGe/o8iIK 1tXEY7CXB9bM4tCT8T5nPG9tkq98sozp0g== X-Received: by 2002:a1c:4d12:: with SMTP id o18mr9421128wmh.92.1547673750663; Wed, 16 Jan 2019 13:22:30 -0800 (PST) Received: from dogfood.home ([2a01:cb1d:112:6f00:28df:207d:542c:1451]) by smtp.gmail.com with ESMTPSA id l14sm162789095wrp.55.2019.01.16.13.22.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 13:22:29 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 16 Jan 2019 22:22:20 +0100 Message-Id: <20190116212221.7460-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190116212221.7460-1-ard.biesheuvel@linaro.org> References: <20190116212221.7460-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 3/4] MdeModulePkg/VarCheckLib: permit use by MM_STANDALONE modules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ting Ye , Liming Gao , Hao Wu , Jiewen Yao , Star Zeng , Michael D Kinney , Chao Zhang MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Permit VarCheckLib and VarCheckUefiLib to be used by MM_STANDALONE modules. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf | 4 ++-- MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Jian J Wang Signed-off-by: Ard Biesheuvel Signed-off-by: Ard Biesheuvel diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf index 128c44d695e1..8873fd51a02a 100644 --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf @@ -19,9 +19,9 @@ [Defines] BASE_NAME = VarCheckUefiLib MODULE_UNI_FILE = VarCheckUefiLib.uni FILE_GUID = AC24A4C7-F845-4665-90E5-6431D6E28DC0 - MODULE_TYPE = DXE_RUNTIME_DRIVER + MODULE_TYPE = BASE VERSION_STRING = 1.0 - LIBRARY_CLASS = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER + LIBRARY_CLASS = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE CONSTRUCTOR = VarCheckUefiLibNullClassConstructor # diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c index 80dc6341adcf..5e419831e8cc 100644 --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c @@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ +#include + #include #include #include @@ -927,15 +929,14 @@ VariablePropertySetUefiDefined ( @retval EFI_SUCCESS The constructor executed correctly. **/ -EFI_STATUS +RETURN_STATUS EFIAPI VarCheckUefiLibNullClassConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + VOID ) { VariablePropertySetUefiDefined (); VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined); - return EFI_SUCCESS; + return RETURN_SUCCESS; }