Implement BlEfiMemoryAllocatePool() and BlEfiMemoryFreePool()
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
e61108d9b5
commit
d369a5e163
@ -155,6 +155,44 @@ BlDbgPrint(IN PUINT16 Format,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine allocates a pool memory.
|
||||||
|
*
|
||||||
|
* @param Size
|
||||||
|
* The number of bytes to allocate from the pool.
|
||||||
|
*
|
||||||
|
* @param Memory
|
||||||
|
* The pointer to a physical address.
|
||||||
|
*
|
||||||
|
* @return This routine returns a status code.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
EFI_STATUS
|
||||||
|
BlEfiMemoryAllocatePool(IN UINT_PTR Size,
|
||||||
|
OUT PVOID *Memory)
|
||||||
|
{
|
||||||
|
/* Allocate pool */
|
||||||
|
return EfiSystemTable->BootServices->AllocatePool(EfiLoaderData, Size, Memory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pool memory to the system.
|
||||||
|
*
|
||||||
|
* @param Memory
|
||||||
|
* The pointer to the buffer to free.
|
||||||
|
*
|
||||||
|
* @return This routine returns a status code.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
EFI_STATUS
|
||||||
|
BlEfiMemoryFreePool(IN PVOID Memory)
|
||||||
|
{
|
||||||
|
/* Free pool */
|
||||||
|
return EfiSystemTable->BootServices->FreePool(Memory);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This routine formats the input string and prints it out to the stdout and serial console.
|
* This routine formats the input string and prints it out to the stdout and serial console.
|
||||||
*
|
*
|
||||||
|
@ -41,6 +41,13 @@ VOID
|
|||||||
BlDbgPrint(IN PUINT16 Format,
|
BlDbgPrint(IN PUINT16 Format,
|
||||||
IN ...);
|
IN ...);
|
||||||
|
|
||||||
|
EFI_STATUS
|
||||||
|
BlEfiMemoryAllocatePool(IN UINT_PTR Size,
|
||||||
|
OUT PVOID *Memory);
|
||||||
|
|
||||||
|
EFI_STATUS
|
||||||
|
BlEfiMemoryFreePool(IN PVOID Memory);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
BlEfiPrint(IN PUINT16 Format,
|
BlEfiPrint(IN PUINT16 Format,
|
||||||
IN ...);
|
IN ...);
|
||||||
|
Loading…
Reference in New Issue
Block a user