]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/PlatformVarCleanupLib.h
bf0ad06be78df318847b99666a2276dc772600e2
[mirror_edk2.git] / MdeModulePkg / Include / Library / PlatformVarCleanupLib.h
1 /** @file
2 The library class provides platform variable cleanup services.
3
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _PLATFORM_VARIABLE_CLEANUP_LIB_
10 #define _PLATFORM_VARIABLE_CLEANUP_LIB_
11
12 #include <Guid/VarErrorFlag.h>
13
14 typedef enum {
15 VarCleanupAll,
16 VarCleanupManually,
17 VarCleanupMax,
18 } VAR_CLEANUP_TYPE;
19
20 /**
21 Get last boot variable error flag.
22
23 @return Last boot variable error flag.
24
25 **/
26 VAR_ERROR_FLAG
27 EFIAPI
28 GetLastBootVarErrorFlag (
29 VOID
30 );
31
32 /**
33 Platform variable cleanup.
34
35 @param[in] Flag Variable error flag.
36 @param[in] Type Variable cleanup type.
37 If it is VarCleanupManually, the interface must be called after console connected.
38
39 @retval EFI_SUCCESS No error or error processed.
40 @retval EFI_UNSUPPORTED The specified Flag or Type is not supported.
41 For example, system error may be not supported to process and Platform should have mechanism to reset system to manufacture mode.
42 Another, if system and user variables are wanted to be distinguished to process, the interface must be called after EndOfDxe.
43 @retval EFI_OUT_OF_RESOURCES Not enough resource to process the error.
44 @retval EFI_INVALID_PARAMETER The specified Flag or Type is an invalid value.
45 @retval Others Other failure occurs.
46
47 **/
48 EFI_STATUS
49 EFIAPI
50 PlatformVarCleanup (
51 IN VAR_ERROR_FLAG Flag,
52 IN VAR_CLEANUP_TYPE Type
53 );
54
55 #endif
56