2 * Copyright (C) 2011-2012 ARM Limited. All rights reserved.
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11 #ifndef __MALI_KERNEL_MEM_OS_H__
12 #define __MALI_KERNEL_MEM_OS_H__
15 * @brief Creates an object that manages allocating OS memory
17 * Creates an object that provides an interface to allocate OS memory and
18 * have it mapped into the Mali virtual memory space.
20 * The object exposes pointers to
21 * - allocate OS memory
22 * - allocate Mali page tables in OS memory
23 * - destroy the object
25 * Allocations from OS memory are of type mali_physical_memory_allocation
26 * which provides a function to release the allocation.
28 * @param max_allocation max. number of bytes that can be allocated from OS memory
29 * @param cpu_usage_adjust value to add to mali physical addresses to obtain CPU physical addresses
30 * @param name description of the allocator
31 * @return pointer to mali_physical_memory_allocator object. NULL on failure.
33 mali_physical_memory_allocator * mali_os_allocator_create(u32 max_allocation, u32 cpu_usage_adjust, const char *name);
35 #endif /* __MALI_KERNEL_MEM_OS_H__ */