public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH V1 0/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation
@ 2019-11-27  2:56 Kubacki, Michael A
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
  0 siblings, 2 replies; 11+ messages in thread
From: Kubacki, Michael A @ 2019-11-27  2:56 UTC (permalink / raw)
  To: devel; +Cc: Sai Chaganty, Chasel Chiu, Nate DeSimone, Zhichao Gao

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

This patch series:
 1. Removes a ResetSystemLib.h override in KabylakeSiliconPkg
 2. Removes a redundant implementation of ResetSystem ()

The redundant ResetSystem () implementation causes a build failure
in VS2017. The build failure does not reproduce in VS2015. The new
ResetSystem () implementation that led to the issue was introduced
in the following commits:
 * 2393cff0d4
 * 07fd95c9ca
 * 0ad2f057d8
 * a6e61d43c9

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>

Michael Kubacki (2):
  KabylakeSiliconPkg: Remove ResetSystemLib.h override
  KabylakeSiliconPkg: Remove redundant ResetSystem() implementation

 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf                     |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h          | 62 --------------------
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c                             | 55 -----------------
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c                 |  5 ++
 7 files changed, 13 insertions(+), 121 deletions(-)
 delete mode 100644 Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h

-- 
2.16.2.windows.1


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

* [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27  2:56 [edk2-platforms][PATCH V1 0/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
@ 2019-11-27  2:56 ` Kubacki, Michael A
  2019-11-27  3:26   ` Chiu, Chasel
                     ` (2 more replies)
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
  1 sibling, 3 replies; 11+ messages in thread
From: Kubacki, Michael A @ 2019-11-27  2:56 UTC (permalink / raw)
  To: devel; +Cc: Sai Chaganty, Chasel Chiu, Nate DeSimone, Zhichao Gao

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg
that does not contain the prototype for ResetSystem () and
ResetPlatformSpecific ().

The ResetSystemLib.h file from MdeModulePkg will be used. Any INF
files that did not include the MdeModulePkg.dec under [Packages]
were updated to do so.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf                     |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h          | 62 --------------------
 5 files changed, 8 insertions(+), 66 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
index aa8877140a..46313bf35f 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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
 #
@@ -35,6 +35,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
index 6b27661603..c7fad31c71 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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
 #
@@ -36,6 +36,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
index b04f4006ef..29f69078a4 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for PCH Reset Lib Pei Phase
 #
-# 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
 #
@@ -28,6 +28,7 @@ ResetSystemLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 [Sources]
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
index 18a92a6f18..3c6ff78863 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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
 #
@@ -32,6 +32,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
deleted file mode 100644
index 75d3e15ed7..0000000000
--- a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/** @file
-  System reset Library Services.  This library class defines a set of
-  methods that reset the whole system.
-
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __RESET_SYSTEM_LIB_H__
-#define __RESET_SYSTEM_LIB_H__
-
-/**
-  This function causes a system-wide reset (cold reset), in which
-  all circuitry within the system returns to its initial state. This type of reset
-  is asynchronous to system operation and operates without regard to
-  cycle boundaries.
-
-  If this function returns, it means that the system does not support cold reset.
-**/
-VOID
-EFIAPI
-ResetCold (
-  VOID
-  );
-
-/**
-  This function causes a system-wide initialization (warm reset), in which all processors
-  are set to their initial state. Pending cycles are not corrupted.
-
-  If this function returns, it means that the system does not support warm reset.
-**/
-VOID
-EFIAPI
-ResetWarm (
-  VOID
-  );
-
-/**
-  This function causes the system to enter a power state equivalent
-  to the ACPI G2/S5 or G3 states.
-
-  If this function returns, it means that the system does not support shutdown reset.
-**/
-VOID
-EFIAPI
-ResetShutdown (
-  VOID
-  );
-
-/**
-  This function causes the system to enter S3 and then wake up immediately.
-
-  If this function returns, it means that the system does not support S3 feature.
-**/
-VOID
-EFIAPI
-EnterS3WithImmediateWake (
-  VOID
-  );
-
-#endif
-- 
2.16.2.windows.1


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

* [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation
  2019-11-27  2:56 [edk2-platforms][PATCH V1 0/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
@ 2019-11-27  2:56 ` Kubacki, Michael A
  2019-11-27  3:26   ` Chiu, Chasel
  2019-11-27  4:49   ` Nate DeSimone
  1 sibling, 2 replies; 11+ messages in thread
From: Kubacki, Michael A @ 2019-11-27  2:56 UTC (permalink / raw)
  To: devel; +Cc: Sai Chaganty, Chasel Chiu, Nate DeSimone, Zhichao Gao

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

The following commits introduced a new implementation of
ResetSystem () in ResetLib instances in KabylakeSiliconPkg:
 * 2393cff0d4
 * 07fd95c9ca
 * 0ad2f057d8
 * a6e61d43c9

The PchResetLib instance PeiPchResetLib links against ResetLib and
already contained a definition of ResetSystem (). This resulted in
a build failure in VS2017 due to multiple definitions of a symbol
being provided to the linker. The failure did not reproduce in
VS2015 so it persisted until now.

This change removes the pre-existing implementation of
ResetSystem () in PchReset.c as it is now linked by the
implementation in the ResetLib instance.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c             | 55 --------------------
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c |  5 ++
 2 files changed, 5 insertions(+), 55 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
index 20e5d36892..c3963164c1 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
@@ -18,61 +18,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/ResetSystemLib.h>
 #include <PchResetPlatformSpecific.h>
 
-VOID
-EFIAPI
-ResetPlatformSpecific (
-  IN UINTN            DataSize,
-  IN VOID             *ResetData OPTIONAL
-  );
-
-
-/**
-  Resets the entire platform.
-
-  @param[in] ResetType            UEFI defined reset type.
-  @param[in] ResetStatus          The status code for the reset.
-  @param[in] DataSize             The size of ResetData in bytes.
-  @param[in] ResetData            Optional element used to introduce a platform specific reset.
-                                  The exact type of the reset is defined by the EFI_GUID that follows
-                                  the Null-terminated Unicode string.
-
-**/
-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;
-  }
-
-  //
-  // Given we should have reset getting here would be bad
-  //
-  ASSERT (FALSE);
-}
-
 /**
   Execute Pch Reset from the host controller.
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
index 6f12abf111..a3db100619 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
@@ -317,5 +317,10 @@ ResetSystem (
   default:
     return;
   }
+
+  //
+  // Given we should have reset getting here would be bad
+  //
+  ASSERT (FALSE);
 }
 
-- 
2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
@ 2019-11-27  3:26   ` Chiu, Chasel
  2019-11-27  4:49   ` Nate DeSimone
  2019-11-27  6:42   ` Chaganty, Rangasai V
  2 siblings, 0 replies; 11+ messages in thread
From: Chiu, Chasel @ 2019-11-27  3:26 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Gao, Zhichao


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Kubacki, Michael A <michael.a.kubacki@intel.com>
> Sent: Wednesday, November 27, 2019 10:57 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> ResetSystemLib.h override
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375
> 
> Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that does
> not contain the prototype for ResetSystem () and ResetPlatformSpecific ().
> 
> The ResetSystemLib.h file from MdeModulePkg will be used. Any INF files
> that did not include the MdeModulePkg.dec under [Packages] were updated
> to do so.
> 
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> ---
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSys
> temLib.inf               |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/Dxe
> RuntimeResetSystemLib.inf |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.i
> nf                     |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSyst
> emLib.inf               |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Librar
> y/ResetSystemLib.h          | 62 --------------------
>  5 files changed, 8 insertions(+), 66 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.inf
> index aa8877140a..46313bf35f 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> +++ ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -35,6 +35,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/D
> xeRuntimeResetSystemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/D
> xeRuntimeResetSystemLib.inf
> index 6b27661603..c7fad31c71 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/D
> xeRuntimeResetSystemLib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> +++ Lib/DxeRuntimeResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -36,6 +36,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLi
> b.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLi
> b.inf
> index b04f4006ef..29f69078a4 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLi
> b.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
> +++ ResetLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for PCH Reset Lib Pei Phase  # -# 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  # @@ -28,6 +28,7 @@
> ResetSystemLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
>  [Sources]
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.inf
> index 18a92a6f18..3c6ff78863 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> +++ ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -32,6 +32,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libr
> ary/ResetSystemLib.h
> b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libr
> ary/ResetSystemLib.h
> deleted file mode 100644
> index 75d3e15ed7..0000000000
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libr
> ary/ResetSystemLib.h
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -/** @file
> -  System reset Library Services.  This library class defines a set of
> -  methods that reset the whole system.
> -
> -Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#ifndef __RESET_SYSTEM_LIB_H__
> -#define __RESET_SYSTEM_LIB_H__
> -
> -/**
> -  This function causes a system-wide reset (cold reset), in which
> -  all circuitry within the system returns to its initial state. This type of reset
> -  is asynchronous to system operation and operates without regard to
> -  cycle boundaries.
> -
> -  If this function returns, it means that the system does not support cold
> reset.
> -**/
> -VOID
> -EFIAPI
> -ResetCold (
> -  VOID
> -  );
> -
> -/**
> -  This function causes a system-wide initialization (warm reset), in which
> all processors
> -  are set to their initial state. Pending cycles are not corrupted.
> -
> -  If this function returns, it means that the system does not support warm
> reset.
> -**/
> -VOID
> -EFIAPI
> -ResetWarm (
> -  VOID
> -  );
> -
> -/**
> -  This function causes the system to enter a power state equivalent
> -  to the ACPI G2/S5 or G3 states.
> -
> -  If this function returns, it means that the system does not support
> shutdown reset.
> -**/
> -VOID
> -EFIAPI
> -ResetShutdown (
> -  VOID
> -  );
> -
> -/**
> -  This function causes the system to enter S3 and then wake up
> immediately.
> -
> -  If this function returns, it means that the system does not support S3
> feature.
> -**/
> -VOID
> -EFIAPI
> -EnterS3WithImmediateWake (
> -  VOID
> -  );
> -
> -#endif
> --
> 2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
@ 2019-11-27  3:26   ` Chiu, Chasel
  2019-11-27  4:49   ` Nate DeSimone
  1 sibling, 0 replies; 11+ messages in thread
