public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nickle Wang via groups.io" <nicklew=nvidia.com@groups.io>
To: Mike Maslenkin <mike.maslenkin@gmail.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "abner.chang@amd.com" <abner.chang@amd.com>,
	"igork@ami.com" <igork@ami.com>
Subject: Re: [edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed.
Date: Mon, 4 Dec 2023 07:05:57 +0000	[thread overview]
Message-ID: <MW4PR12MB70314C084332CDAED8BC1E57D986A@MW4PR12MB7031.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20231130231844.22397-4-mike.maslenkin@gmail.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]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-12-04  7:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW4PR12MB70314C084332CDAED8BC1E57D986A@MW4PR12MB7031.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox