Refactor part 1
Some checks failed
Builds / ExectOS (amd64) (push) Failing after 14s
Builds / ExectOS (i686) (push) Failing after 14s

This commit is contained in:
2023-12-03 16:04:12 +01:00
parent 55bd9e326f
commit fce8a50321
10 changed files with 121 additions and 104 deletions

View File

@@ -2,7 +2,7 @@
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtldr/hardware.c
* DESCRIPTION: XT Boot Manager EFI hardware support
* DESCRIPTION: EFI hardware support for XT Boot Loader
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
@@ -18,7 +18,7 @@
*/
XTCDECL
EFI_STATUS
BmActivateSerialIOController()
BlpHwActivateSerialIOController()
{
EFI_GUID PciGuid = EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID;
PEFI_PCI_ROOT_BRIDGE_IO_PROTOCOL PciDev;
@@ -31,7 +31,7 @@ BmActivateSerialIOController()
/* Allocate memory for single EFI_HANDLE, what should be enough in most cases */
PciHandleSize = sizeof(EFI_HANDLE);
Status = BmAllocateEfiPool(PciHandleSize, (PVOID*)&PciHandle);
Status = BlMemoryAllocatePool(PciHandleSize, (PVOID*)&PciHandle);
if(Status != STATUS_EFI_SUCCESS)
{
/* Memory allocation failure */
@@ -43,8 +43,8 @@ BmActivateSerialIOController()
if(Status == STATUS_EFI_BUFFER_TOO_SMALL)
{
/* Reallocate more memory as requested by UEFI */
BmFreeEfiPool(PciHandle);
Status = BmAllocateEfiPool(PciHandleSize, (PVOID*)&PciHandle);
BlMemoryFreePool(PciHandle);
Status = BlMemoryAllocatePool(PciHandleSize, (PVOID*)&PciHandle);
if(Status != STATUS_EFI_SUCCESS)
{
/* Memory reallocation failure */