From nobody Mon Apr 29 14:02:44 2024 Delivered-To: importer@patchew.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; Authentication-Results: mx.zoho.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 1497965768681994.263443668165; Tue, 20 Jun 2017 06:36:08 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6248D21C8F63B; Tue, 20 Jun 2017 06:34:40 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 14FF621C8EFD4 for ; Tue, 20 Jun 2017 06:34:39 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2017 06:36:01 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.2]) by fmsmga006.fm.intel.com with ESMTP; 20 Jun 2017 06:36:00 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,364,1493708400"; d="scan'208";a="117115893" From: Star Zeng To: edk2-devel@lists.01.org Date: Tue, 20 Jun 2017 21:35:56 +0800 Message-Id: <1497965757-138892-2-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1497965757-138892-1-git-send-email-star.zeng@intel.com> References: <1497965757-138892-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 1/2] MdePkg: Update comments for LocateProtocol to follow UEFI 2.7 spec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , 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" Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiSpec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 9203df934084..eb662a35503c 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -1575,6 +1575,7 @@ EFI_STATUS @retval EFI_NOT_FOUND No protocol instances were found that matc= h Protocol and Registration. @retval EFI_INVALID_PARAMETER Interface is NULL. + Protocol is NULL. =20 **/ typedef --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 14:02:44 2024 Delivered-To: importer@patchew.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; Authentication-Results: mx.zoho.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 1497965771254367.26727415376513; Tue, 20 Jun 2017 06:36:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9E17221BBC403; Tue, 20 Jun 2017 06:34:41 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 1E2DD21C8F63B for ; Tue, 20 Jun 2017 06:34:40 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2017 06:36:02 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.2]) by fmsmga006.fm.intel.com with ESMTP; 20 Jun 2017 06:36:02 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,364,1493708400"; d="scan'208";a="117115909" From: Star Zeng To: edk2-devel@lists.01.org Date: Tue, 20 Jun 2017 21:35:57 +0800 Message-Id: <1497965757-138892-3-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1497965757-138892-1-git-send-email-star.zeng@intel.com> References: <1497965757-138892-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 2/2] MdeModulePkg: Return invalid param in LocateProtocol for Protocol==NULL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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" Return EFI_INVALID_PARAMETER in LocateProtocol for Protocol=3D=3DNULL to follow UEFI 2.7 spec PiSmmCore is also updated as the EFI_SMM_SYSTEM_TABLE2.SmmLocateProtocol is reusing the definition of EFI_LOCATE_PROTOCOL. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Hand/Locate.c | 8 ++------ MdeModulePkg/Core/PiSmmCore/Locate.c | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Hand/Locate.c b/MdeModulePkg/Core/Dxe/Ha= nd/Locate.c index 80df0d4a6c1d..3cc146f3814c 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Locate.c +++ b/MdeModulePkg/Core/Dxe/Hand/Locate.c @@ -1,7 +1,7 @@ /** @file Locate handle functions =20 -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -560,14 +560,10 @@ CoreLocateProtocol ( PROTOCOL_NOTIFY *ProtNotify; IHANDLE *Handle; =20 - if (Interface =3D=3D NULL) { + if ((Interface =3D=3D NULL) || (Protocol =3D=3D NULL)) { return EFI_INVALID_PARAMETER; } =20 - if (Protocol =3D=3D NULL) { - return EFI_NOT_FOUND; - } - *Interface =3D NULL; Status =3D EFI_SUCCESS; =20 diff --git a/MdeModulePkg/Core/PiSmmCore/Locate.c b/MdeModulePkg/Core/PiSmm= Core/Locate.c index a7220bae86af..c174a4dd03b8 100644 --- a/MdeModulePkg/Core/PiSmmCore/Locate.c +++ b/MdeModulePkg/Core/PiSmmCore/Locate.c @@ -1,7 +1,7 @@ /** @file Locate handle functions =20 - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availa= ble=20 under the terms and conditions of the BSD License which accompanies this=20 distribution. The full text of the license may be found at =20 @@ -205,14 +205,10 @@ SmmLocateProtocol ( PROTOCOL_NOTIFY *ProtNotify; IHANDLE *Handle; =20 - if (Interface =3D=3D NULL) { + if ((Interface =3D=3D NULL) || (Protocol =3D=3D NULL)) { return EFI_INVALID_PARAMETER; } =20 - if (Protocol =3D=3D NULL) { - return EFI_NOT_FOUND; - } - *Interface =3D NULL; Status =3D EFI_SUCCESS; =20 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel