]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c
3 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions
7 of the BSD License which accompanies this distribution. The
8 full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/DebugLib.h>
20 This function will save confidential information to lockbox.
22 @param Guid the guid to identify the confidential information
23 @param Buffer the address of the confidential information
24 @param Length the length of the confidential information
26 @retval RETURN_SUCCESS the information is saved successfully.
27 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0
28 @retval RETURN_ALREADY_STARTED the requested GUID already exist.
29 @retval RETURN_OUT_OF_RESOURCES no enough resource to save the information.
30 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
31 @retval RETURN_NOT_STARTED it is too early to invoke this interface
32 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
42 return RETURN_SUCCESS
;
46 This function will set lockbox attributes.
48 @param Guid the guid to identify the confidential information
49 @param Attributes the attributes of the lockbox
51 @retval RETURN_SUCCESS the information is saved successfully.
52 @retval RETURN_INVALID_PARAMETER attributes is invalid.
53 @retval RETURN_NOT_FOUND the requested GUID not found.
54 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
55 @retval RETURN_NOT_STARTED it is too early to invoke this interface
56 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
60 SetLockBoxAttributes (
65 return RETURN_SUCCESS
;
69 This function will update confidential information to lockbox.
71 @param Guid the guid to identify the original confidential information
72 @param Offset the offset of the original confidential information
73 @param Buffer the address of the updated confidential information
74 @param Length the length of the updated confidential information
76 @retval RETURN_SUCCESS the information is saved successfully.
77 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0.
78 @retval RETURN_NOT_FOUND the requested GUID not found.
79 @retval RETURN_BUFFER_TOO_SMALL the original buffer to too small to hold new information.
80 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
81 @retval RETURN_NOT_STARTED it is too early to invoke this interface
82 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
93 return RETURN_SUCCESS
;
97 This function will restore confidential information from lockbox.
99 @param Guid the guid to identify the confidential information
100 @param Buffer the address of the restored confidential information
101 NULL means restored to original address, Length MUST be NULL at same time.
102 @param Length the length of the restored confidential information
104 @retval RETURN_SUCCESS the information is restored successfully.
105 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL.
106 @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no
107 LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute.
108 @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information.
109 @retval RETURN_NOT_FOUND the requested GUID not found.
110 @retval RETURN_NOT_STARTED it is too early to invoke this interface
111 @retval RETURN_ACCESS_DENIED not allow to restore to the address
112 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
118 IN VOID
*Buffer
, OPTIONAL
119 IN OUT UINTN
*Length OPTIONAL
122 return RETURN_SUCCESS
;
126 This function will restore confidential information from all lockbox which have RestoreInPlace attribute.
128 @retval RETURN_SUCCESS the information is restored successfully.
129 @retval RETURN_NOT_STARTED it is too early to invoke this interface
130 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
134 RestoreAllLockBoxInPlace (
138 return RETURN_SUCCESS
;