Implement BlEfiMemoryAllocatePool() and BlEfiMemoryFreePool()
所有检测均成功
ci/woodpecker/push/build Pipeline was successful

这个提交包含在:
Rafal Kupiec 2022-08-21 17:05:05 +02:00
父节点 e61108d9b5
当前提交 d369a5e163
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4
共有 2 个文件被更改,包括 45 次插入0 次删除

查看文件

@ -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.
*

查看文件

@ -41,6 +41,13 @@ VOID
BlDbgPrint(IN PUINT16 Format,
IN ...);
EFI_STATUS
BlEfiMemoryAllocatePool(IN UINT_PTR Size,
OUT PVOID *Memory);
EFI_STATUS
BlEfiMemoryFreePool(IN PVOID Memory);
VOID
BlEfiPrint(IN PUINT16 Format,
IN ...);