51 ASSERT (mLockBoxGlobal->Signature == LOCK_BOX_GLOBAL_SIGNATURE);
52 if ((
UINTN)mLockBoxGlobal->SubPageRemaining >= Size) {
53 Buffer = (VOID *)(
UINTN)mLockBoxGlobal->SubPageBuffer;
54 mLockBoxGlobal->SubPageBuffer += (UINT32)Size;
55 mLockBoxGlobal->SubPageRemaining -= (UINT32)Size;
59 Status =
gBS->AllocatePages (
65 if (EFI_ERROR (Status)) {
69 Buffer = (VOID *)(
UINTN)Address;
73 if (AllocRemaining > (
UINTN)mLockBoxGlobal->SubPageRemaining) {
74 mLockBoxGlobal->SubPageBuffer = (UINT32)(Address + Size);
75 mLockBoxGlobal->SubPageRemaining = (UINT32)AllocRemaining;
106LockBoxDxeLibInitialize (
114 Status = LockBoxLibInitialize ();
115 if (!EFI_ERROR (Status)) {
123 Status =
gBS->LocateProtocol (&gEfiLockBoxProtocolGuid,
NULL, &Interface);
124 if (EFI_ERROR (Status)) {
125 Status =
gBS->InstallProtocolInterface (
127 &gEfiLockBoxProtocolGuid,
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateAcpiNvsPool(IN UINTN AllocationSize)
STATIC VOID * AllocateMemoryBelow4G(IN EFI_MEMORY_TYPE MemoryType, IN UINTN Size)
#define ASSERT_EFI_ERROR(StatusParameter)
#define PcdGetBool(TokenName)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_PAGES_TO_SIZE(Pages)
#define EFI_SIZE_TO_PAGES(Size)