3 * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * A copy of the licence is included with the program, and can also be obtained
11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12 * Boston, MA 02110-1301, USA.
20 #ifndef _MALI_KBASE_MMU_MODE_
21 #define _MALI_KBASE_MMU_MODE_
23 #include <linux/types.h>
25 /* Forward declarations */
29 struct kbase_mmu_setup;
31 struct kbase_mmu_mode {
32 void (*update)(struct kbase_context *kctx);
33 void (*get_as_setup)(struct kbase_context *kctx,
34 struct kbase_mmu_setup * const setup);
35 void (*disable_as)(struct kbase_device *kbdev, int as_nr);
36 phys_addr_t (*pte_to_phy_addr)(u64 entry);
37 int (*ate_is_valid)(u64 ate);
38 int (*pte_is_valid)(u64 pte);
39 void (*entry_set_ate)(u64 *entry, phys_addr_t phy, unsigned long flags);
40 void (*entry_set_pte)(u64 *entry, phys_addr_t phy);
41 void (*entry_invalidate)(u64 *entry);
44 struct kbase_mmu_mode const *kbase_mmu_mode_get_lpae(void);
45 struct kbase_mmu_mode const *kbase_mmu_mode_get_aarch64(void);
47 #endif /* _MALI_KBASE_MMU_MODE_ */