From nobody Sat May 4 11:32:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1522229483105379.5988605523513; Wed, 28 Mar 2018 02:31:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B9E9422106DE6; Wed, 28 Mar 2018 02:24:42 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8D2D922106DE0 for ; Wed, 28 Mar 2018 02:24:39 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 02:31:17 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga005.fm.intel.com with ESMTP; 28 Mar 2018 02:31:16 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,370,1517904000"; d="scan'208";a="215565674" From: Star Zeng To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 17:31:12 +0800 Message-Id: <1522229472-37164-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [PATCH] MdeModulePkg Variable: Align TPL level for (Smm)EndOfDxe callback X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Jiewen Yao , Liming Gao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" VariableRuntimeDxe will have OnEndOfDxe() callback function at TPL_NOTIFY level on EndOfDxe event when DXE variable solution is used. Status =3D gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, OnEndOfDxe, NULL, &gEfiEndOfDxeEventGroupGuid, &EndOfDxeEvent ); VariableSmm will have SmmEndOfDxeCallback() callback function at TPL_CALLBACK level on SmmEndOfDxe event when SMM variable solution is used. SmmIplGuidedEventNotify() - PiSmmIpl.c TPL_CALLBACK on EndOfDxe -> SmmEndOfDxeHandler() - PiSmmCore.c install SmmEndOfDxe protocol -> SmmEndOfDxeCallback() - VariableSmm.c The TPL level for (Smm)EndOfDxe callback between VariableRuntimeDxe and VariableSmm is inconsistent, it will make the unified platform code could not make sure its TPL_NOTIFY EndOfDxe callback function (to use variable lock/check) executed before (Smm)EndOfDxe callback function in variable driver. The variable lock/check will start to protect after (Smm)EndOfDxe callback function in variable driver is executed. This patch is to algin the TPL level to TPL_CALLBACK for (Smm)EndOfDxe callback between VariableRuntimeDxe and VariableSmm. Cc: Chasel Chiu Cc: Ruiyu Ni Cc: Liming Gao Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Chasel Chiu --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c b/Mde= ModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c index b2a373cf98aa..6b04f4f7b394 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c @@ -3,7 +3,7 @@ and volatile storage space and install variable architecture protocol. =20 Copyright (C) 2013, Red Hat, Inc. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License @@ -547,7 +547,7 @@ VariableServiceInitialize ( // Status =3D gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, - TPL_NOTIFY, + TPL_CALLBACK, OnEndOfDxe, NULL, &gEfiEndOfDxeEventGroupGuid, --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel