]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c
IntelFrameworkModulePkg: Fix a memory leak bug in BdsDxe driver.
[mirror_edk2.git] / MdeModulePkg / Library / SmmLockBoxLib / SmmLockBoxSmmLib.c
CommitLineData
1c837cd5 1/** @file\r
2\r
ef96ba3c 3Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
1c837cd5 4\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions\r
7of the BSD License which accompanies this distribution. The\r
8full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#include <PiSmm.h>\r
17#include <Library/SmmServicesTableLib.h>\r
18#include <Library/BaseLib.h>\r
19#include <Library/BaseMemoryLib.h>\r
20#include <Library/LockBoxLib.h>\r
21#include <Library/DebugLib.h>\r
22#include <Guid/SmmLockBox.h>\r
23\r
24#include "SmmLockBoxLibPrivate.h"\r
25\r
26/**\r
27 We need handle this library carefully. Only one library instance will construct the environment.\r
28 Below 2 global variable can only be used in constructor. They should NOT be used in any other library functions.\r
29**/\r
30SMM_LOCK_BOX_CONTEXT mSmmLockBoxContext;\r
31LIST_ENTRY mLockBoxQueue = INITIALIZE_LIST_HEAD_VARIABLE (mLockBoxQueue);\r
32\r
33/**\r
34 This function return SmmLockBox context from SMST.\r
35\r
36 @return SmmLockBox context from SMST.\r
37**/\r
38SMM_LOCK_BOX_CONTEXT *\r
39InternalGetSmmLockBoxContext (\r
40 VOID\r
41 )\r
42{\r
43 UINTN Index;\r
44\r
45 //\r
46 // Check if gEfiSmmLockBoxCommunicationGuid is installed by someone\r
47 //\r
48 for (Index = 0; Index < gSmst->NumberOfTableEntries; Index++) {\r
49 if (CompareGuid (&gSmst->SmmConfigurationTable[Index].VendorGuid, &gEfiSmmLockBoxCommunicationGuid)) {\r
50 //\r
51 // Found. That means some other library instance is already run.\r
52 // No need to install again, just return.\r
53 //\r
54 return (SMM_LOCK_BOX_CONTEXT *)gSmst->SmmConfigurationTable[Index].VendorTable;\r
55 }\r
56 }\r
57\r
58 //\r
59 // Not found.\r
60 //\r
61 return NULL;\r
62}\r
63\r
64/**\r
65 Constructor for SmmLockBox library.\r
66 This is used to set SmmLockBox context, which will be used in PEI phase in S3 boot path later.\r
67\r
68 @param[in] ImageHandle Image handle of this driver.\r
69 @param[in] SystemTable A Pointer to the EFI System Table.\r
70\r
71 @retval EFI_SUCEESS \r
72 @return Others Some error occurs.\r
73**/\r
74EFI_STATUS\r
75EFIAPI\r
76SmmLockBoxSmmConstructuor (\r
77 IN EFI_HANDLE ImageHandle,\r
78 IN EFI_SYSTEM_TABLE *SystemTable\r
79 )\r
80{\r
81 EFI_STATUS Status;\r
82 SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext;\r
83\r
84 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SmmLockBoxSmmConstructuor - Enter\n"));\r
85\r
86 //\r
87 // Check if gEfiSmmLockBoxCommunicationGuid is installed by someone\r
88 //\r
89 SmmLockBoxContext = InternalGetSmmLockBoxContext ();\r
90 if (SmmLockBoxContext != NULL) {\r
91 //\r
92 // Find it. That means some other library instance is already run.\r
93 // No need to install again, just return.\r
94 //\r
95 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SmmLockBoxContext - already installed\n"));\r
96 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SmmLockBoxSmmConstructuor - Exit\n"));\r
97 return EFI_SUCCESS;\r
98 }\r
99\r
100 //\r
101 // If no one install this, it means this is first instance. Install it.\r
102 //\r
103 if (sizeof(UINTN) == sizeof(UINT64)) {\r
104 mSmmLockBoxContext.Signature = SMM_LOCK_BOX_SIGNATURE_64;\r
105 } else {\r
106 mSmmLockBoxContext.Signature = SMM_LOCK_BOX_SIGNATURE_32;\r
107 }\r
108 mSmmLockBoxContext.LockBoxDataAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)&mLockBoxQueue;\r
109\r
110 Status = gSmst->SmmInstallConfigurationTable (\r
111 gSmst,\r
112 &gEfiSmmLockBoxCommunicationGuid,\r
113 &mSmmLockBoxContext,\r
114 sizeof(mSmmLockBoxContext)\r
115 );\r
116 ASSERT_EFI_ERROR (Status);\r
117\r
118 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SmmLockBoxContext - %x\n", (UINTN)&mSmmLockBoxContext));\r
119 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib LockBoxDataAddress - %x\n", (UINTN)&mLockBoxQueue));\r
120 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SmmLockBoxSmmConstructuor - Exit\n"));\r
121\r
122 return Status;\r
123}\r
124\r
125/**\r
126 This function return SmmLockBox queue address.\r
127\r
128 @return SmmLockBox queue address.\r
129**/\r
130LIST_ENTRY *\r
131InternalGetLockBoxQueue (\r
132 VOID\r
133 )\r
134{\r
135 SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext;\r
136\r
137 SmmLockBoxContext = InternalGetSmmLockBoxContext ();\r
138 ASSERT (SmmLockBoxContext != NULL);\r
139 if (SmmLockBoxContext == NULL) {\r
140 return NULL;\r
141 }\r
142 return (LIST_ENTRY *)(UINTN)SmmLockBoxContext->LockBoxDataAddress;\r
143}\r
144\r
145/**\r
146 This function find LockBox by GUID.\r
147\r
148 @param Guid The guid to indentify the LockBox\r
149\r
150 @return LockBoxData\r
151**/\r
152SMM_LOCK_BOX_DATA *\r
153InternalFindLockBoxByGuid (\r
154 IN EFI_GUID *Guid\r
155 )\r
156{\r
157 LIST_ENTRY *Link;\r
158 SMM_LOCK_BOX_DATA *LockBox;\r
159 LIST_ENTRY *LockBoxQueue;\r
160\r
161 LockBoxQueue = InternalGetLockBoxQueue ();\r
162 ASSERT (LockBoxQueue != NULL);\r
163\r
164 for (Link = LockBoxQueue->ForwardLink;\r
165 Link != LockBoxQueue;\r
166 Link = Link->ForwardLink) {\r
167 LockBox = BASE_CR (\r
168 Link,\r
169 SMM_LOCK_BOX_DATA,\r
170 Link\r
171 );\r
172 if (CompareGuid (&LockBox->Guid, Guid)) {\r
173 return LockBox;\r
174 }\r
175 }\r
176 return NULL;\r
177}\r
178\r
179/**\r
180 This function will save confidential information to lockbox.\r
181\r
182 @param Guid the guid to identify the confidential information\r
183 @param Buffer the address of the confidential information\r
184 @param Length the length of the confidential information\r
185\r
186 @retval RETURN_SUCCESS the information is saved successfully.\r
187 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0\r
188 @retval RETURN_ALREADY_STARTED the requested GUID already exist.\r
189 @retval RETURN_OUT_OF_RESOURCES no enough resource to save the information.\r
190 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r
191 @retval RETURN_NOT_STARTED it is too early to invoke this interface\r
192 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r
193**/\r
194RETURN_STATUS\r
195EFIAPI\r
196SaveLockBox (\r
197 IN GUID *Guid,\r
198 IN VOID *Buffer,\r
199 IN UINTN Length\r
200 )\r
201{\r
202 SMM_LOCK_BOX_DATA *LockBox;\r
203 EFI_PHYSICAL_ADDRESS SmramBuffer;\r
204 EFI_STATUS Status;\r
205 LIST_ENTRY *LockBoxQueue;\r
206\r
207 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Enter\n"));\r
208\r
209 //\r
210 // Basic check\r
211 //\r
212 if ((Guid == NULL) || (Buffer == NULL) || (Length == 0)) {\r
213 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Exit (%r)\n", EFI_INVALID_PARAMETER));\r
214 return EFI_INVALID_PARAMETER;\r
215 }\r
216\r
217 //\r
218 // Find LockBox\r
219 //\r
220 LockBox = InternalFindLockBoxByGuid (Guid);\r
221 if (LockBox != NULL) {\r
222 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Exit (%r)\n", EFI_ALREADY_STARTED));\r
223 return EFI_ALREADY_STARTED;\r
224 }\r
225\r
226 //\r
227 // Allocate SMRAM buffer\r
228 //\r
229 Status = gSmst->SmmAllocatePages (\r
230 AllocateAnyPages,\r
231 EfiRuntimeServicesData,\r
232 EFI_SIZE_TO_PAGES (Length),\r
233 &SmramBuffer\r
234 );\r
235 ASSERT_EFI_ERROR (Status);\r
236 if (EFI_ERROR (Status)) {\r
237 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Exit (%r)\n", EFI_OUT_OF_RESOURCES));\r
238 return EFI_OUT_OF_RESOURCES;\r
239 }\r
240\r
241 //\r
242 // Allocate LockBox\r
243 //\r
244 Status = gSmst->SmmAllocatePool (\r
245 EfiRuntimeServicesData,\r
246 sizeof(*LockBox),\r
247 (VOID **)&LockBox\r
248 );\r
249 ASSERT_EFI_ERROR (Status);\r
250 if (EFI_ERROR (Status)) {\r
251 gSmst->SmmFreePages (SmramBuffer, EFI_SIZE_TO_PAGES (Length));\r
252 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Exit (%r)\n", EFI_OUT_OF_RESOURCES));\r
253 return EFI_OUT_OF_RESOURCES;\r
254 }\r
255\r
256 //\r
257 // Save data\r
258 //\r
259 CopyMem ((VOID *)(UINTN)SmramBuffer, (VOID *)(UINTN)Buffer, Length);\r
260\r
261 //\r
262 // Insert LockBox to queue\r
263 //\r
264 LockBox->Signature = SMM_LOCK_BOX_DATA_SIGNATURE;\r
265 CopyMem (&LockBox->Guid, Guid, sizeof(EFI_GUID));\r
266 LockBox->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;\r
267 LockBox->Length = (UINT64)Length;\r
05ca95e2 268 LockBox->Attributes = 0;\r
1c837cd5 269 LockBox->SmramBuffer = SmramBuffer;\r
ef96ba3c
SZ
270\r
271 DEBUG ((\r
272 EFI_D_INFO,\r
273 "LockBoxGuid - %g, SmramBuffer - 0x%lx, Length - 0x%lx\n",\r
274 &LockBox->Guid,\r
275 LockBox->SmramBuffer,\r
276 LockBox->Length\r
277 ));\r
278\r
1c837cd5 279 LockBoxQueue = InternalGetLockBoxQueue ();\r
280 ASSERT (LockBoxQueue != NULL);\r
281 InsertTailList (LockBoxQueue, &LockBox->Link);\r
282\r
283 //\r
284 // Done\r
285 //\r
286 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SaveLockBox - Exit (%r)\n", EFI_SUCCESS));\r
287 return EFI_SUCCESS;\r
288}\r
289\r
290/**\r
291 This function will set lockbox attributes.\r
292\r
293 @param Guid the guid to identify the confidential information\r
294 @param Attributes the attributes of the lockbox\r
295\r
296 @retval RETURN_SUCCESS the information is saved successfully.\r
297 @retval RETURN_INVALID_PARAMETER attributes is invalid.\r
298 @retval RETURN_NOT_FOUND the requested GUID not found.\r
299 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r
300 @retval RETURN_NOT_STARTED it is too early to invoke this interface\r
301 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r
302**/\r
303RETURN_STATUS\r
304EFIAPI\r
305SetLockBoxAttributes (\r
306 IN GUID *Guid,\r
307 IN UINT64 Attributes\r
308 )\r
309{\r
310 SMM_LOCK_BOX_DATA *LockBox;\r
311\r
312 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SetLockBoxAttributes - Enter\n"));\r
313\r
314 //\r
315 // Basic check\r
316 //\r
317 if ((Guid == NULL) ||\r
318 ((Attributes & ~LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE) != 0)) {\r
319 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SetLockBoxAttributes - Exit (%r)\n", EFI_INVALID_PARAMETER));\r
320 return EFI_INVALID_PARAMETER;\r
321 }\r
322\r
323 //\r
324 // Find LockBox\r
325 //\r
326 LockBox = InternalFindLockBoxByGuid (Guid);\r
327 if (LockBox == NULL) {\r
328 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SetLockBoxAttributes - Exit (%r)\n", EFI_NOT_FOUND));\r
329 return EFI_NOT_FOUND;\r
330 }\r
331\r
332 //\r
333 // Update data\r
334 //\r
335 LockBox->Attributes = Attributes;\r
336\r
337 //\r
338 // Done\r
339 //\r
340 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib SetLockBoxAttributes - Exit (%r)\n", EFI_SUCCESS));\r
341 return EFI_SUCCESS;\r
342}\r
343\r
344/**\r
345 This function will update confidential information to lockbox.\r
346\r
347 @param Guid the guid to identify the original confidential information\r
348 @param Offset the offset of the original confidential information\r
349 @param Buffer the address of the updated confidential information\r
350 @param Length the length of the updated confidential information\r
351\r
352 @retval RETURN_SUCCESS the information is saved successfully.\r
353 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or Buffer is NULL, or Length is 0.\r
354 @retval RETURN_NOT_FOUND the requested GUID not found.\r
355 @retval RETURN_BUFFER_TOO_SMALL the original buffer to too small to hold new information.\r
356 @retval RETURN_ACCESS_DENIED it is too late to invoke this interface\r
357 @retval RETURN_NOT_STARTED it is too early to invoke this interface\r
358 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r
359**/\r
360RETURN_STATUS\r
361EFIAPI\r
362UpdateLockBox (\r
363 IN GUID *Guid,\r
364 IN UINTN Offset,\r
365 IN VOID *Buffer,\r
366 IN UINTN Length\r
367 )\r
368{\r
369 SMM_LOCK_BOX_DATA *LockBox;\r
370\r
371 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib UpdateLockBox - Enter\n"));\r
372\r
373 //\r
374 // Basic check\r
375 //\r
376 if ((Guid == NULL) || (Buffer == NULL) || (Length == 0)) {\r
377 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib UpdateLockBox - Exit (%r)\n", EFI_INVALID_PARAMETER));\r
378 return EFI_INVALID_PARAMETER;\r
379 }\r
380\r
381 //\r
382 // Find LockBox\r
383 //\r
384 LockBox = InternalFindLockBoxByGuid (Guid);\r
385 if (LockBox == NULL) {\r
386 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib UpdateLockBox - Exit (%r)\n", EFI_NOT_FOUND));\r
387 return EFI_NOT_FOUND;\r
388 }\r
389\r
390 //\r
391 // Update data\r
392 //\r
393 if (LockBox->Length < Offset + Length) {\r
394 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib UpdateLockBox - Exit (%r)\n", EFI_BUFFER_TOO_SMALL));\r
395 return EFI_BUFFER_TOO_SMALL;\r
396 }\r
397 CopyMem ((VOID *)((UINTN)LockBox->SmramBuffer + Offset), Buffer, Length);\r
398\r
399 //\r
400 // Done\r
401 //\r
402 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib UpdateLockBox - Exit (%r)\n", EFI_SUCCESS));\r
403 return EFI_SUCCESS;\r
404}\r
405\r
406/**\r
407 This function will restore confidential information from lockbox.\r
408\r
409 @param Guid the guid to identify the confidential information\r
410 @param Buffer the address of the restored confidential information\r
411 NULL means restored to original address, Length MUST be NULL at same time.\r
412 @param Length the length of the restored confidential information\r
413\r
414 @retval RETURN_SUCCESS the information is restored successfully.\r
415 @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL.\r
416 @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no \r
417 LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute.\r
418 @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information.\r
419 @retval RETURN_NOT_FOUND the requested GUID not found.\r
420 @retval RETURN_NOT_STARTED it is too early to invoke this interface\r
421 @retval RETURN_ACCESS_DENIED not allow to restore to the address\r
422 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r
423**/\r
424RETURN_STATUS\r
425EFIAPI\r
426RestoreLockBox (\r
427 IN GUID *Guid,\r
428 IN VOID *Buffer, OPTIONAL\r
429 IN OUT UINTN *Length OPTIONAL\r
430 )\r
431{\r
432 SMM_LOCK_BOX_DATA *LockBox;\r
433 VOID *RestoreBuffer;\r
434\r
435 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Enter\n"));\r
436\r
437 //\r
438 // Restore this, Buffer and Length MUST be both NULL or both non-NULL\r
439 //\r
440 if ((Guid == NULL) ||\r
441 ((Buffer == NULL) && (Length != NULL)) ||\r
442 ((Buffer != NULL) && (Length == NULL))) {\r
443 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Exit (%r)\n", EFI_INVALID_PARAMETER));\r
444 return EFI_INVALID_PARAMETER;\r
445 }\r
446\r
447 //\r
448 // Find LockBox\r
449 //\r
450 LockBox = InternalFindLockBoxByGuid (Guid);\r
451 if (LockBox == NULL) {\r
452 //\r
453 // Not found\r
454 //\r
455 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Exit (%r)\n", EFI_NOT_FOUND));\r
456 return EFI_NOT_FOUND;\r
457 }\r
458\r
459 //\r
460 // Set RestoreBuffer\r
461 //\r
462 if (Buffer != NULL) {\r
463 //\r
464 // restore to new buffer\r
465 //\r
466 RestoreBuffer = Buffer;\r
467 } else {\r
468 //\r
469 // restore to original buffer\r
470 //\r
471 if ((LockBox->Attributes & LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE) == 0) {\r
472 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Exit (%r)\n", EFI_WRITE_PROTECTED));\r
473 return EFI_WRITE_PROTECTED;\r
474 }\r
475 RestoreBuffer = (VOID *)(UINTN)LockBox->Buffer;\r
476 }\r
477\r
478 //\r
479 // Set RestoreLength\r
480 //\r
481 if (Length != NULL) {\r
482 if (*Length < (UINTN)LockBox->Length) {\r
483 //\r
484 // Input buffer is too small to hold all data.\r
485 //\r
486 *Length = (UINTN)LockBox->Length;\r
487 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Exit (%r)\n", EFI_BUFFER_TOO_SMALL));\r
488 return EFI_BUFFER_TOO_SMALL;\r
489 }\r
490 *Length = (UINTN)LockBox->Length;\r
491 }\r
492\r
493 //\r
494 // Restore data\r
495 //\r
496 CopyMem (RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);\r
497\r
498 //\r
499 // Done\r
500 //\r
501 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreLockBox - Exit (%r)\n", EFI_SUCCESS));\r
502 return EFI_SUCCESS;\r
503}\r
504\r
505/**\r
506 This function will restore confidential information from all lockbox which have RestoreInPlace attribute.\r
507\r
508 @retval RETURN_SUCCESS the information is restored successfully.\r
509 @retval RETURN_NOT_STARTED it is too early to invoke this interface\r
510 @retval RETURN_UNSUPPORTED the service is not supported by implementaion.\r
511**/\r
512RETURN_STATUS\r
513EFIAPI\r
514RestoreAllLockBoxInPlace (\r
515 VOID\r
516 )\r
517{\r
518 SMM_LOCK_BOX_DATA *LockBox;\r
519 LIST_ENTRY *Link;\r
520 LIST_ENTRY *LockBoxQueue;\r
521\r
522 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreAllLockBoxInPlace - Enter\n"));\r
523\r
524 LockBoxQueue = InternalGetLockBoxQueue ();\r
525 ASSERT (LockBoxQueue != NULL);\r
526\r
527 //\r
528 // Restore all, Buffer and Length MUST be NULL\r
529 //\r
530 for (Link = LockBoxQueue->ForwardLink;\r
531 Link != LockBoxQueue;\r
532 Link = Link->ForwardLink) {\r
533 LockBox = BASE_CR (\r
534 Link,\r
535 SMM_LOCK_BOX_DATA,\r
536 Link\r
537 );\r
538 if ((LockBox->Attributes & LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE) != 0) {\r
539 //\r
540 // Restore data\r
541 //\r
542 CopyMem ((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length);\r
543 }\r
544 }\r
545 //\r
546 // Done\r
547 //\r
548 DEBUG ((EFI_D_INFO, "SmmLockBoxSmmLib RestoreAllLockBoxInPlace - Exit (%r)\n", EFI_SUCCESS));\r
549 return EFI_SUCCESS;\r
550}\r
551\r