Re: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Mudusuru, Giri P
Thanks for clarification Liming.

Reviewed-by: Giri P Mudusuru 
<giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>

From: Gao, Liming
Sent: Thursday, June 23, 2016 9:11 PM
To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

Giri:
  Thanks for your comment. I thought this option before. For this library 
implementation, its WarmReset is same to CodeReset. So, I just introduce one 
PCD to configure it. If this library is expected to have the different 
WarmReset, I can add warm reset value later.

Thanks
Liming
From: Mudusuru, Giri P
Sent: Thursday, June 23, 2016 11:12 PM
To: Gao, Liming <liming@intel.com<mailto:liming@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: RE: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

Looks good to me. Can you also use the PCD control for Warm and add new PCD for 
warm reset value in separate patch?

Reviewed-by: Giri P Mudusuru

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs
>
> Update ResetSystemLib with PCDs for Reset Control Register and Value
> instead of hard code 0x64 and 0xFE.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao
> ---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c | 6 +++---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> index 6a9dd71..b3b2efb 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> Reset System Library functions for PCAT platforms
>
> - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.

> + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -32,7 +32,7 @@ ResetCold (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> @@ -48,7 +48,7 @@ ResetWarm (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> index c994827..2384efa 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> @@ -1,7 +1,7 @@
> ## @file
> # Library instance for ResetSystem library class for PCAT systems
> #
> -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.

> +# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> # This program and the accompanying materials
> # are licensed and made available under the terms and conditions of the BSD
> License
> # which accompanies this distribution. The full text of the license may be 
> found
> at
> @@ -32,8 +32,12 @@
>
> [Packages]
> MdePkg/MdePkg.dec
> + PcAtChipsetPkg/PcAtChipsetPkg.dec
>
> [LibraryClasses]
> DebugLib
> IoLib
>
> +[Pcd]
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister ## CONSUMES
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset ##
> CONSUMES
> --
> 2.8.0.windows.1
>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Gao, Liming
Giri:
  Thanks for your comment. I thought this option before. For this library 
implementation, its WarmReset is same to CodeReset. So, I just introduce one 
PCD to configure it. If this library is expected to have the different 
WarmReset, I can add warm reset value later.

Thanks
Liming
From: Mudusuru, Giri P
Sent: Thursday, June 23, 2016 11:12 PM
To: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

Looks good to me. Can you also use the PCD control for Warm and add new PCD for 
warm reset value in separate patch?

Reviewed-by: Giri P Mudusuru

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs
>
> Update ResetSystemLib with PCDs for Reset Control Register and Value
> instead of hard code 0x64 and 0xFE.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao
> ---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c | 6 +++---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> index 6a9dd71..b3b2efb 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> Reset System Library functions for PCAT platforms
>
> - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.

> + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -32,7 +32,7 @@ ResetCold (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> @@ -48,7 +48,7 @@ ResetWarm (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> index c994827..2384efa 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> @@ -1,7 +1,7 @@
> ## @file
> # Library instance for ResetSystem library class for PCAT systems
> #
> -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.

> +# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> # This program and the accompanying materials
> # are licensed and made available under the terms and conditions of the BSD
> License
> # which accompanies this distribution. The full text of the license may be 
> found
> at
> @@ -32,8 +32,12 @@
>
> [Packages]
> MdePkg/MdePkg.dec
> + PcAtChipsetPkg/PcAtChipsetPkg.dec
>
> [LibraryClasses]
> DebugLib
> IoLib
>
> +[Pcd]
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister ## CONSUMES
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset ##
> CONSUMES
> --
> 2.8.0.windows.1
>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Mudusuru, Giri P
Looks good to me. Can you also use the PCD control for Warm and add new PCD for 
warm reset value in separate patch?

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs
> 
> Update ResetSystemLib with PCDs for Reset Control Register and Value
> instead of hard code 0x64 and 0xFE.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c   | 6 +++---
>  PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> index 6a9dd71..b3b2efb 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>Reset System Library functions for PCAT platforms
> 
> -  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
> +  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
>which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -32,7 +32,7 @@ ResetCold (
>VOID
>)
>  {
> -  IoWrite8 (0x64, 0xfe);
> +  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
>  }
> 
>  /**
> @@ -48,7 +48,7 @@ ResetWarm (
>VOID
>)
>  {
> -  IoWrite8 (0x64, 0xfe);
> +  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
>  }
> 
>  /**
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> index c994827..2384efa 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #   Library instance for ResetSystem library class for PCAT systems
>  #
> -#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the BSD
> License
>  #  which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -32,8 +32,12 @@
> 
>  [Packages]
>MdePkg/MdePkg.dec
> +  PcAtChipsetPkg/PcAtChipsetPkg.dec
> 
>  [LibraryClasses]
>DebugLib
>IoLib
> 
> +[Pcd]
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister## CONSUMES
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset  ##
> CONSUMES
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Liming Gao
Update ResetSystemLib with PCDs for Reset Control Register and Value
instead of hard code 0x64 and 0xFE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao 
---
 PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c   | 6 +++---
 PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c 
b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
index 6a9dd71..b3b2efb 100644
--- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -1,7 +1,7 @@
 /** @file
   Reset System Library functions for PCAT platforms
 
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
   which accompanies this distribution.  The full text of the license may be 
found at
@@ -32,7 +32,7 @@ ResetCold (
   VOID
   )
 {
-  IoWrite8 (0x64, 0xfe);
+  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8 
(PcdResetControlValueColdReset));
 }
 
 /**
@@ -48,7 +48,7 @@ ResetWarm (
   VOID
   )
 {
-  IoWrite8 (0x64, 0xfe);
+  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8 
(PcdResetControlValueColdReset));
 }
 
 /**
diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf 
b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
index c994827..2384efa 100644
--- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
+++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 #   Library instance for ResetSystem library class for PCAT systems
 #
-#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
 #  which accompanies this distribution.  The full text of the license may be 
found at
@@ -32,8 +32,12 @@
 
 [Packages]
   MdePkg/MdePkg.dec
+  PcAtChipsetPkg/PcAtChipsetPkg.dec
 
 [LibraryClasses]
   DebugLib
   IoLib
 
+[Pcd]
+  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister## CONSUMES
+  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset  ## CONSUMES
-- 
2.8.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel