Lines Matching refs:LockBox
197 SMM_LOCK_BOX_DATA *LockBox; in InternalFindLockBoxByGuid() local
206 LockBox = BASE_CR ( in InternalFindLockBoxByGuid()
211 if (CompareGuid (&LockBox->Guid, Guid)) { in InternalFindLockBoxByGuid()
212 return LockBox; in InternalFindLockBoxByGuid()
241 SMM_LOCK_BOX_DATA *LockBox; in SaveLockBox() local
259 LockBox = InternalFindLockBoxByGuid (Guid); in SaveLockBox()
260 if (LockBox != NULL) { in SaveLockBox()
285 sizeof(*LockBox), in SaveLockBox()
286 (VOID **)&LockBox in SaveLockBox()
303 LockBox->Signature = SMM_LOCK_BOX_DATA_SIGNATURE; in SaveLockBox()
304 CopyMem (&LockBox->Guid, Guid, sizeof(EFI_GUID)); in SaveLockBox()
305 LockBox->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer; in SaveLockBox()
306 LockBox->Length = (UINT64)Length; in SaveLockBox()
307 LockBox->Attributes = 0; in SaveLockBox()
308 LockBox->SmramBuffer = SmramBuffer; in SaveLockBox()
313 &LockBox->Guid, in SaveLockBox()
314 LockBox->SmramBuffer, in SaveLockBox()
315 LockBox->Length in SaveLockBox()
320 InsertTailList (LockBoxQueue, &LockBox->Link); in SaveLockBox()
349 SMM_LOCK_BOX_DATA *LockBox; in SetLockBoxAttributes() local
365 LockBox = InternalFindLockBoxByGuid (Guid); in SetLockBoxAttributes()
366 if (LockBox == NULL) { in SetLockBoxAttributes()
374 LockBox->Attributes = Attributes; in SetLockBoxAttributes()
408 SMM_LOCK_BOX_DATA *LockBox; in UpdateLockBox() local
423 LockBox = InternalFindLockBoxByGuid (Guid); in UpdateLockBox()
424 if (LockBox == NULL) { in UpdateLockBox()
432 if (LockBox->Length < Offset + Length) { in UpdateLockBox()
436 ASSERT ((UINTN)LockBox->SmramBuffer <= (MAX_ADDRESS - Offset)); in UpdateLockBox()
437 CopyMem ((VOID *)((UINTN)LockBox->SmramBuffer + Offset), Buffer, Length); in UpdateLockBox()
472 SMM_LOCK_BOX_DATA *LockBox; in RestoreLockBox() local
490 LockBox = InternalFindLockBoxByGuid (Guid); in RestoreLockBox()
491 if (LockBox == NULL) { in RestoreLockBox()
511 if ((LockBox->Attributes & LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE) == 0) { in RestoreLockBox()
515 RestoreBuffer = (VOID *)(UINTN)LockBox->Buffer; in RestoreLockBox()
522 if (*Length < (UINTN)LockBox->Length) { in RestoreLockBox()
526 *Length = (UINTN)LockBox->Length; in RestoreLockBox()
530 *Length = (UINTN)LockBox->Length; in RestoreLockBox()
536 CopyMem (RestoreBuffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Length); in RestoreLockBox()
558 SMM_LOCK_BOX_DATA *LockBox; in RestoreAllLockBoxInPlace() local
573 LockBox = BASE_CR ( in RestoreAllLockBoxInPlace()
578 if ((LockBox->Attributes & LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE) != 0) { in RestoreAllLockBoxInPlace()
582 …CopyMem ((VOID *)(UINTN)LockBox->Buffer, (VOID *)(UINTN)LockBox->SmramBuffer, (UINTN)LockBox->Leng… in RestoreAllLockBoxInPlace()