From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.9242.1616393622101966977 for ; Sun, 21 Mar 2021 23:13:42 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: eric.jin@intel.com) IronPort-SDR: MylXAMgYeMdqFJHfbbF139JY4Q5M/WjvISZQnicG/JIlXdAzxoGibQDQf0O2ZvV/SxxSFyg5LQ T2Mia3VZ6Kug== X-IronPort-AV: E=McAfee;i="6000,8403,9930"; a="254206940" X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="254206940" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2021 23:13:40 -0700 IronPort-SDR: RYMcr8hSx3/ZCu6E33PhMaqsQgHZ8dCXVCpMRCI+nHjUTgMQq9gvdGzt3/tE8kjCKh17tpYHFW tUO7KXeFA4dg== X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="407671068" Received: from shwdeopenpsi175.ccr.corp.intel.com ([10.239.9.8]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2021 23:13:39 -0700 From: "Eric Jin" To: devel@edk2.groups.io Cc: G Edhaya Chandran , Barton Gao , Samer El-Haj-Mahmoud , Arvin Chen Subject: [edk2-test][Patch 1/1] ImageIndex need be corrected to range 1 ~ DescriptorCount. Date: Mon, 22 Mar 2021 14:12:54 +0800 Message-Id: <20210322061254.6272-1-eric.jin@intel.com> X-Mailer: git-send-email 2.20.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3272 The goal of the Support Routine: CheckForSupportGetImage is to detect the current FMP instance's capability for supporting GetImage(). In current code, "ImageIndex = 0" is the input parameter, but it is inconsistent with spec -"A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount." It is a bug and need the fix. The similar errors exist in CheckForSupportSetImage/CheckForSupportCheckImage. Cc: G Edhaya Chandran Cc: Barton Gao Cc: Samer El-Haj-Mahmoud Cc: Arvin Chen Signed-off-by: Eric Jin --- .../BlackBoxTest/FirmwareManagementBBTestConformance.c | 7 ++++--- .../BlackBoxTest/FirmwareManagementBBTestConformance.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c index 257f2756dbcb..44d01d27a8f2 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c @@ -2,6 +2,7 @@ Copyright 2006 - 2016 Unified EFI, Inc.
Copyright (c) 2010 - 2016, Dell Inc. All rights reserved.
+ Copyright (c) 2021, 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 @@ -208,7 +209,7 @@ CheckForSupportGetImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid001; ResultMessageLabel = L"GetImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; @@ -283,7 +284,7 @@ CheckForSupportSetImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid002; ResultMessageLabel = L"SetImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; AbortReason = NULL; @@ -362,7 +363,7 @@ CheckForSupportCheckImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid003; ResultMessageLabel = L"CheckImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c index 797229adc8f6..65715f6c33e6 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/FirmwareManagement/BlackBoxTest/FirmwareManagementBBTestConformance.c @@ -3,6 +3,7 @@ Copyright 2006 - 2016 Unified EFI, Inc.
Copyright (c) 2010 - 2016, Dell Inc. All rights reserved.
Copyright (c) 2019,Microchip Technology Inc.
+ Copyright (c) 2021, 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 @@ -209,7 +210,7 @@ CheckForSupportGetImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid001; ResultMessageLabel = L"GetImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; @@ -284,7 +285,7 @@ CheckForSupportSetImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid002; ResultMessageLabel = L"SetImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; AbortReason = NULL; @@ -363,7 +364,7 @@ CheckForSupportCheckImage ( TestGuid = gFirmwareManagementBBTestConformanceSupportGuid003; ResultMessageLabel = L"CheckImage, function support check"; - ImageIndex = 0; + ImageIndex = 1; Image = NULL; ImageSize = 0; -- 2.20.0.windows.1