* [edk2-devel] [PATCH] MdeModulePkg: FirmwarePerformanceCommonEntryPoint error handling
@ 2024-02-27 4:34 Sasikanth Valaparla
0 siblings, 0 replies; only message in thread
From: Sasikanth Valaparla @ 2024-02-27 4:34 UTC (permalink / raw)
To: devel; +Cc: Sasikanth Valaparla, S, Bhavana, Yasmin, Tabassum
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 <sasikanth.valaparla@intel.com>
---
.../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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-27 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 4:34 [edk2-devel] [PATCH] MdeModulePkg: FirmwarePerformanceCommonEntryPoint error handling Sasikanth Valaparla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox