core-matmap.h (47894B)
1/* 2 * xtensa/config/core-matmap.h -- Memory access and translation mapping 3 * parameters (CHAL) of the Xtensa processor core configuration. 4 * 5 * If you are using Xtensa Tools, see <xtensa/config/core.h> (which includes 6 * this file) for more details. 7 * 8 * In the Xtensa processor products released to date, all parameters 9 * defined in this file are derivable (at least in theory) from 10 * information contained in the core-isa.h header file. 11 * In particular, the following core configuration parameters are relevant: 12 * XCHAL_HAVE_CACHEATTR 13 * XCHAL_HAVE_MIMIC_CACHEATTR 14 * XCHAL_HAVE_XLT_CACHEATTR 15 * XCHAL_HAVE_PTP_MMU 16 * XCHAL_ITLB_ARF_ENTRIES_LOG2 17 * XCHAL_DTLB_ARF_ENTRIES_LOG2 18 * XCHAL_DCACHE_IS_WRITEBACK 19 * XCHAL_ICACHE_SIZE (presence of I-cache) 20 * XCHAL_DCACHE_SIZE (presence of D-cache) 21 * XCHAL_HW_VERSION_MAJOR 22 * XCHAL_HW_VERSION_MINOR 23 */ 24 25/* Copyright (c) 1999-2020 Tensilica Inc. 26 27 Permission is hereby granted, free of charge, to any person obtaining 28 a copy of this software and associated documentation files (the 29 "Software"), to deal in the Software without restriction, including 30 without limitation the rights to use, copy, modify, merge, publish, 31 distribute, sublicense, and/or sell copies of the Software, and to 32 permit persons to whom the Software is furnished to do so, subject to 33 the following conditions: 34 35 The above copyright notice and this permission notice shall be included 36 in all copies or substantial portions of the Software. 37 38 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 39 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 40 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 41 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 42 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 43 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 44 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 45 46 47#ifndef XTENSA_CONFIG_CORE_MATMAP_H 48#define XTENSA_CONFIG_CORE_MATMAP_H 49 50 51/*---------------------------------------------------------------------- 52 CACHE (MEMORY ACCESS) ATTRIBUTES 53 ----------------------------------------------------------------------*/ 54 55 56 57/* Cache Attribute encodings -- lists of access modes for each cache attribute: */ 58#define XCHAL_FCA_LIST XTHAL_FAM_EXCEPTION XCHAL_SEP \ 59 XTHAL_FAM_BYPASS XCHAL_SEP \ 60 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 61 XTHAL_FAM_BYPASS XCHAL_SEP \ 62 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 63 XTHAL_FAM_CACHED XCHAL_SEP \ 64 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 65 XTHAL_FAM_CACHED XCHAL_SEP \ 66 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 67 XTHAL_FAM_CACHED XCHAL_SEP \ 68 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 69 XTHAL_FAM_CACHED XCHAL_SEP \ 70 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 71 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 72 XTHAL_FAM_EXCEPTION XCHAL_SEP \ 73 XTHAL_FAM_EXCEPTION 74#define XCHAL_LCA_LIST XTHAL_LAM_BYPASSG XCHAL_SEP \ 75 XTHAL_LAM_BYPASSG XCHAL_SEP \ 76 XTHAL_LAM_BYPASSG XCHAL_SEP \ 77 XTHAL_LAM_BYPASSG XCHAL_SEP \ 78 XTHAL_LAM_CACHED XCHAL_SEP \ 79 XTHAL_LAM_CACHED XCHAL_SEP \ 80 XTHAL_LAM_CACHED XCHAL_SEP \ 81 XTHAL_LAM_CACHED XCHAL_SEP \ 82 XTHAL_LAM_CACHED XCHAL_SEP \ 83 XTHAL_LAM_CACHED XCHAL_SEP \ 84 XTHAL_LAM_CACHED XCHAL_SEP \ 85 XTHAL_LAM_CACHED XCHAL_SEP \ 86 XTHAL_LAM_EXCEPTION XCHAL_SEP \ 87 XTHAL_LAM_EXCEPTION XCHAL_SEP \ 88 XTHAL_LAM_EXCEPTION XCHAL_SEP \ 89 XTHAL_LAM_EXCEPTION 90#define XCHAL_SCA_LIST XTHAL_SAM_EXCEPTION XCHAL_SEP \ 91 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 92 XTHAL_SAM_BYPASS XCHAL_SEP \ 93 XTHAL_SAM_BYPASS XCHAL_SEP \ 94 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 95 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 96 XTHAL_SAM_WRITEBACK XCHAL_SEP \ 97 XTHAL_SAM_WRITEBACK XCHAL_SEP \ 98 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 99 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 100 XTHAL_SAM_WRITETHRU XCHAL_SEP \ 101 XTHAL_SAM_WRITETHRU XCHAL_SEP \ 102 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 103 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 104 XTHAL_SAM_EXCEPTION XCHAL_SEP \ 105 XTHAL_SAM_EXCEPTION 106 107#define XCHAL_CA_R (0xC0 | 0x40000000) 108#define XCHAL_CA_RX (0xD0 | 0x40000000) 109#define XCHAL_CA_RW (0xE0 | 0x40000000) 110#define XCHAL_CA_RWX (0xF0 | 0x40000000) 111 112/* 113 * Specific encoded cache attribute values of general interest. 114 * If a specific cache mode is not available, the closest available 115 * one is returned instead (eg. writethru instead of writeback, 116 * bypass instead of writethru). 117 */ 118#define XCHAL_CA_BYPASS 3 /* cache disabled (bypassed) mode */ 119#define XCHAL_CA_WRITETHRU 11 /* cache enabled (write-through) mode */ 120#define XCHAL_CA_WRITEBACK 7 /* cache enabled (write-back) mode */ 121#define XCHAL_HAVE_CA_WRITEBACK_NOALLOC 0 /* write-back no-allocate availability */ 122#define XCHAL_CA_WRITEBACK_NOALLOC 7 /* cache enabled (write-back no-allocate) mode */ 123#define XCHAL_CA_BYPASS_RX 1 /* cache disabled (bypassed) mode (no write) */ 124#define XCHAL_CA_WRITETHRU_RX 9 /* cache enabled (write-through) mode (no write) */ 125#define XCHAL_CA_WRITEBACK_RX 5 /* cache enabled (write-back) mode (no write) */ 126#define XCHAL_CA_WRITEBACK_NOALLOC_RX 5 /* cache enabled (write-back no-allocate) mode (no write) */ 127#define XCHAL_CA_BYPASS_RW 2 /* cache disabled (bypassed) mode (no exec) */ 128#define XCHAL_CA_WRITETHRU_RW 10 /* cache enabled (write-through) mode (no exec) */ 129#define XCHAL_CA_WRITEBACK_RW 6 /* cache enabled (write-back) mode (no exec) */ 130#define XCHAL_CA_WRITEBACK_NOALLOC_RW 6 /* cache enabled (write-back no-allocate) mode (no exec) */ 131#define XCHAL_CA_BYPASS_R 0 /* cache disabled (bypassed) mode (no exec, no write) */ 132#define XCHAL_CA_WRITETHRU_R 8 /* cache enabled (write-through) mode (no exec, no write) */ 133#define XCHAL_CA_WRITEBACK_R 4 /* cache enabled (write-back) mode (no exec, no write) */ 134#define XCHAL_CA_WRITEBACK_NOALLOC_R 4 /* cache enabled (write-back no-allocate) mode (no exec, no write) */ 135#define XCHAL_CA_ILLEGAL 12 /* no access allowed (all cause exceptions) mode */ 136 137/*---------------------------------------------------------------------- 138 MMU 139 ----------------------------------------------------------------------*/ 140 141/* 142 * General notes on MMU parameters. 143 * 144 * Terminology: 145 * ASID = address-space ID (acts as an "extension" of virtual addresses) 146 * VPN = virtual page number 147 * PPN = physical page number 148 * CA = encoded cache attribute (access modes) 149 * TLB = translation look-aside buffer (term is stretched somewhat here) 150 * I = instruction (fetch accesses) 151 * D = data (load and store accesses) 152 * way = each TLB (ITLB and DTLB) consists of a number of "ways" 153 * that simultaneously match the virtual address of an access; 154 * a TLB successfully translates a virtual address if exactly 155 * one way matches the vaddr; if none match, it is a miss; 156 * if multiple match, one gets a "multihit" exception; 157 * each way can be independently configured in terms of number of 158 * entries, page sizes, which fields are writable or constant, etc. 159 * set = group of contiguous ways with exactly identical parameters 160 * ARF = auto-refill; hardware services a 1st-level miss by loading a PTE 161 * from the page table and storing it in one of the auto-refill ways; 162 * if this PTE load also misses, a miss exception is posted for s/w. 163 * min-wired = a "min-wired" way can be used to map a single (minimum-sized) 164 * page arbitrarily under program control; it has a single entry, 165 * is non-auto-refill (some other way(s) must be auto-refill), 166 * all its fields (VPN, PPN, ASID, CA) are all writable, and it 167 * supports the XCHAL_MMU_MIN_PTE_PAGE_SIZE page size (a current 168 * restriction is that this be the only page size it supports). 169 * 170 * TLB way entries are virtually indexed. 171 * TLB ways that support multiple page sizes: 172 * - must have all writable VPN and PPN fields; 173 * - can only use one page size at any given time (eg. setup at startup), 174 * selected by the respective ITLBCFG or DTLBCFG special register, 175 * whose bits n*4+3 .. n*4 index the list of page sizes for way n 176 * (XCHAL_xTLB_SETm_PAGESZ_LOG2_LIST for set m corresponding to way n); 177 * this list may be sparse for auto-refill ways because auto-refill 178 * ways have independent lists of supported page sizes sharing a 179 * common encoding with PTE entries; the encoding is the index into 180 * this list; unsupported sizes for a given way are zero in the list; 181 * selecting unsupported sizes results in undefine hardware behaviour; 182 * - is only possible for ways 0 thru 7 (due to ITLBCFG/DTLBCFG definition). 183 */ 184 185#define XCHAL_MMU_ASID_INVALID 0 /* ASID value indicating invalid address space */ 186#define XCHAL_MMU_ASID_KERNEL 1 /* ASID value indicating kernel (ring 0) address space */ 187#define XCHAL_MMU_SR_BITS 0 /* number of size-restriction bits supported */ 188#define XCHAL_MMU_CA_BITS 4 /* number of bits needed to hold cache attribute encoding */ 189#define XCHAL_MMU_MAX_PTE_PAGE_SIZE 12 /* max page size in a PTE structure (log2) */ 190#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 12 /* min page size in a PTE structure (log2) */ 191 192 193/*** Instruction TLB: ***/ 194 195#define XCHAL_ITLB_WAY_BITS 3 /* number of bits holding the ways */ 196#define XCHAL_ITLB_WAYS 7 /* number of ways (n-way set-associative TLB) */ 197#define XCHAL_ITLB_ARF_WAYS 4 /* number of auto-refill ways */ 198#define XCHAL_ITLB_SETS 7 /* number of sets (groups of ways with identical settings) */ 199 200/* Way set to which each way belongs: */ 201#define XCHAL_ITLB_WAY0_SET 0 202#define XCHAL_ITLB_WAY1_SET 1 203#define XCHAL_ITLB_WAY2_SET 2 204#define XCHAL_ITLB_WAY3_SET 3 205#define XCHAL_ITLB_WAY4_SET 4 206#define XCHAL_ITLB_WAY5_SET 5 207#define XCHAL_ITLB_WAY6_SET 6 208 209/* Ways sets that are used by hardware auto-refill (ARF): */ 210#define XCHAL_ITLB_ARF_SETS 4 /* number of auto-refill sets */ 211#define XCHAL_ITLB_ARF_SET0 0 /* index of n'th auto-refill set */ 212#define XCHAL_ITLB_ARF_SET1 1 /* index of n'th auto-refill set */ 213#define XCHAL_ITLB_ARF_SET2 2 /* index of n'th auto-refill set */ 214#define XCHAL_ITLB_ARF_SET3 3 /* index of n'th auto-refill set */ 215 216/* Way sets that are "min-wired" (see terminology comment above): */ 217#define XCHAL_ITLB_MINWIRED_SETS 0 /* number of "min-wired" sets */ 218 219 220/* ITLB way set 0 (group of ways 0 thru 0): */ 221#define XCHAL_ITLB_SET0_WAY 0 /* index of first way in this way set */ 222#define XCHAL_ITLB_SET0_WAYS 1 /* number of (contiguous) ways in this way set */ 223#define XCHAL_ITLB_SET0_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 224#define XCHAL_ITLB_SET0_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 225#define XCHAL_ITLB_SET0_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 226#define XCHAL_ITLB_SET0_PAGESIZES 1 /* number of supported page sizes in this way */ 227#define XCHAL_ITLB_SET0_PAGESZ_BITS 0 /* number of bits to encode the page size */ 228#define XCHAL_ITLB_SET0_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 229#define XCHAL_ITLB_SET0_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 230#define XCHAL_ITLB_SET0_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 231 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 232#define XCHAL_ITLB_SET0_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 233#define XCHAL_ITLB_SET0_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 234#define XCHAL_ITLB_SET0_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 235#define XCHAL_ITLB_SET0_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 236#define XCHAL_ITLB_SET0_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 237#define XCHAL_ITLB_SET0_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 238#define XCHAL_ITLB_SET0_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 239#define XCHAL_ITLB_SET0_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 240 241/* ITLB way set 1 (group of ways 1 thru 1): */ 242#define XCHAL_ITLB_SET1_WAY 1 /* index of first way in this way set */ 243#define XCHAL_ITLB_SET1_WAYS 1 /* number of (contiguous) ways in this way set */ 244#define XCHAL_ITLB_SET1_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 245#define XCHAL_ITLB_SET1_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 246#define XCHAL_ITLB_SET1_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 247#define XCHAL_ITLB_SET1_PAGESIZES 1 /* number of supported page sizes in this way */ 248#define XCHAL_ITLB_SET1_PAGESZ_BITS 0 /* number of bits to encode the page size */ 249#define XCHAL_ITLB_SET1_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 250#define XCHAL_ITLB_SET1_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 251#define XCHAL_ITLB_SET1_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 252 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 253#define XCHAL_ITLB_SET1_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 254#define XCHAL_ITLB_SET1_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 255#define XCHAL_ITLB_SET1_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 256#define XCHAL_ITLB_SET1_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 257#define XCHAL_ITLB_SET1_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 258#define XCHAL_ITLB_SET1_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 259#define XCHAL_ITLB_SET1_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 260#define XCHAL_ITLB_SET1_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 261 262/* ITLB way set 2 (group of ways 2 thru 2): */ 263#define XCHAL_ITLB_SET2_WAY 2 /* index of first way in this way set */ 264#define XCHAL_ITLB_SET2_WAYS 1 /* number of (contiguous) ways in this way set */ 265#define XCHAL_ITLB_SET2_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 266#define XCHAL_ITLB_SET2_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 267#define XCHAL_ITLB_SET2_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 268#define XCHAL_ITLB_SET2_PAGESIZES 1 /* number of supported page sizes in this way */ 269#define XCHAL_ITLB_SET2_PAGESZ_BITS 0 /* number of bits to encode the page size */ 270#define XCHAL_ITLB_SET2_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 271#define XCHAL_ITLB_SET2_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 272#define XCHAL_ITLB_SET2_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 273 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 274#define XCHAL_ITLB_SET2_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 275#define XCHAL_ITLB_SET2_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 276#define XCHAL_ITLB_SET2_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 277#define XCHAL_ITLB_SET2_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 278#define XCHAL_ITLB_SET2_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 279#define XCHAL_ITLB_SET2_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 280#define XCHAL_ITLB_SET2_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 281#define XCHAL_ITLB_SET2_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 282 283/* ITLB way set 3 (group of ways 3 thru 3): */ 284#define XCHAL_ITLB_SET3_WAY 3 /* index of first way in this way set */ 285#define XCHAL_ITLB_SET3_WAYS 1 /* number of (contiguous) ways in this way set */ 286#define XCHAL_ITLB_SET3_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 287#define XCHAL_ITLB_SET3_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 288#define XCHAL_ITLB_SET3_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 289#define XCHAL_ITLB_SET3_PAGESIZES 1 /* number of supported page sizes in this way */ 290#define XCHAL_ITLB_SET3_PAGESZ_BITS 0 /* number of bits to encode the page size */ 291#define XCHAL_ITLB_SET3_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 292#define XCHAL_ITLB_SET3_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 293#define XCHAL_ITLB_SET3_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 294 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 295#define XCHAL_ITLB_SET3_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 296#define XCHAL_ITLB_SET3_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 297#define XCHAL_ITLB_SET3_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 298#define XCHAL_ITLB_SET3_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 299#define XCHAL_ITLB_SET3_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 300#define XCHAL_ITLB_SET3_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 301#define XCHAL_ITLB_SET3_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 302#define XCHAL_ITLB_SET3_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 303 304/* ITLB way set 4 (group of ways 4 thru 4): */ 305#define XCHAL_ITLB_SET4_WAY 4 /* index of first way in this way set */ 306#define XCHAL_ITLB_SET4_WAYS 1 /* number of (contiguous) ways in this way set */ 307#define XCHAL_ITLB_SET4_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 308#define XCHAL_ITLB_SET4_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 309#define XCHAL_ITLB_SET4_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 310#define XCHAL_ITLB_SET4_PAGESIZES 4 /* number of supported page sizes in this way */ 311#define XCHAL_ITLB_SET4_PAGESZ_BITS 2 /* number of bits to encode the page size */ 312#define XCHAL_ITLB_SET4_PAGESZ_LOG2_MIN 20 /* log2(minimum supported page size) */ 313#define XCHAL_ITLB_SET4_PAGESZ_LOG2_MAX 26 /* log2(maximum supported page size) */ 314#define XCHAL_ITLB_SET4_PAGESZ_LOG2_LIST 20 XCHAL_SEP 22 XCHAL_SEP 24 XCHAL_SEP 26 /* list of log2(page size)s, separated by XCHAL_SEP; 315 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 316#define XCHAL_ITLB_SET4_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 317#define XCHAL_ITLB_SET4_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 318#define XCHAL_ITLB_SET4_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 319#define XCHAL_ITLB_SET4_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 320#define XCHAL_ITLB_SET4_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 321#define XCHAL_ITLB_SET4_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 322#define XCHAL_ITLB_SET4_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 323#define XCHAL_ITLB_SET4_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 324 325/* ITLB way set 5 (group of ways 5 thru 5): */ 326#define XCHAL_ITLB_SET5_WAY 5 /* index of first way in this way set */ 327#define XCHAL_ITLB_SET5_WAYS 1 /* number of (contiguous) ways in this way set */ 328#define XCHAL_ITLB_SET5_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 329#define XCHAL_ITLB_SET5_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 330#define XCHAL_ITLB_SET5_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 331#define XCHAL_ITLB_SET5_PAGESIZES 2 /* number of supported page sizes in this way */ 332#define XCHAL_ITLB_SET5_PAGESZ_BITS 1 /* number of bits to encode the page size */ 333#define XCHAL_ITLB_SET5_PAGESZ_LOG2_MIN 27 /* log2(minimum supported page size) */ 334#define XCHAL_ITLB_SET5_PAGESZ_LOG2_MAX 28 /* log2(maximum supported page size) */ 335#define XCHAL_ITLB_SET5_PAGESZ_LOG2_LIST 27 XCHAL_SEP 28 /* list of log2(page size)s, separated by XCHAL_SEP; 336 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 337#define XCHAL_ITLB_SET5_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 338#define XCHAL_ITLB_SET5_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 339#define XCHAL_ITLB_SET5_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 340#define XCHAL_ITLB_SET5_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 341#define XCHAL_ITLB_SET5_ASID_RESET 1 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 342#define XCHAL_ITLB_SET5_VPN_RESET 1 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 343#define XCHAL_ITLB_SET5_PPN_RESET 1 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 344#define XCHAL_ITLB_SET5_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 345/* Reset ASID values for each entry of ITLB way set 5 (because SET5_ASID_RESET is non-zero): */ 346#define XCHAL_ITLB_SET5_E0_ASID_RESET 0x00 347#define XCHAL_ITLB_SET5_E1_ASID_RESET 0x00 348#define XCHAL_ITLB_SET5_E2_ASID_RESET 0x00 349#define XCHAL_ITLB_SET5_E3_ASID_RESET 0x00 350/* Reset VPN values for each entry of ITLB way set 5 (because SET5_VPN_RESET is non-zero): */ 351#define XCHAL_ITLB_SET5_E0_VPN_RESET 0x00000000 352#define XCHAL_ITLB_SET5_E1_VPN_RESET 0x00000000 353#define XCHAL_ITLB_SET5_E2_VPN_RESET 0x00000000 354#define XCHAL_ITLB_SET5_E3_VPN_RESET 0x00000000 355/* Reset PPN values for each entry of ITLB way set 5 (because SET5_PPN_RESET is non-zero): */ 356#define XCHAL_ITLB_SET5_E0_PPN_RESET 0x00000000 357#define XCHAL_ITLB_SET5_E1_PPN_RESET 0x00000000 358#define XCHAL_ITLB_SET5_E2_PPN_RESET 0x00000000 359#define XCHAL_ITLB_SET5_E3_PPN_RESET 0x00000000 360 361/* ITLB way set 6 (group of ways 6 thru 6): */ 362#define XCHAL_ITLB_SET6_WAY 6 /* index of first way in this way set */ 363#define XCHAL_ITLB_SET6_WAYS 1 /* number of (contiguous) ways in this way set */ 364#define XCHAL_ITLB_SET6_ENTRIES_LOG2 3 /* log2(number of entries in this way) */ 365#define XCHAL_ITLB_SET6_ENTRIES 8 /* number of entries in this way (always a power of 2) */ 366#define XCHAL_ITLB_SET6_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 367#define XCHAL_ITLB_SET6_PAGESIZES 2 /* number of supported page sizes in this way */ 368#define XCHAL_ITLB_SET6_PAGESZ_BITS 1 /* number of bits to encode the page size */ 369#define XCHAL_ITLB_SET6_PAGESZ_LOG2_MIN 28 /* log2(minimum supported page size) */ 370#define XCHAL_ITLB_SET6_PAGESZ_LOG2_MAX 29 /* log2(maximum supported page size) */ 371#define XCHAL_ITLB_SET6_PAGESZ_LOG2_LIST 29 XCHAL_SEP 28 /* list of log2(page size)s, separated by XCHAL_SEP; 372 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 373#define XCHAL_ITLB_SET6_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 374#define XCHAL_ITLB_SET6_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 375#define XCHAL_ITLB_SET6_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 376#define XCHAL_ITLB_SET6_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 377#define XCHAL_ITLB_SET6_ASID_RESET 1 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 378#define XCHAL_ITLB_SET6_VPN_RESET 1 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 379#define XCHAL_ITLB_SET6_PPN_RESET 1 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 380#define XCHAL_ITLB_SET6_CA_RESET 1 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 381/* Reset ASID values for each entry of ITLB way set 6 (because SET6_ASID_RESET is non-zero): */ 382#define XCHAL_ITLB_SET6_E0_ASID_RESET 0x01 383#define XCHAL_ITLB_SET6_E1_ASID_RESET 0x01 384#define XCHAL_ITLB_SET6_E2_ASID_RESET 0x01 385#define XCHAL_ITLB_SET6_E3_ASID_RESET 0x01 386#define XCHAL_ITLB_SET6_E4_ASID_RESET 0x01 387#define XCHAL_ITLB_SET6_E5_ASID_RESET 0x01 388#define XCHAL_ITLB_SET6_E6_ASID_RESET 0x01 389#define XCHAL_ITLB_SET6_E7_ASID_RESET 0x01 390/* Reset VPN values for each entry of ITLB way set 6 (because SET6_VPN_RESET is non-zero): */ 391#define XCHAL_ITLB_SET6_E0_VPN_RESET 0x00000000 392#define XCHAL_ITLB_SET6_E1_VPN_RESET 0x20000000 393#define XCHAL_ITLB_SET6_E2_VPN_RESET 0x40000000 394#define XCHAL_ITLB_SET6_E3_VPN_RESET 0x60000000 395#define XCHAL_ITLB_SET6_E4_VPN_RESET 0x80000000 396#define XCHAL_ITLB_SET6_E5_VPN_RESET 0xA0000000 397#define XCHAL_ITLB_SET6_E6_VPN_RESET 0xC0000000 398#define XCHAL_ITLB_SET6_E7_VPN_RESET 0xE0000000 399/* Reset PPN values for each entry of ITLB way set 6 (because SET6_PPN_RESET is non-zero): */ 400#define XCHAL_ITLB_SET6_E0_PPN_RESET 0x00000000 401#define XCHAL_ITLB_SET6_E1_PPN_RESET 0x20000000 402#define XCHAL_ITLB_SET6_E2_PPN_RESET 0x40000000 403#define XCHAL_ITLB_SET6_E3_PPN_RESET 0x60000000 404#define XCHAL_ITLB_SET6_E4_PPN_RESET 0x80000000 405#define XCHAL_ITLB_SET6_E5_PPN_RESET 0xA0000000 406#define XCHAL_ITLB_SET6_E6_PPN_RESET 0xC0000000 407#define XCHAL_ITLB_SET6_E7_PPN_RESET 0xE0000000 408/* Reset CA values for each entry of ITLB way set 6 (because SET6_CA_RESET is non-zero): */ 409#define XCHAL_ITLB_SET6_E0_CA_RESET 0x03 410#define XCHAL_ITLB_SET6_E1_CA_RESET 0x03 411#define XCHAL_ITLB_SET6_E2_CA_RESET 0x03 412#define XCHAL_ITLB_SET6_E3_CA_RESET 0x03 413#define XCHAL_ITLB_SET6_E4_CA_RESET 0x03 414#define XCHAL_ITLB_SET6_E5_CA_RESET 0x03 415#define XCHAL_ITLB_SET6_E6_CA_RESET 0x03 416#define XCHAL_ITLB_SET6_E7_CA_RESET 0x03 417 418 419/*** Data TLB: ***/ 420 421#define XCHAL_DTLB_WAY_BITS 4 /* number of bits holding the ways */ 422#define XCHAL_DTLB_WAYS 10 /* number of ways (n-way set-associative TLB) */ 423#define XCHAL_DTLB_ARF_WAYS 4 /* number of auto-refill ways */ 424#define XCHAL_DTLB_SETS 10 /* number of sets (groups of ways with identical settings) */ 425 426/* Way set to which each way belongs: */ 427#define XCHAL_DTLB_WAY0_SET 0 428#define XCHAL_DTLB_WAY1_SET 1 429#define XCHAL_DTLB_WAY2_SET 2 430#define XCHAL_DTLB_WAY3_SET 3 431#define XCHAL_DTLB_WAY4_SET 4 432#define XCHAL_DTLB_WAY5_SET 5 433#define XCHAL_DTLB_WAY6_SET 6 434#define XCHAL_DTLB_WAY7_SET 7 435#define XCHAL_DTLB_WAY8_SET 8 436#define XCHAL_DTLB_WAY9_SET 9 437 438/* Ways sets that are used by hardware auto-refill (ARF): */ 439#define XCHAL_DTLB_ARF_SETS 4 /* number of auto-refill sets */ 440#define XCHAL_DTLB_ARF_SET0 0 /* index of n'th auto-refill set */ 441#define XCHAL_DTLB_ARF_SET1 1 /* index of n'th auto-refill set */ 442#define XCHAL_DTLB_ARF_SET2 2 /* index of n'th auto-refill set */ 443#define XCHAL_DTLB_ARF_SET3 3 /* index of n'th auto-refill set */ 444 445/* Way sets that are "min-wired" (see terminology comment above): */ 446#define XCHAL_DTLB_MINWIRED_SETS 3 /* number of "min-wired" sets */ 447#define XCHAL_DTLB_MINWIRED_SET0 7 /* index of n'th "min-wired" set */ 448#define XCHAL_DTLB_MINWIRED_SET1 8 /* index of n'th "min-wired" set */ 449#define XCHAL_DTLB_MINWIRED_SET2 9 /* index of n'th "min-wired" set */ 450 451 452/* DTLB way set 0 (group of ways 0 thru 0): */ 453#define XCHAL_DTLB_SET0_WAY 0 /* index of first way in this way set */ 454#define XCHAL_DTLB_SET0_WAYS 1 /* number of (contiguous) ways in this way set */ 455#define XCHAL_DTLB_SET0_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 456#define XCHAL_DTLB_SET0_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 457#define XCHAL_DTLB_SET0_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 458#define XCHAL_DTLB_SET0_PAGESIZES 1 /* number of supported page sizes in this way */ 459#define XCHAL_DTLB_SET0_PAGESZ_BITS 0 /* number of bits to encode the page size */ 460#define XCHAL_DTLB_SET0_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 461#define XCHAL_DTLB_SET0_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 462#define XCHAL_DTLB_SET0_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 463 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 464#define XCHAL_DTLB_SET0_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 465#define XCHAL_DTLB_SET0_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 466#define XCHAL_DTLB_SET0_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 467#define XCHAL_DTLB_SET0_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 468#define XCHAL_DTLB_SET0_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 469#define XCHAL_DTLB_SET0_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 470#define XCHAL_DTLB_SET0_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 471#define XCHAL_DTLB_SET0_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 472 473/* DTLB way set 1 (group of ways 1 thru 1): */ 474#define XCHAL_DTLB_SET1_WAY 1 /* index of first way in this way set */ 475#define XCHAL_DTLB_SET1_WAYS 1 /* number of (contiguous) ways in this way set */ 476#define XCHAL_DTLB_SET1_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 477#define XCHAL_DTLB_SET1_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 478#define XCHAL_DTLB_SET1_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 479#define XCHAL_DTLB_SET1_PAGESIZES 1 /* number of supported page sizes in this way */ 480#define XCHAL_DTLB_SET1_PAGESZ_BITS 0 /* number of bits to encode the page size */ 481#define XCHAL_DTLB_SET1_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 482#define XCHAL_DTLB_SET1_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 483#define XCHAL_DTLB_SET1_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 484 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 485#define XCHAL_DTLB_SET1_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 486#define XCHAL_DTLB_SET1_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 487#define XCHAL_DTLB_SET1_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 488#define XCHAL_DTLB_SET1_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 489#define XCHAL_DTLB_SET1_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 490#define XCHAL_DTLB_SET1_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 491#define XCHAL_DTLB_SET1_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 492#define XCHAL_DTLB_SET1_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 493 494/* DTLB way set 2 (group of ways 2 thru 2): */ 495#define XCHAL_DTLB_SET2_WAY 2 /* index of first way in this way set */ 496#define XCHAL_DTLB_SET2_WAYS 1 /* number of (contiguous) ways in this way set */ 497#define XCHAL_DTLB_SET2_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 498#define XCHAL_DTLB_SET2_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 499#define XCHAL_DTLB_SET2_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 500#define XCHAL_DTLB_SET2_PAGESIZES 1 /* number of supported page sizes in this way */ 501#define XCHAL_DTLB_SET2_PAGESZ_BITS 0 /* number of bits to encode the page size */ 502#define XCHAL_DTLB_SET2_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 503#define XCHAL_DTLB_SET2_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 504#define XCHAL_DTLB_SET2_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 505 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 506#define XCHAL_DTLB_SET2_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 507#define XCHAL_DTLB_SET2_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 508#define XCHAL_DTLB_SET2_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 509#define XCHAL_DTLB_SET2_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 510#define XCHAL_DTLB_SET2_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 511#define XCHAL_DTLB_SET2_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 512#define XCHAL_DTLB_SET2_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 513#define XCHAL_DTLB_SET2_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 514 515/* DTLB way set 3 (group of ways 3 thru 3): */ 516#define XCHAL_DTLB_SET3_WAY 3 /* index of first way in this way set */ 517#define XCHAL_DTLB_SET3_WAYS 1 /* number of (contiguous) ways in this way set */ 518#define XCHAL_DTLB_SET3_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 519#define XCHAL_DTLB_SET3_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 520#define XCHAL_DTLB_SET3_ARF 1 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 521#define XCHAL_DTLB_SET3_PAGESIZES 1 /* number of supported page sizes in this way */ 522#define XCHAL_DTLB_SET3_PAGESZ_BITS 0 /* number of bits to encode the page size */ 523#define XCHAL_DTLB_SET3_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 524#define XCHAL_DTLB_SET3_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 525#define XCHAL_DTLB_SET3_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 526 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 527#define XCHAL_DTLB_SET3_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 528#define XCHAL_DTLB_SET3_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 529#define XCHAL_DTLB_SET3_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 530#define XCHAL_DTLB_SET3_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 531#define XCHAL_DTLB_SET3_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 532#define XCHAL_DTLB_SET3_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 533#define XCHAL_DTLB_SET3_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 534#define XCHAL_DTLB_SET3_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 535 536/* DTLB way set 4 (group of ways 4 thru 4): */ 537#define XCHAL_DTLB_SET4_WAY 4 /* index of first way in this way set */ 538#define XCHAL_DTLB_SET4_WAYS 1 /* number of (contiguous) ways in this way set */ 539#define XCHAL_DTLB_SET4_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 540#define XCHAL_DTLB_SET4_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 541#define XCHAL_DTLB_SET4_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 542#define XCHAL_DTLB_SET4_PAGESIZES 4 /* number of supported page sizes in this way */ 543#define XCHAL_DTLB_SET4_PAGESZ_BITS 2 /* number of bits to encode the page size */ 544#define XCHAL_DTLB_SET4_PAGESZ_LOG2_MIN 20 /* log2(minimum supported page size) */ 545#define XCHAL_DTLB_SET4_PAGESZ_LOG2_MAX 26 /* log2(maximum supported page size) */ 546#define XCHAL_DTLB_SET4_PAGESZ_LOG2_LIST 20 XCHAL_SEP 22 XCHAL_SEP 24 XCHAL_SEP 26 /* list of log2(page size)s, separated by XCHAL_SEP; 547 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 548#define XCHAL_DTLB_SET4_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 549#define XCHAL_DTLB_SET4_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 550#define XCHAL_DTLB_SET4_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 551#define XCHAL_DTLB_SET4_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 552#define XCHAL_DTLB_SET4_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 553#define XCHAL_DTLB_SET4_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 554#define XCHAL_DTLB_SET4_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 555#define XCHAL_DTLB_SET4_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 556 557/* DTLB way set 5 (group of ways 5 thru 5): */ 558#define XCHAL_DTLB_SET5_WAY 5 /* index of first way in this way set */ 559#define XCHAL_DTLB_SET5_WAYS 1 /* number of (contiguous) ways in this way set */ 560#define XCHAL_DTLB_SET5_ENTRIES_LOG2 2 /* log2(number of entries in this way) */ 561#define XCHAL_DTLB_SET5_ENTRIES 4 /* number of entries in this way (always a power of 2) */ 562#define XCHAL_DTLB_SET5_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 563#define XCHAL_DTLB_SET5_PAGESIZES 2 /* number of supported page sizes in this way */ 564#define XCHAL_DTLB_SET5_PAGESZ_BITS 1 /* number of bits to encode the page size */ 565#define XCHAL_DTLB_SET5_PAGESZ_LOG2_MIN 27 /* log2(minimum supported page size) */ 566#define XCHAL_DTLB_SET5_PAGESZ_LOG2_MAX 28 /* log2(maximum supported page size) */ 567#define XCHAL_DTLB_SET5_PAGESZ_LOG2_LIST 27 XCHAL_SEP 28 /* list of log2(page size)s, separated by XCHAL_SEP; 568 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 569#define XCHAL_DTLB_SET5_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 570#define XCHAL_DTLB_SET5_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 571#define XCHAL_DTLB_SET5_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 572#define XCHAL_DTLB_SET5_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 573#define XCHAL_DTLB_SET5_ASID_RESET 1 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 574#define XCHAL_DTLB_SET5_VPN_RESET 1 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 575#define XCHAL_DTLB_SET5_PPN_RESET 1 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 576#define XCHAL_DTLB_SET5_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 577/* Reset ASID values for each entry of DTLB way set 5 (because SET5_ASID_RESET is non-zero): */ 578#define XCHAL_DTLB_SET5_E0_ASID_RESET 0x00 579#define XCHAL_DTLB_SET5_E1_ASID_RESET 0x00 580#define XCHAL_DTLB_SET5_E2_ASID_RESET 0x00 581#define XCHAL_DTLB_SET5_E3_ASID_RESET 0x00 582/* Reset VPN values for each entry of DTLB way set 5 (because SET5_VPN_RESET is non-zero): */ 583#define XCHAL_DTLB_SET5_E0_VPN_RESET 0x00000000 584#define XCHAL_DTLB_SET5_E1_VPN_RESET 0x00000000 585#define XCHAL_DTLB_SET5_E2_VPN_RESET 0x00000000 586#define XCHAL_DTLB_SET5_E3_VPN_RESET 0x00000000 587/* Reset PPN values for each entry of DTLB way set 5 (because SET5_PPN_RESET is non-zero): */ 588#define XCHAL_DTLB_SET5_E0_PPN_RESET 0x00000000 589#define XCHAL_DTLB_SET5_E1_PPN_RESET 0x00000000 590#define XCHAL_DTLB_SET5_E2_PPN_RESET 0x00000000 591#define XCHAL_DTLB_SET5_E3_PPN_RESET 0x00000000 592 593/* DTLB way set 6 (group of ways 6 thru 6): */ 594#define XCHAL_DTLB_SET6_WAY 6 /* index of first way in this way set */ 595#define XCHAL_DTLB_SET6_WAYS 1 /* number of (contiguous) ways in this way set */ 596#define XCHAL_DTLB_SET6_ENTRIES_LOG2 3 /* log2(number of entries in this way) */ 597#define XCHAL_DTLB_SET6_ENTRIES 8 /* number of entries in this way (always a power of 2) */ 598#define XCHAL_DTLB_SET6_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 599#define XCHAL_DTLB_SET6_PAGESIZES 2 /* number of supported page sizes in this way */ 600#define XCHAL_DTLB_SET6_PAGESZ_BITS 1 /* number of bits to encode the page size */ 601#define XCHAL_DTLB_SET6_PAGESZ_LOG2_MIN 28 /* log2(minimum supported page size) */ 602#define XCHAL_DTLB_SET6_PAGESZ_LOG2_MAX 29 /* log2(maximum supported page size) */ 603#define XCHAL_DTLB_SET6_PAGESZ_LOG2_LIST 29 XCHAL_SEP 28 /* list of log2(page size)s, separated by XCHAL_SEP; 604 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 605#define XCHAL_DTLB_SET6_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 606#define XCHAL_DTLB_SET6_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 607#define XCHAL_DTLB_SET6_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 608#define XCHAL_DTLB_SET6_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 609#define XCHAL_DTLB_SET6_ASID_RESET 1 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 610#define XCHAL_DTLB_SET6_VPN_RESET 1 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 611#define XCHAL_DTLB_SET6_PPN_RESET 1 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 612#define XCHAL_DTLB_SET6_CA_RESET 1 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 613/* Reset ASID values for each entry of DTLB way set 6 (because SET6_ASID_RESET is non-zero): */ 614#define XCHAL_DTLB_SET6_E0_ASID_RESET 0x01 615#define XCHAL_DTLB_SET6_E1_ASID_RESET 0x01 616#define XCHAL_DTLB_SET6_E2_ASID_RESET 0x01 617#define XCHAL_DTLB_SET6_E3_ASID_RESET 0x01 618#define XCHAL_DTLB_SET6_E4_ASID_RESET 0x01 619#define XCHAL_DTLB_SET6_E5_ASID_RESET 0x01 620#define XCHAL_DTLB_SET6_E6_ASID_RESET 0x01 621#define XCHAL_DTLB_SET6_E7_ASID_RESET 0x01 622/* Reset VPN values for each entry of DTLB way set 6 (because SET6_VPN_RESET is non-zero): */ 623#define XCHAL_DTLB_SET6_E0_VPN_RESET 0x00000000 624#define XCHAL_DTLB_SET6_E1_VPN_RESET 0x20000000 625#define XCHAL_DTLB_SET6_E2_VPN_RESET 0x40000000 626#define XCHAL_DTLB_SET6_E3_VPN_RESET 0x60000000 627#define XCHAL_DTLB_SET6_E4_VPN_RESET 0x80000000 628#define XCHAL_DTLB_SET6_E5_VPN_RESET 0xA0000000 629#define XCHAL_DTLB_SET6_E6_VPN_RESET 0xC0000000 630#define XCHAL_DTLB_SET6_E7_VPN_RESET 0xE0000000 631/* Reset PPN values for each entry of DTLB way set 6 (because SET6_PPN_RESET is non-zero): */ 632#define XCHAL_DTLB_SET6_E0_PPN_RESET 0x00000000 633#define XCHAL_DTLB_SET6_E1_PPN_RESET 0x20000000 634#define XCHAL_DTLB_SET6_E2_PPN_RESET 0x40000000 635#define XCHAL_DTLB_SET6_E3_PPN_RESET 0x60000000 636#define XCHAL_DTLB_SET6_E4_PPN_RESET 0x80000000 637#define XCHAL_DTLB_SET6_E5_PPN_RESET 0xA0000000 638#define XCHAL_DTLB_SET6_E6_PPN_RESET 0xC0000000 639#define XCHAL_DTLB_SET6_E7_PPN_RESET 0xE0000000 640/* Reset CA values for each entry of DTLB way set 6 (because SET6_CA_RESET is non-zero): */ 641#define XCHAL_DTLB_SET6_E0_CA_RESET 0x03 642#define XCHAL_DTLB_SET6_E1_CA_RESET 0x03 643#define XCHAL_DTLB_SET6_E2_CA_RESET 0x03 644#define XCHAL_DTLB_SET6_E3_CA_RESET 0x03 645#define XCHAL_DTLB_SET6_E4_CA_RESET 0x03 646#define XCHAL_DTLB_SET6_E5_CA_RESET 0x03 647#define XCHAL_DTLB_SET6_E6_CA_RESET 0x03 648#define XCHAL_DTLB_SET6_E7_CA_RESET 0x03 649 650/* DTLB way set 7 (group of ways 7 thru 7): */ 651#define XCHAL_DTLB_SET7_WAY 7 /* index of first way in this way set */ 652#define XCHAL_DTLB_SET7_WAYS 1 /* number of (contiguous) ways in this way set */ 653#define XCHAL_DTLB_SET7_ENTRIES_LOG2 0 /* log2(number of entries in this way) */ 654#define XCHAL_DTLB_SET7_ENTRIES 1 /* number of entries in this way (always a power of 2) */ 655#define XCHAL_DTLB_SET7_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 656#define XCHAL_DTLB_SET7_PAGESIZES 1 /* number of supported page sizes in this way */ 657#define XCHAL_DTLB_SET7_PAGESZ_BITS 0 /* number of bits to encode the page size */ 658#define XCHAL_DTLB_SET7_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 659#define XCHAL_DTLB_SET7_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 660#define XCHAL_DTLB_SET7_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 661 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 662#define XCHAL_DTLB_SET7_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 663#define XCHAL_DTLB_SET7_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 664#define XCHAL_DTLB_SET7_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 665#define XCHAL_DTLB_SET7_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 666#define XCHAL_DTLB_SET7_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 667#define XCHAL_DTLB_SET7_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 668#define XCHAL_DTLB_SET7_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 669#define XCHAL_DTLB_SET7_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 670 671/* DTLB way set 8 (group of ways 8 thru 8): */ 672#define XCHAL_DTLB_SET8_WAY 8 /* index of first way in this way set */ 673#define XCHAL_DTLB_SET8_WAYS 1 /* number of (contiguous) ways in this way set */ 674#define XCHAL_DTLB_SET8_ENTRIES_LOG2 0 /* log2(number of entries in this way) */ 675#define XCHAL_DTLB_SET8_ENTRIES 1 /* number of entries in this way (always a power of 2) */ 676#define XCHAL_DTLB_SET8_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 677#define XCHAL_DTLB_SET8_PAGESIZES 1 /* number of supported page sizes in this way */ 678#define XCHAL_DTLB_SET8_PAGESZ_BITS 0 /* number of bits to encode the page size */ 679#define XCHAL_DTLB_SET8_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 680#define XCHAL_DTLB_SET8_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 681#define XCHAL_DTLB_SET8_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 682 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 683#define XCHAL_DTLB_SET8_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 684#define XCHAL_DTLB_SET8_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 685#define XCHAL_DTLB_SET8_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 686#define XCHAL_DTLB_SET8_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 687#define XCHAL_DTLB_SET8_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 688#define XCHAL_DTLB_SET8_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 689#define XCHAL_DTLB_SET8_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 690#define XCHAL_DTLB_SET8_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 691 692/* DTLB way set 9 (group of ways 9 thru 9): */ 693#define XCHAL_DTLB_SET9_WAY 9 /* index of first way in this way set */ 694#define XCHAL_DTLB_SET9_WAYS 1 /* number of (contiguous) ways in this way set */ 695#define XCHAL_DTLB_SET9_ENTRIES_LOG2 0 /* log2(number of entries in this way) */ 696#define XCHAL_DTLB_SET9_ENTRIES 1 /* number of entries in this way (always a power of 2) */ 697#define XCHAL_DTLB_SET9_ARF 0 /* 1=autorefill by h/w, 0=non-autorefill (wired/constant/static) */ 698#define XCHAL_DTLB_SET9_PAGESIZES 1 /* number of supported page sizes in this way */ 699#define XCHAL_DTLB_SET9_PAGESZ_BITS 0 /* number of bits to encode the page size */ 700#define XCHAL_DTLB_SET9_PAGESZ_LOG2_MIN 12 /* log2(minimum supported page size) */ 701#define XCHAL_DTLB_SET9_PAGESZ_LOG2_MAX 12 /* log2(maximum supported page size) */ 702#define XCHAL_DTLB_SET9_PAGESZ_LOG2_LIST 12 /* list of log2(page size)s, separated by XCHAL_SEP; 703 2^PAGESZ_BITS entries in list, unsupported entries are zero */ 704#define XCHAL_DTLB_SET9_ASID_CONSTMASK 0 /* constant ASID bits; 0 if all writable */ 705#define XCHAL_DTLB_SET9_VPN_CONSTMASK 0 /* constant VPN bits, not including entry index bits; 0 if all writable */ 706#define XCHAL_DTLB_SET9_PPN_CONSTMASK 0 /* constant PPN bits, including entry index bits; 0 if all writable */ 707#define XCHAL_DTLB_SET9_CA_CONSTMASK 0 /* constant CA bits; 0 if all writable */ 708#define XCHAL_DTLB_SET9_ASID_RESET 0 /* 1 if ASID reset values defined (and all writable); 0 otherwise */ 709#define XCHAL_DTLB_SET9_VPN_RESET 0 /* 1 if VPN reset values defined (and all writable); 0 otherwise */ 710#define XCHAL_DTLB_SET9_PPN_RESET 0 /* 1 if PPN reset values defined (and all writable); 0 otherwise */ 711#define XCHAL_DTLB_SET9_CA_RESET 0 /* 1 if CA reset values defined (and all writable); 0 otherwise */ 712 713 714 715 716#endif /*XTENSA_CONFIG_CORE_MATMAP_H*/ 717