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 C31A274003A for ; Mon, 8 Apr 2024 09:48:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qDov9ME4K1pszmc4xJs+iOuUzBBxmNmPq7rLaqtbYlE=; 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=1712569686; v=1; b=F5XcI5YcvjGcXl9UdzHJc0k/ANdPWd+1TxXK4+83TO6at0YNyp2XZSxF8dM7lyyZiE7P/ky8 s99lB7fC47umUpg/smWp2Dhmg9gadSEvHBes59GGQVfqBa1eqTFLbXuw5+lmhCCY0C+goksBVsq CEtt+WTdmuXchP8R1o4dOcJEsAyhI3f0sHlJVgkMMDPpsmkmG9ahma7fI0I5EKIkd+qOIBVQt97 hiWoxwX0iHF1BGnCjvGUhailQECj1ddwSxg9PNiHgg8RhciLJMGyQhwBqTZ6/ZzACoRwLkvlLHi stxcUDtfomSDEHlx4I/I0lvmoPIRdQ8ipSKVhWcvm0wtw== X-Received: by 127.0.0.2 with SMTP id EfI1YY7687511xD3mdmjCZlx; Mon, 08 Apr 2024 02:48:06 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by mx.groups.io with SMTP id smtpd.web10.102415.1712569685810864149 for ; Mon, 08 Apr 2024 02:48:05 -0700 X-CSE-ConnectionGUID: RBSJR0rTQMa56pbP3xr2bQ== X-CSE-MsgGUID: ktBGx1moQiuz62PM9/NmsQ== X-IronPort-AV: E=McAfee;i="6600,9927,11037"; a="7704299" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="7704299" X-Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 02:48:04 -0700 X-CSE-ConnectionGUID: 4T3MimneSmmFu+UM8/g5zw== X-CSE-MsgGUID: tb2sinUKRV++0XOaT5sxrg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="19700691" X-Received: from qingyush-mobl.ccr.corp.intel.com ([10.238.10.240]) by orviesa010.jf.intel.com with ESMTP; 08 Apr 2024 02:48:02 -0700 From: "Qingyu" To: devel@edk2.groups.io Cc: Pedro Falcato , Ray Ni , Gahan Saraiya Subject: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function Date: Mon, 8 Apr 2024 17:47:21 +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:48:05 -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: 43iTBw08x0TgtG41p1K8z6QHx7686176AA= 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=F5XcI5Yc; 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: Pedro Falcato Cc: Ray Ni Signed-off-by: Qingyu Signed-off-by: Gahan Saraiya --- Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h | 5 ++++- Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h index 31c55a8e11..665221e952 100644 --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h @@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr); 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. @@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr); @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c index 21151a076f..d80ce65da9 100644 --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c @@ -18,7 +18,9 @@ EFI_GUID mSupportedInfoTypes[] = { 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. @@ -28,6 +30,7 @@ EFI_GUID mSupportedInfoTypes[] = { @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 (#117497): https://edk2.groups.io/g/devel/message/117497 Mute This Topic: https://groups.io/mt/105398061/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-