EFI: naive platform_allocate_region() implementation
This commit is contained in:
parent
96f4d68b2b
commit
dbf1363b41
@ -7,19 +7,25 @@
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
#include "efi_platform.h"
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
platform_allocate_region(void **_virtualAddress, size_t size, uint8 protection,
|
||||
bool exactAddress)
|
||||
{
|
||||
panic("platform_allocate_region not implemented");
|
||||
return B_ERROR;
|
||||
if (kBootServices->AllocatePool(EfiLoaderData, size, _virtualAddress) != EFI_SUCCESS)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
platform_free_region(void *address, size_t size)
|
||||
{
|
||||
panic("platform_free_region not implemented");
|
||||
return B_ERROR;
|
||||
if (kBootServices->FreePool(address) != EFI_SUCCESS)
|
||||
return B_ERROR;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user