public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH V1] KabylakeOpenBoardPkg: Implement the PEI Reset Services
@ 2021-07-13  9:26 Nate DeSimone
  2021-07-21  4:16 ` Chiu, Chasel
  0 siblings, 1 reply; 2+ messages in thread
From: Nate DeSimone @ 2021-07-13  9:26 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Jeremy Soller, Michael Kubacki, Benjamin Doron

This change implements the ResetSystem and ResetSystem2
PEI services for KabylakeRvp3 and GalagoPro3. The
invocation of PchInitializeReset() was missing from
BoardInitLib.

Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Jeremy Soller <jeremy@system76.com>
Cc: Michael Kubacki <Michael.Kubacki@microsoft.com>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
---
 .../Library/BoardInitLib/PeiBoardInitPreMemLib.inf  |  3 ++-
 .../BoardInitLib/PeiGalagoPro3InitPreMemLib.c       |  8 +++++++-
 .../BoardInitLib/PeiMultiBoardInitPreMemLib.inf     |  3 ++-
 .../Library/BoardInitLib/PeiBoardInitPreMemLib.inf  |  3 ++-
 .../BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c     | 13 +++++++++++--
 .../BoardInitLib/PeiMultiBoardInitPreMemLib.inf     |  3 ++-
 6 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
index e4b783684f..d6c91cd2b9 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component information file for PEI GalagoPro3 Board Init Pre-Mem Library
 #
-# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2021 Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -22,6 +22,7 @@
   MemoryAllocationLib
   PcdLib
   SiliconInitLib
+  PchResetLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiGalagoPro3InitPreMemLib.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiGalagoPro3InitPreMemLib.c
index ca32ab2514..6bf77a2af0 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiGalagoPro3InitPreMemLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiGalagoPro3InitPreMemLib.c
@@ -1,7 +1,7 @@
 /** @file
   System 76 GalagoPro3 board pre-memory initialization.
 
-Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -209,6 +209,12 @@ GalagoPro3BoardInitBeforeMemoryInit (
   ///
   SiliconInit ();
 
+  //
+  // Install PCH RESET PPI and EFI RESET2 PeiService
+  //
+  Status = PchInitializeReset ();
+  ASSERT_EFI_ERROR (Status);
+
   return EFI_SUCCESS;
 }
 
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
index d866f59338..fe31f42135 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component information file for PEI GalagoPro3 Board Init Pre-Mem Library
 #
-# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2021 Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -24,6 +24,7 @@
   PcdLib
   SiliconInitLib
   MultiBoardInitSupportLib
+  PchResetLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
index d0cdba666f..850fc51418 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component information file for PEI KabylakeRvp3 Board Init Pre-Mem Library
 #
-# Copyright (c) 2017 - 2020 Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2021 Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -23,6 +23,7 @@
   PcdLib
   SiliconInitLib
   EcLib
+  PchResetLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c
index 8f2e036356..d34b0be3c7 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c
@@ -1,6 +1,6 @@
 /** @file
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -28,6 +28,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <SioRegs.h>
 #include <Library/PchPcrLib.h>
 #include <Library/SiliconInitLib.h>
+#include <Library/PchResetLib.h>
 
 #include "PeiKabylakeRvp3InitLib.h"
 
@@ -282,6 +283,8 @@ KabylakeRvp3BoardInitBeforeMemoryInit (
   VOID
   )
 {
+  EFI_STATUS    Status;
+
   if (LibPcdGetSku () == BoardIdKabyLakeYLpddr3Rvp3) {
     KabylakeRvp3InitPreMem ();
   } else if (LibPcdGetSku () == BoardIdSkylakeRvp3) {
@@ -297,12 +300,18 @@ KabylakeRvp3BoardInitBeforeMemoryInit (
 
   GpioInitPreMem ();
   SioInit ();
-    
+
   ///
   /// Do basic PCH init
   ///
   SiliconInit ();
 
+  //
+  // Install PCH RESET PPI and EFI RESET2 PeiService
+  //
+  Status = PchInitializeReset ();
+  ASSERT_EFI_ERROR (Status);
+
   return EFI_SUCCESS;
 }
 
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
index a51712ac34..23fe6b6f03 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # Component information file for PEI KabylakeRvp3 Board Init Pre-Mem Library
 #
-# Copyright (c) 2017 - 2020 Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2021 Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -25,6 +25,7 @@
   SiliconInitLib
   MultiBoardInitSupportLib
   EcLib
+  PchResetLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.27.0.windows.1


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

* Re: [edk2-platforms][PATCH V1] KabylakeOpenBoardPkg: Implement the PEI Reset Services
  2021-07-13  9:26 [edk2-platforms][PATCH V1] KabylakeOpenBoardPkg: Implement the PEI Reset Services Nate DeSimone
@ 2021-07-21  4:16 ` Chiu, Chasel
  0 siblings, 0 replies; 2+ messages in thread