From: Chiu, Chasel @ 2019-11-27  3:26 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Gao, Zhichao


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Kubacki, Michael A <michael.a.kubacki@intel.com>
> Sent: Wednesday, November 27, 2019 10:57 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove
> redundant ResetSystem() implementation
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375
> 
> The following commits introduced a new implementation of ResetSystem ()
> in ResetLib instances in KabylakeSiliconPkg:
>  * 2393cff0d4
>  * 07fd95c9ca
>  * 0ad2f057d8
>  * a6e61d43c9
> 
> The PchResetLib instance PeiPchResetLib links against ResetLib and already
> contained a definition of ResetSystem (). This resulted in a build failure in
> VS2017 due to multiple definitions of a symbol being provided to the linker.
> The failure did not reproduce in
> VS2015 so it persisted until now.
> 
> This change removes the pre-existing implementation of ResetSystem () in
> PchReset.c as it is now linked by the implementation in the ResetLib
> instance.
> 
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> | 55 --------------------
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSyst
> emLib.c |  5 ++
>  2 files changed, 5 insertions(+), 55 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> index 20e5d36892..c3963164c1 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchRes
> +++ et.c
> @@ -18,61 +18,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> #include <Library/ResetSystemLib.h>  #include
> <PchResetPlatformSpecific.h>
> 
> -VOID
> -EFIAPI
> -ResetPlatformSpecific (
> -  IN UINTN            DataSize,
> -  IN VOID             *ResetData OPTIONAL
> -  );
> -
> -
> -/**
> -  Resets the entire platform.
> -
> -  @param[in] ResetType            UEFI defined reset type.
> -  @param[in] ResetStatus          The status code for the reset.
> -  @param[in] DataSize             The size of ResetData in bytes.
> -  @param[in] ResetData            Optional element used to introduce
> a platform specific reset.
> -                                  The exact type of the reset is
> defined by the EFI_GUID that follows
> -                                  the Null-terminated Unicode string.
> -
> -**/
> -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;
> -  }
> -
> -  //
> -  // Given we should have reset getting here would be bad
> -  //
> -  ASSERT (FALSE);
> -}
> -
>  /**
>    Execute Pch Reset from the host controller.
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.c
> index 6f12abf111..a3db100619 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSy
> stemLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> +++ ResetSystemLib.c
> @@ -317,5 +317,10 @@ ResetSystem (
>    default:
>      return;
>    }
> +
> +  //
> +  // Given we should have reset getting here would be bad  //  ASSERT
> + (FALSE);
>  }
> 
> --
> 2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
  2019-11-27  3:26   ` Chiu, Chasel
@ 2019-11-27  4:49   ` Nate DeSimone
  2019-11-27  6:42   ` Chaganty, Rangasai V
  2 siblings, 0 replies; 11+ messages in thread
From: Nate DeSimone @ 2019-11-27  4:49 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Chiu, Chasel, Gao, Zhichao

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Kubacki, Michael A <michael.a.kubacki@intel.com> 
Sent: Tuesday, November 26, 2019 6:57 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that does not contain the prototype for ResetSystem () and ResetPlatformSpecific ().

The ResetSystemLib.h file from MdeModulePkg will be used. Any INF files that did not include the MdeModulePkg.dec under [Packages] were updated to do so.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf                     |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h          | 62 --------------------
 5 files changed, 8 insertions(+), 66 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
index aa8877140a..46313bf35f 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
+++ ResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -35,6 +35,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
index 6b27661603..c7fad31c71 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
+++ Lib/DxeRuntimeResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -36,6 +36,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
index b04f4006ef..29f69078a4 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
+++ ResetLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for PCH Reset Lib Pei Phase  # -# 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  # @@ -28,6 +28,7 @@ ResetSystemLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 [Sources]
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
index 18a92a6f18..3c6ff78863 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
+++ ResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -32,6 +32,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
deleted file mode 100644
index 75d3e15ed7..0000000000
--- a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/** @file
-  System reset Library Services.  This library class defines a set of
-  methods that reset the whole system.
-
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __RESET_SYSTEM_LIB_H__
-#define __RESET_SYSTEM_LIB_H__
-
-/**
-  This function causes a system-wide reset (cold reset), in which
-  all circuitry within the system returns to its initial state. This type of reset
-  is asynchronous to system operation and operates without regard to
-  cycle boundaries.
-
-  If this function returns, it means that the system does not support cold reset.
-**/
-VOID
-EFIAPI
-ResetCold (
-  VOID
-  );
-
-/**
-  This function causes a system-wide initialization (warm reset), in which all processors
-  are set to their initial state. Pending cycles are not corrupted.
-
-  If this function returns, it means that the system does not support warm reset.
-**/
-VOID
-EFIAPI
-ResetWarm (
-  VOID
-  );
-
-/**
-  This function causes the system to enter a power state equivalent
-  to the ACPI G2/S5 or G3 states.
-
-  If this function returns, it means that the system does not support shutdown reset.
-**/
-VOID
-EFIAPI
-ResetShutdown (
-  VOID
-  );
-
-/**
-  This function causes the system to enter S3 and then wake up immediately.
-
-  If this function returns, it means that the system does not support S3 feature.
-**/
-VOID
-EFIAPI
-EnterS3WithImmediateWake (
-  VOID
-  );
-
-#endif
--
2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
  2019-11-27  3:26   ` Chiu, Chasel
@ 2019-11-27  4:49   ` Nate DeSimone
  1 sibling, 0 replies; 11+ messages in thread
From: Nate DeSimone @ 2019-11-27  4:49 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Chiu, Chasel, Gao, Zhichao

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Kubacki, Michael A <michael.a.kubacki@intel.com> 
Sent: Tuesday, November 26, 2019 6:57 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
Subject: [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

The following commits introduced a new implementation of ResetSystem () in ResetLib instances in KabylakeSiliconPkg:
 * 2393cff0d4
 * 07fd95c9ca
 * 0ad2f057d8
 * a6e61d43c9

The PchResetLib instance PeiPchResetLib links against ResetLib and already contained a definition of ResetSystem (). This resulted in a build failure in VS2017 due to multiple definitions of a symbol being provided to the linker. The failure did not reproduce in
VS2015 so it persisted until now.

This change removes the pre-existing implementation of ResetSystem () in PchReset.c as it is now linked by the implementation in the ResetLib instance.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c             | 55 --------------------
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c |  5 ++
 2 files changed, 5 insertions(+), 55 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
index 20e5d36892..c3963164c1 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchReset.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PchRes
+++ et.c
@@ -18,61 +18,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include <Library/ResetSystemLib.h>  #include <PchResetPlatformSpecific.h>
 
-VOID
-EFIAPI
-ResetPlatformSpecific (
-  IN UINTN            DataSize,
-  IN VOID             *ResetData OPTIONAL
-  );
-
-
-/**
-  Resets the entire platform.
-
-  @param[in] ResetType            UEFI defined reset type.
-  @param[in] ResetStatus          The status code for the reset.
-  @param[in] DataSize             The size of ResetData in bytes.
-  @param[in] ResetData            Optional element used to introduce a platform specific reset.
-                                  The exact type of the reset is defined by the EFI_GUID that follows
-                                  the Null-terminated Unicode string.
-
-**/
-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;
-  }
-
-  //
-  // Given we should have reset getting here would be bad
-  //
-  ASSERT (FALSE);
-}
-
 /**
   Execute Pch Reset from the host controller.
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
index 6f12abf111..a3db100619 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
+++ ResetSystemLib.c
@@ -317,5 +317,10 @@ ResetSystem (
   default:
     return;
   }
+
+  //
+  // Given we should have reset getting here would be bad  //  ASSERT 
+ (FALSE);
 }
 
--
2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
  2019-11-27  3:26   ` Chiu, Chasel
  2019-11-27  4:49   ` Nate DeSimone
@ 2019-11-27  6:42   ` Chaganty, Rangasai V
  2019-11-27 18:41     ` Kubacki, Michael A
  2 siblings, 1 reply; 11+ messages in thread
From: Chaganty, Rangasai V @ 2019-11-27  6:42 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Gao, Zhichao

This change is introducing SiliconPkg's dependency on MdeModulePkg.
SiliconPkg dependencies should be limited to a selected few packages and this seems to be an unnecessary addition to the dependency list.
The reset interfaces are providing generic reset services and perhaps better suited in packages like MdePkg.

-----Original Message-----
From: Kubacki, Michael A 
Sent: Tuesday, November 26, 2019 6:57 PM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375

Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that does not contain the prototype for ResetSystem () and ResetPlatformSpecific ().

The ResetSystemLib.h file from MdeModulePkg will be used. Any INF files that did not include the MdeModulePkg.dec under [Packages] were updated to do so.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf                     |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf               |  3 +-
 Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h          | 62 --------------------
 5 files changed, 8 insertions(+), 66 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
index aa8877140a..46313bf35f 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
+++ ResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -35,6 +35,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
index 6b27661603..c7fad31c71 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
+++ Lib/DxeRuntimeResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -36,6 +36,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
index b04f4006ef..29f69078a4 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
+++ ResetLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for PCH Reset Lib Pei Phase  # -# 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  # @@ -28,6 +28,7 @@ ResetSystemLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 [Sources]
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
index 18a92a6f18..3c6ff78863 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSystemLib.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
+++ ResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component description file for Intel Ich7 Reset System Library.
 #
-# 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  # @@ -32,6 +32,7 @@ PchCycleDecodingLib
 
 [Packages]
 MdePkg/MdePkg.dec
+MdeModulePkg/MdeModulePkg.dec
 KabylakeSiliconPkg/SiPkg.dec
 
 
diff --git a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
deleted file mode 100644
index 75d3e15ed7..0000000000
--- a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Library/ResetSystemLib.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/** @file
-  System reset Library Services.  This library class defines a set of
-  methods that reset the whole system.
-
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __RESET_SYSTEM_LIB_H__
-#define __RESET_SYSTEM_LIB_H__
-
-/**
-  This function causes a system-wide reset (cold reset), in which
-  all circuitry within the system returns to its initial state. This type of reset
-  is asynchronous to system operation and operates without regard to
-  cycle boundaries.
-
-  If this function returns, it means that the system does not support cold reset.
-**/
-VOID
-EFIAPI
-ResetCold (
-  VOID
-  );
-
-/**
-  This function causes a system-wide initialization (warm reset), in which all processors
-  are set to their initial state. Pending cycles are not corrupted.
-
-  If this function returns, it means that the system does not support warm reset.
-**/
-VOID
-EFIAPI
-ResetWarm (
-  VOID
-  );
-
-/**
-  This function causes the system to enter a power state equivalent
-  to the ACPI G2/S5 or G3 states.
-
-  If this function returns, it means that the system does not support shutdown reset.
-**/
-VOID
-EFIAPI
-ResetShutdown (
-  VOID
-  );
-
-/**
-  This function causes the system to enter S3 and then wake up immediately.
-
-  If this function returns, it means that the system does not support S3 feature.
-**/
-VOID
-EFIAPI
-EnterS3WithImmediateWake (
-  VOID
-  );
-
-#endif
--
2.16.2.windows.1


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27  6:42   ` Chaganty, Rangasai V
@ 2019-11-27 18:41     ` Kubacki, Michael A
  2019-11-28  0:31       ` Kubacki, Michael A
  0 siblings, 1 reply; 11+ messages in thread
From: Kubacki, Michael A @ 2019-11-27 18:41 UTC (permalink / raw)
  To: Chaganty, Rangasai V, devel@edk2.groups.io
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Gao, Zhichao

This dependency existed prior to this change (and still does exist). It was obfuscated in such a way that contributed to this problem.

See the previous library header path:
  \Silicon\Intel\KabylakeSiliconPkg\SampleCode\MdeModulePkg\Include\Library\ResetSystemLib.h

The fact KabylakeSiliconPkg implements a MdeModulePkg library API introduces the dependency on MdeModulePkg. Hiding a redundant definition of the API locally does not eliminate the dependency in any meaningful way.

I think the practice of "freezing" an API with a local copy only works if the codebase is locked onto a specific stable tag in which the upstream API is not expected to change. Zhichao rightfully added the new function definition to the KabylakeSiliconPkg library class implementation because a board package consumer would expect a ResetSystemLib library class instance to be compliant with the API defined in MdeModulePkg and link the ResetSystem () function. The only problem was a set of circumstances that led to the duplicate symbol definition for ResetSystem () with PchResetLib.

So I view the task of eliminating the package dependency as a larger separate effort outside the scope of this change. But I do not agree with maintaining redundant local copies of edk2 APIs in packages in edk2-platforms.

Thanks,
Michael

> -----Original Message-----
> From: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>
> Sent: Tuesday, November 26, 2019 10:43 PM
> To: Kubacki, Michael A <michael.a.kubacki@intel.com>;
> devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> ResetSystemLib.h override
> 
> This change is introducing SiliconPkg's dependency on MdeModulePkg.
> SiliconPkg dependencies should be limited to a selected few packages and
> this seems to be an unnecessary addition to the dependency list.
> The reset interfaces are providing generic reset services and perhaps better
> suited in packages like MdePkg.
> 
> -----Original Message-----
> From: Kubacki, Michael A
> Sent: Tuesday, November 26, 2019 6:57 PM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> ResetSystemLib.h override
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375
> 
> Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that does
> not contain the prototype for ResetSystem () and ResetPlatformSpecific ().
> 
> The ResetSystemLib.h file from MdeModulePkg will be used. Any INF files
> that did not include the MdeModulePkg.dec under [Packages] were updated
> to do so.
> 
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> ---
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> ystemLib.inf               |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/Dx
> eRuntimeResetSystemLib.inf |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.
> inf                     |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSys
> temLib.inf               |  3 +-
> 
> Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libra
> ry/ResetSystemLib.h          | 62 --------------------
>  5 files changed, 8 insertions(+), 66 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRese
> tSystemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRese
> tSystemLib.inf
> index aa8877140a..46313bf35f 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRese
> tSystemLib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> +++ ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -35,6 +35,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/
> DxeRuntimeResetSystemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/
> DxeRuntimeResetSystemLib.inf
> index 6b27661603..c7fad31c71 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/
> DxeRuntimeResetSystemLib.inf
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> +++ Lib/DxeRuntimeResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -36,6 +36,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetL
> ib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetL
> ib.inf
> index b04f4006ef..29f69078a4 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetL
> ib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
> +++ ResetLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for PCH Reset Lib Pei Phase  # -# 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  # @@ -28,6 +28,7 @@
> ResetSystemLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
>  [Sources]
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetS
> ystemLib.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiReset
> SystemLib.inf
> index 18a92a6f18..3c6ff78863 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetS
> ystemLib.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> +++ ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component description file for Intel Ich7 Reset System Library.
>  #
> -# 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  # @@ -32,6 +32,7 @@
> PchCycleDecodingLib
> 
>  [Packages]
>  MdePkg/MdePkg.dec
> +MdeModulePkg/MdeModulePkg.dec
>  KabylakeSiliconPkg/SiPkg.dec
> 
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> rary/ResetSystemLib.h
> b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> rary/ResetSystemLib.h
> deleted file mode 100644
> index 75d3e15ed7..0000000000
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> rary/ResetSystemLib.h
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -/** @file
> -  System reset Library Services.  This library class defines a set of
> -  methods that reset the whole system.
> -
> -Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#ifndef __RESET_SYSTEM_LIB_H__
> -#define __RESET_SYSTEM_LIB_H__
> -
> -/**
> -  This function causes a system-wide reset (cold reset), in which
> -  all circuitry within the system returns to its initial state. This type of reset
> -  is asynchronous to system operation and operates without regard to
> -  cycle boundaries.
> -
> -  If this function returns, it means that the system does not support cold
> reset.
> -**/
> -VOID
> -EFIAPI
> -ResetCold (
> -  VOID
> -  );
> -
> -/**
> -  This function causes a system-wide initialization (warm reset), in which all
> processors
> -  are set to their initial state. Pending cycles are not corrupted.
> -
> -  If this function returns, it means that the system does not support warm
> reset.
> -**/
> -VOID
> -EFIAPI
> -ResetWarm (
> -  VOID
> -  );
> -
> -/**
> -  This function causes the system to enter a power state equivalent
> -  to the ACPI G2/S5 or G3 states.
> -
> -  If this function returns, it means that the system does not support
> shutdown reset.
> -**/
> -VOID
> -EFIAPI
> -ResetShutdown (
> -  VOID
> -  );
> -
> -/**
> -  This function causes the system to enter S3 and then wake up immediately.
> -
> -  If this function returns, it means that the system does not support S3
> feature.
> -**/
> -VOID
> -EFIAPI
> -EnterS3WithImmediateWake (
> -  VOID
> -  );
> -
> -#endif
> --
> 2.16.2.windows.1
> 


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-27 18:41     ` Kubacki, Michael A
@ 2019-11-28  0:31       ` Kubacki, Michael A
  2019-12-02  8:36         ` Chaganty, Rangasai V
  0 siblings, 1 reply; 11+ messages in thread
