]>
Commit | Line | Data |
---|---|---|
f4cd24da RN |
1 | /** @file\r |
2 | Set the level of support for Hardware Error Record Persistence that is\r | |
3 | implemented by the platform.\r | |
4 | \r | |
5 | Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include "HwErrRecSupport.h"\r | |
17 | \r | |
18 | /**\r | |
19 | Set the HwErrRecSupport variable contains a binary UINT16 that supplies the\r | |
20 | level of support for Hardware Error Record Persistence that is implemented\r | |
21 | by the platform.\r | |
22 | \r | |
23 | **/\r | |
24 | VOID\r | |
25 | InitializeHwErrRecSupport (\r | |
26 | VOID\r | |
27 | )\r | |
28 | {\r | |
29 | EFI_STATUS Status;\r | |
30 | UINT16 HardwareErrorRecordLevel;\r | |
31 | \r | |
32 | HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);\r | |
33 | \r | |
34 | if (HardwareErrorRecordLevel != 0) {\r | |
35 | //\r | |
36 | // If level value equal 0, no need set to 0 to variable area because UEFI specification\r | |
37 | // define same behavior between no value or 0 value for L"HwErrRecSupport".\r | |
38 | //\r | |
39 | Status = gRT->SetVariable (\r | |
40 | L"HwErrRecSupport",\r | |
41 | &gEfiGlobalVariableGuid,\r | |
42 | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r | |
43 | sizeof (UINT16),\r | |
44 | &HardwareErrorRecordLevel\r | |
45 | );\r | |
46 | ASSERT_EFI_ERROR(Status);\r | |
47 | }\r | |
48 | }\r |