TianoCore EDK2 master
Loading...
Searching...
No Matches
HwErrRecSupport.c
Go to the documentation of this file.
1
10#include "HwErrRecSupport.h"
11
18VOID
20 VOID
21 )
22{
23 EFI_STATUS Status;
24 UINT16 HardwareErrorRecordLevel;
25
26 HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel);
27
28 if (HardwareErrorRecordLevel != 0) {
29 //
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".
32 //
33 Status = gRT->SetVariable (
34 L"HwErrRecSupport",
35 &gEfiGlobalVariableGuid,
36 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
37 sizeof (UINT16),
38 &HardwareErrorRecordLevel
39 );
40 ASSERT_EFI_ERROR (Status);
41 }
42}
VOID InitializeHwErrRecSupport(VOID)
EFI_RUNTIME_SERVICES * gRT
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define PcdGet16(TokenName)
Definition: PcdLib.h:349
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_VARIABLE_NON_VOLATILE