]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PcAtChipsetPkg: Update ResetSystemLib with PCDs
authorLiming Gao <liming.gao@intel.com>
Thu, 23 Jun 2016 09:53:57 +0000 (17:53 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 28 Jun 2016 02:09:02 +0000 (10:09 +0800)
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.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf

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