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 D1E8FAC1433 for ; Tue, 27 Feb 2024 12:48:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=EdPemSq5PWIGz3f5ZYd01tYTT/TP0sZ4xWKG5JldEUk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1709038106; v=1; b=wJ4eY+ffZfPLXP7X/EKrUgSU+PIGko9V78rkiG3wntHgof3qJ92jCKDloswbnoLKRYxElsns RIsFmmuU4AJUNdQy0NZhKe2GP3gd3ownlr7hXLPNnuP0KxTSUInZCbzlZ0lSCerxmEOkwkU1RCt nbHkpb/vW4iX8x47fSYg6WH4= X-Received: by 127.0.0.2 with SMTP id CdPOYY7687511xYqf8GYhJYo; Tue, 27 Feb 2024 04:48:26 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mx.groups.io with SMTP id smtpd.web10.5787.1709008502941751284 for ; Mon, 26 Feb 2024 20:35:03 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="14773350" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="14773350" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 20:35:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="30077803" X-Received: from babiosdev016.gar.corp.intel.com ([10.66.244.144]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 20:34:58 -0800 From: "Sasikanth Valaparla" To: devel@edk2.groups.io Cc: Sasikanth Valaparla , S, Bhavana , Yasmin, Tabassum Subject: [edk2-devel] [PATCH] MdeModulePkg: FirmwarePerformanceCommonEntryPoint error handling Date: Tue, 27 Feb 2024 10:04:15 +0530 Message-Id: <2e7b1232df99b3b46edfc000ca69a2170afb23a7.1708931471.git.sasikanth.valaparla@intel.com> 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 Reply-To: devel@edk2.groups.io,sasikanth.valaparla@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: qhRmMBGzWHPHVpswGFYH0nVqx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=wJ4eY+ff; 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 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4651 In FirmwarePerformanceCommonEntryPoint there is a MmLocateProtocol which will locate the gEfiMmRscHandlerProtocolGuid and then ASSERT_EFI_ERROR(Status) if the locate protocol fails when build is debug enabled. if the build is debug disabled then code will execute - register the report status code using the API provided by gEfiMmRscHandlerProtocolGuid. Adding a proper error handling mechanism to handle the error gracefully when debug is not enabled and to properly report the error if it cannot continue. Signed-off-by: Sasikanth Valaparla --- .../FirmwarePerformanceCommon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceCommon.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceCommon.c index 9046896c55..7b13215ade 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceCommon.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceCommon.c @@ -152,7 +152,10 @@ FirmwarePerformanceCommonEntryPoint ( NULL, (VOID **)&mRscHandlerProtocol ); - ASSERT_EFI_ERROR (Status); + if (EFI_ERROR(Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } // // Register report status code listener for BootRecords and S3 Suspend Start and End. -- 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116036): https://edk2.groups.io/g/devel/message/116036 Mute This Topic: https://groups.io/mt/104601540/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-