* [PATCH V2 01/25] MdePkg/UefiSpec.h: Change comments of EFI_RESET_SYSTEM
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
@ 2019-04-17 6:26 ` Gao, Zhichao
2019-04-17 6:26 ` [PATCH V2 02/25] MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM Gao, Zhichao
` (24 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:26 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Sean Brogan, Michael Turner,
Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Uefi/UefiSpec.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index fca8df6751..44a0a6a7fa 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -5,7 +5,7 @@
If a code construct is defined in the UEFI 2.7 specification it must be included
by this include file.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1014,10 +1014,7 @@ EFI_STATUS
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 02/25] MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
2019-04-17 6:26 ` [PATCH V2 01/25] MdePkg/UefiSpec.h: Change comments of EFI_RESET_SYSTEM Gao, Zhichao
@ 2019-04-17 6:26 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 03/25] MdePkg/PeiServicesLib.h: Change comments of PeiServicesResetSystem2 Gao, Zhichao
` (23 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:26 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Sean Brogan, Michael Turner,
Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Pi/PiPeiCis.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h
index ea2455ab1f..d9d4ed7d41 100644
--- a/MdePkg/Include/Pi/PiPeiCis.h
+++ b/MdePkg/Include/Pi/PiPeiCis.h
@@ -1,7 +1,7 @@
/** @file
PI PEI master include file. This file should match the PI spec.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
@@ -614,9 +614,7 @@ EFI_STATUS
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
typedef
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 03/25] MdePkg/PeiServicesLib.h: Change comments of PeiServicesResetSystem2
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
2019-04-17 6:26 ` [PATCH V2 01/25] MdePkg/UefiSpec.h: Change comments of EFI_RESET_SYSTEM Gao, Zhichao
2019-04-17 6:26 ` [PATCH V2 02/25] MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 04/25] MdePkg/PeiServicesLib.c: " Gao, Zhichao
` (22 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Sean Brogan, Michael Turner,
Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Library/PeiServicesLib.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/MdePkg/Include/Library/PeiServicesLib.h b/MdePkg/Include/Library/PeiServicesLib.h
index d32347493b..5d57947101 100644
--- a/MdePkg/Include/Library/PeiServicesLib.h
+++ b/MdePkg/Include/Library/PeiServicesLib.h
@@ -1,7 +1,7 @@
/** @file
Provides library functions for all PEI Services.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -544,9 +544,7 @@ PeiServicesInstallFvInfo2Ppi (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 04/25] MdePkg/PeiServicesLib.c: Change comments of PeiServicesResetSystem2
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (2 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 03/25] MdePkg/PeiServicesLib.h: Change comments of PeiServicesResetSystem2 Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset Gao, Zhichao
` (21 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Sean Brogan, Michael Turner,
Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Library/PeiServicesLib/PeiServicesLib.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
index 35d03fed62..e8eaed71c8 100644
--- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
+++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
@@ -1,7 +1,7 @@
/** @file
Implementation for PEI Services Library.
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -793,9 +793,7 @@ PeiServicesInstallFvInfo2Ppi (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (3 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 04/25] MdePkg/PeiServicesLib.c: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-18 3:30 ` Zhang, Chao B
2019-04-17 6:27 ` [PATCH V2 06/25] MdeModulePkg/ResetSystemLib.h: Change comments of ResetSystem Gao, Zhichao
` (20 subsequent siblings)
25 siblings, 1 reply; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Chao Zhang, Jiewen Yao, Liming Gao, Sean Brogan, Michael Turner,
Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index b3e21f0947..a2729457b7 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1,7 +1,7 @@
/** @file
This module implements Tcg2 Protocol.
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -2419,10 +2419,7 @@ OnExitBootServicesFailed (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset
2019-04-17 6:27 ` [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset Gao, Zhichao
@ 2019-04-18 3:30 ` Zhang, Chao B
0 siblings, 0 replies; 31+ messages in thread
From: Zhang, Chao B @ 2019-04-18 3:30 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io
Cc: Yao, Jiewen, Gao, Liming, Sean Brogan, Michael Turner,
Bret Barkelew
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
-----Original Message-----
From: Gao, Zhichao
Sent: Wednesday, April 17, 2019 2:27 PM
To: devel@edk2.groups.io
Cc: Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Gao, Liming <liming.gao@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Michael Turner <Michael.Turner@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific or not.
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index b3e21f0947..a2729457b7 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1,7 +1,7 @@
/** @file
This module implements Tcg2 Protocol.
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -2419,10 +2419,7 @@ OnExitBootServicesFailed (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 06/25] MdeModulePkg/ResetSystemLib.h: Change comments of ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (4 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 05/25] SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 07/25] MdeModulePkg/DxeResetSystemLib.c: " Gao, Zhichao
` (19 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Include/Library/ResetSystemLib.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MdeModulePkg/Include/Library/ResetSystemLib.h b/MdeModulePkg/Include/Library/ResetSystemLib.h
index 8fd875f2e9..3b2a098a60 100644
--- a/MdeModulePkg/Include/Library/ResetSystemLib.h
+++ b/MdeModulePkg/Include/Library/ResetSystemLib.h
@@ -90,9 +90,7 @@ ResetPlatformSpecific (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
EFIAPI
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 07/25] MdeModulePkg/DxeResetSystemLib.c: Change comments of ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (5 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 06/25] MdeModulePkg/ResetSystemLib.h: Change comments of ResetSystem Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 08/25] MdeModulePkg/BaseResetSystemLibNull.c: " Gao, Zhichao
` (18 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c b/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c
index 5ca2fd4c11..a85b6cd9a6 100644
--- a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c
+++ b/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c
@@ -101,9 +101,7 @@ ResetPlatformSpecific (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
EFIAPI
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 08/25] MdeModulePkg/BaseResetSystemLibNull.c: Change comments of ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (6 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 07/25] MdeModulePkg/DxeResetSystemLib.c: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 09/25] MdeModulePkg/RuntimeResetSystemLib.c: Change comments Gao, Zhichao
` (17 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
.../Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
index 10c682afb8..8d4c1028e6 100644
--- a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
+++ b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
@@ -1,7 +1,7 @@
/** @file
Null Reset System Library instance that only generates ASSERT() conditions.
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -103,9 +103,7 @@ ResetPlatformSpecific (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
EFIAPI
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 09/25] MdeModulePkg/RuntimeResetSystemLib.c: Change comments
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (7 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 08/25] MdeModulePkg/BaseResetSystemLibNull.c: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 10/25] MdeModulePkg/PeiResetSystemlib.c: Change comments of ResetSystem Gao, Zhichao
` (16 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not. So change the comments of ResetSystem.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
.../Library/RuntimeResetSystemLib/RuntimeResetSystemLib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.c b/MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.c
index 7074f595b7..29b3f7ebd8 100644
--- a/MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.c
+++ b/MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.c
@@ -106,9 +106,7 @@ ResetPlatformSpecific (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
EFIAPI
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 10/25] MdeModulePkg/PeiResetSystemlib.c: Change comments of ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (8 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 09/25] MdeModulePkg/RuntimeResetSystemLib.c: Change comments Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 11/25] MdeModulePkg/ResetSystemRuntimeDxe: Change comments Gao, Zhichao
` (15 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c b/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c
index be5dc08c7a..50297129b7 100644
--- a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c
+++ b/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c
@@ -101,9 +101,7 @@ ResetPlatformSpecific (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
EFIAPI
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 11/25] MdeModulePkg/ResetSystemRuntimeDxe: Change comments
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (9 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 10/25] MdeModulePkg/PeiResetSystemlib.c: Change comments of ResetSystem Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 12/25] MdeModulePkg/ResetSystemPei: Change comments of ResetSystem2 Gao, Zhichao
` (14 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not. So change the comments of RuntimeServiceResetSystem.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c | 5 +----
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c
index 399104ca8e..77aedcba6e 100644
--- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c
+++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c
@@ -210,10 +210,7 @@ InitializeResetSystem (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h
index 25ae5dac27..87d9c572aa 100644
--- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h
+++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h
@@ -80,10 +80,7 @@ InitializeResetSystem (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 12/25] MdeModulePkg/ResetSystemPei: Change comments of ResetSystem2
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (10 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 11/25] MdeModulePkg/ResetSystemRuntimeDxe: Change comments Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 13/25] MdeModulePkg/PeiMain: Change comments of PeiResetSystem2 Gao, Zhichao
` (13 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c | 7 ++-----
MdeModulePkg/Universal/ResetSystemPei/ResetSystem.h | 5 +----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c
index 068e4e1130..ce90c86257 100644
--- a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c
+++ b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c
@@ -1,7 +1,7 @@
/** @file
Implementation of Reset2, ResetFilter and ResetHandler PPIs.
- Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -265,10 +265,7 @@ InitializeResetSystem (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
diff --git a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.h b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.h
index 6c96ddaa84..4d49a308af 100644
--- a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.h
+++ b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.h
@@ -58,10 +58,7 @@ typedef struct {
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 13/25] MdeModulePkg/PeiMain: Change comments of PeiResetSystem2
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (11 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 12/25] MdeModulePkg/ResetSystemPei: Change comments of ResetSystem2 Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 14/25] MdeModulePkg/NvmExpressHci.c: Change comments Gao, Zhichao
` (12 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Core/Pei/PeiMain.h | 4 +---
MdeModulePkg/Core/Pei/Reset/Reset.c | 6 ++----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index 0aed4f4685..f2aa97c664 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -1097,9 +1097,7 @@ PeiResetSystem (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
diff --git a/MdeModulePkg/Core/Pei/Reset/Reset.c b/MdeModulePkg/Core/Pei/Reset/Reset.c
index 263eace239..0c3cfad035 100644
--- a/MdeModulePkg/Core/Pei/Reset/Reset.c
+++ b/MdeModulePkg/Core/Pei/Reset/Reset.c
@@ -1,7 +1,7 @@
/** @file
Pei Core Reset System Support
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -72,9 +72,7 @@ PeiResetSystem (
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. ResetData is only valid if ResetStatus is something
- other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ system reset.
**/
VOID
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 14/25] MdeModulePkg/NvmExpressHci.c: Change comments
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (12 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 13/25] MdeModulePkg/PeiMain: Change comments of PeiResetSystem2 Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 15/25] BeagleBoardPkg/ResetSystemLib: Add new API ResetSystem Gao, Zhichao
` (11 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao, Sean Brogan,
Michael Turner, Bret Barkelew
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not. So change the comments of NvmeShutdownAllControllers.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
index d1b106ef61..95f8b18bc4 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
@@ -966,10 +966,7 @@ NvmeControllerInit (
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. ResetData is only
- valid if ResetStatus is something other than EFI_SUCCESS
- unless the ResetType is EfiResetPlatformSpecific
- where a minimum amount of ResetData is always required.
+ indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH V2 15/25] BeagleBoardPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (13 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 14/25] MdeModulePkg/NvmExpressHci.c: Change comments Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 16/25] CorebootPayloadPkg/ResetSystemLib: " Gao, Zhichao
` (10 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
index 9fc572957f..f3e0201a6f 100644
--- a/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -3,6 +3,7 @@
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -103,3 +104,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] 31+ messages in thread
* [PATCH V2 16/25] CorebootPayloadPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (14 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 15/25] BeagleBoardPkg/ResetSystemLib: Add new API ResetSystem Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 17/25] Nt32Pkg/ResetSystemLib: " Gao, Zhichao
` (9 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c b/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c
index 1fb9142408..2a6abaf6ba 100644
--- a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
Reset System Library functions for coreboot
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -176,3 +176,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] 31+ messages in thread
* [PATCH V2 17/25] Nt32Pkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (15 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 16/25] CorebootPayloadPkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 18/25] OvmfPkg/ResetSystemLib: " Gao, Zhichao
` (8 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Liming Gao, Hao Wu
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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.c b/Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.c
index ed4129d46b..f8f9aa409f 100644
--- a/Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -90,3 +90,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] 31+ messages in thread
* [PATCH V2 18/25] OvmfPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (16 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 17/25] Nt32Pkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 19/25] PcAtChipsetPkg/ResetSystemLib: " Gao, Zhichao
` (7 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
index c2c7736aa8..27460cd100 100644
--- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,7 +1,7 @@
/** @file
Reset System Library functions for OVMF
- Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -140,3 +140,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] 31+ messages in thread
* [PATCH V2 19/25] PcAtChipsetPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (17 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 18/25] OvmfPkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 20/25] QuarkSocPkg/ResetSystemLib: " Gao, Zhichao
` (6 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 48 ++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
index eccef89ebe..7fe1663c97 100644
--- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,13 +1,16 @@
/** @file
Reset System Library functions for PCAT platforms
- Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Base.h>
+#include <Uefi/UefiBaseType.h>
+#include <Uefi/UefiMultiPhase.h>
+
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
@@ -99,3 +102,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] 31+ messages in thread
* [PATCH V2 20/25] QuarkSocPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (18 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 19/25] PcAtChipsetPkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-25 17:09 ` [edk2-devel] " Michael D Kinney
2019-04-17 6:27 ` [PATCH V2 21/25] Vlv2TbltdevicePkg/ResetSystemLib: " Gao, Zhichao
` (5 subsequent siblings)
25 siblings, 1 reply; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Michael D Kinney, Kelly Steele, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/ResetSystemLib.c b/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/ResetSystemLib.c
index ea95f89059..d730f62ce0 100644
--- a/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/ResetSystemLib.c
+++ b/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/ResetSystemLib.c
@@ -2,7 +2,7 @@
System reset Library Services. This library class provides a set of
methods to reset whole system with manipulate QNC.
-Copyright (c) 2013-2016 Intel Corporation.
+Copyright (c) 2013-2019 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -334,3 +334,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] 31+ messages in thread
* Re: [edk2-devel] [PATCH V2 20/25] QuarkSocPkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:27 ` [PATCH V2 20/25] QuarkSocPkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-25 17:09 ` Michael D Kinney
0 siblings, 0 replies; 31+ messages in thread
From: Michael D Kinney @ 2019-04-25 17:09 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Zhichao, Kinney, Michael D
Cc: Steele, Kelly, Gao, Liming
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
> On Behalf Of Gao, Zhichao
> Sent: Tuesday, April 16, 2019 11:27 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Steele, Kelly <kelly.steele@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2-devel] [PATCH V2 20/25]
> QuarkSocPkg/ResetSystemLib: Add 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.
> Notes:
> This library API only provide a basic function of reset.
> Full
> function should use the instance in the MdeModulePkg and
> make
> sure the depex driver is dispatched.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../Library/ResetSystemLib/ResetSystemLib.c | 45
> ++++++++++++++++++-
> 1 file changed, 44 insertions(+), 1 deletion(-)
>
> diff --git
> a/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/Re
> setSystemLib.c
> b/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/Re
> setSystemLib.c
> index ea95f89059..d730f62ce0 100644
> ---
> a/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/Re
> setSystemLib.c
> +++
> b/QuarkSocPkg/QuarkNorthCluster/Library/ResetSystemLib/Re
> setSystemLib.c
> @@ -2,7 +2,7 @@
> System reset Library Services. This library class
> provides a set of
> methods to reset whole system with manipulate QNC.
>
> -Copyright (c) 2013-2016 Intel Corporation.
> +Copyright (c) 2013-2019 Intel Corporation.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -334,3 +334,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] 31+ messages in thread
* [PATCH V2 21/25] Vlv2TbltdevicePkg/ResetSystemLib: Add new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (19 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 20/25] QuarkSocPkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 22/25] ArmPkg/ArmSmcPsciResetSystemLib: Add a " Gao, Zhichao
` (4 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Zailiang Sun, Yi Qian, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
---
.../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c b/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c
index 1cd6f80891..fac998fefa 100644
--- a/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -190,3 +190,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] 31+ messages in thread
* [PATCH V2 22/25] ArmPkg/ArmSmcPsciResetSystemLib: Add a new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (20 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 21/25] Vlv2TbltdevicePkg/ResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 23/25] ArmVirtPkg/ArmVirtPsciResetSystemLib: " Gao, Zhichao
` (3 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
.../ArmSmcPsciResetSystemLib.c | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c b/ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c
index 87c1ea0ed0..b2dde9bfc1 100644
--- a/ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c
+++ b/ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c
@@ -2,6 +2,7 @@
ResetSystemLib implementation using PSCI calls
Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.<BR>
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -169,3 +170,46 @@ ResetPlatformSpecific (
// Map the platform specific reset as reboot
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] 31+ messages in thread
* [PATCH V2 23/25] ArmVirtPkg/ArmVirtPsciResetSystemLib: Add a new API ResetSystem
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (21 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 22/25] ArmPkg/ArmSmcPsciResetSystemLib: Add a " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:27 ` [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype Gao, Zhichao
` (2 subsequent siblings)
25 siblings, 0 replies; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel, 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.
Notes:
This library API only provide a basic function of reset. Full
function should use the instance in the MdeModulePkg and make
sure the depex driver is dispatched.
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
.../ArmVirtPsciResetSystemLib.c | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.c b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.c
index 79a5456c49..fdf49e1d9c 100644
--- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.c
+++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.c
@@ -8,6 +8,7 @@
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
+ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -179,3 +180,46 @@ ResetPlatformSpecific (
// Map the platform specific reset as reboot
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] 31+ messages in thread
* [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (22 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 23/25] ArmVirtPkg/ArmVirtPsciResetSystemLib: " Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:36 ` Wu, Hao A
2019-04-17 6:27 ` [PATCH V2 25/25] " Gao, Zhichao
2019-04-25 16:46 ` [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Steele, Kelly
25 siblings, 1 reply; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Bret Barkelew, Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao,
Sean Brogan, Michael Turner
From: Bret Barkelew <Bret.Barkelew@microsoft.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458
Add a new API ResetSystemWithSubtype's prototype declaration in
header file. Also add the required data type header file.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Include/Library/ResetUtilityLib.h | 34 ++++++++++++++++---
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/MdeModulePkg/Include/Library/ResetUtilityLib.h b/MdeModulePkg/Include/Library/ResetUtilityLib.h
index ca310cdb01..656703e782 100644
--- a/MdeModulePkg/Include/Library/ResetUtilityLib.h
+++ b/MdeModulePkg/Include/Library/ResetUtilityLib.h
@@ -1,7 +1,7 @@
/** @file
This header describes various helper functions for resetting the system.
- Copyright (c) 2017 Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,10 +10,36 @@
#ifndef _RESET_UTILITY_LIB_H_
#define _RESET_UTILITY_LIB_H_
+#include <Uefi/UefiMultiPhase.h>
+
+/**
+ This is a shorthand helper function to reset with reset type and a subtype
+ so that the caller doesn't have to bother with a function that has half
+ a dozen parameters.
+
+ This will generate a reset with status EFI_SUCCESS, a NULL string, and
+ no custom data. The subtype will be formatted in such a way that it can be
+ picked up by notification registrations and custom handlers.
+
+ NOTE: This call will fail if the architectural ResetSystem underpinnings
+ are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
+ to your DEPEX.
+
+ @param[in] ResetType The default EFI_RESET_TYPE of the reset.
+ @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
+
+**/
+VOID
+EFIAPI
+ResetSystemWithSubtype (
+ IN EFI_RESET_TYPE ResetType,
+ IN CONST GUID *ResetSubtype
+ );
+
/**
- This is a shorthand helper function to reset with a subtype so that
- the caller doesn't have to bother with a function that has half a dozen
- parameters.
+ This is a shorthand helper function to reset with the reset type
+ 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't
+ have to bother with a function that has half a dozen parameters.
This will generate a reset with status EFI_SUCCESS, a NULL string, and
no custom data. The subtype will be formatted in such a way that it can be
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
2019-04-17 6:27 ` [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype Gao, Zhichao
@ 2019-04-17 6:36 ` Wu, Hao A
0 siblings, 0 replies; 31+ messages in thread
From: Wu, Hao A @ 2019-04-17 6:36 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io
Cc: Bret Barkelew, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
Sean Brogan, Michael Turner
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Wednesday, April 17, 2019 2:27 PM
> To: devel@edk2.groups.io
> Cc: Bret Barkelew; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao, Liming;
> Sean Brogan; Michael Turner
> Subject: [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API
> ResetSystemWithSubtype
>
> From: Bret Barkelew <Bret.Barkelew@microsoft.com>
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458
>
> Add a new API ResetSystemWithSubtype's prototype declaration in
> header file. Also add the required data type header file.
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Michael Turner <Michael.Turner@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../Include/Library/ResetUtilityLib.h | 34 ++++++++++++++++---
> 1 file changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/MdeModulePkg/Include/Library/ResetUtilityLib.h
> b/MdeModulePkg/Include/Library/ResetUtilityLib.h
> index ca310cdb01..656703e782 100644
> --- a/MdeModulePkg/Include/Library/ResetUtilityLib.h
> +++ b/MdeModulePkg/Include/Library/ResetUtilityLib.h
> @@ -1,7 +1,7 @@
> /** @file
> This header describes various helper functions for resetting the system.
>
> - Copyright (c) 2017 Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>
> Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -10,10 +10,36 @@
> #ifndef _RESET_UTILITY_LIB_H_
> #define _RESET_UTILITY_LIB_H_
>
> +#include <Uefi/UefiMultiPhase.h>
> +
> +/**
> + This is a shorthand helper function to reset with reset type and a subtype
> + so that the caller doesn't have to bother with a function that has half
> + a dozen parameters.
> +
> + This will generate a reset with status EFI_SUCCESS, a NULL string, and
> + no custom data. The subtype will be formatted in such a way that it can be
> + picked up by notification registrations and custom handlers.
> +
> + NOTE: This call will fail if the architectural ResetSystem underpinnings
> + are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
> + to your DEPEX.
> +
> + @param[in] ResetType The default EFI_RESET_TYPE of the reset.
> + @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
> +
> +**/
> +VOID
> +EFIAPI
> +ResetSystemWithSubtype (
> + IN EFI_RESET_TYPE ResetType,
> + IN CONST GUID *ResetSubtype
> + );
> +
> /**
> - This is a shorthand helper function to reset with a subtype so that
> - the caller doesn't have to bother with a function that has half a dozen
> - parameters.
> + This is a shorthand helper function to reset with the reset type
> + 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't
> + have to bother with a function that has half a dozen parameters.
Thanks for addressing the comments.
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
>
> This will generate a reset with status EFI_SUCCESS, a NULL string, and
> no custom data. The subtype will be formatted in such a way that it can be
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH V2 25/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (23 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype Gao, Zhichao
@ 2019-04-17 6:27 ` Gao, Zhichao
2019-04-17 6:37 ` [edk2-devel] " Wu, Hao A
2019-04-25 16:46 ` [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Steele, Kelly
25 siblings, 1 reply; 31+ messages in thread
From: Gao, Zhichao @ 2019-04-17 6:27 UTC (permalink / raw)
To: devel
Cc: Bret Barkelew, Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao,
Sean Brogan, Michael Turner
From: Bret Barkelew <Bret.Barkelew@microsoft.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458
Implement the new API ResetSystemWithSubtype. Depend on Uefi Spec
2.8 chapter 8.5.1, the ResetData is valid while the ResetStatus
is EFI_SUCCESS regardless of the ResetType. Also change the function
ResetPlatofrmSpecificGuid to directly call ResetSystemWithSubtype
to reduce the duplicated code.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../Library/ResetUtilityLib/ResetUtility.c | 40 ++++++++++++++++---
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 59f14edadc..2b5af4b95a 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -1,7 +1,7 @@
/** @file
This contains the business logic for the module-specific Reset Helper functions.
- Copyright (c) 2017 - 2018 Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -23,9 +23,9 @@ typedef struct {
VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
/**
- This is a shorthand helper function to reset with a subtype so that
- the caller doesn't have to bother with a function that has half a dozen
- parameters.
+ This is a shorthand helper function to reset with reset type and a subtype
+ so that the caller doesn't have to bother with a function that has half
+ a dozen parameters.
This will generate a reset with status EFI_SUCCESS, a NULL string, and
no custom data. The subtype will be formatted in such a way that it can be
@@ -35,12 +35,14 @@ VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
to your DEPEX.
+ @param[in] ResetType The default EFI_RESET_TYPE of the reset.
@param[in] ResetSubtype GUID pointer for the reset subtype to be used.
**/
VOID
EFIAPI
-ResetPlatformSpecificGuid (
+ResetSystemWithSubtype (
+ IN EFI_RESET_TYPE ResetType,
IN CONST GUID *ResetSubtype
)
{
@@ -51,7 +53,33 @@ ResetPlatformSpecificGuid (
(GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)),
ResetSubtype
);
- ResetPlatformSpecific (sizeof (ResetData), &ResetData);
+
+ ResetSystem (ResetType, EFI_SUCCESS, sizeof (ResetData), &ResetData);
+}
+
+/**
+ This is a shorthand helper function to reset with the reset type
+ 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't
+ have to bother with a function that has half a dozen parameters.
+
+ This will generate a reset with status EFI_SUCCESS, a NULL string, and
+ no custom data. The subtype will be formatted in such a way that it can be
+ picked up by notification registrations and custom handlers.
+
+ NOTE: This call will fail if the architectural ResetSystem underpinnings
+ are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
+ to your DEPEX.
+
+ @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
+
+**/
+VOID
+EFIAPI
+ResetPlatformSpecificGuid (
+ IN CONST GUID *ResetSubtype
+ )
+{
+ ResetSystemWithSubtype (EfiResetPlatformSpecific, ResetSubtype);
}
/**
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [edk2-devel] [PATCH V2 25/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
2019-04-17 6:27 ` [PATCH V2 25/25] " Gao, Zhichao
@ 2019-04-17 6:37 ` Wu, Hao A
0 siblings, 0 replies; 31+ messages in thread
From: Wu, Hao A @ 2019-04-17 6:37 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Zhichao
Cc: Bret Barkelew, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
Sean Brogan, Michael Turner
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao,
> Zhichao
> Sent: Wednesday, April 17, 2019 2:27 PM
> To: devel@edk2.groups.io
> Cc: Bret Barkelew; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao, Liming;
> Sean Brogan; Michael Turner
> Subject: [edk2-devel] [PATCH V2 25/25] MdeModulePkg/ResetUtilityLib: Add a
> new API ResetSystemWithSubtype
>
> From: Bret Barkelew <Bret.Barkelew@microsoft.com>
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458
>
> Implement the new API ResetSystemWithSubtype. Depend on Uefi Spec
> 2.8 chapter 8.5.1, the ResetData is valid while the ResetStatus
> is EFI_SUCCESS regardless of the ResetType. Also change the function
> ResetPlatofrmSpecificGuid to directly call ResetSystemWithSubtype
> to reduce the duplicated code.
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Michael Turner <Michael.Turner@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
> .../Library/ResetUtilityLib/ResetUtility.c | 40 ++++++++++++++++---
> 1 file changed, 34 insertions(+), 6 deletions(-)
>
> diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> index 59f14edadc..2b5af4b95a 100644
> --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> @@ -1,7 +1,7 @@
> /** @file
> This contains the business logic for the module-specific Reset Helper
> functions.
>
> - Copyright (c) 2017 - 2018 Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>
> Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -23,9 +23,9 @@ typedef struct {
> VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
>
> /**
> - This is a shorthand helper function to reset with a subtype so that
> - the caller doesn't have to bother with a function that has half a dozen
> - parameters.
> + This is a shorthand helper function to reset with reset type and a subtype
> + so that the caller doesn't have to bother with a function that has half
> + a dozen parameters.
>
> This will generate a reset with status EFI_SUCCESS, a NULL string, and
> no custom data. The subtype will be formatted in such a way that it can be
> @@ -35,12 +35,14 @@ VERIFY_SIZE_OF
> (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
> are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
> to your DEPEX.
>
> + @param[in] ResetType The default EFI_RESET_TYPE of the reset.
> @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
>
> **/
> VOID
> EFIAPI
> -ResetPlatformSpecificGuid (
> +ResetSystemWithSubtype (
> + IN EFI_RESET_TYPE ResetType,
> IN CONST GUID *ResetSubtype
> )
> {
> @@ -51,7 +53,33 @@ ResetPlatformSpecificGuid (
> (GUID *)((UINT8 *)&ResetData + OFFSET_OF
> (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)),
> ResetSubtype
> );
> - ResetPlatformSpecific (sizeof (ResetData), &ResetData);
> +
> + ResetSystem (ResetType, EFI_SUCCESS, sizeof (ResetData), &ResetData);
> +}
> +
> +/**
> + This is a shorthand helper function to reset with the reset type
> + 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't
> + have to bother with a function that has half a dozen parameters.
> +
> + This will generate a reset with status EFI_SUCCESS, a NULL string, and
> + no custom data. The subtype will be formatted in such a way that it can be
> + picked up by notification registrations and custom handlers.
> +
> + NOTE: This call will fail if the architectural ResetSystem underpinnings
> + are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
> + to your DEPEX.
> +
> + @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
> +
> +**/
> +VOID
> +EFIAPI
> +ResetPlatformSpecificGuid (
> + IN CONST GUID *ResetSubtype
> + )
> +{
> + ResetSystemWithSubtype (EfiResetPlatformSpecific, ResetSubtype);
Thanks for addressing the comments.
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> }
>
> /**
> --
> 2.21.0.windows.1
>
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype
2019-04-17 6:26 [PATCH V2 00/25] Add the new APIs ResetSystem and ResetSystemWithSubtype Gao, Zhichao
` (24 preceding siblings ...)
2019-04-17 6:27 ` [PATCH V2 25/25] " Gao, Zhichao
@ 2019-04-25 16:46 ` Steele, Kelly
25 siblings, 0 replies; 31+ messages in thread
From: Steele, Kelly @ 2019-04-25 16:46 UTC (permalink / raw)
To: Gao, Zhichao, devel@edk2.groups.io
Cc: Kinney, Michael D, Gao, Liming, Zhang, Chao B, Yao, Jiewen,
Wang, Jian J, Wu, Hao A, Ni, Ray, Zeng, Star, Leif Lindholm,
Ard Biesheuvel, Justen, Jordan L, Laszlo Ersek, Sun, Zailiang,
Qian, Yi, Sean Brogan, Michael Turner, Bret Barkelew
QuarkSocPkg/ResetSystemLib
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
> -----Original Message-----
> From: Gao, Zhichao
> Sent: April 16, 2019 23:27
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao,
> Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu,
> Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Zeng, Star
> <star.zeng@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Ard
> Biesheuvel <ard.biesheuvel@linaro.org>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@redhat.com>; Steele, Kelly
> <kelly.steele@intel.com>; Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi
> <yi.qian@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Michael
> Turner <Michael.Turner@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>
> Subject: [PATCH V2 00/25] Add the new APIs ResetSystem and
> ResetSystemWithSubtype
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
> Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
> is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
> or not.
> Add a new API ResetSystem to ResetSystemLib instances. The new driver may
> consume this new API and then it may cause a link error. For these library
> instances, the new API only has a basic function. If the consumers want
> the full function of this API, they should use the instance in the MdeModulePkg
> and make sure the depex driver is dispatched.
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1458
> Add a new API ResetSystemWithSubtype to ResetUtilityLib
>
> V2:
> Update the copy right.
> Fix build error of PcAtChipsetPkg/ResetSystemLib.
> Fix the coding style issue.
> Update the comment for the new API ResetSystemWithSubtype
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Michael Turner <Michael.Turner@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
>
> Bret Barkelew (2):
> MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
> MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
>
> Zhichao Gao (23):
> MdePkg/UefiSpec.h: Change comments of EFI_RESET_SYSTEM
> MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM
> MdePkg/PeiServicesLib.h: Change comments of PeiServicesResetSystem2
> MdePkg/PeiServicesLib.c: Change comments of PeiServicesResetSystem2
> SecurityPkg/Tcg2Dxe: Change comments of ShutdownTpmOnReset
> MdeModulePkg/ResetSystemLib.h: Change comments of ResetSystem
> MdeModulePkg/DxeResetSystemLib.c: Change comments of ResetSystem
> MdeModulePkg/BaseResetSystemLibNull.c: Change comments of ResetSystem
> MdeModulePkg/RuntimeResetSystemLib.c: Change comments
> MdeModulePkg/PeiResetSystemlib.c: Change comments of ResetSystem
> MdeModulePkg/ResetSystemRuntimeDxe: Change comments
> MdeModulePkg/ResetSystemPei: Change comments of ResetSystem2
> MdeModulePkg/PeiMain: Change comments of PeiResetSystem2
> MdeModulePkg/NvmExpressHci.c: Change comments
> BeagleBoardPkg/ResetSystemLib: Add new API ResetSystem
> CorebootPayloadPkg/ResetSystemLib: Add new API ResetSystem
> Nt32Pkg/ResetSystemLib: Add new API ResetSystem
> OvmfPkg/ResetSystemLib: Add new API ResetSystem
> PcAtChipsetPkg/ResetSystemLib: Add new API ResetSystem
> QuarkSocPkg/ResetSystemLib: Add new API ResetSystem
> Vlv2TbltdevicePkg/ResetSystemLib: Add new API ResetSystem
> ArmPkg/ArmSmcPsciResetSystemLib: Add a new API ResetSystem
> ArmVirtPkg/ArmVirtPsciResetSystemLib: Add a new API ResetSystem
>
> .../ArmSmcPsciResetSystemLib.c | 44 +++++++++++++++++
> .../ArmVirtPsciResetSystemLib.c | 44 +++++++++++++++++
> .../Library/ResetSystemLib/ResetSystemLib.c | 44 +++++++++++++++++
> .../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++-
> .../Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 5 +-
> MdeModulePkg/Core/Pei/PeiMain.h | 4 +-
> MdeModulePkg/Core/Pei/Reset/Reset.c | 6 +--
> MdeModulePkg/Include/Library/ResetSystemLib.h | 4 +-
> .../Include/Library/ResetUtilityLib.h | 34 +++++++++++--
> .../BaseResetSystemLibNull.c | 6 +--
> .../DxeResetSystemLib/DxeResetSystemLib.c | 4 +-
> .../PeiResetSystemLib/PeiResetSystemLib.c | 4 +-
> .../Library/ResetUtilityLib/ResetUtility.c | 40 +++++++++++++---
> .../RuntimeResetSystemLib.c | 4 +-
> .../Universal/ResetSystemPei/ResetSystem.c | 7 +--
> .../Universal/ResetSystemPei/ResetSystem.h | 5 +-
> .../ResetSystemRuntimeDxe/ResetSystem.c | 5 +-
> .../ResetSystemRuntimeDxe/ResetSystem.h | 5 +-
> MdePkg/Include/Library/PeiServicesLib.h | 6 +--
> MdePkg/Include/Pi/PiPeiCis.h | 6 +--
> MdePkg/Include/Uefi/UefiSpec.h | 7 +--
> .../Library/PeiServicesLib/PeiServicesLib.c | 6 +--
> .../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++-
> .../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++-
> .../Library/ResetSystemLib/ResetSystemLib.c | 48 ++++++++++++++++++-
> .../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++-
> SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 7 +--
> .../Library/ResetSystemLib/ResetSystemLib.c | 45 ++++++++++++++++-
> 28 files changed, 488 insertions(+), 82 deletions(-)
>
> --
> 2.21.0.windows.1
^ permalink raw reply [flat|nested] 31+ messages in thread