]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / HwErrRecSupport.c
CommitLineData
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 5Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
f4cd24da
RN
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT 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
24VOID\r
25InitializeHwErrRecSupport (\r
26 VOID\r
27 )\r
28{\r
29 EFI_STATUS Status;\r
30 UINT16 HardwareErrorRecordLevel;\r
d1102dba 31\r
f4cd24da 32 HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);\r
d1102dba 33\r
f4cd24da
RN
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