Implemented the platform MMU functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-10-16 18:05:37 +00:00
parent 384be72972
commit b6384820ac
@@ -0,0 +1,32 @@
/*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#include <platform_arch.h>
#include <boot/platform.h>
#include <boot/stdio.h>
#include <stdarg.h>
#include "openfirmware.h"
status_t
platform_allocate_region(void **_address, size_t size, uint8 protection)
{
void *address = arch_mmu_allocate(*_address, size, protection);
if (address == NULL)
return B_NO_MEMORY;
*_address = address;
return B_OK;
}
status_t
platform_free_region(void *address, size_t size)
{
return arch_mmu_free(address, size);
}