From: Kubacki, Michael A @ 2019-11-28  0:31 UTC (permalink / raw)
  To: Chaganty, Rangasai V, devel@edk2.groups.io
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Gao, Zhichao

Hi Sai,

I'd like to fix the VS2017 build failure asap. What would you like done to resolve this?

I would prefer to eliminate the local ResetSystemLib.h file in KabylakeSiliconPkg but I'd be happy to revise the patch series based on your suggestion.

Thanks,
Michael

> -----Original Message-----
> From: Kubacki, Michael A
> Sent: Wednesday, November 27, 2019 10:42 AM
> To: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>;
> devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> ResetSystemLib.h override
> 
> This dependency existed prior to this change (and still does exist). It was
> obfuscated in such a way that contributed to this problem.
> 
> See the previous library header path:
> 
> \Silicon\Intel\KabylakeSiliconPkg\SampleCode\MdeModulePkg\Include\Libr
> ary\ResetSystemLib.h
> 
> The fact KabylakeSiliconPkg implements a MdeModulePkg library API
> introduces the dependency on MdeModulePkg. Hiding a redundant
> definition of the API locally does not eliminate the dependency in any
> meaningful way.
> 
> I think the practice of "freezing" an API with a local copy only works if the
> codebase is locked onto a specific stable tag in which the upstream API is not
> expected to change. Zhichao rightfully added the new function definition to
> the KabylakeSiliconPkg library class implementation because a board package
> consumer would expect a ResetSystemLib library class instance to be
> compliant with the API defined in MdeModulePkg and link the ResetSystem
> () function. The only problem was a set of circumstances that led to the
> duplicate symbol definition for ResetSystem () with PchResetLib.
> 
> So I view the task of eliminating the package dependency as a larger separate
> effort outside the scope of this change. But I do not agree with maintaining
> redundant local copies of edk2 APIs in packages in edk2-platforms.
> 
> Thanks,
> Michael
> 
> > -----Original Message-----
> > From: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>
> > Sent: Tuesday, November 26, 2019 10:43 PM
> > To: Kubacki, Michael A <michael.a.kubacki@intel.com>;
> > devel@edk2.groups.io
> > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> > <nathaniel.l.desimone@intel.com>; Gao, Zhichao
> <zhichao.gao@intel.com>
> > Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> > ResetSystemLib.h override
> >
> > This change is introducing SiliconPkg's dependency on MdeModulePkg.
> > SiliconPkg dependencies should be limited to a selected few packages
> > and this seems to be an unnecessary addition to the dependency list.
> > The reset interfaces are providing generic reset services and perhaps
> > better suited in packages like MdePkg.
> >
> > -----Original Message-----
> > From: Kubacki, Michael A
> > Sent: Tuesday, November 26, 2019 6:57 PM
> > To: devel@edk2.groups.io
> > Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, Chasel
> > <chasel.chiu@intel.com>; Desimone, Nathaniel L
> > <nathaniel.l.desimone@intel.com>; Gao, Zhichao
> <zhichao.gao@intel.com>
> > Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove
> > ResetSystemLib.h override
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375
> >
> > Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that
> > does not contain the prototype for ResetSystem () and
> ResetPlatformSpecific ().
> >
> > The ResetSystemLib.h file from MdeModulePkg will be used. Any INF
> > files that did not include the MdeModulePkg.dec under [Packages] were
> > updated to do so.
> >
> > Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> > Cc: Chasel Chiu <chasel.chiu@intel.com>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> > ---
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeResetS
> > ystemLib.inf               |  3 +-
> >
> > Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLib/
> > Dx
> > eRuntimeResetSystemLib.inf |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.
> > inf                     |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiResetSys
> > temLib.inf               |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libra
> > ry/ResetSystemLib.h          | 62 --------------------
> >  5 files changed, 8 insertions(+), 66 deletions(-)
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRe
> > se
> > tSystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRe
> > se
> > tSystemLib.inf
> > index aa8877140a..46313bf35f 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRe
> > se
> > tSystemLib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/D
> > +++ xe
> > +++ ResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -35,6 +35,7 @@
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLi
> > b/
> > DxeRuntimeResetSystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLi
> > b/
> > DxeRuntimeResetSystemLib.inf
> > index 6b27661603..c7fad31c71 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLi
> > b/
> > DxeRuntimeResetSystemLib.inf
> > +++
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> > +++ Lib/DxeRuntimeResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -36,6 +36,7 @@
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchRe
> > setL
> > ib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchRe
> > setL
> > ib.inf
> > index b04f4006ef..29f69078a4 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchRe
> > setL
> > ib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiP
> > +++ ch
> > +++ ResetLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for PCH Reset Lib Pei Phase  # -#
> > 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  # @@ -28,6 +28,7 @@
> > ResetSystemLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >  [Sources]
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiRe
> > setS
> > ystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiRe
> > set
> > SystemLib.inf
> > index 18a92a6f18..3c6ff78863 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiRe
> > setS
> > ystemLib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/P
> > +++ ei
> > +++ ResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -32,6 +32,7 @@
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> >
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> >
> b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> > deleted file mode 100644
> > index 75d3e15ed7..0000000000
> > ---
> >
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> > +++ /dev/null
> > @@ -1,62 +0,0 @@
> > -/** @file
> > -  System reset Library Services.  This library class defines a set of
> > -  methods that reset the whole system.
> > -
> > -Copyright (c) 2005 - 2010, Intel Corporation. All rights
> > reserved.<BR>
> > -SPDX-License-Identifier: BSD-2-Clause-Patent
> > -
> > -**/
> > -
> > -#ifndef __RESET_SYSTEM_LIB_H__
> > -#define __RESET_SYSTEM_LIB_H__
> > -
> > -/**
> > -  This function causes a system-wide reset (cold reset), in which
> > -  all circuitry within the system returns to its initial state. This
> > type of reset
> > -  is asynchronous to system operation and operates without regard to
> > -  cycle boundaries.
> > -
> > -  If this function returns, it means that the system does not support
> > cold reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetCold (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes a system-wide initialization (warm reset), in
> > which all processors
> > -  are set to their initial state. Pending cycles are not corrupted.
> > -
> > -  If this function returns, it means that the system does not support
> > warm reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetWarm (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes the system to enter a power state equivalent
> > -  to the ACPI G2/S5 or G3 states.
> > -
> > -  If this function returns, it means that the system does not support
> > shutdown reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetShutdown (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes the system to enter S3 and then wake up
> immediately.
> > -
> > -  If this function returns, it means that the system does not support
> > S3 feature.
> > -**/
> > -VOID
> > -EFIAPI
> > -EnterS3WithImmediateWake (
> > -  VOID
> > -  );
> > -
> > -#endif
> > --
> > 2.16.2.windows.1
> >


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

