]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c
Correct a typo: Change the type of the 4th parameter of EFI_DRIVER_HEALTH_PROTOCOL...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / HwErrRecSupport.c
CommitLineData
5c08e117 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
e1e91b73 5Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
180a5a35 6This program and the accompanying materials\r
5c08e117 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
5c08e117 23**/\r
24VOID\r
25InitializeHwErrRecSupport (\r
a2b35995 26 VOID\r
5c08e117 27 )\r
28{\r
e1e91b73
SZ
29 EFI_STATUS Status;\r
30 UINT16 HardwareErrorRecordLevel;\r
a2b35995 31 \r
32 HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);\r
33 \r
34 if (HardwareErrorRecordLevel != 0) {\r
35 //\r
e1e91b73
SZ
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
a2b35995 38 //\r
e1e91b73
SZ
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
5c08e117 47 }\r
5c08e117 48}\r