public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification()
@ 2023-05-23  8:25 Gerd Hoffmann
  2023-05-23  8:56 ` [edk2-devel] " Ard Biesheuvel
  2023-05-23 10:07 ` Laszlo Ersek
  0 siblings, 2 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2023-05-23  8:25 UTC (permalink / raw)
  To: devel
  Cc: Oliver Steffen, Ard Biesheuvel, Pawel Polawski, Gerd Hoffmann,
	Ray Ni, Jiewen Yao, László Érsek, Jordan Justen

Not needed any more, SMM + 64-bit PEI + S3 suspend works now.

Fixed by commits:
 - 8bd2028f9ac3 ("MdeModulePkg: Supporting S3 in 64bit PEI")
 - 6acf72901a2e ("UefiCpuPkg: Supporting S3 in 64bit PEI")
See also https://bugzilla.tianocore.org/show_bug.cgi?id=4195

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/PlatformPei/Platform.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index c56247e294f2..f5dc41c3a8c4 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -230,36 +230,6 @@ ReserveEmuVariableNvStore (
   ASSERT_RETURN_ERROR (PcdStatus);
 }
 
-STATIC
-VOID
-S3Verification (
-  IN EFI_HOB_PLATFORM_INFO  *PlatformInfoHob
-  )
-{
- #if defined (MDE_CPU_X64)
-  if (PlatformInfoHob->SmmSmramRequire && PlatformInfoHob->S3Supported) {
-    DEBUG ((
-      DEBUG_ERROR,
-      "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n",
-      __func__
-      ));
-    DEBUG ((
-      DEBUG_ERROR,
-      "%a: Please disable S3 on the QEMU command line (see the README),\n",
-      __func__
-      ));
-    DEBUG ((
-      DEBUG_ERROR,
-      "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n",
-      __func__
-      ));
-    ASSERT (FALSE);
-    CpuDeadLoop ();
-  }
-
- #endif
-}
-
 STATIC
 VOID
 Q35BoardVerification (
@@ -354,7 +324,6 @@ InitializePlatform (
     ASSERT_EFI_ERROR (Status);
   }
 
-  S3Verification (PlatformInfoHob);
   BootModeInitialization (PlatformInfoHob);
 
   //
-- 
2.40.1


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

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification()
  2023-05-23  8:25 [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification() Gerd Hoffmann
@ 2023-05-23  8:56 ` Ard Biesheuvel
  2023-05-23 10:07 ` Laszlo Ersek
  1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2023-05-23  8:56 UTC (permalink / raw)
  To: devel, kraxel, Rebecca Cran
  Cc: Oliver Steffen, Ard Biesheuvel, Pawel Polawski, Ray Ni,
	Jiewen Yao, László Érsek, Jordan Justen

(cc Rebecca)

On Tue, 23 May 2023 at 10:26, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Not needed any more, SMM + 64-bit PEI + S3 suspend works now.
>
> Fixed by commits:
>  - 8bd2028f9ac3 ("MdeModulePkg: Supporting S3 in 64bit PEI")
>  - 6acf72901a2e ("UefiCpuPkg: Supporting S3 in 64bit PEI")
> See also https://bugzilla.tianocore.org/show_bug.cgi?id=4195
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

I spotted another implementation of this function in
OvmfPkg/Bhyve/PlatformPei/Platform.c, which appears to be unused.

Rebecca, mind sending a patch to get rid of that too? Thanks.

> ---
>  OvmfPkg/PlatformPei/Platform.c | 31 -------------------------------
>  1 file changed, 31 deletions(-)
>
> diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> index c56247e294f2..f5dc41c3a8c4 100644
> --- a/OvmfPkg/PlatformPei/Platform.c
> +++ b/OvmfPkg/PlatformPei/Platform.c
> @@ -230,36 +230,6 @@ ReserveEmuVariableNvStore (
>    ASSERT_RETURN_ERROR (PcdStatus);
>  }
>
> -STATIC
> -VOID
> -S3Verification (
> -  IN EFI_HOB_PLATFORM_INFO  *PlatformInfoHob
> -  )
> -{
> - #if defined (MDE_CPU_X64)
> -  if (PlatformInfoHob->SmmSmramRequire && PlatformInfoHob->S3Supported) {
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n",
> -      __func__
> -      ));
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: Please disable S3 on the QEMU command line (see the README),\n",
> -      __func__
> -      ));
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n",
> -      __func__
> -      ));
> -    ASSERT (FALSE);
> -    CpuDeadLoop ();
> -  }
> -
> - #endif
> -}
> -
>  STATIC
>  VOID
>  Q35BoardVerification (
> @@ -354,7 +324,6 @@ InitializePlatform (
>      ASSERT_EFI_ERROR (Status);
>    }
>
> -  S3Verification (PlatformInfoHob);
>    BootModeInitialization (PlatformInfoHob);
>
>    //
> --
> 2.40.1
>
>
>
> 
>
>

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

* Re: [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification()
  2023-05-23  8:25 [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification() Gerd Hoffmann
  2023-05-23  8:56 ` [edk2-devel] " Ard Biesheuvel
@ 2023-05-23 10:07 ` Laszlo Ersek
  2023-05-23 10:37   ` Ni, Ray
  1 sibling, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2023-05-23 10:07 UTC (permalink / raw)
  To: Gerd Hoffmann, devel
  Cc: Oliver Steffen, Ard Biesheuvel, Pawel Polawski, Ray Ni,
	Jiewen Yao, Jordan Justen

On 5/23/23 10:25, Gerd Hoffmann wrote:
> Not needed any more, SMM + 64-bit PEI + S3 suspend works now.
> 
> Fixed by commits:
>  - 8bd2028f9ac3 ("MdeModulePkg: Supporting S3 in 64bit PEI")
>  - 6acf72901a2e ("UefiCpuPkg: Supporting S3 in 64bit PEI")
> See also https://bugzilla.tianocore.org/show_bug.cgi?id=4195
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  OvmfPkg/PlatformPei/Platform.c | 31 -------------------------------
>  1 file changed, 31 deletions(-)
> 
> diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> index c56247e294f2..f5dc41c3a8c4 100644
> --- a/OvmfPkg/PlatformPei/Platform.c
> +++ b/OvmfPkg/PlatformPei/Platform.c
> @@ -230,36 +230,6 @@ ReserveEmuVariableNvStore (
>    ASSERT_RETURN_ERROR (PcdStatus);
>  }
>  
> -STATIC
> -VOID
> -S3Verification (
> -  IN EFI_HOB_PLATFORM_INFO  *PlatformInfoHob
> -  )
> -{
> - #if defined (MDE_CPU_X64)
> -  if (PlatformInfoHob->SmmSmramRequire && PlatformInfoHob->S3Supported) {
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n",
> -      __func__
> -      ));
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: Please disable S3 on the QEMU command line (see the README),\n",
> -      __func__
> -      ));
> -    DEBUG ((
> -      DEBUG_ERROR,
> -      "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n",
> -      __func__
> -      ));
> -    ASSERT (FALSE);
> -    CpuDeadLoop ();
> -  }
> -
> - #endif
> -}
> -
>  STATIC
>  VOID
>  Q35BoardVerification (
> @@ -354,7 +324,6 @@ InitializePlatform (
>      ASSERT_EFI_ERROR (Status);
>    }
>  
> -  S3Verification (PlatformInfoHob);
>    BootModeInitialization (PlatformInfoHob);
>  
>    //

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


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

* Re: [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification()
  2023-05-23 10:07 ` Laszlo Ersek
@ 2023-05-23 10:37   ` Ni, Ray
  0 siblings, 0 replies; 4+ messages in thread
From: Ni, Ray @ 2023-05-23 10:37 UTC (permalink / raw)
  To: Laszlo Ersek, Gerd Hoffmann, devel@edk2.groups.io
  Cc: Oliver Steffen, Ard Biesheuvel, Pawel Polawski, Yao, Jiewen,
	Justen, Jordan L

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Tuesday, May 23, 2023 6:07 PM
> To: Gerd Hoffmann <kraxel@redhat.com>; devel@edk2.groups.io
> Cc: Oliver Steffen <osteffen@redhat.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>; Pawel Polawski <ppolawsk@redhat.com>; Ni, Ray
> <ray.ni@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>
> Subject: Re: [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification()
> 
> On 5/23/23 10:25, Gerd Hoffmann wrote:
> > Not needed any more, SMM + 64-bit PEI + S3 suspend works now.
> >
> > Fixed by commits:
> >  - 8bd2028f9ac3 ("MdeModulePkg: Supporting S3 in 64bit PEI")
> >  - 6acf72901a2e ("UefiCpuPkg: Supporting S3 in 64bit PEI")
> > See also https://bugzilla.tianocore.org/show_bug.cgi?id=4195
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> >  OvmfPkg/PlatformPei/Platform.c | 31 -------------------------------
> >  1 file changed, 31 deletions(-)
> >
> > diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> > index c56247e294f2..f5dc41c3a8c4 100644
> > --- a/OvmfPkg/PlatformPei/Platform.c
> > +++ b/OvmfPkg/PlatformPei/Platform.c
> > @@ -230,36 +230,6 @@ ReserveEmuVariableNvStore (
> >    ASSERT_RETURN_ERROR (PcdStatus);
> >  }
> >
> > -STATIC
> > -VOID
> > -S3Verification (
> > -  IN EFI_HOB_PLATFORM_INFO  *PlatformInfoHob
> > -  )
> > -{
> > - #if defined (MDE_CPU_X64)
> > -  if (PlatformInfoHob->SmmSmramRequire && PlatformInfoHob->S3Supported)
> {
> > -    DEBUG ((
> > -      DEBUG_ERROR,
> > -      "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n",
> > -      __func__
> > -      ));
> > -    DEBUG ((
> > -      DEBUG_ERROR,
> > -      "%a: Please disable S3 on the QEMU command line (see the README),\n",
> > -      __func__
> > -      ));
> > -    DEBUG ((
> > -      DEBUG_ERROR,
> > -      "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n",
> > -      __func__
> > -      ));
> > -    ASSERT (FALSE);
> > -    CpuDeadLoop ();
> > -  }
> > -
> > - #endif
> > -}
> > -
> >  STATIC
> >  VOID
> >  Q35BoardVerification (
> > @@ -354,7 +324,6 @@ InitializePlatform (
> >      ASSERT_EFI_ERROR (Status);
> >    }
> >
> > -  S3Verification (PlatformInfoHob);
> >    BootModeInitialization (PlatformInfoHob);
> >
> >    //
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>


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

end of thread, other threads:[~2023-05-23 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23  8:25 [PATCH 1/1] OvmfPkg/PlatformPei: drop S3Verification() Gerd Hoffmann
2023-05-23  8:56 ` [edk2-devel] " Ard Biesheuvel
2023-05-23 10:07 ` Laszlo Ersek
2023-05-23 10:37   ` Ni, Ray

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