mali_kernel_mem_os.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2010 ARM Limited. All rights reserved.
  3. *
  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.
  6. *
  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.
  9. */
  10. #ifndef __MALI_KERNEL_MEM_OS_H__
  11. #define __MALI_KERNEL_MEM_OS_H__
  12. /**
  13. * @brief Creates an object that manages allocating OS memory
  14. *
  15. * Creates an object that provides an interface to allocate OS memory and
  16. * have it mapped into the Mali virtual memory space.
  17. *
  18. * The object exposes pointers to
  19. * - allocate OS memory
  20. * - allocate Mali page tables in OS memory
  21. * - destroy the object
  22. *
  23. * Allocations from OS memory are of type mali_physical_memory_allocation
  24. * which provides a function to release the allocation.
  25. *
  26. * @param max_allocation max. number of bytes that can be allocated from OS memory
  27. * @param cpu_usage_adjust value to add to mali physical addresses to obtain CPU physical addresses
  28. * @param name description of the allocator
  29. * @return pointer to mali_physical_memory_allocator object. NULL on failure.
  30. **/
  31. mali_physical_memory_allocator * mali_os_allocator_create(u32 max_allocation, u32 cpu_usage_adjust, const char *name);
  32. #endif /* __MALI_KERNEL_MEM_OS_H__ */