Home | History | Annotate | Download | only in Library
      1 /** @file
      2   The library class provides platform variable cleanup services.
      3 
      4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
      5 This program and the accompanying materials
      6 are licensed and made available under the terms and conditions of the BSD License
      7 which accompanies this distribution.  The full text of the license may be found at
      8 http://opensource.org/licenses/bsd-license.php
      9 
     10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13 **/
     14 
     15 #ifndef _PLATFORM_VARIABLE_CLEANUP_LIB_
     16 #define _PLATFORM_VARIABLE_CLEANUP_LIB_
     17 
     18 #include <Guid/VarErrorFlag.h>
     19 
     20 typedef enum {
     21   VarCleanupAll,
     22   VarCleanupManually,
     23   VarCleanupMax,
     24 } VAR_CLEANUP_TYPE;
     25 
     26 /**
     27   Get last boot variable error flag.
     28 
     29   @return   Last boot variable error flag.
     30 
     31 **/
     32 VAR_ERROR_FLAG
     33 EFIAPI
     34 GetLastBootVarErrorFlag (
     35   );
     36 
     37 /**
     38   Platform variable cleanup.
     39 
     40   @param[in] Flag                   Variable error flag.
     41   @param[in] Type                   Variable cleanup type.
     42                                     If it is VarCleanupManually, the interface must be called after console connected.
     43 
     44   @retval EFI_SUCCESS               No error or error processed.
     45   @retval EFI_UNSUPPORTED           The specified Flag or Type is not supported.
     46                                     For example, system error may be not supported to process and Platform should have mechanism to reset system to manufacture mode.
     47                                     Another, if system and user variables are wanted to be distinguished to process, the interface must be called after EndOfDxe.
     48   @retval EFI_OUT_OF_RESOURCES      Not enough resource to process the error.
     49   @retval EFI_INVALID_PARAMETER     The specified Flag or Type is an invalid value.
     50   @retval Others                    Other failure occurs.
     51 
     52 **/
     53 EFI_STATUS
     54 EFIAPI
     55 PlatformVarCleanup (
     56   IN VAR_ERROR_FLAG     Flag,
     57   IN VAR_CLEANUP_TYPE   Type
     58   );
     59 
     60 #endif
     61 
     62