]>
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 | |
d1102dba | 5 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
f4cd24da RN |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #include "HwErrRecSupport.h"\r | |
11 | \r | |
12 | /**\r | |
13 | Set the HwErrRecSupport variable contains a binary UINT16 that supplies the\r | |
14 | level of support for Hardware Error Record Persistence that is implemented\r | |
15 | by the platform.\r | |
16 | \r | |
17 | **/\r | |
18 | VOID\r | |
19 | InitializeHwErrRecSupport (\r | |
20 | VOID\r | |
21 | )\r | |
22 | {\r | |
1436aea4 MK |
23 | EFI_STATUS Status;\r |
24 | UINT16 HardwareErrorRecordLevel;\r | |
d1102dba | 25 | \r |
f4cd24da | 26 | HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);\r |
d1102dba | 27 | \r |
f4cd24da RN |
28 | if (HardwareErrorRecordLevel != 0) {\r |
29 | //\r | |
30 | // If level value equal 0, no need set to 0 to variable area because UEFI specification\r | |
31 | // define same behavior between no value or 0 value for L"HwErrRecSupport".\r | |
32 | //\r | |
33 | Status = gRT->SetVariable (\r | |
34 | L"HwErrRecSupport",\r | |
35 | &gEfiGlobalVariableGuid,\r | |
36 | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r | |
37 | sizeof (UINT16),\r | |
38 | &HardwareErrorRecordLevel\r | |
39 | );\r | |
1436aea4 | 40 | ASSERT_EFI_ERROR (Status);\r |
f4cd24da RN |
41 | }\r |
42 | }\r |