OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the OvmfPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
This commit is contained in:
committed by
mergify[bot]
parent
d1050b9dff
commit
ac0a286f4d
@@ -29,17 +29,17 @@
|
||||
STATIC
|
||||
VOID *
|
||||
AllocateMemoryBelow4G (
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Size
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Size
|
||||
)
|
||||
{
|
||||
UINTN Pages;
|
||||
EFI_PHYSICAL_ADDRESS Address;
|
||||
EFI_STATUS Status;
|
||||
VOID* Buffer;
|
||||
VOID *Buffer;
|
||||
UINTN AllocRemaining;
|
||||
|
||||
Pages = EFI_SIZE_TO_PAGES (Size);
|
||||
Pages = EFI_SIZE_TO_PAGES (Size);
|
||||
Address = 0xffffffff;
|
||||
|
||||
//
|
||||
@@ -49,36 +49,35 @@ AllocateMemoryBelow4G (
|
||||
// allocations, and use these to allocate memory for small buffers.
|
||||
//
|
||||
ASSERT (mLockBoxGlobal->Signature == LOCK_BOX_GLOBAL_SIGNATURE);
|
||||
if ((UINTN) mLockBoxGlobal->SubPageRemaining >= Size) {
|
||||
Buffer = (VOID*)(UINTN) mLockBoxGlobal->SubPageBuffer;
|
||||
mLockBoxGlobal->SubPageBuffer += (UINT32) Size;
|
||||
mLockBoxGlobal->SubPageRemaining -= (UINT32) Size;
|
||||
if ((UINTN)mLockBoxGlobal->SubPageRemaining >= Size) {
|
||||
Buffer = (VOID *)(UINTN)mLockBoxGlobal->SubPageBuffer;
|
||||
mLockBoxGlobal->SubPageBuffer += (UINT32)Size;
|
||||
mLockBoxGlobal->SubPageRemaining -= (UINT32)Size;
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
Status = gBS->AllocatePages (
|
||||
AllocateMaxAddress,
|
||||
MemoryType,
|
||||
Pages,
|
||||
&Address
|
||||
);
|
||||
Status = gBS->AllocatePages (
|
||||
AllocateMaxAddress,
|
||||
MemoryType,
|
||||
Pages,
|
||||
&Address
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Buffer = (VOID *) (UINTN) Address;
|
||||
Buffer = (VOID *)(UINTN)Address;
|
||||
ZeroMem (Buffer, EFI_PAGES_TO_SIZE (Pages));
|
||||
|
||||
AllocRemaining = EFI_PAGES_TO_SIZE (Pages) - Size;
|
||||
if (AllocRemaining > (UINTN) mLockBoxGlobal->SubPageRemaining) {
|
||||
mLockBoxGlobal->SubPageBuffer = (UINT32) (Address + Size);
|
||||
mLockBoxGlobal->SubPageRemaining = (UINT32) AllocRemaining;
|
||||
if (AllocRemaining > (UINTN)mLockBoxGlobal->SubPageRemaining) {
|
||||
mLockBoxGlobal->SubPageBuffer = (UINT32)(Address + Size);
|
||||
mLockBoxGlobal->SubPageRemaining = (UINT32)AllocRemaining;
|
||||
}
|
||||
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Allocates a buffer of type EfiACPIMemoryNVS.
|
||||
|
||||
@@ -102,7 +101,6 @@ AllocateAcpiNvsPool (
|
||||
return AllocateMemoryBelow4G (EfiACPIMemoryNVS, AllocationSize);
|
||||
}
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
LockBoxDxeLibInitialize (
|
||||
@@ -110,8 +108,8 @@ LockBoxDxeLibInitialize (
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
VOID *Interface;
|
||||
EFI_STATUS Status;
|
||||
VOID *Interface;
|
||||
|
||||
Status = LockBoxLibInitialize ();
|
||||
if (!EFI_ERROR (Status)) {
|
||||
|
Reference in New Issue
Block a user