summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2016-06-23 17:53:57 +0800
committerLiming Gao <liming.gao@intel.com>2016-06-28 10:09:02 +0800
commit631c942726640615d53e4a358c078bb915e1bdd4 (patch)
tree297c21fd0168cb7b3c967c6fcea1095bc6a2d5ee /PcAtChipsetPkg
parenta38b89c725429d04d3e9c93ab6d507a8dbdaad0f (diff)
downloadedk2-631c942726640615d53e4a358c078bb915e1bdd4.tar.gz
edk2-631c942726640615d53e4a358c078bb915e1bdd4.tar.bz2
edk2-631c942726640615d53e4a358c078bb915e1bdd4.zip
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.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Diffstat (limited to 'PcAtChipsetPkg')
-rw-r--r--PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c6
-rw-r--r--PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf6
2 files changed, 8 insertions, 4 deletions
diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
index 6a9dd71b00..b3b2efbe35 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.<BR>
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
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 c994827c2b..2384efaae2 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.<BR>
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
# 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