VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c

Last change on this file was 99404, checked in by vboxsync, 19 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1/** @file
2 Set the level of support for Hardware Error Record Persistence that is
3 implemented by the platform.
4
5Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
6SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#include "HwErrRecSupport.h"
11
12/**
13 Set the HwErrRecSupport variable contains a binary UINT16 that supplies the
14 level of support for Hardware Error Record Persistence that is implemented
15 by the platform.
16
17**/
18VOID
19InitializeHwErrRecSupport (
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}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette