xref: /linux/drivers/gpu/drm/imagination/pvr_rogue_mmu_defs.h (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
2 /* Copyright (c) 2023 Imagination Technologies Ltd. */
3 
4 /*  *** Autogenerated C -- do not edit ***  */
5 
6 #ifndef PVR_ROGUE_MMU_DEFS_H
7 #define PVR_ROGUE_MMU_DEFS_H
8 
9 #define ROGUE_MMU_DEFS_REVISION 0
10 
11 #define ROGUE_BIF_DM_ENCODING_VERTEX (0x00000000U)
12 #define ROGUE_BIF_DM_ENCODING_PIXEL (0x00000001U)
13 #define ROGUE_BIF_DM_ENCODING_COMPUTE (0x00000002U)
14 #define ROGUE_BIF_DM_ENCODING_TLA (0x00000003U)
15 #define ROGUE_BIF_DM_ENCODING_PB_VCE (0x00000004U)
16 #define ROGUE_BIF_DM_ENCODING_PB_TE (0x00000005U)
17 #define ROGUE_BIF_DM_ENCODING_META (0x00000007U)
18 #define ROGUE_BIF_DM_ENCODING_HOST (0x00000008U)
19 #define ROGUE_BIF_DM_ENCODING_PM_ALIST (0x00000009U)
20 
21 #define ROGUE_MMUCTRL_VADDR_PC_INDEX_SHIFT (30U)
22 #define ROGUE_MMUCTRL_VADDR_PC_INDEX_CLRMSK (0xFFFFFF003FFFFFFFULL)
23 #define ROGUE_MMUCTRL_VADDR_PD_INDEX_SHIFT (21U)
24 #define ROGUE_MMUCTRL_VADDR_PD_INDEX_CLRMSK (0xFFFFFFFFC01FFFFFULL)
25 #define ROGUE_MMUCTRL_VADDR_PT_INDEX_SHIFT (12U)
26 #define ROGUE_MMUCTRL_VADDR_PT_INDEX_CLRMSK (0xFFFFFFFFFFE00FFFULL)
27 
28 #define ROGUE_MMUCTRL_ENTRIES_PC_VALUE (0x00000400U)
29 #define ROGUE_MMUCTRL_ENTRIES_PD_VALUE (0x00000200U)
30 #define ROGUE_MMUCTRL_ENTRIES_PT_VALUE (0x00000200U)
31 
32 #define ROGUE_MMUCTRL_ENTRY_SIZE_PC_VALUE (0x00000020U)
33 #define ROGUE_MMUCTRL_ENTRY_SIZE_PD_VALUE (0x00000040U)
34 #define ROGUE_MMUCTRL_ENTRY_SIZE_PT_VALUE (0x00000040U)
35 
36 #define ROGUE_MMUCTRL_PAGE_SIZE_MASK (0x00000007U)
37 #define ROGUE_MMUCTRL_PAGE_SIZE_4KB (0x00000000U)
38 #define ROGUE_MMUCTRL_PAGE_SIZE_16KB (0x00000001U)
39 #define ROGUE_MMUCTRL_PAGE_SIZE_64KB (0x00000002U)
40 #define ROGUE_MMUCTRL_PAGE_SIZE_256KB (0x00000003U)
41 #define ROGUE_MMUCTRL_PAGE_SIZE_1MB (0x00000004U)
42 #define ROGUE_MMUCTRL_PAGE_SIZE_2MB (0x00000005U)
43 
44 #define ROGUE_MMUCTRL_PAGE_4KB_RANGE_SHIFT (12U)
45 #define ROGUE_MMUCTRL_PAGE_4KB_RANGE_CLRMSK (0xFFFFFF0000000FFFULL)
46 
47 #define ROGUE_MMUCTRL_PAGE_16KB_RANGE_SHIFT (14U)
48 #define ROGUE_MMUCTRL_PAGE_16KB_RANGE_CLRMSK (0xFFFFFF0000003FFFULL)
49 
50 #define ROGUE_MMUCTRL_PAGE_64KB_RANGE_SHIFT (16U)
51 #define ROGUE_MMUCTRL_PAGE_64KB_RANGE_CLRMSK (0xFFFFFF000000FFFFULL)
52 
53 #define ROGUE_MMUCTRL_PAGE_256KB_RANGE_SHIFT (18U)
54 #define ROGUE_MMUCTRL_PAGE_256KB_RANGE_CLRMSK (0xFFFFFF000003FFFFULL)
55 
56 #define ROGUE_MMUCTRL_PAGE_1MB_RANGE_SHIFT (20U)
57 #define ROGUE_MMUCTRL_PAGE_1MB_RANGE_CLRMSK (0xFFFFFF00000FFFFFULL)
58 
59 #define ROGUE_MMUCTRL_PAGE_2MB_RANGE_SHIFT (21U)
60 #define ROGUE_MMUCTRL_PAGE_2MB_RANGE_CLRMSK (0xFFFFFF00001FFFFFULL)
61 
62 #define ROGUE_MMUCTRL_PT_BASE_4KB_RANGE_SHIFT (12U)
63 #define ROGUE_MMUCTRL_PT_BASE_4KB_RANGE_CLRMSK (0xFFFFFF0000000FFFULL)
64 
65 #define ROGUE_MMUCTRL_PT_BASE_16KB_RANGE_SHIFT (10U)
66 #define ROGUE_MMUCTRL_PT_BASE_16KB_RANGE_CLRMSK (0xFFFFFF00000003FFULL)
67 
68 #define ROGUE_MMUCTRL_PT_BASE_64KB_RANGE_SHIFT (8U)
69 #define ROGUE_MMUCTRL_PT_BASE_64KB_RANGE_CLRMSK (0xFFFFFF00000000FFULL)
70 
71 #define ROGUE_MMUCTRL_PT_BASE_256KB_RANGE_SHIFT (6U)
72 #define ROGUE_MMUCTRL_PT_BASE_256KB_RANGE_CLRMSK (0xFFFFFF000000003FULL)
73 
74 #define ROGUE_MMUCTRL_PT_BASE_1MB_RANGE_SHIFT (5U)
75 #define ROGUE_MMUCTRL_PT_BASE_1MB_RANGE_CLRMSK (0xFFFFFF000000001FULL)
76 
77 #define ROGUE_MMUCTRL_PT_BASE_2MB_RANGE_SHIFT (5U)
78 #define ROGUE_MMUCTRL_PT_BASE_2MB_RANGE_CLRMSK (0xFFFFFF000000001FULL)
79 
80 #define ROGUE_MMUCTRL_PT_DATA_PM_META_PROTECT_SHIFT (62U)
81 #define ROGUE_MMUCTRL_PT_DATA_PM_META_PROTECT_CLRMSK (0xBFFFFFFFFFFFFFFFULL)
82 #define ROGUE_MMUCTRL_PT_DATA_PM_META_PROTECT_EN (0x4000000000000000ULL)
83 #define ROGUE_MMUCTRL_PT_DATA_VP_PAGE_HI_SHIFT (40U)
84 #define ROGUE_MMUCTRL_PT_DATA_VP_PAGE_HI_CLRMSK (0xC00000FFFFFFFFFFULL)
85 #define ROGUE_MMUCTRL_PT_DATA_PAGE_SHIFT (12U)
86 #define ROGUE_MMUCTRL_PT_DATA_PAGE_CLRMSK (0xFFFFFF0000000FFFULL)
87 #define ROGUE_MMUCTRL_PT_DATA_VP_PAGE_LO_SHIFT (6U)
88 #define ROGUE_MMUCTRL_PT_DATA_VP_PAGE_LO_CLRMSK (0xFFFFFFFFFFFFF03FULL)
89 #define ROGUE_MMUCTRL_PT_DATA_ENTRY_PENDING_SHIFT (5U)
90 #define ROGUE_MMUCTRL_PT_DATA_ENTRY_PENDING_CLRMSK (0xFFFFFFFFFFFFFFDFULL)
91 #define ROGUE_MMUCTRL_PT_DATA_ENTRY_PENDING_EN (0x0000000000000020ULL)
92 #define ROGUE_MMUCTRL_PT_DATA_PM_SRC_SHIFT (4U)
93 #define ROGUE_MMUCTRL_PT_DATA_PM_SRC_CLRMSK (0xFFFFFFFFFFFFFFEFULL)
94 #define ROGUE_MMUCTRL_PT_DATA_PM_SRC_EN (0x0000000000000010ULL)
95 #define ROGUE_MMUCTRL_PT_DATA_SLC_BYPASS_CTRL_SHIFT (3U)
96 #define ROGUE_MMUCTRL_PT_DATA_SLC_BYPASS_CTRL_CLRMSK (0xFFFFFFFFFFFFFFF7ULL)
97 #define ROGUE_MMUCTRL_PT_DATA_SLC_BYPASS_CTRL_EN (0x0000000000000008ULL)
98 #define ROGUE_MMUCTRL_PT_DATA_CC_SHIFT (2U)
99 #define ROGUE_MMUCTRL_PT_DATA_CC_CLRMSK (0xFFFFFFFFFFFFFFFBULL)
100 #define ROGUE_MMUCTRL_PT_DATA_CC_EN (0x0000000000000004ULL)
101 #define ROGUE_MMUCTRL_PT_DATA_READ_ONLY_SHIFT (1U)
102 #define ROGUE_MMUCTRL_PT_DATA_READ_ONLY_CLRMSK (0xFFFFFFFFFFFFFFFDULL)
103 #define ROGUE_MMUCTRL_PT_DATA_READ_ONLY_EN (0x0000000000000002ULL)
104 #define ROGUE_MMUCTRL_PT_DATA_VALID_SHIFT (0U)
105 #define ROGUE_MMUCTRL_PT_DATA_VALID_CLRMSK (0xFFFFFFFFFFFFFFFEULL)
106 #define ROGUE_MMUCTRL_PT_DATA_VALID_EN (0x0000000000000001ULL)
107 
108 #define ROGUE_MMUCTRL_PD_DATA_ENTRY_PENDING_SHIFT (40U)
109 #define ROGUE_MMUCTRL_PD_DATA_ENTRY_PENDING_CLRMSK (0xFFFFFEFFFFFFFFFFULL)
110 #define ROGUE_MMUCTRL_PD_DATA_ENTRY_PENDING_EN (0x0000010000000000ULL)
111 #define ROGUE_MMUCTRL_PD_DATA_PT_BASE_SHIFT (5U)
112 #define ROGUE_MMUCTRL_PD_DATA_PT_BASE_CLRMSK (0xFFFFFF000000001FULL)
113 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_SHIFT (1U)
114 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_CLRMSK (0xFFFFFFFFFFFFFFF1ULL)
115 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_4KB (0x0000000000000000ULL)
116 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_16KB (0x0000000000000002ULL)
117 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_64KB (0x0000000000000004ULL)
118 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_256KB (0x0000000000000006ULL)
119 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_1MB (0x0000000000000008ULL)
120 #define ROGUE_MMUCTRL_PD_DATA_PAGE_SIZE_2MB (0x000000000000000aULL)
121 #define ROGUE_MMUCTRL_PD_DATA_VALID_SHIFT (0U)
122 #define ROGUE_MMUCTRL_PD_DATA_VALID_CLRMSK (0xFFFFFFFFFFFFFFFEULL)
123 #define ROGUE_MMUCTRL_PD_DATA_VALID_EN (0x0000000000000001ULL)
124 
125 #define ROGUE_MMUCTRL_PC_DATA_PD_BASE_SHIFT (4U)
126 #define ROGUE_MMUCTRL_PC_DATA_PD_BASE_CLRMSK (0x0000000FU)
127 #define ROGUE_MMUCTRL_PC_DATA_PD_BASE_ALIGNSHIFT (12U)
128 #define ROGUE_MMUCTRL_PC_DATA_PD_BASE_ALIGNSIZE (4096U)
129 #define ROGUE_MMUCTRL_PC_DATA_ENTRY_PENDING_SHIFT (1U)
130 #define ROGUE_MMUCTRL_PC_DATA_ENTRY_PENDING_CLRMSK (0xFFFFFFFDU)
131 #define ROGUE_MMUCTRL_PC_DATA_ENTRY_PENDING_EN (0x00000002U)
132 #define ROGUE_MMUCTRL_PC_DATA_VALID_SHIFT (0U)
133 #define ROGUE_MMUCTRL_PC_DATA_VALID_CLRMSK (0xFFFFFFFEU)
134 #define ROGUE_MMUCTRL_PC_DATA_VALID_EN (0x00000001U)
135 
136 #endif /* PVR_ROGUE_MMU_DEFS_H */
137