summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-26 08:19:38 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-26 08:19:38 +0000
commita2b35995cac983b676296fcb95fde0e9121319f6 (patch)
treed34e1e44517156aa0bdb0a2e3395e6521dafedde
parent0b845260565e2fd00d6089977835ee7e02e07235 (diff)
downloadedk2-platforms-a2b35995cac983b676296fcb95fde0e9121319f6.tar.xz
1, Retired PCD PcdSupportHardwareErrorRecord, because as UEFI specification said, if PcdHardwareErrorRecordLevel is 0, platform does not provide feature of hardware error record.
2, Move PcdHardwareErrorRecordLevel to IntelFrameworkModulePkg 3, Change PCD type to dynamic, Platform integrator need set this PCD type as HII type PCD mapped to variable L"HwErrRecSupport". git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7713 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec4
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf3
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c5
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c33
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.h9
5 files changed, 21 insertions, 33 deletions
diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
index 3fe2e35d3a..c9b72e5dd8 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
@@ -111,3 +111,7 @@
## Timeout value for displaying progressing bar in before boot OS.
# According to UEFI 2.0 spec, it should treat the Timeout value as 0xffff.
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x40000001
+
+ ## Error level for hardware recorder. If value 0, platform does not support feature of hardware error record.
+ # This PCD should be set as HII type PCD by platform integrator mapped to variable L"HwErrRecSupport"
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|0|UINT16|0x40000002
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
index cd89b77eab..d009977952 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -160,7 +160,6 @@
[FeaturePcd.common]
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate
- gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
[Pcd.common]
@@ -168,7 +167,7 @@
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
- gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index 55ea372892..ac37f10529 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -313,9 +313,8 @@ BdsEntry (
PERF_START (0, "PlatformBds", "BDS", 0);
PlatformBdsInit (PrivateData);
- if (FeaturePcdGet (PcdSupportHardwareErrorRecord)) {
- InitializeHwErrRecSupport (PcdGet16 (PcdHardwareErrorRecordLevel));
- }
+ InitializeHwErrRecSupport();
+
//
// bugbug: platform specific code
// Initialize the platform specific string and language
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c b/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c
index 3b48c370ce..5c333697b3 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c
@@ -20,30 +20,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
level of support for Hardware Error Record Persistence that is implemented
by the platform.
-
- @param HwErrRecSupportLevel
- zero value: Indicates that the platform implements no support for
- Hardware Error Record Persistence.
- non-zero value: Indicates that the platform implements Hardware Error
- Record Persistence.
-
**/
VOID
InitializeHwErrRecSupport (
- IN UINT16 HwErrRecSupportLevel
+ VOID
)
{
- EFI_STATUS Status;
-
- Status = gRT->SetVariable (
- L"HwErrRecSupport",
- &gEfiGlobalVariableGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- sizeof (UINT16),
- &HwErrRecSupportLevel
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "HwErrRecSupport: Can not set the variable\n"));
+ UINT16 HardwareErrorRecordLevel;
+
+ HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);
+
+ if (HardwareErrorRecordLevel != 0) {
+ //
+ // Set original value again to make sure this value is stored into variable
+ // area but not PCD database.
+ // if level value equal 0, no need set to 0 to variable area because UEFI specification
+ // define same behavior between no value or 0 value for L"HwErrRecSupport"
+ //
+ PcdSet16 (PcdHardwareErrorRecordLevel, HardwareErrorRecordLevel);
}
-
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.h b/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.h
index 1926839c6f..ea5e4e7beb 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.h
@@ -23,17 +23,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
level of support for Hardware Error Record Persistence that is implemented
by the platform.
-
- @param HwErrRecSupportLevel
- zero value - Indicates that the platform implements no support for
- Hardware Error Record Persistence.
- non-zero value - Indicates that the platform implements Hardware Error
- Record Persistence.
-
**/
VOID
InitializeHwErrRecSupport (
- IN UINT16 HwErrRecSupportLevel
+ VOID
);
#endif