]>
Commit | Line | Data |
---|---|---|
1c837cd5 | 1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r | |
4 | \r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions\r | |
7 | of the BSD License which accompanies this distribution. The\r | |
8 | full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include <Uefi.h>\r | |
17 | #include <Library/DebugLib.h>\r | |
18 | \r | |
19 | /**\r | |
20 | This function will save confidential information to lockbox.\r | |
21 | \r | |
22 | @param Guid the guid to identify the confidential information\r | |
23 | @param Buffer the address of the confidential information\r | |
24 | @param Length the length of the confidential information\r | |
25 | \r | |
26 | @retval RETURN_SUCCESS the information is saved successfully.\r | |
27 | @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0\r | |
28 | @retval RETURN_ALREADY_STARTED the requested GUID already exist.\r | |
29 | @retval RETURN_OUT_OF_RESOURCES no enough resource to save the information.\r | |
30 | @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r | |
31 | @retval RETURN_NOT_STARTED it is too early to invoke this interface\r | |
32 | @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r | |
33 | **/\r | |
34 | RETURN_STATUS\r | |
35 | EFIAPI\r | |
36 | SaveLockBox (\r | |
37 | IN GUID *Guid,\r | |
38 | IN VOID *Buffer,\r | |
39 | IN UINTN Length\r | |
40 | )\r | |
41 | {\r | |
42 | return RETURN_SUCCESS;\r | |
43 | }\r | |
44 | \r | |
45 | /**\r | |
46 | This function will set lockbox attributes.\r | |
47 | \r | |
48 | @param Guid the guid to identify the confidential information\r | |
49 | @param Attributes the attributes of the lockbox\r | |
50 | \r | |
51 | @retval RETURN_SUCCESS the information is saved successfully.\r | |
52 | @retval RETURN_INVALID_PARAMETER attributes is invalid.\r | |
53 | @retval RETURN_NOT_FOUND the requested GUID not found.\r | |
54 | @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r | |
55 | @retval RETURN_NOT_STARTED it is too early to invoke this interface\r | |
56 | @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r | |
57 | **/\r | |
58 | RETURN_STATUS\r | |
59 | EFIAPI\r | |
60 | SetLockBoxAttributes (\r | |
61 | IN GUID *Guid,\r | |
62 | IN UINT64 Attributes\r | |
63 | )\r | |
64 | {\r | |
65 | return RETURN_SUCCESS;\r | |
66 | }\r | |
67 | \r | |
68 | /**\r | |
69 | This function will update confidential information to lockbox.\r | |
70 | \r | |
71 | @param Guid the guid to identify the original confidential information\r | |
72 | @param Offset the offset of the original confidential information\r | |
73 | @param Buffer the address of the updated confidential information\r | |
74 | @param Length the length of the updated confidential information\r | |
75 | \r | |
76 | @retval RETURN_SUCCESS the information is saved successfully.\r | |
77 | @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0.\r | |
78 | @retval RETURN_NOT_FOUND the requested GUID not found.\r | |
79 | @retval RETURN_BUFFER_TOO_SMALL the original buffer to too small to hold new information.\r | |
80 | @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r | |
81 | @retval RETURN_NOT_STARTED it is too early to invoke this interface\r | |
82 | @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r | |
83 | **/\r | |
84 | RETURN_STATUS\r | |
85 | EFIAPI\r | |
86 | UpdateLockBox (\r | |
87 | IN GUID *Guid,\r | |
88 | IN UINTN Offset,\r | |
89 | IN VOID *Buffer,\r | |
90 | IN UINTN Length\r | |
91 | )\r | |
92 | {\r | |
93 | return RETURN_SUCCESS;\r | |
94 | }\r | |
95 | \r | |
96 | /**\r | |
97 | This function will restore confidential information from lockbox.\r | |
98 | \r | |
99 | @param Guid the guid to identify the confidential information\r | |
100 | @param Buffer the address of the restored confidential information\r | |
101 | NULL means restored to original address, Length MUST be NULL at same time.\r | |
102 | @param Length the length of the restored confidential information\r | |
103 | \r | |
104 | @retval RETURN_SUCCESS the information is restored successfully.\r | |
105 | @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL.\r | |
106 | @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no \r | |
107 | LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute.\r | |
108 | @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information.\r | |
109 | @retval RETURN_NOT_FOUND the requested GUID not found.\r | |
110 | @retval RETURN_NOT_STARTED it is too early to invoke this interface\r | |
111 | @retval RETURN_ACCESS_DENIED not allow to restore to the address\r | |
112 | @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r | |
113 | **/\r | |
114 | RETURN_STATUS\r | |
115 | EFIAPI\r | |
116 | RestoreLockBox (\r | |
117 | IN GUID *Guid,\r | |
118 | IN VOID *Buffer, OPTIONAL\r | |
119 | IN OUT UINTN *Length OPTIONAL\r | |
120 | )\r | |
121 | {\r | |
122 | return RETURN_SUCCESS;\r | |
123 | }\r | |
124 | \r | |
125 | /**\r | |
126 | This function will restore confidential information from all lockbox which have RestoreInPlace attribute.\r | |
127 | \r | |
128 | @retval RETURN_SUCCESS the information is restored successfully.\r | |
129 | @retval RETURN_NOT_STARTED it is too early to invoke this interface\r | |
130 | @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r | |
131 | **/\r | |
132 | RETURN_STATUS\r | |
133 | EFIAPI\r | |
134 | RestoreAllLockBoxInPlace (\r | |
135 | VOID\r | |
136 | )\r | |
137 | {\r | |
138 | return RETURN_SUCCESS;\r | |
139 | }\r |