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 DF7E67803CE for ; Mon, 8 Apr 2024 09:28:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9sCE2H883Oj76HhFEwBK6v3uu2Cl1rT773Ga5A9h6PY=; 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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1712568490; v=1; b=2YldNPcccte6N8U8Yh80HtaYVh+QM/rdU7KBFINZBnyptESQIvuXGo/2kifsNJVRH8EOvjXS C9Fm2vDDnG94dH7LMf43Gb8agRgPR3IAmjak1HnBIttGPwSTBiawpZwwSq0YXqBnoMiRB/AtJv7 8FR1yzhgnXmOKD+tVEEGZh6rWS7I0Br5QMyyVqB7/DNDm5rjFtVOiKTVb6QMrPTI9CmngcIl9M0 C2RLxhKajqmjLthxXJaY7FQXGNl6QUMTyluKTTd9lP4ABn2qdUGN3/EECR1+uEYtFgq9Y83Y9Vb dfL2/8OT8XxywB/1DZR4wnX9tYTjg91StauW22IF471TQ== X-Received: by 127.0.0.2 with SMTP id TiQFYY7687511xuRlJThzi1O; Mon, 08 Apr 2024 02:28:10 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mx.groups.io with SMTP id smtpd.web10.102100.1712568489599724167 for ; Mon, 08 Apr 2024 02:28:09 -0700 X-CSE-ConnectionGUID: w8XVY9KST4a4k8DnJLu75A== X-CSE-MsgGUID: KrtN1kpOQVONwfr2nO5CBQ== X-IronPort-AV: E=McAfee;i="6600,9927,11037"; a="18558063" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="18558063" X-Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 02:28:09 -0700 X-CSE-ConnectionGUID: JMZw+Jt/TtiTdGrxtuB4PQ== X-CSE-MsgGUID: Mu8BhAdiTSWPfUDASff6PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="19780930" X-Received: from qingyush-mobl.ccr.corp.intel.com ([10.238.10.240]) by fmviesa010.fm.intel.com with ESMTP; 08 Apr 2024 02:28:08 -0700 From: "Qingyu" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Zhiguang Liu , Gahan Saraiya Subject: [edk2-devel] [PATCH] MdePkg: Update the comments of GetInformation function Date: Mon, 8 Apr 2024 17:27:58 +0800 Message-Id: In-Reply-To: References: 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 Resent-Date: Mon, 08 Apr 2024 02:28:09 -0700 Resent-From: qingyu.shang@intel.com Reply-To: devel@edk2.groups.io,qingyu.shang@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QC3EaeB3B9K66ThBIS7O7eWEx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=2YldNPcc; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.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 Refer to Uefi spec 2.10 section 11.11.2, add a new retval EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(). Reference: [mantis #1866] - GetInfo() of Adapter Information Protocol should have a provision for IHV to return no data. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Signed-off-by: Qingyu Signed-off-by: Gahan Saraiya --- MdePkg/Include/Protocol/AdapterInformation.h | 5 ++++- MdePkg/Library/DxeHstiLib/HstiAip.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Protocol/AdapterInformation.h b/MdePkg/Include/Protocol/AdapterInformation.h index ed19e5736c3c..8e4448eb0f87 100644 --- a/MdePkg/Include/Protocol/AdapterInformation.h +++ b/MdePkg/Include/Protocol/AdapterInformation.h @@ -140,7 +140,9 @@ typedef struct { This function returns information of type InformationType from the adapter. If an adapter does not support the requested informational type, then - EFI_UNSUPPORTED is returned. + EFI_UNSUPPORTED is returned. If an adapter does not contain Information for + the requested InformationType, it fills InformationBlockSize with 0 and + returns EFI_NOT_FOUND. @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance. @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock. @@ -150,6 +152,7 @@ typedef struct { @retval EFI_SUCCESS The InformationType information was retrieved. @retval EFI_UNSUPPORTED The InformationType is not known. + @retval EFI_NOT_FOUND Information is not available for the requested information type. @retval EFI_DEVICE_ERROR The device reported an error. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_INVALID_PARAMETER This is NULL. diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c b/MdePkg/Library/DxeHstiLib/HstiAip.c index a2454ffeaa7a..523a712e6f6e 100644 --- a/MdePkg/Library/DxeHstiLib/HstiAip.c +++ b/MdePkg/Library/DxeHstiLib/HstiAip.c @@ -12,7 +12,9 @@ This function returns information of type InformationType from the adapter. If an adapter does not support the requested informational type, then - EFI_UNSUPPORTED is returned. + EFI_UNSUPPORTED is returned. If an adapter does not contain Information for + the requested InformationType, it fills InformationBlockSize with 0 and + returns EFI_NOT_FOUND. @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance. @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock. @@ -22,6 +24,7 @@ @retval EFI_SUCCESS The InformationType information was retrieved. @retval EFI_UNSUPPORTED The InformationType is not known. + @retval EFI_NOT_FOUND Information is not available for the requested information type. @retval EFI_DEVICE_ERROR The device reported an error. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_INVALID_PARAMETER This is NULL. -- 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117494): https://edk2.groups.io/g/devel/message/117494 Mute This Topic: https://groups.io/mt/105397937/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-