From b6384820acce2d7b6d76173b277f04fb45df932f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 16 Oct 2003 18:05:37 +0000 Subject: [PATCH] Implemented the platform MMU functions. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5050 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/openfirmware/mmu.cpp | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/kernel/boot/platform/openfirmware/mmu.cpp diff --git a/src/kernel/boot/platform/openfirmware/mmu.cpp b/src/kernel/boot/platform/openfirmware/mmu.cpp new file mode 100644 index 0000000000..0c76d4def1 --- /dev/null +++ b/src/kernel/boot/platform/openfirmware/mmu.cpp @@ -0,0 +1,32 @@ +/* +** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include +#include +#include +#include + +#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); +} +