]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c
3 Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/DebugLib.h>
13 This function will save confidential information to lockbox.
15 @param Guid the guid to identify the confidential information
16 @param Buffer the address of the confidential information
17 @param Length the length of the confidential information
19 @retval RETURN_SUCCESS the information is saved successfully.
20 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0
21 @retval RETURN_ALREADY_STARTED the requested GUID already exist.
22 @retval RETURN_OUT_OF_RESOURCES no enough resource to save the information.
23 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
24 @retval RETURN_NOT_STARTED it is too early to invoke this interface
25 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
35 return RETURN_SUCCESS
;
39 This function will set lockbox attributes.
41 @param Guid the guid to identify the confidential information
42 @param Attributes the attributes of the lockbox
44 @retval RETURN_SUCCESS the information is saved successfully.
45 @retval RETURN_INVALID_PARAMETER attributes is invalid.
46 @retval RETURN_NOT_FOUND the requested GUID not found.
47 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
48 @retval RETURN_NOT_STARTED it is too early to invoke this interface
49 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
53 SetLockBoxAttributes (
58 return RETURN_SUCCESS
;
62 This function will update confidential information to lockbox.
64 @param Guid the guid to identify the original confidential information
65 @param Offset the offset of the original confidential information
66 @param Buffer the address of the updated confidential information
67 @param Length the length of the updated confidential information
69 @retval RETURN_SUCCESS the information is saved successfully.
70 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0.
71 @retval RETURN_NOT_FOUND the requested GUID not found.
72 @retval RETURN_BUFFER_TOO_SMALL for lockbox without attribute LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY,
73 the original buffer to too small to hold new information.
74 @retval RETURN_OUT_OF_RESOURCES for lockbox with attribute LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY,
75 no enough resource to save the information.
76 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface
77 @retval RETURN_NOT_STARTED it is too early to invoke this interface
78 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
89 return RETURN_SUCCESS
;
93 This function will restore confidential information from lockbox.
95 @param Guid the guid to identify the confidential information
96 @param Buffer the address of the restored confidential information
97 NULL means restored to original address, Length MUST be NULL at same time.
98 @param Length the length of the restored confidential information
100 @retval RETURN_SUCCESS the information is restored successfully.
101 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL.
102 @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no
103 LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute.
104 @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information.
105 @retval RETURN_NOT_FOUND the requested GUID not found.
106 @retval RETURN_NOT_STARTED it is too early to invoke this interface
107 @retval RETURN_ACCESS_DENIED not allow to restore to the address
108 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
114 IN VOID
*Buffer
, OPTIONAL
115 IN OUT UINTN
*Length OPTIONAL
118 return RETURN_SUCCESS
;
122 This function will restore confidential information from all lockbox which have RestoreInPlace attribute.
124 @retval RETURN_SUCCESS the information is restored successfully.
125 @retval RETURN_NOT_STARTED it is too early to invoke this interface
126 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.
130 RestoreAllLockBoxInPlace (
134 return RETURN_SUCCESS
;