Finish moving global variables into classes
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 34s
Builds / ExectOS (amd64, release) (push) Successful in 33s
Builds / ExectOS (i686, debug) (push) Successful in 29s
Builds / ExectOS (i686, release) (push) Successful in 27s

This commit is contained in:
2025-09-22 09:56:58 +02:00
parent 7791ca13e2
commit ed293c7e61
15 changed files with 275 additions and 719 deletions

View File

@@ -28,7 +28,8 @@ Memory::AllocatePages(IN EFI_ALLOCATE_TYPE AllocationType,
IN ULONGLONG NumberOfPages,
OUT PEFI_PHYSICAL_ADDRESS Memory)
{
return EfiSystemTable->BootServices->AllocatePages(AllocationType, EfiLoaderData, NumberOfPages, Memory);
return XtLoader::GetEfiSystemTable()->BootServices->AllocatePages(AllocationType, EfiLoaderData,
NumberOfPages, Memory);
}
/**
@@ -50,7 +51,7 @@ Memory::AllocatePool(IN UINT_PTR Size,
OUT PVOID *Memory)
{
/* Allocate pool */
return EfiSystemTable->BootServices->AllocatePool(EfiLoaderData, Size, Memory);
return XtLoader::GetEfiSystemTable()->BootServices->AllocatePool(EfiLoaderData, Size, Memory);
}
/**
@@ -71,7 +72,7 @@ EFI_STATUS
Memory::FreePages(IN ULONGLONG NumberOfPages,
IN EFI_PHYSICAL_ADDRESS Memory)
{
return EfiSystemTable->BootServices->FreePages(Memory, NumberOfPages);
return XtLoader::GetEfiSystemTable()->BootServices->FreePages(Memory, NumberOfPages);
}
/**
@@ -89,7 +90,7 @@ EFI_STATUS
Memory::FreePool(IN PVOID Memory)
{
/* Free pool */
return EfiSystemTable->BootServices->FreePool(Memory);
return XtLoader::GetEfiSystemTable()->BootServices->FreePool(Memory);
}
/**
@@ -190,8 +191,11 @@ Memory::GetMemoryMap(OUT PEFI_MEMORY_MAP MemoryMap)
do
{
/* Attempt do get EFI memory map */
Status = EfiSystemTable->BootServices->GetMemoryMap(&MemoryMap->MapSize, MemoryMap->Map, &MemoryMap->MapKey,
&MemoryMap->DescriptorSize, &MemoryMap->DescriptorVersion);
Status = XtLoader::GetEfiSystemTable()->BootServices->GetMemoryMap(&MemoryMap->MapSize,
MemoryMap->Map,
&MemoryMap->MapKey,
&MemoryMap->DescriptorSize,
&MemoryMap->DescriptorVersion);
if(Status == STATUS_EFI_SUCCESS)
{
/* Go further if succeeded */