public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces
@ 2023-11-30 23:18 Mike Maslenkin
  2023-11-30 23:18 ` [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces Mike Maslenkin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mike Maslenkin @ 2023-11-30 23:18 UTC (permalink / raw)
  To: devel; +Cc: abner.chang, nicklew, igork

This set contains a fix of misleading texts, format specifier
and refines interaction with user about system reset.

Here is link to PR:
https://github.com/tianocore/edk2-redfish-client/pull/62

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces.
  2023-11-30 23:18 [edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces Mike Maslenkin
@ 2023-11-30 23:18 ` Mike Maslenkin
  2023-12-04  7:03   ` Nickle Wang via groups.io
  2023-11-30 23:18 ` [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro Mike Maslenkin
  2023-11-30 23:18 ` [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed Mike Maslenkin
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Maslenkin @ 2023-11-30 23:18 UTC (permalink / raw)
  To: devel; +Cc: abner.chang, nicklew, igork

Update debug traces with the correct function names.

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c     | 4 ++--
 .../ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c       | 4 ++--
 RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
index ea2740184160..a26a1083cd74 100644
--- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
+++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
@@ -553,7 +553,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: %r\n", __func__, Status));
     return Status;
   }
 
@@ -720,7 +720,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
     Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+      DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__, Status));
       return Status;
     }
 
diff --git a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
index 78beb5cb32b3..979d49f79234 100644
--- a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
+++ b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
@@ -1457,7 +1457,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: %r\n", __func__, Status));
     return Status;
   }
 
@@ -1591,7 +1591,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
     Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+      DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__, Status));
       return Status;
     }
 
diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
index 44325ddb21c4..14c263011c2a 100644
--- a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
+++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
@@ -2373,7 +2373,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: %r\n", __func__, Status));
     return Status;
   }
 
@@ -2507,7 +2507,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
     Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __func__, Status));
+      DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__, Status));
       return Status;
     }
 
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro
  2023-11-30 23:18 [edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces Mike Maslenkin
  2023-11-30 23:18 ` [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces Mike Maslenkin
@ 2023-11-30 23:18 ` Mike Maslenkin
  2023-12-04  7:03   ` Nickle Wang via groups.io
  2023-11-30 23:18 ` [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed Mike Maslenkin
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Maslenkin @ 2023-11-30 23:18 UTC (permalink / raw)
  To: devel; +Cc: abner.chang, nicklew, igork

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../Features/MemoryCollectionDxe/MemoryCollectionDxe.c          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
index dc1ee5ca4143..bebc605dce34 100644
--- a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
+++ b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
@@ -45,7 +45,7 @@ HandleResource (
   // Check and see if this is target resource that we want to handle.
   // Some resource is handled by other provider so we have to make sure this first.
   //
-  DEBUG ((REDFISH_DEBUG_TRACE, "%s Identify for %s\n", __func__, Uri));
+  DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
   ConfigLang = RedfishGetConfigLanguage (Uri);
   if (ConfigLang == NULL) {
     Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private->InformationExchange);
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed.
  2023-11-30 23:18 [edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces Mike Maslenkin
  2023-11-30 23:18 ` [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces Mike Maslenkin
  2023-11-30 23:18 ` [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro Mike Maslenkin
@ 2023-11-30 23:18 ` Mike Maslenkin
  2023-12-04  7:05   ` Nickle Wang via groups.io
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Maslenkin @ 2023-11-30 23:18 UTC (permalink / raw)
  To: devel; +Cc: abner.chang, nicklew, igork

Warn user about system reboot only if it has not been rejected by
callbacks executed as result of EdkiiRedfishPhaseBeforeReboot notification

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
index 51d0387ce867..f3188ddfde2c 100644
--- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
@@ -296,9 +296,6 @@ RedfishFeatureDriverStartup (
   // If system configuration is changed, reboot system.
   //
   if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
-    Print (L"System configuration is changed from RESTful interface. Reboot system in %d seconds...\n", RebootTimeout);
-    gBS->Stall (RebootTimeout * 1000000U);
-
     //
     // Call override protocol to notify platform that Redfish is processed
     // and about to reboot system.
@@ -312,9 +309,14 @@ RedfishFeatureDriverStartup (
       Status = RedfishOverride->NotifyPhase (RedfishOverride, EdkiiRedfishPhaseBeforeReboot);
       if (EFI_ERROR (Status)) {
         DEBUG ((DEBUG_ERROR, "%a: abort the reboot because NotifyPhase() returns failure: %r\n", __func__, Status));
-        return;
+        PcdSetBoolS (PcdRedfishSystemRebootRequired, FALSE);
       }
     }
+  }
+
+  if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
+    Print (L"System configuration is changed from RESTful interface. Reboot system in %d seconds...\n", RebootTimeout);
+    gBS->Stall (RebootTimeout * 1000000U);
 
     gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
     CpuDeadLoop ();
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces.
  2023-11-30 23:18 ` [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces Mike Maslenkin
@ 2023-12-04  7:03   ` Nickle Wang via groups.io
  0 siblings, 0 replies; 7+ messages in thread
From: Nickle Wang via groups.io @ 2023-12-04  7:03 UTC (permalink / raw)
  To: Mike Maslenkin, devel@edk2.groups.io; +Cc: abner.chang@amd.com, igork@ami.com



Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Friday, December 1, 2023 7:19 AM
> To: devel@edk2.groups.io
> Cc: abner.chang@amd.com; Nickle Wang <nicklew@nvidia.com>;
> igork@ami.com
> Subject: [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces.
> 
> External email: Use caution opening links or attachments
> 
> 
> Update debug traces with the correct function names.
> 
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c     | 4 ++--
>  .../ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c       | 4 ++--
>  RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c | 4
> ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> index ea2740184160..a26a1083cd74 100644
> --- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> @@ -553,7 +553,7 @@ RedfishCheckResourceCommon (
> 
>    Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA,
> RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList,
> &Count);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang
> failed: %r\n", __func__, Status));
>      return Status;
>    }
> 
> @@ -720,7 +720,7 @@ RedfishIdentifyResourceCommon (
>    if (Supported) {
>      Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang
> (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION,
> REDPATH_ARRAY_PATTERN, &ConfigLangList);
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a,
> RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__,
> Status));
>        return Status;
>      }
> 
> diff --git
> a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSyste
> mCommon.c
> b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSyste
> mCommon.c
> index 78beb5cb32b3..979d49f79234 100644
> ---
> a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSyste
> mCommon.c
> +++
> b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSyste
> mCommon.c
> @@ -1457,7 +1457,7 @@ RedfishCheckResourceCommon (
> 
>    Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA,
> RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList,
> &Count);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang
> failed: %r\n", __func__, Status));
>      return Status;
>    }
> 
> @@ -1591,7 +1591,7 @@ RedfishIdentifyResourceCommon (
>    if (Supported) {
>      Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang
> (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION,
> REDPATH_ARRAY_PATTERN, &ConfigLangList);
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a,
> RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__,
> Status));
>        return Status;
>      }
> 
> diff --git
> a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
> b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
> index 44325ddb21c4..14c263011c2a 100644
> --- a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
> +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
> @@ -2373,7 +2373,7 @@ RedfishCheckResourceCommon (
> 
>    Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA,
> RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList,
> &Count);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang
> failed: %r\n", __func__, Status));
>      return Status;
>    }
> 
> @@ -2507,7 +2507,7 @@ RedfishIdentifyResourceCommon (
>    if (Supported) {
>      Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang
> (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION,
> REDPATH_ARRAY_PATTERN, &ConfigLangList);
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex
> failed: %r\n", __func__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a,
> RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__,
> Status));
>        return Status;
>      }
> 
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112004): https://edk2.groups.io/g/devel/message/112004
Mute This Topic: https://groups.io/mt/102905309/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro
  2023-11-30 23:18 ` [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro Mike Maslenkin
@ 2023-12-04  7:03   ` Nickle Wang via groups.io
  0 siblings, 0 replies; 7+ messages in thread
From: Nickle Wang via groups.io @ 2023-12-04  7:03 UTC (permalink / raw)
  To: Mike Maslenkin, devel@edk2.groups.io; +Cc: abner.chang@amd.com, igork@ami.com



Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Friday, December 1, 2023 7:19 AM
> To: devel@edk2.groups.io
> Cc: abner.chang@amd.com; Nickle Wang <nicklew@nvidia.com>;
> igork@ami.com
> Subject: [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro
> 
> External email: Use caution opening links or attachments
> 
> 
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../Features/MemoryCollectionDxe/MemoryCollectionDxe.c          | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> index dc1ee5ca4143..bebc605dce34 100644
> --- a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> +++ b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> @@ -45,7 +45,7 @@ HandleResource (
>    // Check and see if this is target resource that we want to handle.
>    // Some resource is handled by other provider so we have to make sure this
> first.
>    //
> -  DEBUG ((REDFISH_DEBUG_TRACE, "%s Identify for %s\n", __func__, Uri));
> +  DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
>    ConfigLang = RedfishGetConfigLanguage (Uri);
>    if (ConfigLang == NULL) {
>      Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private-
> >InformationExchange);
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112005): https://edk2.groups.io/g/devel/message/112005
Mute This Topic: https://groups.io/mt/102905310/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed.
  2023-11-30 23:18 ` [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed Mike Maslenkin
@ 2023-12-04  7:05   ` Nickle Wang via groups.io
  0 siblings, 0 replies; 7+ messages in thread
From: Nickle Wang via groups.io @ 2023-12-04  7:05 UTC (permalink / raw)
  To: Mike Maslenkin, devel@edk2.groups.io; +Cc: abner.chang@amd.com, igork@ami.com



Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Friday, December 1, 2023 7:19 AM
> To: devel@edk2.groups.io
> Cc: abner.chang@amd.com; Nickle Wang <nicklew@nvidia.com>;
> igork@ami.com
> Subject: [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed.
> 
> External email: Use caution opening links or attachments
> 
> 
> Warn user about system reboot only if it has not been rejected by callbacks
> executed as result of EdkiiRedfishPhaseBeforeReboot notification
> 
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c      | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> index 51d0387ce867..f3188ddfde2c 100644
> --- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> @@ -296,9 +296,6 @@ RedfishFeatureDriverStartup (
>    // If system configuration is changed, reboot system.
>    //
>    if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
> -    Print (L"System configuration is changed from RESTful interface. Reboot
> system in %d seconds...\n", RebootTimeout);
> -    gBS->Stall (RebootTimeout * 1000000U);
> -
>      //
>      // Call override protocol to notify platform that Redfish is processed
>      // and about to reboot system.
> @@ -312,9 +309,14 @@ RedfishFeatureDriverStartup (
>        Status = RedfishOverride->NotifyPhase (RedfishOverride,
> EdkiiRedfishPhaseBeforeReboot);
>        if (EFI_ERROR (Status)) {
>          DEBUG ((DEBUG_ERROR, "%a: abort the reboot because NotifyPhase()
> returns failure: %r\n", __func__, Status));
> -        return;
> +        PcdSetBoolS (PcdRedfishSystemRebootRequired, FALSE);
>        }
>      }
> +  }
> +
> +  if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
> +    Print (L"System configuration is changed from RESTful interface. Reboot
> system in %d seconds...\n", RebootTimeout);
> +    gBS->Stall (RebootTimeout * 1000000U);
> 
>      gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
>      CpuDeadLoop ();
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112006): https://edk2.groups.io/g/devel/message/112006
Mute This Topic: https://groups.io/mt/102905312/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-04  7:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 23:18 [edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces Mike Maslenkin
2023-11-30 23:18 ` [edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces Mike Maslenkin
2023-12-04  7:03   ` Nickle Wang via groups.io
2023-11-30 23:18 ` [edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro Mike Maslenkin
2023-12-04  7:03   ` Nickle Wang via groups.io
2023-11-30 23:18 ` [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed Mike Maslenkin
2023-12-04  7:05   ` Nickle Wang via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox