]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Library / AuthVariableLibNull / AuthVariableLibNull.c
1 /** @file
2 Implements NULL authenticated variable services.
3
4 Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <Library/AuthVariableLib.h>
10 #include <Library/DebugLib.h>
11
12 /**
13 Initialization for authenticated varibale services.
14 If this initialization returns error status, other APIs will not work
15 and expect to be not called then.
16
17 @param[in] AuthVarLibContextIn Pointer to input auth variable lib context.
18 @param[out] AuthVarLibContextOut Pointer to output auth variable lib context.
19
20 @retval EFI_SUCCESS Function successfully executed.
21 @retval EFI_INVALID_PARAMETER If AuthVarLibContextIn == NULL or AuthVarLibContextOut == NULL.
22 @retval EFI_OUT_OF_RESOURCES Fail to allocate enough resource.
23 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
24
25 **/
26 EFI_STATUS
27 EFIAPI
28 AuthVariableLibInitialize (
29 IN AUTH_VAR_LIB_CONTEXT_IN *AuthVarLibContextIn,
30 OUT AUTH_VAR_LIB_CONTEXT_OUT *AuthVarLibContextOut
31 )
32 {
33 //
34 // Do nothing, just return EFI_UNSUPPORTED.
35 //
36 return EFI_UNSUPPORTED;
37 }
38
39 /**
40 Process variable with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS set.
41
42 @param[in] VariableName Name of the variable.
43 @param[in] VendorGuid Variable vendor GUID.
44 @param[in] Data Data pointer.
45 @param[in] DataSize Size of Data.
46 @param[in] Attributes Attribute value of the variable.
47
48 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
49 defined by the Attributes.
50 @retval EFI_INVALID_PARAMETER Invalid parameter.
51 @retval EFI_WRITE_PROTECTED Variable is write-protected.
52 @retval EFI_OUT_OF_RESOURCES There is not enough resource.
53 @retval EFI_SECURITY_VIOLATION The variable is with EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS
54 set, but the AuthInfo does NOT pass the validation
55 check carried out by the firmware.
56 @retval EFI_UNSUPPORTED Unsupported to process authenticated variable.
57
58 **/
59 EFI_STATUS
60 EFIAPI
61 AuthVariableLibProcessVariable (
62 IN CHAR16 *VariableName,
63 IN EFI_GUID *VendorGuid,
64 IN VOID *Data,
65 IN UINTN DataSize,
66 IN UINT32 Attributes
67 )
68 {
69 ASSERT (FALSE);
70 return EFI_UNSUPPORTED;
71 }