Fix 4KB pages allocation
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2022-11-05 21:59:55 +01:00
parent bef6b5a589
commit 4a364212de
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -165,7 +165,7 @@ BlDbgPrint(IN PUINT16 Format,
/**
* This routine allocates one or more 4KB pages.
*
* @param Size
* @param Pages
* The number of contiguous 4KB pages to allocate.
*
* @param Memory
@ -176,11 +176,10 @@ BlDbgPrint(IN PUINT16 Format,
* @since XT 1.0
*/
EFI_STATUS
BlEfiMemoryAllocatePages(IN UINT64 Size,
BlEfiMemoryAllocatePages(IN UINT64 Pages,
OUT PEFI_PHYSICAL_ADDRESS Memory)
{
return EfiSystemTable->BootServices->AllocatePages(AllocateAnyPages, EfiRuntimeServicesData,
EFI_SIZE_TO_PAGES(Size), Memory);
return EfiSystemTable->BootServices->AllocatePages(AllocateAnyPages, EfiLoaderData, Pages, Memory);
}
/**
@ -207,7 +206,7 @@ BlEfiMemoryAllocatePool(IN UINT_PTR Size,
/**
* This routine frees memory pages.
*
* @param Size
* @param Pages
* The number of contiguous 4 KB pages to free.
*
* @param Memory
@ -218,10 +217,10 @@ BlEfiMemoryAllocatePool(IN UINT_PTR Size,
* @since XT 1.0
*/
EFI_STATUS
BlEfiMemoryFreePages(IN UINT64 Size,
BlEfiMemoryFreePages(IN UINT64 Pages,
IN EFI_PHYSICAL_ADDRESS Memory)
{
return EfiSystemTable->BootServices->FreePages(Memory, Size);
return EfiSystemTable->BootServices->FreePages(Memory, Pages);
}
/**