* Re: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override
  2019-11-28  0:31       ` Kubacki, Michael A
@ 2019-12-02  8:36         ` Chaganty, Rangasai V
  0 siblings, 0 replies; 11+ messages in thread
From: Chaganty, Rangasai V @ 2019-12-02  8:36 UTC (permalink / raw)
  To: Kubacki, Michael A, devel@edk2.groups.io
  Cc: Chiu, Chasel, Desimone, Nathaniel L, Gao, Zhichao

Hi Michael, 
I agree on eliminating the redundant copies Edk2 APIs from Edk2Platform packages and I also think it can be done without introducing newer dependencies as indicated in my previous response.
That said, the topic of package dependencies, especially for silicon initialization code needs a broader discussion and is outside the scope of this review.
Let's take care of this change for now and address the VS2017 build issue and let's be prepared for further changes as we make progress on the package dependency discussions.


Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

Thanks,
Sai


-----Original Message-----
From: Kubacki, Michael A <michael.a.kubacki@intel.com> 
Sent: Wednesday, November 27, 2019 4:31 PM
To: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override

Hi Sai,

I'd like to fix the VS2017 build failure asap. What would you like done to resolve this?

I would prefer to eliminate the local ResetSystemLib.h file in KabylakeSiliconPkg but I'd be happy to revise the patch series based on your suggestion.