From: Chiu, Chasel @ 2021-07-21  4:16 UTC (permalink / raw)
  To: Desimone, Nathaniel L, devel@edk2.groups.io
  Cc: Jeremy Soller, Michael Kubacki, Benjamin Doron


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


> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Tuesday, July 13, 2021 5:27 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Jeremy Soller
> <jeremy@system76.com>; Michael Kubacki <Michael.Kubacki@microsoft.com>;
> Benjamin Doron <benjamin.doron00@gmail.com>
> Subject: [edk2-platforms][PATCH V1] KabylakeOpenBoardPkg: Implement the
> PEI Reset Services
> 
> This change implements the ResetSystem and ResetSystem2 PEI services for
> KabylakeRvp3 and GalagoPro3. The invocation of PchInitializeReset() was
> missing from BoardInitLib.
> 
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Jeremy Soller <jeremy@system76.com>
> Cc: Michael Kubacki <Michael.Kubacki@microsoft.com>
> Cc: Benjamin Doron <benjamin.doron00@gmail.com>
> ---
>  .../Library/BoardInitLib/PeiBoardInitPreMemLib.inf  |  3 ++-
>  .../BoardInitLib/PeiGalagoPro3InitPreMemLib.c       |  8 +++++++-
>  .../BoardInitLib/PeiMultiBoardInitPreMemLib.inf     |  3 ++-
>  .../Library/BoardInitLib/PeiBoardInitPreMemLib.inf  |  3 ++-
>  .../BoardInitLib/PeiKabylakeRvp3InitPreMemLib.c     | 13 +++++++++++--
>  .../BoardInitLib/PeiMultiBoardInitPreMemLib.inf     |  3 ++-
>  6 files changed, 26 insertions(+), 7 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiB
> oardInitPreMemLib.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiB
> oardInitPreMemLib.inf
> index e4b783684f..d6c91cd2b9 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiB
> oardInitPreMemLib.inf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLi
> +++ b/PeiBoardInitPreMemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component information file for PEI GalagoPro3 Board Init Pre-Mem Library  #
> -# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2019 - 2021 Intel Corporation. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -22,6 +22,7 @@
>    MemoryAllocationLib
>    PcdLib
>    SiliconInitLib
> +  PchResetLib
> 
>  [Packages]
>    MinPlatformPkg/MinPlatformPkg.dec
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiG
> alagoPro3InitPreMemLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiG
> alagoPro3InitPreMemLib.c
> index ca32ab2514..6bf77a2af0 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiG
> alagoPro3InitPreMemLib.c
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLi
> +++ b/PeiGalagoPro3InitPreMemLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>    System 76 GalagoPro3 board pre-memory initialization.
> 
> -Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -209,6 +209,12 @@ GalagoPro3BoardInitBeforeMemoryInit (
>    ///
>    SiliconInit ();
> 
> +  //
> +  // Install PCH RESET PPI and EFI RESET2 PeiService  //  Status =
> + PchInitializeReset ();  ASSERT_EFI_ERROR (Status);
> +
>    return EFI_SUCCESS;
>  }
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/Pei
> MultiBoardInitPreMemLib.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/Pei
> MultiBoardInitPreMemLib.inf
> index d866f59338..fe31f42135 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/Pei
> MultiBoardInitPreMemLib.inf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLi
> +++ b/PeiMultiBoardInitPreMemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component information file for PEI GalagoPro3 Board Init Pre-Mem Library  #
> -# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2019 - 2021 Intel Corporation. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,6 +24,7 @@
>    PcdLib
>    SiliconInitLib
>    MultiBoardInitSupportLib
> +  PchResetLib
> 
>  [Packages]
>    MinPlatformPkg/MinPlatformPkg.dec
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iBoardInitPreMemLib.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iBoardInitPreMemLib.inf
> index d0cdba666f..850fc51418 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iBoardInitPreMemLib.inf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInit
> +++ Lib/PeiBoardInitPreMemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component information file for PEI KabylakeRvp3 Board Init Pre-Mem Library
> # -# Copyright (c) 2017 - 2020 Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2017 - 2021 Intel Corporation. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -23,6 +23,7 @@
>    PcdLib
>    SiliconInitLib
>    EcLib
> +  PchResetLib
> 
>  [Packages]
>    MinPlatformPkg/MinPlatformPkg.dec
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iKabylakeRvp3InitPreMemLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iKabylakeRvp3InitPreMemLib.c
> index 8f2e036356..d34b0be3c7 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iKabylakeRvp3InitPreMemLib.c
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInit
> +++ Lib/PeiKabylakeRvp3InitPreMemLib.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -28,6 +28,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
> <SioRegs.h>  #include <Library/PchPcrLib.h>  #include <Library/SiliconInitLib.h>
> +#include <Library/PchResetLib.h>
> 
>  #include "PeiKabylakeRvp3InitLib.h"
> 
> @@ -282,6 +283,8 @@ KabylakeRvp3BoardInitBeforeMemoryInit (
>    VOID
>    )
>  {
> +  EFI_STATUS    Status;
> +
>    if (LibPcdGetSku () == BoardIdKabyLakeYLpddr3Rvp3) {
>      KabylakeRvp3InitPreMem ();
>    } else if (LibPcdGetSku () == BoardIdSkylakeRvp3) { @@ -297,12 +300,18 @@
> KabylakeRvp3BoardInitBeforeMemoryInit (
> 
>    GpioInitPreMem ();
>    SioInit ();
> -
> +
>    ///
>    /// Do basic PCH init
>    ///
>    SiliconInit ();
> 
> +  //
> +  // Install PCH RESET PPI and EFI RESET2 PeiService  //  Status =
> + PchInitializeReset ();  ASSERT_EFI_ERROR (Status);
> +
>    return EFI_SUCCESS;
>  }
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iMultiBoardInitPreMemLib.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iMultiBoardInitPreMemLib.inf
> index a51712ac34..23fe6b6f03 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInitLib/Pe
> iMultiBoardInitPreMemLib.inf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardInit
> +++ Lib/PeiMultiBoardInitPreMemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  # Component information file for PEI KabylakeRvp3 Board Init Pre-Mem Library
> # -# Copyright (c) 2017 - 2020 Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2017 - 2021 Intel Corporation. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -25,6 +25,7 @@
>    SiliconInitLib
>    MultiBoardInitSupportLib
>    EcLib
> +  PchResetLib
> 
>  [Packages]
>    MinPlatformPkg/MinPlatformPkg.dec
> --
> 2.27.0.windows.1


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

end of thread, other threads:[~2021-07-21  4:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-13  9:26 [edk2-platforms][PATCH V1] KabylakeOpenBoardPkg: Implement the PEI Reset Services Nate DeSimone
2021-07-21  4:16 ` Chiu, Chasel

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