1/*
2 * Copyright 2003, Axel Dörfler, axeld@pinc-software.de.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5
6
7#include <platform_arch.h>
8#include <boot/platform.h>
9#include <boot/stdio.h>
10#include <boot/platform/cfe/cfe.h>
11#include <stdarg.h>
12
13
14status_t
15platform_allocate_region(void **_address, size_t size, uint8 protection,
16	bool exactAddress)
17{
18	if (size == 0)
19		return B_BAD_VALUE;
20
21	void *address = arch_mmu_allocate(*_address, size, protection,
22		exactAddress);
23	if (address == NULL)
24		return B_NO_MEMORY;
25
26	*_address = address;
27	return B_OK;
28}
29
30
31status_t
32platform_free_region(void *address, size_t size)
33{
34	return arch_mmu_free(address, size);
35}
36
37