Thanks,
Michael

> -----Original Message-----
> From: Kubacki, Michael A
> Sent: Wednesday, November 27, 2019 10:42 AM
> To: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; 
> devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L 
> <nathaniel.l.desimone@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove 
> ResetSystemLib.h override
> 
> This dependency existed prior to this change (and still does exist). 
> It was obfuscated in such a way that contributed to this problem.
> 
> See the previous library header path:
> 
> \Silicon\Intel\KabylakeSiliconPkg\SampleCode\MdeModulePkg\Include\Libr
> ary\ResetSystemLib.h
> 
> The fact KabylakeSiliconPkg implements a MdeModulePkg library API 
> introduces the dependency on MdeModulePkg. Hiding a redundant 
> definition of the API locally does not eliminate the dependency in any 
> meaningful way.
> 
> I think the practice of "freezing" an API with a local copy only works 
> if the codebase is locked onto a specific stable tag in which the 
> upstream API is not expected to change. Zhichao rightfully added the 
> new function definition to the KabylakeSiliconPkg library class 
> implementation because a board package consumer would expect a 
> ResetSystemLib library class instance to be compliant with the API 
> defined in MdeModulePkg and link the ResetSystem
> () function. The only problem was a set of circumstances that led to 
> the duplicate symbol definition for ResetSystem () with PchResetLib.
> 
> So I view the task of eliminating the package dependency as a larger 
> separate effort outside the scope of this change. But I do not agree 
> with maintaining redundant local copies of edk2 APIs in packages in edk2-platforms.
> 
> Thanks,
> Michael
> 
> > -----Original Message-----
> > From: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>
> > Sent: Tuesday, November 26, 2019 10:43 PM
> > To: Kubacki, Michael A <michael.a.kubacki@intel.com>; 
> > devel@edk2.groups.io
> > Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L 
> > <nathaniel.l.desimone@intel.com>; Gao, Zhichao
> <zhichao.gao@intel.com>
> > Subject: RE: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: 
> > Remove ResetSystemLib.h override
> >
> > This change is introducing SiliconPkg's dependency on MdeModulePkg.
> > SiliconPkg dependencies should be limited to a selected few packages 
> > and this seems to be an unnecessary addition to the dependency list.
> > The reset interfaces are providing generic reset services and 
> > perhaps better suited in packages like MdePkg.
> >
> > -----Original Message-----
> > From: Kubacki, Michael A
> > Sent: Tuesday, November 26, 2019 6:57 PM
> > To: devel@edk2.groups.io
> > Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Chiu, 
> > Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L 
> > <nathaniel.l.desimone@intel.com>; Gao, Zhichao
> <zhichao.gao@intel.com>
> > Subject: [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove 
> > ResetSystemLib.h override
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2375
> >
> > Removes a stale ResetSystemLib.h override in KabylakeSiliconPkg that 
> > does not contain the prototype for ResetSystem () and
> ResetPlatformSpecific ().
> >
> > The ResetSystemLib.h file from MdeModulePkg will be used. Any INF 
> > files that did not include the MdeModulePkg.dec under [Packages] 
> > were updated to do so.
> >
> > Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> > Cc: Chasel Chiu <chasel.chiu@intel.com>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> > ---
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/DxeRese
> tS
> > ystemLib.inf               |  3 +-
> >
> > Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystemLi
> > b/
> > Dx
> > eRuntimeResetSystemLib.inf |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPchResetLib.
> > inf                     |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/PeiRese
> tSys
> > temLib.inf               |  3 +-
> >
> >
> Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Libra
> > ry/ResetSystemLib.h          | 62 --------------------
> >  5 files changed, 8 insertions(+), 66 deletions(-)
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> > Re
> > se
> > tSystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> > Re
> > se
> > tSystemLib.inf
> > index aa8877140a..46313bf35f 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib/Dxe
> > Re
> > se
> > tSystemLib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeResetSystemLib
> > +++ /D
> > +++ xe
> > +++ ResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -35,6 +35,7 @@ 
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> > Li
> > b/
> > DxeRuntimeResetSystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> > Li
> > b/
> > DxeRuntimeResetSystemLib.inf
> > index 6b27661603..c7fad31c71 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> > Li
> > b/
> > DxeRuntimeResetSystemLib.inf
> > +++
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/DxeRuntimeResetSystem
> > +++ Lib/DxeRuntimeResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -36,6 +36,7 @@ 
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
> > Re
> > setL
> > ib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
> > Re
> > setL
> > ib.inf
> > index b04f4006ef..29f69078a4 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/PeiPch
> > Re
> > setL
> > ib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiPchResetLib/Pe
> > +++ iP
> > +++ ch
> > +++ ResetLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for PCH Reset Lib Pei Phase  # -# 
> > 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  # @@ -28,6 +28,7 @@ 
> > ResetSystemLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >  [Sources]
> > diff --git
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> > Re
> > setS
> > ystemLib.inf
> > b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> > Re
> > set
> > SystemLib.inf
> > index 18a92a6f18..3c6ff78863 100644
> > ---
> > a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib/Pei
> > Re
> > setS
> > ystemLib.inf
> > +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiResetSystemLib
> > +++ /P
> > +++ ei
> > +++ ResetSystemLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  # Component description file for Intel Ich7 Reset System Library.
> >  #
> > -# 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  # @@ -32,6 +32,7 @@ 
> > PchCycleDecodingLib
> >
> >  [Packages]
> >  MdePkg/MdePkg.dec
> > +MdeModulePkg/MdeModulePkg.dec
> >  KabylakeSiliconPkg/SiPkg.dec
> >
> >
> > diff --git
> >
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> >
> b/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> > deleted file mode 100644
> > index 75d3e15ed7..0000000000
> > ---
> >
> a/Silicon/Intel/KabylakeSiliconPkg/SampleCode/MdeModulePkg/Include/Lib
> > rary/ResetSystemLib.h
> > +++ /dev/null
> > @@ -1,62 +0,0 @@
> > -/** @file
> > -  System reset Library Services.  This library class defines a set 
> > of
> > -  methods that reset the whole system.
> > -
> > -Copyright (c) 2005 - 2010, Intel Corporation. All rights 
> > reserved.<BR>
> > -SPDX-License-Identifier: BSD-2-Clause-Patent
> > -
> > -**/
> > -
> > -#ifndef __RESET_SYSTEM_LIB_H__
> > -#define __RESET_SYSTEM_LIB_H__
> > -
> > -/**
> > -  This function causes a system-wide reset (cold reset), in which
> > -  all circuitry within the system returns to its initial state. 
> > This type of reset
> > -  is asynchronous to system operation and operates without regard 
> > to
> > -  cycle boundaries.
> > -
> > -  If this function returns, it means that the system does not 
> > support cold reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetCold (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes a system-wide initialization (warm reset), 
> > in which all processors
> > -  are set to their initial state. Pending cycles are not corrupted.
> > -
> > -  If this function returns, it means that the system does not 
> > support warm reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetWarm (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes the system to enter a power state equivalent
> > -  to the ACPI G2/S5 or G3 states.
> > -
> > -  If this function returns, it means that the system does not 
> > support shutdown reset.
> > -**/
> > -VOID
> > -EFIAPI
> > -ResetShutdown (
> > -  VOID
> > -  );
> > -
> > -/**
> > -  This function causes the system to enter S3 and then wake up
> immediately.
> > -
> > -  If this function returns, it means that the system does not 
> > support
> > S3 feature.
> > -**/
> > -VOID
> > -EFIAPI
> > -EnterS3WithImmediateWake (
> > -  VOID
> > -  );
> > -
> > -#endif
> > --
> > 2.16.2.windows.1
> >



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

end of thread, other threads:[~2019-12-02  8:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-27  2:56 [edk2-platforms][PATCH V1 0/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
2019-11-27  2:56 ` [edk2-platforms][PATCH V1 1/2] KabylakeSiliconPkg: Remove ResetSystemLib.h override Kubacki, Michael A
2019-11-27  3:26   ` Chiu, Chasel
2019-11-27  4:49   ` Nate DeSimone
2019-11-27  6:42   ` Chaganty, Rangasai V
2019-11-27 18:41     ` Kubacki, Michael A
2019-11-28  0:31       ` Kubacki, Michael A
2019-12-02  8:36         ` Chaganty, Rangasai V
2019-11-27  2:56 ` [edk2-platforms][PATCH V1 2/2] KabylakeSiliconPkg: Remove redundant ResetSystem() implementation Kubacki, Michael A
2019-11-27  3:26   ` Chiu, Chasel
2019-11-27  4:49   ` Nate DeSimone

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