* [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-15 9:03 ` Chiu, Chasel
2019-04-16 1:54 ` Chiu, Chasel
2019-04-15 3:07 ` [edk2-platforms PATCH] Platform/ResetSystemLib: " Gao, Zhichao
` (5 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Michael A Kubacki
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../BaseResetSystemLib/BaseResetSystemLib.c | 47 +++++++++++++++++--
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseResetSystemLib.c
index ec1a69e4de..0d5c27401d 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
System reset library services.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -108,7 +108,6 @@ ResetShutdown (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows
@@ -118,7 +117,6 @@ ResetShutdown (
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -142,6 +140,49 @@ EnterS3WithImmediateWake (
ASSERT (FALSE);
}
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
/**
The library constructuor.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem Gao, Zhichao
@ 2019-04-15 9:03 ` Chiu, Chasel
2019-04-15 22:44 ` Gao, Zhichao
2019-04-16 1:54 ` Chiu, Chasel
1 sibling, 1 reply; 18+ messages in thread
From: Chiu, Chasel @ 2019-04-15 9:03 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io; +Cc: Kubacki, Michael A
Please see below comments inline.
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 1/5]
> KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API and
> link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in Edk2
> repo.
> Notes:
> This library API only provide a basic function of reset. If the consumers want full
> functions, they should use the instance in the MdeModulePkg and make sure the
> depex driver is dispatched.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../BaseResetSystemLib/BaseResetSystemLib.c | 47 +++++++++++++++++--
> 1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseReset
> SystemLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseRese
> tSystemLib.c
> index ec1a69e4de..0d5c27401d 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseReset
> SystemLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/Ba
> +++ seResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> System reset library services.
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License that accompanies this
> distribution.
> The full text of the license may be found at @@ -108,7 +108,6 @@
> ResetShutdown (
> /**
> Calling this function causes the system to enter a power state for platform
> specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a
> platform specific reset.
> The exact type of the reset is defined by the
> EFI_GUID that follows @@ -118,7 +117,6 @@ ResetShutdown ( VOID EFIAPI
> ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -142,6 +140,49 @@ EnterS3WithImmediateWake (
> ASSERT (FALSE);
> }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string,
> optionally
> + followed by additional binary data. The string is a
> description
> + that the caller may use to further indicate the reason for
> the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
Where we consuming this new "ResetSystem ()" in Kabylake MinPlatform?
Same question for changes in Pei and Dxe library instances.
Thanks!
Chasel
> /**
> The library constructuor.
>
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
2019-04-15 9:03 ` Chiu, Chasel
@ 2019-04-15 22:44 ` Gao, Zhichao
0 siblings, 0 replies; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 22:44 UTC (permalink / raw)
To: Chiu, Chasel, devel@edk2.groups.io; +Cc: Kubacki, Michael A
For now, no driver consumes ResetSystem. But some drivers in edk repo, such as CapsuleRuntimeDxe would use it in the further. If the platform support this driver and do not use the ResetSystemLib instance in MdeModulePkg, a link error would be caused.
Thanks,
Zhichao
> -----Original Message-----
> From: Chiu, Chasel
> Sent: Monday, April 15, 2019 5:03 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>
> Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 1/5]
> KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
>
>
> Please see below comments inline.
>
> > -----Original Message-----
> > From: Gao, Zhichao
> > Sent: Monday, April 15, 2019 11:08 AM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> > <michael.a.kubacki@intel.com>
> > Subject: [edk2-platforms/devel-MinPlatform][PATCH 1/5]
> > KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
> >
> > Add a new API ResetSystem to this ResetSystemLib instance.
> > It only adds the basic functions from ResetSystemRuntimeDxe.
> > Lacking of this interface may cause link error, if some drivers use
> > this new API and link to this library instance.
> > Make the ResetPlatformSpecific's parameters same with the interface in
> > Edk2 repo.
> > Notes:
> > This library API only provide a basic function of reset. If the
> > consumers want full functions, they should use the instance in the
> > MdeModulePkg and make sure the depex driver is dispatched.
> >
> > Cc: Chasel Chiu <chasel.chiu@intel.com>
> > Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> > ---
> > .../BaseResetSystemLib/BaseResetSystemLib.c | 47
> +++++++++++++++++--
> > 1 file changed, 44 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/Base
> > Reset
> > SystemLib.c
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/Base
> > Rese
> > tSystemLib.c
> > index ec1a69e4de..0d5c27401d 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/Base
> > Reset
> > SystemLib.c
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/
> > +++ Ba
> > +++ seResetSystemLib.c
> > @@ -1,7 +1,7 @@
> > /** @file
> > System reset library services.
> >
> > -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> > +Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > +reserved.<BR>
> > This program and the accompanying materials are licensed and made
> > available under the terms and conditions of the BSD License that
> > accompanies this distribution.
> > The full text of the license may be found at @@ -108,7 +108,6 @@
> > ResetShutdown (
> > /**
> > Calling this function causes the system to enter a power state for
> > platform specific.
> >
> > - @param[in] ResetStatus The status code for the reset.
> > @param[in] DataSize The size of ResetData in bytes.
> > @param[in] ResetData Optional element used to introduce a
> > platform specific reset.
> > The exact type of the reset is
> > defined by the EFI_GUID that follows @@ -118,7 +117,6 @@
> ResetShutdown
> > ( VOID EFIAPI ResetPlatformSpecific (
> > - IN EFI_STATUS ResetStatus,
> > IN UINTN DataSize,
> > IN VOID *ResetData OPTIONAL
> > )
> > @@ -142,6 +140,49 @@ EnterS3WithImmediateWake (
> > ASSERT (FALSE);
> > }
> >
> > +/**
> > + The ResetSystem function resets the entire platform.
> > +
> > + @param[in] ResetType The type of reset to perform.
> > + @param[in] ResetStatus The status code for the reset.
> > + @param[in] DataSize The size, in bytes, of ResetData.
> > + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> > or EfiResetShutdown
> > + the data buffer starts with a
> > + Null-terminated string,
> > optionally
> > + followed by additional binary data. The
> > + string is a
> > description
> > + that the caller may use to further
> > + indicate the reason for
> > the
> > + system reset.
> > +**/
> > +VOID
> > +EFIAPI
> > +ResetSystem (
> > + IN EFI_RESET_TYPE ResetType,
> > + IN EFI_STATUS ResetStatus,
> > + IN UINTN DataSize,
> > + IN VOID *ResetData OPTIONAL
> > + )
> > +{
> > + switch (ResetType) {
> > + case EfiResetWarm:
> > + ResetWarm ();
> > + break;
> > +
> > + case EfiResetCold:
> > + ResetCold ();
> > + break;
> > +
> > + case EfiResetShutdown:
> > + ResetShutdown ();
> > + return ;
> > +
> > + case EfiResetPlatformSpecific:
> > + ResetPlatformSpecific (DataSize, ResetData);
> > + return;
> > +
> > + default:
> > + return ;
> > + }
> > +}
> > +
>
> Where we consuming this new "ResetSystem ()" in Kabylake MinPlatform?
> Same question for changes in Pei and Dxe library instances.
>
> Thanks!
> Chasel
>
>
> > /**
> > The library constructuor.
> >
> > --
> > 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem Gao, Zhichao
2019-04-15 9:03 ` Chiu, Chasel
@ 2019-04-16 1:54 ` Chiu, Chasel
1 sibling, 0 replies; 18+ messages in thread
From: Chiu, Chasel @ 2019-04-16 1:54 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io; +Cc: Kubacki, Michael A
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 1/5]
> KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API and
> link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in Edk2
> repo.
> Notes:
> This library API only provide a basic function of reset. If the consumers want full
> functions, they should use the instance in the MdeModulePkg and make sure the
> depex driver is dispatched.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../BaseResetSystemLib/BaseResetSystemLib.c | 47 +++++++++++++++++--
> 1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseReset
> SystemLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseRese
> tSystemLib.c
> index ec1a69e4de..0d5c27401d 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/BaseReset
> SystemLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseResetSystemLib/Ba
> +++ seResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> System reset library services.
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License that accompanies this
> distribution.
> The full text of the license may be found at @@ -108,7 +108,6 @@
> ResetShutdown (
> /**
> Calling this function causes the system to enter a power state for platform
> specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a
> platform specific reset.
> The exact type of the reset is defined by the
> EFI_GUID that follows @@ -118,7 +117,6 @@ ResetShutdown ( VOID EFIAPI
> ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -142,6 +140,49 @@ EnterS3WithImmediateWake (
> ASSERT (FALSE);
> }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string,
> optionally
> + followed by additional binary data. The string is a
> description
> + that the caller may use to further indicate the reason for
> the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
> /**
> The library constructuor.
>
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [edk2-platforms PATCH] Platform/ResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-15 10:16 ` Leif Lindholm
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 2/5] KabylakeSiliconPkg/DxeResetSystemLib: " Gao, Zhichao
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Leif Lindholm, Michael D Kinney, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c b/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
index d2bc4a88fa..c4f4eedc45 100644
--- a/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -6,6 +6,7 @@
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -109,3 +110,46 @@ ResetPlatformSpecific (
{
ResetCold ();
}
+
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-platforms PATCH] Platform/ResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms PATCH] Platform/ResetSystemLib: " Gao, Zhichao
@ 2019-04-15 10:16 ` Leif Lindholm
0 siblings, 0 replies; 18+ messages in thread
From: Leif Lindholm @ 2019-04-15 10:16 UTC (permalink / raw)
To: Zhichao Gao
Cc: devel, Ard Biesheuvel, Michael D Kinney, Liming Gao,
Thomas Panakamattam Abraham
+Thomas for info
Zhichao - please update subject line to
Platform/ARM: Add a new API ResetSystem to VExpress ResetSystemLib
and drop the spaces before ;.
With that:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
On Mon, Apr 15, 2019 at 11:07:35AM +0800, Zhichao Gao wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers
> use this new API and link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the
> interface in Edk2 repo.
> Notes:
> This library API only provide a basic function of reset. If
> the consumers want full functions, they should use the instance
> in the MdeModulePkg and make sure the depex driver is dispatched.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../Library/ResetSystemLib/ResetSystemLib.c | 44 +++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c b/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
> index d2bc4a88fa..c4f4eedc45 100644
> --- a/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/Platform/ARM/VExpressPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -6,6 +6,7 @@
> Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
> Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
> Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
> + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD License
> @@ -109,3 +110,46 @@ ResetPlatformSpecific (
> {
> ResetCold ();
> }
> +
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
> + the data buffer starts with a Null-terminated string, optionally
> + followed by additional binary data. The string is a description
> + that the caller may use to further indicate the reason for the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> --
> 2.21.0.windows.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [edk2-platforms/devel-MinPlatform][PATCH 2/5] KabylakeSiliconPkg/DxeResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 1/5] KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem Gao, Zhichao
2019-04-15 3:07 ` [edk2-platforms PATCH] Platform/ResetSystemLib: " Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-16 1:55 ` Chiu, Chasel
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: " Gao, Zhichao
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Michael A Kubacki, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../DxeResetSystemLib/DxeResetSystemLib.c | 47 +++++++++++++++++--
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.c
index 9526560b95..bb94b66c11 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
System reset library services.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -247,7 +247,6 @@ DxePchGlobalReset (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows
@@ -257,7 +256,6 @@ DxePchGlobalReset (
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -292,6 +290,49 @@ EnterS3WithImmediateWake (
ASSERT (FALSE);
}
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
/**
The library constructuor.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 2/5] KabylakeSiliconPkg/DxeResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 2/5] KabylakeSiliconPkg/DxeResetSystemLib: " Gao, Zhichao
@ 2019-04-16 1:55 ` Chiu, Chasel
0 siblings, 0 replies; 18+ messages in thread
From: Chiu, Chasel @ 2019-04-16 1:55 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io; +Cc: Kubacki, Michael A, Gao, Liming
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 2/5]
> KabylakeSiliconPkg/DxeResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API and
> link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in Edk2
> repo.
> Notes:
> This library API only provide a basic function of reset. If the consumers want full
> functions, they should use the instance in the MdeModulePkg and make sure the
> depex driver is dispatched.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../DxeResetSystemLib/DxeResetSystemLib.c | 47 +++++++++++++++++--
> 1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.c
> index 9526560b95..bb94b66c11 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> +++ ResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> System reset library services.
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License that accompanies this
> distribution.
> The full text of the license may be found at @@ -247,7 +247,6 @@
> DxePchGlobalReset (
> /**
> Calling this function causes the system to enter a power state for platform
> specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a
> platform specific reset.
> The exact type of the reset is defined by the
> EFI_GUID that follows @@ -257,7 +256,6 @@ DxePchGlobalReset ( VOID
> EFIAPI ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -292,6 +290,49 @@ EnterS3WithImmediateWake (
> ASSERT (FALSE);
> }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string,
> optionally
> + followed by additional binary data. The string is a
> description
> + that the caller may use to further indicate the reason for
> the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
> /**
> The library constructuor.
>
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
` (2 preceding siblings ...)
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 2/5] KabylakeSiliconPkg/DxeResetSystemLib: " Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-15 7:55 ` Bu, Daocheng
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 4/5] KabylakeSiliconPkg/PeiResetSystemLib: " Gao, Zhichao
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Piwko, Maciej, Bu, Daocheng, Oram, Isaac W, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: "Piwko, Maciej" <maciej.piwko@intel.com>
Cc: "Bu, Daocheng" <daocheng.bu@intel.com>
Cc: "Oram, Isaac W" <isaac.w.oram@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c
index cdc0f19c17..673f42e72c 100644
--- a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c
+++ b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -255,7 +255,6 @@ ResetShutdown (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows
@@ -265,7 +264,6 @@ ResetShutdown (
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -306,6 +304,49 @@ EnterS3WithImmediateWake (
PchReset (mPchResetInstance, (PCH_RESET_TYPE) EfiResetWarm);
}
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
/**
<b>PchReset Runtime DXE Driver Entry Point</b>\n
- <b>Introduction</b>\n
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: " Gao, Zhichao
@ 2019-04-15 7:55 ` Bu, Daocheng
2019-04-22 2:49 ` Gao, Zhichao
0 siblings, 1 reply; 18+ messages in thread
From: Bu, Daocheng @ 2019-04-15 7:55 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io
Cc: Piwko, Maciej, Oram, Isaac W, Gao, Liming
Hi Maciej,
Please help review this code from PCH perspective.
If you approve this change , please also help cherry pick this change to ServerSiliconPkg\Pch\SouthClusterLbg pkg @10nm trunk.
Thanks,
Amos
UEFI FW, IAFW or System Firmware is more generic & accurate
it's not BIOS anymore!
-----Original Message-----
From: Gao, Zhichao
Sent: Monday, April 15, 2019 11:08 AM
To: devel@edk2.groups.io
Cc: Piwko, Maciej <maciej.piwko@intel.com>; Bu, Daocheng <daocheng.bu@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If the consumers want full functions, they should use the instance in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: "Piwko, Maciej" <maciej.piwko@intel.com>
Cc: "Bu, Daocheng" <daocheng.bu@intel.com>
Cc: "Oram, Isaac W" <isaac.w.oram@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c
index cdc0f19c17..673f42e72c 100644
--- a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.c
+++ b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchRes
+++ et.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at @@ -255,7 +255,6 @@ ResetShutdown (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows @@ -265,7 +264,6 @@ ResetShutdown ( VOID EFIAPI ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -306,6 +304,49 @@ EnterS3WithImmediateWake (
PchReset (mPchResetInstance, (PCH_RESET_TYPE) EfiResetWarm); }
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
/**
<b>PchReset Runtime DXE Driver Entry Point</b>\n
- <b>Introduction</b>\n
--
2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-15 7:55 ` Bu, Daocheng
@ 2019-04-22 2:49 ` Gao, Zhichao
2019-04-24 13:45 ` Piwko, Maciej
0 siblings, 1 reply; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-22 2:49 UTC (permalink / raw)
To: Bu, Daocheng, devel@edk2.groups.io
Cc: Piwko, Maciej, Oram, Isaac W, Gao, Liming
Hi,
I didn't receive any comments with this patch yet. Maybe you missed this email.
The new added function is only a few part of the ResetSystemRuntimeDxe to provide the reset function.
As I know, platforms always have their own ResetSystemLib instance and do not use the instance in MdeModulePkg.
While the platform contains a driver base on the new interface(the driver may be in the edk2 repo), the driver would not find the interface's implement and cause a link error.
I suggest all platform code should update it to avoid the link error if the platform is working with the edk2 master repo.
Thanks,
Zhichao
> -----Original Message-----
> From: Bu, Daocheng
> Sent: Monday, April 15, 2019 3:56 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> Cc: Piwko, Maciej <maciej.piwko@intel.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
>
> Hi Maciej,
>
> Please help review this code from PCH perspective.
> If you approve this change , please also help cherry pick this change to
> ServerSiliconPkg\Pch\SouthClusterLbg pkg @10nm trunk.
>
> Thanks,
> Amos
>
> UEFI FW, IAFW or System Firmware is more generic & accurate it's not BIOS
> anymore!
>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Piwko, Maciej <maciej.piwko@intel.com>; Bu, Daocheng
> <daocheng.bu@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API
> and link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in
> Edk2 repo.
> Notes:
> This library API only provide a basic function of reset. If the consumers want
> full functions, they should use the instance in the MdeModulePkg and make
> sure the depex driver is dispatched.
>
> Cc: "Piwko, Maciej" <maciej.piwko@intel.com>
> Cc: "Bu, Daocheng" <daocheng.bu@intel.com>
> Cc: "Oram, Isaac W" <isaac.w.oram@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
> 1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git
> a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> index cdc0f19c17..673f42e72c 100644
> ---
> a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> +++
> b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchRes
> +++ et.c
> @@ -1,6 +1,6 @@
> /** @file
>
> -Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License that
> accompanies this distribution.
> The full text of the license may be found at @@ -255,7 +255,6 @@
> ResetShutdown (
> /**
> Calling this function causes the system to enter a power state for platform
> specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a platform
> specific reset.
> The exact type of the reset is defined by the EFI_GUID that
> follows @@ -265,7 +264,6 @@ ResetShutdown ( VOID EFIAPI
> ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -306,6 +304,49 @@ EnterS3WithImmediateWake (
> PchReset (mPchResetInstance, (PCH_RESET_TYPE) EfiResetWarm); }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string, optionally
> + followed by additional binary data. The string is a description
> + that the caller may use to further indicate the reason for the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
> /**
> <b>PchReset Runtime DXE Driver Entry Point</b>\n
> - <b>Introduction</b>\n
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-22 2:49 ` Gao, Zhichao
@ 2019-04-24 13:45 ` Piwko, Maciej
2019-04-24 14:27 ` Kwolek, Adam
0 siblings, 1 reply; 18+ messages in thread
From: Piwko, Maciej @ 2019-04-24 13:45 UTC (permalink / raw)
To: Gao, Zhichao, Bu, Daocheng, devel@edk2.groups.io, Kwolek, Adam
Cc: Oram, Isaac W, Gao, Liming
Hi,
For me the change seems fine.
The only concern that I have may be related to the fact, the resetting the system we may also want to inform the ME engine about that fact and choose proper reset type.
I'm adding Adam, who can comment on the reset functionality from ME UEFIFW perspective.
Adam, could you also look at this change?
Thanks,
Maciej
-----Original Message-----
From: Gao, Zhichao
Sent: Monday, April 22, 2019 4:50 AM
To: Bu, Daocheng <daocheng.bu@intel.com>; devel@edk2.groups.io
Cc: Piwko, Maciej <maciej.piwko@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
Hi,
I didn't receive any comments with this patch yet. Maybe you missed this email.
The new added function is only a few part of the ResetSystemRuntimeDxe to provide the reset function.
As I know, platforms always have their own ResetSystemLib instance and do not use the instance in MdeModulePkg.
While the platform contains a driver base on the new interface(the driver may be in the edk2 repo), the driver would not find the interface's implement and cause a link error.
I suggest all platform code should update it to avoid the link error if the platform is working with the edk2 master repo.
Thanks,
Zhichao
> -----Original Message-----
> From: Bu, Daocheng
> Sent: Monday, April 15, 2019 3:56 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> Cc: Piwko, Maciej <maciej.piwko@intel.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
>
> Hi Maciej,
>
> Please help review this code from PCH perspective.
> If you approve this change , please also help cherry pick this change
> to ServerSiliconPkg\Pch\SouthClusterLbg pkg @10nm trunk.
>
> Thanks,
> Amos
>
> UEFI FW, IAFW or System Firmware is more generic & accurate it's not
> BIOS anymore!
>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Piwko, Maciej <maciej.piwko@intel.com>; Bu, Daocheng
> <daocheng.bu@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use
> this new API and link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in
> Edk2 repo.
> Notes:
> This library API only provide a basic function of reset. If the
> consumers want full functions, they should use the instance in the
> MdeModulePkg and make sure the depex driver is dispatched.
>
> Cc: "Piwko, Maciej" <maciej.piwko@intel.com>
> Cc: "Bu, Daocheng" <daocheng.bu@intel.com>
> Cc: "Oram, Isaac W" <isaac.w.oram@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
> 1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git
> a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> index cdc0f19c17..673f42e72c 100644
> ---
> a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> c
> +++
> b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchRes
> +++ et.c
> @@ -1,6 +1,6 @@
> /** @file
>
> -Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2018 - 2019, Intel Corporation. All rights
> +reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License that
> accompanies this distribution.
> The full text of the license may be found at @@ -255,7 +255,6 @@
> ResetShutdown (
> /**
> Calling this function causes the system to enter a power state for
> platform specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a platform
> specific reset.
> The exact type of the reset is
> defined by the EFI_GUID that follows @@ -265,7 +264,6 @@ ResetShutdown
> ( VOID EFIAPI ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -306,6 +304,49 @@ EnterS3WithImmediateWake (
> PchReset (mPchResetInstance, (PCH_RESET_TYPE) EfiResetWarm); }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string, optionally
> + followed by additional binary data. The string is a description
> + that the caller may use to further indicate the reason for the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
> /**
> <b>PchReset Runtime DXE Driver Entry Point</b>\n
> - <b>Introduction</b>\n
> --
> 2.21.0.windows.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-24 13:45 ` Piwko, Maciej
@ 2019-04-24 14:27 ` Kwolek, Adam
0 siblings, 0 replies; 18+ messages in thread
From: Kwolek, Adam @ 2019-04-24 14:27 UTC (permalink / raw)
To: Piwko, Maciej, Gao, Zhichao, Bu, Daocheng, devel@edk2.groups.io
Cc: Oram, Isaac W, Gao, Liming
Hi,
For me it looks good also,
I do not see any change that will not allow to call WS ME on reset (as we currently have for Workstation).
BR
Adam
> -----Original Message-----
> From: Piwko, Maciej
> Sent: Wednesday, April 24, 2019 3:45 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>; Bu, Daocheng
> <daocheng.bu@intel.com>; devel@edk2.groups.io; Kwolek, Adam
> <adam.kwolek@intel.com>
> Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
> Hi,
>
> For me the change seems fine.
> The only concern that I have may be related to the fact, the resetting the
> system we may also want to inform the ME engine about that fact and choose
> proper reset type.
> I'm adding Adam, who can comment on the reset functionality from ME
> UEFIFW perspective.
>
> Adam, could you also look at this change?
>
> Thanks,
> Maciej
>
>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 22, 2019 4:50 AM
> To: Bu, Daocheng <daocheng.bu@intel.com>; devel@edk2.groups.io
> Cc: Piwko, Maciej <maciej.piwko@intel.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
> Hi,
>
> I didn't receive any comments with this patch yet. Maybe you missed this
> email.
> The new added function is only a few part of the ResetSystemRuntimeDxe to
> provide the reset function.
> As I know, platforms always have their own ResetSystemLib instance and do
> not use the instance in MdeModulePkg.
> While the platform contains a driver base on the new interface(the driver may
> be in the edk2 repo), the driver would not find the interface's implement and
> cause a link error.
> I suggest all platform code should update it to avoid the link error if the
> platform is working with the edk2 master repo.
>
> Thanks,
> Zhichao
>
> > -----Original Message-----
> > From: Bu, Daocheng
> > Sent: Monday, April 15, 2019 3:56 PM
> > To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> > Cc: Piwko, Maciej <maciej.piwko@intel.com>; Oram, Isaac W
> > <isaac.w.oram@intel.com>; Gao, Liming <liming.gao@intel.com>
> > Subject: RE: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> > LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
> >
> >
> > Hi Maciej,
> >
> > Please help review this code from PCH perspective.
> > If you approve this change , please also help cherry pick this change
> > to ServerSiliconPkg\Pch\SouthClusterLbg pkg @10nm trunk.
> >
> > Thanks,
> > Amos
> >
> > UEFI FW, IAFW or System Firmware is more generic & accurate it's not
> > BIOS anymore!
> >
> > -----Original Message-----
> > From: Gao, Zhichao
> > Sent: Monday, April 15, 2019 11:08 AM
> > To: devel@edk2.groups.io
> > Cc: Piwko, Maciej <maciej.piwko@intel.com>; Bu, Daocheng
> > <daocheng.bu@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Gao,
> > Liming <liming.gao@intel.com>
> > Subject: [edk2-platforms/devel-MinPlatform][PATCH 3/5]
> > LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
> >
> > Add a new API ResetSystem to this ResetSystemLib instance.
> > It only adds the basic functions from ResetSystemRuntimeDxe.
> > Lacking of this interface may cause link error, if some drivers use
> > this new API and link to this library instance.
> > Make the ResetPlatformSpecific's parameters same with the interface in
> > Edk2 repo.
> > Notes:
> > This library API only provide a basic function of reset. If the
> > consumers want full functions, they should use the instance in the
> > MdeModulePkg and make sure the depex driver is dispatched.
> >
> > Cc: "Piwko, Maciej" <maciej.piwko@intel.com>
> > Cc: "Bu, Daocheng" <daocheng.bu@intel.com>
> > Cc: "Oram, Isaac W" <isaac.w.oram@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> > ---
> > .../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
> > 1 file changed, 44 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> > c
> > b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> > c
> > index cdc0f19c17..673f42e72c 100644
> > ---
> > a/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchReset.
> > c
> > +++
> > b/Silicon/Intel/LewisburgPkg/Library/DxeRuntimeResetSystemLib/PchRes
> > +++ et.c
> > @@ -1,6 +1,6 @@
> > /** @file
> >
> > -Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> > +Copyright (c) 2018 - 2019, Intel Corporation. All rights
> > +reserved.<BR>
> > This program and the accompanying materials are licensed and made
> > available under the terms and conditions of the BSD License that
> > accompanies this distribution.
> > The full text of the license may be found at @@ -255,7 +255,6 @@
> > ResetShutdown (
> > /**
> > Calling this function causes the system to enter a power state for
> > platform specific.
> >
> > - @param[in] ResetStatus The status code for the reset.
> > @param[in] DataSize The size of ResetData in bytes.
> > @param[in] ResetData Optional element used to introduce a
> platform
> > specific reset.
> > The exact type of the reset is
> > defined by the EFI_GUID that follows @@ -265,7 +264,6 @@ ResetShutdown
> > ( VOID EFIAPI ResetPlatformSpecific (
> > - IN EFI_STATUS ResetStatus,
> > IN UINTN DataSize,
> > IN VOID *ResetData OPTIONAL
> > )
> > @@ -306,6 +304,49 @@ EnterS3WithImmediateWake (
> > PchReset (mPchResetInstance, (PCH_RESET_TYPE) EfiResetWarm); }
> >
> > +/**
> > + The ResetSystem function resets the entire platform.
> > +
> > + @param[in] ResetType The type of reset to perform.
> > + @param[in] ResetStatus The status code for the reset.
> > + @param[in] DataSize The size, in bytes, of ResetData.
> > + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> > or EfiResetShutdown
> > + the data buffer starts with a Null-terminated string,
> optionally
> > + followed by additional binary data. The string is a description
> > + that the caller may use to further indicate the reason for the
> > + system reset.
> > +**/
> > +VOID
> > +EFIAPI
> > +ResetSystem (
> > + IN EFI_RESET_TYPE ResetType,
> > + IN EFI_STATUS ResetStatus,
> > + IN UINTN DataSize,
> > + IN VOID *ResetData OPTIONAL
> > + )
> > +{
> > + switch (ResetType) {
> > + case EfiResetWarm:
> > + ResetWarm ();
> > + break;
> > +
> > + case EfiResetCold:
> > + ResetCold ();
> > + break;
> > +
> > + case EfiResetShutdown:
> > + ResetShutdown ();
> > + return ;
> > +
> > + case EfiResetPlatformSpecific:
> > + ResetPlatformSpecific (DataSize, ResetData);
> > + return;
> > +
> > + default:
> > + return ;
> > + }
> > +}
> > +
> > /**
> > <b>PchReset Runtime DXE Driver Entry Point</b>\n
> > - <b>Introduction</b>\n
> > --
> > 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [edk2-platforms/devel-MinPlatform][PATCH 4/5] KabylakeSiliconPkg/PeiResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
` (3 preceding siblings ...)
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 3/5] LewisburgPkg/DxeRuntimeResetSystemLib: " Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-16 1:55 ` Chiu, Chasel
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 5/5] KabylakeSiliconPkg/DxeRuntimeResetSystemLib: " Gao, Zhichao
2019-04-16 2:00 ` [edk2-devel] [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Kubacki, Michael A
6 siblings, 1 reply; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Michael A Kubacki, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Also change the caller and declaration at the same time.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Pch/Library/PeiPchResetLib/PchReset.c | 7 ++-
.../PeiResetSystemLib/PeiResetSystemLib.c | 47 +++++++++++++++++--
2 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
index 79f3f779dc..1a30bf31f6 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
@@ -1,7 +1,7 @@
/** @file
PCH RESET PEIM DRIVER.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -27,7 +27,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
);
@@ -67,7 +66,7 @@ ResetSystem (
return;
case EfiResetPlatformSpecific:
- ResetPlatformSpecific (ResetStatus, DataSize, ResetData);
+ ResetPlatformSpecific (DataSize, ResetData);
return;
default:
@@ -115,7 +114,7 @@ Reset (
case PchGlobalReset:
CopyMem (&ResetData.Guid, &gPchGlobalResetGuid, sizeof (EFI_GUID));
StrCpyS (ResetData.Description, PCH_RESET_DATA_STRING_MAX_LENGTH, PCH_PLATFORM_SPECIFIC_RESET_STRING);
- ResetPlatformSpecific (EFI_SUCCESS, sizeof (PCH_RESET_DATA), &ResetData);
+ ResetPlatformSpecific (sizeof (PCH_RESET_DATA), &ResetData);
break;
default:
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
index 6a017a40a7..92ce6af5cc 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
System reset library services.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -239,7 +239,6 @@ PeiPchGlobalReset (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows
@@ -249,7 +248,6 @@ PeiPchGlobalReset (
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -284,3 +282,46 @@ EnterS3WithImmediateWake (
ASSERT (FALSE);
}
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-platforms/devel-MinPlatform][PATCH 4/5] KabylakeSiliconPkg/PeiResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 4/5] KabylakeSiliconPkg/PeiResetSystemLib: " Gao, Zhichao
@ 2019-04-16 1:55 ` Chiu, Chasel
0 siblings, 0 replies; 18+ messages in thread
From: Chiu, Chasel @ 2019-04-16 1:55 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io; +Cc: Kubacki, Michael A, Gao, Liming
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, April 15, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-platforms/devel-MinPlatform][PATCH 4/5]
> KabylakeSiliconPkg/PeiResetSystemLib: Add a new API ResetSystem
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API and
> link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in Edk2
> repo.
> Also change the caller and declaration at the same time.
> Notes:
> This library API only provide a basic function of reset. If the consumers want full
> functions, they should use the instance in the MdeModulePkg and make sure the
> depex driver is dispatched.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../Pch/Library/PeiPchResetLib/PchReset.c | 7 ++-
> .../PeiResetSystemLib/PeiResetSystemLib.c | 47 +++++++++++++++++--
> 2 files changed, 47 insertions(+), 7 deletions(-)
>
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> index 79f3f779dc..1a30bf31f6 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchRes
> +++ et.c
> @@ -1,7 +1,7 @@
> /** @file
> PCH RESET PEIM DRIVER.
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License that accompanies this
> distribution.
> The full text of the license may be found at @@ -27,7 +27,6 @@ WITHOUT
> WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> VOID
> EFIAPI
> ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> );
> @@ -67,7 +66,7 @@ ResetSystem (
> return;
>
> case EfiResetPlatformSpecific:
> - ResetPlatformSpecific (ResetStatus, DataSize, ResetData);
> + ResetPlatformSpecific (DataSize, ResetData);
> return;
>
> default:
> @@ -115,7 +114,7 @@ Reset (
> case PchGlobalReset:
> CopyMem (&ResetData.Guid, &gPchGlobalResetGuid, sizeof (EFI_GUID));
> StrCpyS (ResetData.Description,
> PCH_RESET_DATA_STRING_MAX_LENGTH,
> PCH_PLATFORM_SPECIFIC_RESET_STRING);
> - ResetPlatformSpecific (EFI_SUCCESS, sizeof (PCH_RESET_DATA),
> &ResetData);
> + ResetPlatformSpecific (sizeof (PCH_RESET_DATA), &ResetData);
> break;
>
> default:
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSys
> temLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSys
> temLib.c
> index 6a017a40a7..92ce6af5cc 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSys
> temLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> +++ ResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> System reset library services.
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License that accompanies this
> distribution.
> The full text of the license may be found at @@ -239,7 +239,6 @@
> PeiPchGlobalReset (
> /**
> Calling this function causes the system to enter a power state for platform
> specific.
>
> - @param[in] ResetStatus The status code for the reset.
> @param[in] DataSize The size of ResetData in bytes.
> @param[in] ResetData Optional element used to introduce a
> platform specific reset.
> The exact type of the reset is defined by the
> EFI_GUID that follows @@ -249,7 +248,6 @@ PeiPchGlobalReset ( VOID
> EFIAPI ResetPlatformSpecific (
> - IN EFI_STATUS ResetStatus,
> IN UINTN DataSize,
> IN VOID *ResetData OPTIONAL
> )
> @@ -284,3 +282,46 @@ EnterS3WithImmediateWake (
> ASSERT (FALSE);
> }
>
> +/**
> + The ResetSystem function resets the entire platform.
> +
> + @param[in] ResetType The type of reset to perform.
> + @param[in] ResetStatus The status code for the reset.
> + @param[in] DataSize The size, in bytes, of ResetData.
> + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,
> or EfiResetShutdown
> + the data buffer starts with a Null-terminated string,
> optionally
> + followed by additional binary data. The string is a
> description
> + that the caller may use to further indicate the reason for
> the
> + system reset.
> +**/
> +VOID
> +EFIAPI
> +ResetSystem (
> + IN EFI_RESET_TYPE ResetType,
> + IN EFI_STATUS ResetStatus,
> + IN UINTN DataSize,
> + IN VOID *ResetData OPTIONAL
> + )
> +{
> + switch (ResetType) {
> + case EfiResetWarm:
> + ResetWarm ();
> + break;
> +
> + case EfiResetCold:
> + ResetCold ();
> + break;
> +
> + case EfiResetShutdown:
> + ResetShutdown ();
> + return ;
> +
> + case EfiResetPlatformSpecific:
> + ResetPlatformSpecific (DataSize, ResetData);
> + return;
> +
> + default:
> + return ;
> + }
> +}
> +
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [edk2-platforms/devel-MinPlatform][PATCH 5/5] KabylakeSiliconPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
` (4 preceding siblings ...)
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 4/5] KabylakeSiliconPkg/PeiResetSystemLib: " Gao, Zhichao
@ 2019-04-15 3:07 ` Gao, Zhichao
2019-04-16 2:00 ` [edk2-devel] [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Kubacki, Michael A
6 siblings, 0 replies; 18+ messages in thread
From: Gao, Zhichao @ 2019-04-15 3:07 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Michael A Kubacki, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Add a new API ResetSystem to this ResetSystemLib instance.
It only adds the basic functions from ResetSystemRuntimeDxe.
Lacking of this interface may cause link error, if some drivers
use this new API and link to this library instance.
Make the ResetPlatformSpecific's parameters same with the
interface in Edk2 repo.
Notes:
This library API only provide a basic function of reset. If
the consumers want full functions, they should use the instance
in the MdeModulePkg and make sure the depex driver is dispatched.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../DxeRuntimeResetSystemLib.c | 47 +++++++++++++++++--
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.c
index 919cb407e0..0ae09074db 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
System reset library services.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -251,7 +251,6 @@ DxeRuntimePchGlobalReset (
/**
Calling this function causes the system to enter a power state for platform specific.
- @param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size of ResetData in bytes.
@param[in] ResetData Optional element used to introduce a platform specific reset.
The exact type of the reset is defined by the EFI_GUID that follows
@@ -261,7 +260,6 @@ DxeRuntimePchGlobalReset (
VOID
EFIAPI
ResetPlatformSpecific (
- IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
@@ -298,6 +296,49 @@ EnterS3WithImmediateWake (
ASSERT (FALSE);
}
+/**
+ The ResetSystem function resets the entire platform.
+
+ @param[in] ResetType The type of reset to perform.
+ @param[in] ResetStatus The status code for the reset.
+ @param[in] DataSize The size, in bytes, of ResetData.
+ @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
+ the data buffer starts with a Null-terminated string, optionally
+ followed by additional binary data. The string is a description
+ that the caller may use to further indicate the reason for the
+ system reset.
+**/
+VOID
+EFIAPI
+ResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ switch (ResetType) {
+ case EfiResetWarm:
+ ResetWarm ();
+ break;
+
+ case EfiResetCold:
+ ResetCold ();
+ break;
+
+ case EfiResetShutdown:
+ ResetShutdown ();
+ return ;
+
+ case EfiResetPlatformSpecific:
+ ResetPlatformSpecific (DataSize, ResetData);
+ return;
+
+ default:
+ return ;
+ }
+}
+
/**
Convert the physical PMC base addresses to virtual addresses.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances
2019-04-15 3:07 [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a new API ResetSystem for ResetSystemLib instances Gao, Zhichao
` (5 preceding siblings ...)
2019-04-15 3:07 ` [edk2-platforms/devel-MinPlatform][PATCH 5/5] KabylakeSiliconPkg/DxeRuntimeResetSystemLib: " Gao, Zhichao
@ 2019-04-16 2:00 ` Kubacki, Michael A
6 siblings, 0 replies; 18+ messages in thread
From: Kubacki, Michael A @ 2019-04-16 2:00 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Zhichao
Cc: Piwko, Maciej, Piwko, Maciej, Bu, Daocheng, Oram, Isaac W,
Chiu, Chasel, Gao, Liming
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao,
> Zhichao
> Sent: Sunday, April 14, 2019 8:08 PM
> To: devel@edk2.groups.io
> Cc: Piwko; Piwko, Maciej <maciej.piwko@intel.com>; Bu; Bu, Daocheng
> <daocheng.bu@intel.com>; Oram; Oram, Isaac W <isaac.w.oram@intel.com>;
> Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel] [edk2-platforms/devel-MinPlatform][PATCH 0/5] Add a
> new API ResetSystem for ResetSystemLib instances
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
>
> Add a new API ResetSystem to this ResetSystemLib instance.
> It only adds the basic functions from ResetSystemRuntimeDxe.
> Lacking of this interface may cause link error, if some drivers use this new API
> and link to this library instance.
> Make the ResetPlatformSpecific's parameters same with the interface in Edk2
> repo.
> Notes:
> This library API only provide a basic function of reset. If the consumers want full
> functions, they should use the instance in the MdeModulePkg and make sure
> the depex driver is dispatched.
>
> Cc: Piwko, Maciej <maciej.piwko@intel.com>
> Cc: Bu, Daocheng <daocheng.bu@intel.com>
> Cc: Oram, Isaac W <isaac.w.oram@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
>
> Zhichao Gao (5):
> KabylakeSiliconPkg/BaseResetSystemLib: Add a new API ResetSystem
> KabylakeSiliconPkg/DxeResetSystemLib: Add a new API ResetSystem
> LewisburgPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
> KabylakeSiliconPkg/PeiResetSystemLib: Add a new API ResetSystem
> KabylakeSiliconPkg/DxeRuntimeResetSystemLib: Add a new API ResetSystem
>
> .../BaseResetSystemLib/BaseResetSystemLib.c | 47 +++++++++++++++++--
> .../DxeResetSystemLib/DxeResetSystemLib.c | 47 +++++++++++++++++--
> .../DxeRuntimeResetSystemLib.c | 47 +++++++++++++++++--
> .../Pch/Library/PeiPchResetLib/PchReset.c | 7 ++-
> .../PeiResetSystemLib/PeiResetSystemLib.c | 47 +++++++++++++++++--
> .../DxeRuntimeResetSystemLib/PchReset.c | 47 +++++++++++++++++--
> 6 files changed, 223 insertions(+), 19 deletions(-)
>
> --
> 2.21.0.windows.1
>
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread