]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c
edk2/MdeModulePkg/Universal/BdsDxe/BootMaint/BootOption.c:
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / HwErrRecSupport.c
CommitLineData
93e3992d 1/*++\r
2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 HwErrRecSupport.c\r
15\r
16Abstract:\r
17\r
18 Set the level of support for Hardware Error Record Persistence that is\r
19 implemented by the platform.\r
20\r
21Revision History\r
22\r
23--*/\r
24\r
25#include "HwErrRecSupport.h"\r
26\r
27VOID\r
28InitializeHwErrRecSupport (\r
29 IN UINT16 HwErrRecSupportLevel\r
30 )\r
31/*++\r
32\r
33 Routine Description:\r
34 Set the HwErrRecSupport variable contains a binary UINT16 that supplies the\r
35 level of support for Hardware Error Record Persistence that is implemented\r
36 by the platform.\r
37\r
38 Arguments:\r
39 HwErrRecSupportLevel\r
40 zero value - Indicates that the platform implements no support for\r
41 Hardware Error Record Persistence.\r
42 non-zero value - Indicates that the platform implements Hardware Error\r
43 Record Persistence.\r
44\r
45 Returns:\r
46\r
47--*/\r
48{\r
49 EFI_STATUS Status;\r
50\r
51 Status = gRT->SetVariable (\r
52 L"HwErrRecSupport",\r
53 &gEfiGlobalVariableGuid,\r
54 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
55 sizeof (UINT16),\r
56 &HwErrRecSupportLevel\r
57 );\r
58 if (EFI_ERROR (Status)) {\r
59 DEBUG ((EFI_D_ERROR, "HwErrRecSupport: Can not set the variable\n"));\r
60 }\r
61\r
62}\r