2 Set the level of support for Hardware Error Record Persistence that is
3 implemented by the platform.
5 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "HwErrRecSupport.h"
13 Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
14 level of support for Hardware Error Record Persistence that is implemented
19 InitializeHwErrRecSupport (
24 UINT16 HardwareErrorRecordLevel
;
26 HardwareErrorRecordLevel
= PcdGet16 (PcdHardwareErrorRecordLevel
);
28 if (HardwareErrorRecordLevel
!= 0) {
30 // If level value equal 0, no need set to 0 to variable area because UEFI specification
31 // define same behavior between no value or 0 value for L"HwErrRecSupport".
33 Status
= gRT
->SetVariable (
35 &gEfiGlobalVariableGuid
,
36 EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
| EFI_VARIABLE_NON_VOLATILE
,
38 &HardwareErrorRecordLevel
40 ASSERT_EFI_ERROR(Status
);