]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[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
9d510e61 6SPDX-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
18VOID\r
19InitializeHwErrRecSupport (\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