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

这个提交包含在:
2022-08-21 17:05:05 +02:00
父节点 e61108d9b5
当前提交 d369a5e163
修改 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. * 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 ...);