xref: /minix3/sys/arch/arm/include/arm32/pte.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: pte.h,v 1.19 2014/10/29 10:59:48 skrll Exp $	*/
281473dbbSBen Gras 
381473dbbSBen Gras /*
481473dbbSBen Gras  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
581473dbbSBen Gras  * All rights reserved.
681473dbbSBen Gras  *
781473dbbSBen Gras  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
881473dbbSBen Gras  *
981473dbbSBen Gras  * Redistribution and use in source and binary forms, with or without
1081473dbbSBen Gras  * modification, are permitted provided that the following conditions
1181473dbbSBen Gras  * are met:
1281473dbbSBen Gras  * 1. Redistributions of source code must retain the above copyright
1381473dbbSBen Gras  *    notice, this list of conditions and the following disclaimer.
1481473dbbSBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
1581473dbbSBen Gras  *    notice, this list of conditions and the following disclaimer in the
1681473dbbSBen Gras  *    documentation and/or other materials provided with the distribution.
1781473dbbSBen Gras  * 3. All advertising materials mentioning features or use of this software
1881473dbbSBen Gras  *    must display the following acknowledgement:
1981473dbbSBen Gras  *	This product includes software developed for the NetBSD Project by
2081473dbbSBen Gras  *	Wasabi Systems, Inc.
2181473dbbSBen Gras  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
2281473dbbSBen Gras  *    or promote products derived from this software without specific prior
2381473dbbSBen Gras  *    written permission.
2481473dbbSBen Gras  *
2581473dbbSBen Gras  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
2681473dbbSBen Gras  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2781473dbbSBen Gras  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2881473dbbSBen Gras  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
2981473dbbSBen Gras  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3081473dbbSBen Gras  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3181473dbbSBen Gras  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3281473dbbSBen Gras  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3381473dbbSBen Gras  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3481473dbbSBen Gras  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3581473dbbSBen Gras  * POSSIBILITY OF SUCH DAMAGE.
3681473dbbSBen Gras  */
3781473dbbSBen Gras 
3881473dbbSBen Gras #ifndef _ARM_PTE_H_
3981473dbbSBen Gras #define	_ARM_PTE_H_
4081473dbbSBen Gras 
4181473dbbSBen Gras /*
4281473dbbSBen Gras  * The ARM MMU architecture was introduced with ARM v3 (previous ARM
4381473dbbSBen Gras  * architecture versions used an optional off-CPU memory controller
4481473dbbSBen Gras  * to perform address translation).
4581473dbbSBen Gras  *
4681473dbbSBen Gras  * The ARM MMU consists of a TLB and translation table walking logic.
4781473dbbSBen Gras  * There is typically one TLB per memory interface (or, put another
4881473dbbSBen Gras  * way, one TLB per software-visible cache).
4981473dbbSBen Gras  *
5081473dbbSBen Gras  * The ARM MMU is capable of mapping memory in the following chunks:
5181473dbbSBen Gras  *
5281473dbbSBen Gras  *	16M	SuperSections (L1 table, ARMv6+)
5381473dbbSBen Gras  *
5481473dbbSBen Gras  *	1M	Sections (L1 table)
5581473dbbSBen Gras  *
5681473dbbSBen Gras  *	64K	Large Pages (L2 table)
5781473dbbSBen Gras  *
5881473dbbSBen Gras  *	4K	Small Pages (L2 table)
5981473dbbSBen Gras  *
6081473dbbSBen Gras  *	1K	Tiny Pages (L2 table)
6181473dbbSBen Gras  *
6281473dbbSBen Gras  * There are two types of L2 tables: Coarse Tables and Fine Tables (not
6381473dbbSBen Gras  * available on ARMv6+).  Coarse Tables can map Large and Small Pages.
6481473dbbSBen Gras  * Fine Tables can map Tiny Pages.
6581473dbbSBen Gras  *
6681473dbbSBen Gras  * Coarse Tables can define 4 Subpages within Large and Small pages.
6781473dbbSBen Gras  * Subpages define different permissions for each Subpage within
6881473dbbSBen Gras  * a Page.  ARMv6 format Coarse Tables have no subpages.
6981473dbbSBen Gras  *
7081473dbbSBen Gras  * Coarse Tables are 1K in length.  Fine tables are 4K in length.
7181473dbbSBen Gras  *
7281473dbbSBen Gras  * The Translation Table Base register holds the pointer to the
7381473dbbSBen Gras  * L1 Table.  The L1 Table is a 16K contiguous chunk of memory
7481473dbbSBen Gras  * aligned to a 16K boundary.  Each entry in the L1 Table maps
7581473dbbSBen Gras  * 1M of virtual address space, either via a Section mapping or
7681473dbbSBen Gras  * via an L2 Table.
7781473dbbSBen Gras  *
7881473dbbSBen Gras  * ARMv6+ has a second TTBR register which can be used if any of the
7981473dbbSBen Gras  * upper address bits are non-zero (think kernel).  For NetBSD, this
8081473dbbSBen Gras  * would be 1 upper bit splitting user/kernel in a 2GB/2GB split.
8181473dbbSBen Gras  * This would also reduce the size of the L1 Table to 8K.
8281473dbbSBen Gras  *
8381473dbbSBen Gras  * In addition, the Fast Context Switching Extension (FCSE) is available
8481473dbbSBen Gras  * on some ARM v4 and ARM v5 processors.  FCSE is a way of eliminating
8581473dbbSBen Gras  * TLB/cache flushes on context switch by use of a smaller address space
8681473dbbSBen Gras  * and a "process ID" that modifies the virtual address before being
8781473dbbSBen Gras  * presented to the translation logic.
8881473dbbSBen Gras  */
8981473dbbSBen Gras 
9081473dbbSBen Gras #ifndef _LOCORE
9181473dbbSBen Gras typedef uint32_t	pd_entry_t;	/* L1 table entry */
9281473dbbSBen Gras typedef uint32_t	pt_entry_t;	/* L2 table entry */
9381473dbbSBen Gras #endif /* _LOCORE */
9481473dbbSBen Gras 
9581473dbbSBen Gras #define	L1_SS_SIZE	0x01000000	/* 16M */
9681473dbbSBen Gras #define	L1_SS_OFFSET	(L1_SS_SIZE - 1)
9781473dbbSBen Gras #define	L1_SS_FRAME	(~L1_SS_OFFSET)
9881473dbbSBen Gras #define	L1_SS_SHIFT	24
9981473dbbSBen Gras 
10081473dbbSBen Gras #define	L1_S_SIZE	0x00100000	/* 1M */
10181473dbbSBen Gras #define	L1_S_OFFSET	(L1_S_SIZE - 1)
10281473dbbSBen Gras #define	L1_S_FRAME	(~L1_S_OFFSET)
10381473dbbSBen Gras #define	L1_S_SHIFT	20
10481473dbbSBen Gras 
10581473dbbSBen Gras #define	L2_L_SIZE	0x00010000	/* 64K */
10681473dbbSBen Gras #define	L2_L_OFFSET	(L2_L_SIZE - 1)
10781473dbbSBen Gras #define	L2_L_FRAME	(~L2_L_OFFSET)
10881473dbbSBen Gras #define	L2_L_SHIFT	16
10981473dbbSBen Gras 
11081473dbbSBen Gras #define	L2_S_SEGSIZE	(PAGE_SIZE * L2_S_SIZE / 4)
11181473dbbSBen Gras #define	L2_S_SIZE	0x00001000	/* 4K */
11281473dbbSBen Gras #define	L2_S_OFFSET	(L2_S_SIZE - 1)
11381473dbbSBen Gras #define	L2_S_FRAME	(~L2_S_OFFSET)
11481473dbbSBen Gras #define	L2_S_SHIFT	12
11581473dbbSBen Gras 
11681473dbbSBen Gras #define	L2_T_SIZE	0x00000400	/* 1K */
11781473dbbSBen Gras #define	L2_T_OFFSET	(L2_T_SIZE - 1)
11881473dbbSBen Gras #define	L2_T_FRAME	(~L2_T_OFFSET)
11981473dbbSBen Gras #define	L2_T_SHIFT	10
12081473dbbSBen Gras 
12181473dbbSBen Gras /*
12281473dbbSBen Gras  * The NetBSD VM implementation only works on whole pages (4K),
12381473dbbSBen Gras  * whereas the ARM MMU's Coarse tables are sized in terms of 1K
12481473dbbSBen Gras  * (16K L1 table, 1K L2 table).
12581473dbbSBen Gras  *
12681473dbbSBen Gras  * So, we allocate L2 tables 4 at a time, thus yielding a 4K L2
12781473dbbSBen Gras  * table.
12881473dbbSBen Gras  */
12981473dbbSBen Gras #define	L1_ADDR_BITS	0xfff00000	/* L1 PTE address bits */
13081473dbbSBen Gras #define	L2_ADDR_BITS	0x000ff000	/* L2 PTE address bits */
13181473dbbSBen Gras 
13281473dbbSBen Gras #define	L1_TABLE_SIZE	0x4000		/* 16K */
13381473dbbSBen Gras #define	L2_TABLE_SIZE	0x1000		/* 4K */
13481473dbbSBen Gras /*
13581473dbbSBen Gras  * The new pmap deals with the 1KB coarse L2 tables by
13681473dbbSBen Gras  * allocating them from a pool. Until every port has been converted,
13781473dbbSBen Gras  * keep the old L2_TABLE_SIZE define lying around. Converted ports
13881473dbbSBen Gras  * should use L2_TABLE_SIZE_REAL until then.
13981473dbbSBen Gras  */
140*0a6a1f1dSLionel Sambuc #define	L1_TABLE_SIZE_REAL	0x4000	/* 16K */
14181473dbbSBen Gras #define	L2_TABLE_SIZE_REAL	0x400	/* 1K */
14281473dbbSBen Gras 
14381473dbbSBen Gras /*
14481473dbbSBen Gras  * ARM L1 Descriptors
14581473dbbSBen Gras  */
14681473dbbSBen Gras 
14781473dbbSBen Gras #define	L1_TYPE_INV	0x00		/* Invalid (fault) */
14881473dbbSBen Gras #define	L1_TYPE_C	0x01		/* Coarse L2 */
14981473dbbSBen Gras #define	L1_TYPE_S	0x02		/* Section */
15081473dbbSBen Gras #define	L1_TYPE_F	0x03		/* Fine L2 */
15181473dbbSBen Gras #define	L1_TYPE_MASK	0x03		/* mask of type bits */
15281473dbbSBen Gras 
15381473dbbSBen Gras /* L1 Section Descriptor */
15481473dbbSBen Gras #define	L1_S_B		0x00000004	/* bufferable Section */
15581473dbbSBen Gras #define	L1_S_C		0x00000008	/* cacheable Section */
15681473dbbSBen Gras #define	L1_S_IMP	0x00000010	/* implementation defined */
15781473dbbSBen Gras #define	L1_S_DOM(x)	((x) << 5)	/* domain */
15881473dbbSBen Gras #define	L1_S_DOM_MASK	L1_S_DOM(0xf)
15981473dbbSBen Gras #define	L1_S_AP(x)	((x) << 10)	/* access permissions */
16081473dbbSBen Gras #define	L1_S_ADDR_MASK	0xfff00000	/* phys address of section */
16181473dbbSBen Gras 
16281473dbbSBen Gras #define	L1_S_XSCALE_P	0x00000200	/* ECC enable for this section */
16381473dbbSBen Gras #define	L1_S_XS_TEX(x) ((x) << 12)	/* Type Extension */
16481473dbbSBen Gras #define	L1_S_V6_TEX(x)	L1_S_XS_TEX(x)
16581473dbbSBen Gras #define	L1_S_V6_P	0x00000200	/* ECC enable for this section */
16681473dbbSBen Gras #define	L1_S_V6_SUPER	0x00040000	/* ARMv6 SuperSection (16MB) bit */
16781473dbbSBen Gras #define	L1_S_V6_XN	L1_S_IMP	/* ARMv6 eXecute Never */
16881473dbbSBen Gras #define	L1_S_V6_APX	0x00008000	/* ARMv6 AP eXtension */
16981473dbbSBen Gras #define	L1_S_V6_S	0x00010000	/* ARMv6 Shared */
17081473dbbSBen Gras #define	L1_S_V6_nG	0x00020000	/* ARMv6 not-Global */
17181473dbbSBen Gras #define	L1_S_V6_SS	0x00040000	/* ARMv6 SuperSection */
17281473dbbSBen Gras #define	L1_S_V6_NS	0x00080000	/* ARMv6 Not Secure */
17381473dbbSBen Gras 
17481473dbbSBen Gras /* L1 Coarse Descriptor */
17581473dbbSBen Gras #define	L1_C_IMP0	0x00000004	/* implementation defined */
17681473dbbSBen Gras #define	L1_C_IMP1	0x00000008	/* implementation defined */
17781473dbbSBen Gras #define	L1_C_IMP2	0x00000010	/* implementation defined */
17881473dbbSBen Gras #define	L1_C_DOM(x)	((x) << 5)	/* domain */
17981473dbbSBen Gras #define	L1_C_DOM_MASK	L1_C_DOM(0xf)
18081473dbbSBen Gras #define	L1_C_ADDR_MASK	0xfffffc00	/* phys address of L2 Table */
18181473dbbSBen Gras 
18281473dbbSBen Gras #define	L1_C_XSCALE_P	0x00000200	/* ECC enable for this section */
18381473dbbSBen Gras #define	L1_C_V6_P	0x00000200	/* ECC enable for this section */
18481473dbbSBen Gras 
18581473dbbSBen Gras /* L1 Fine Descriptor */
18681473dbbSBen Gras #define	L1_F_IMP0	0x00000004	/* implementation defined */
18781473dbbSBen Gras #define	L1_F_IMP1	0x00000008	/* implementation defined */
18881473dbbSBen Gras #define	L1_F_IMP2	0x00000010	/* implementation defined */
18981473dbbSBen Gras #define	L1_F_DOM(x)	((x) << 5)	/* domain */
19081473dbbSBen Gras #define	L1_F_DOM_MASK	L1_F_DOM(0xf)
19181473dbbSBen Gras #define	L1_F_ADDR_MASK	0xfffff000	/* phys address of L2 Table */
19281473dbbSBen Gras 
19381473dbbSBen Gras #define	L1_F_XSCALE_P	0x00000200	/* ECC enable for this section */
19481473dbbSBen Gras 
19581473dbbSBen Gras /*
19681473dbbSBen Gras  * ARM L2 Descriptors
19781473dbbSBen Gras  */
19881473dbbSBen Gras 
19981473dbbSBen Gras #define	L2_TYPE_INV	0x00		/* Invalid (fault) */
20081473dbbSBen Gras #define	L2_TYPE_L	0x01		/* Large Page */
20181473dbbSBen Gras #define	L2_TYPE_S	0x02		/* Small Page */
20281473dbbSBen Gras #define	L2_TYPE_T	0x03		/* Tiny Page (not armv7) */
20381473dbbSBen Gras #define	L2_TYPE_MASK	0x03		/* mask of type bits */
20481473dbbSBen Gras 
20581473dbbSBen Gras /*
20681473dbbSBen Gras  * This L2 Descriptor type is available on XScale processors
20781473dbbSBen Gras  * when using a Coarse L1 Descriptor.  The Extended Small
20881473dbbSBen Gras  * Descriptor has the same format as the XScale Tiny Descriptor,
20981473dbbSBen Gras  * but describes a 4K page, rather than a 1K page.
21081473dbbSBen Gras  * For V6 MMU, this is used when XP bit is cleared.
21181473dbbSBen Gras  */
21281473dbbSBen Gras #define	L2_TYPE_XS	0x03		/* XScale/ARMv6 Extended Small Page */
21381473dbbSBen Gras 
21481473dbbSBen Gras #define	L2_B		0x00000004	/* Bufferable page */
21581473dbbSBen Gras #define	L2_C		0x00000008	/* Cacheable page */
21681473dbbSBen Gras #define	L2_AP0(x)	((x) << 4)	/* access permissions (sp 0) */
21781473dbbSBen Gras #define	L2_AP1(x)	((x) << 6)	/* access permissions (sp 1) */
21881473dbbSBen Gras #define	L2_AP2(x)	((x) << 8)	/* access permissions (sp 2) */
21981473dbbSBen Gras #define	L2_AP3(x)	((x) << 10)	/* access permissions (sp 3) */
22081473dbbSBen Gras #define	L2_AP(x)	(L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x))
22181473dbbSBen Gras 
22281473dbbSBen Gras #define	L2_XS_L_TEX(x)	((x) << 12)	/* Type Extension */
22381473dbbSBen Gras #define	L2_XS_T_TEX(x)	((x) << 6)	/* Type Extension */
22481473dbbSBen Gras #define	L2_XS_XN	0x00000001	/* ARMv6 eXecute Never (when XP=1) */
22581473dbbSBen Gras #define	L2_XS_APX	0x00000200	/* ARMv6 AP eXtension */
22681473dbbSBen Gras #define	L2_XS_S		0x00000400	/* ARMv6 Shared */
22781473dbbSBen Gras #define	L2_XS_nG	0x00000800	/* ARMv6 Not-Global */
22881473dbbSBen Gras #define	L2_V6_L_TEX	L2_XS_L_TEX
22981473dbbSBen Gras #define	L2_V6_XS_TEX	L2_XS_T_TEX
230*0a6a1f1dSLionel Sambuc #define	L2_XS_L_XN	0x00008000	/* ARMv6 eXecute Never */
23181473dbbSBen Gras 
23281473dbbSBen Gras 
23381473dbbSBen Gras /*
23481473dbbSBen Gras  * Access Permissions for L1 and L2 Descriptors.
23581473dbbSBen Gras  */
23681473dbbSBen Gras #define	AP_W		0x01		/* writable */
23781473dbbSBen Gras #define	AP_U		0x02		/* user */
23881473dbbSBen Gras 
23981473dbbSBen Gras /*
24081473dbbSBen Gras  * Access Permissions for L1 and L2 of ARMv6 with XP=1 and ARMv7
24181473dbbSBen Gras  */
24281473dbbSBen Gras #define	AP_R		0x01		/* readable */
243*0a6a1f1dSLionel Sambuc #define	AP_RO		0x20		/* read-only (L2_XS_APX >> 4) */
24481473dbbSBen Gras 
24581473dbbSBen Gras /*
24681473dbbSBen Gras  * Short-hand for common AP_* constants.
24781473dbbSBen Gras  *
24881473dbbSBen Gras  * Note: These values assume the S (System) bit is set and
24981473dbbSBen Gras  * the R (ROM) bit is clear in CP15 register 1.
25081473dbbSBen Gras  */
25181473dbbSBen Gras #define	AP_KR		0x00		/* kernel read */
25281473dbbSBen Gras #define	AP_KRW		0x01		/* kernel read/write */
253*0a6a1f1dSLionel Sambuc #define	AP_KRWUR	0x02		/* kernel read/write user read */
254*0a6a1f1dSLionel Sambuc #define	AP_KRWURW	0x03		/* kernel read/write user read/write */
25581473dbbSBen Gras 
25681473dbbSBen Gras /*
25781473dbbSBen Gras  * Note: These values assume the S (System) and the R (ROM) bits are clear and
25881473dbbSBen Gras  * the XP (eXtended page table) bit is set in CP15 register 1.  ARMv6 only.
25981473dbbSBen Gras  */
26081473dbbSBen Gras #define	APX_KR(APX)	(APX|0x01)	/* kernel read */
26181473dbbSBen Gras #define	APX_KRUR(APX)	(APX|0x02)	/* kernel read user read */
26281473dbbSBen Gras #define	APX_KRW(APX)	(    0x01)	/* kernel read/write */
26381473dbbSBen Gras #define	APX_KRWUR(APX)	(    0x02)	/* kernel read/write user read */
26481473dbbSBen Gras #define	APX_KRWURW(APX)	(    0x03)	/* kernel read/write user read/write */
26581473dbbSBen Gras 
26681473dbbSBen Gras /*
26781473dbbSBen Gras  * Note: These values are for the simplified access permissions model
26881473dbbSBen Gras  * of ARMv7. Assumes that AFE is clear in CP15 register 1.
26981473dbbSBen Gras  * Also used for ARMv6 with XP bit set.
27081473dbbSBen Gras  */
27181473dbbSBen Gras #define	AP7_KR		0x21		/* kernel read */
272*0a6a1f1dSLionel Sambuc #define	AP7_KRUR	0x23		/* kernel read user read */
27381473dbbSBen Gras #define	AP7_KRW		0x01		/* kernel read/write */
274*0a6a1f1dSLionel Sambuc #define	AP7_KRWURW	0x03		/* kernel read/write user read/write */
27581473dbbSBen Gras 
27681473dbbSBen Gras /*
27781473dbbSBen Gras  * Domain Types for the Domain Access Control Register.
27881473dbbSBen Gras  */
27981473dbbSBen Gras #define	DOMAIN_FAULT	0x00		/* no access */
28081473dbbSBen Gras #define	DOMAIN_CLIENT	0x01		/* client */
28181473dbbSBen Gras #define	DOMAIN_RESERVED	0x02		/* reserved */
28281473dbbSBen Gras #define	DOMAIN_MANAGER	0x03		/* manager */
28381473dbbSBen Gras 
28481473dbbSBen Gras /*
28581473dbbSBen Gras  * Type Extension bits for XScale processors.
28681473dbbSBen Gras  *
28781473dbbSBen Gras  * Behavior of C and B when X == 0:
28881473dbbSBen Gras  *
28981473dbbSBen Gras  * C B  Cacheable  Bufferable  Write Policy  Line Allocate Policy
29081473dbbSBen Gras  * 0 0      N          N            -                 -
29181473dbbSBen Gras  * 0 1      N          Y            -                 -
29281473dbbSBen Gras  * 1 0      Y          Y       Write-through    Read Allocate
29381473dbbSBen Gras  * 1 1      Y          Y        Write-back      Read Allocate
29481473dbbSBen Gras  *
29581473dbbSBen Gras  * Behavior of C and B when X == 1:
29681473dbbSBen Gras  * C B  Cacheable  Bufferable  Write Policy  Line Allocate Policy
29781473dbbSBen Gras  * 0 0      -          -            -                 -           DO NOT USE
29881473dbbSBen Gras  * 0 1      N          Y            -                 -
29981473dbbSBen Gras  * 1 0  Mini-Data      -            -                 -
30081473dbbSBen Gras  * 1 1      Y          Y        Write-back       R/W Allocate
30181473dbbSBen Gras  */
30281473dbbSBen Gras #define	TEX_XSCALE_X	0x01		/* X modifies C and B */
30381473dbbSBen Gras 
30481473dbbSBen Gras /*
30581473dbbSBen Gras  * Type Extension bits for ARM V6 and V7 MMU
30681473dbbSBen Gras  *
30781473dbbSBen Gras  * TEX C B                                                    Shared
30881473dbbSBen Gras  * 000 0 0  Strong order                                      yes
30981473dbbSBen Gras  * 000 0 1  Shared device                                     yes
310*0a6a1f1dSLionel Sambuc  * 000 1 0  Outer and Inner write through, no write alloc     S-bit
311*0a6a1f1dSLionel Sambuc  * 000 1 1  Outer and Inner write back, no write alloc        S-bit
312*0a6a1f1dSLionel Sambuc  * 001 0 0  Outer and Inner non-cacheable                     S-bit
31381473dbbSBen Gras  * 001 0 1  reserved
31481473dbbSBen Gras  * 001 1 0  reserved
315*0a6a1f1dSLionel Sambuc  * 001 1 1  Outer and Inner write back, write alloc           S-bit
31681473dbbSBen Gras  * 010 0 0  Non-shared device                                 no
31781473dbbSBen Gras  * 010 0 1  reserved
31881473dbbSBen Gras  * 010 1 X  reserved
31981473dbbSBen Gras  * 011 X X  reserved
320*0a6a1f1dSLionel Sambuc  * 1BB A A  BB for inner, AA for outer                        S-bit
32181473dbbSBen Gras  *
322*0a6a1f1dSLionel Sambuc  *    BB    inner cache
323*0a6a1f1dSLionel Sambuc  *    0 0   Non-cacheable
324*0a6a1f1dSLionel Sambuc  *    0 1   Write back, write alloc
325*0a6a1f1dSLionel Sambuc  *    1 0   Write through, no write alloc
326*0a6a1f1dSLionel Sambuc  *    1 1   Write back, no write alloc
32781473dbbSBen Gras  *
328*0a6a1f1dSLionel Sambuc  *    AA    outer cache
329*0a6a1f1dSLionel Sambuc  *    0 0   Non-cacheable
330*0a6a1f1dSLionel Sambuc  *    0 1   Write back, write alloc
331*0a6a1f1dSLionel Sambuc  *    1 0   Write through, no write alloc
332*0a6a1f1dSLionel Sambuc  *    1 1   Write back, no write alloc
33381473dbbSBen Gras  */
33481473dbbSBen Gras 
33581473dbbSBen Gras #define	TEX_ARMV6_TEX	0x07		/* 3 bits in TEX */
33681473dbbSBen Gras 
33781473dbbSBen Gras #endif /* _ARM_PTE_H_ */
338