18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
38c2ecf20Sopenharmony_ci * Copyright (C) 2009 Wind River Systems Inc
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
68c2ecf20Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
78c2ecf20Sopenharmony_ci * for more details.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef _ASM_NIOS2_PGTABLE_BITS_H
118c2ecf20Sopenharmony_ci#define _ASM_NIOS2_PGTABLE_BITS_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/*
148c2ecf20Sopenharmony_ci * These are actual hardware defined protection bits in the tlbacc register
158c2ecf20Sopenharmony_ci * which looks like this:
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * 31 30 ... 26 25 24 23 22 21 20 19 18 ...  1  0
188c2ecf20Sopenharmony_ci * ignored........  C  R  W  X  G PFN............
198c2ecf20Sopenharmony_ci */
208c2ecf20Sopenharmony_ci#define _PAGE_GLOBAL	(1<<20)
218c2ecf20Sopenharmony_ci#define _PAGE_EXEC	(1<<21)
228c2ecf20Sopenharmony_ci#define _PAGE_WRITE	(1<<22)
238c2ecf20Sopenharmony_ci#define _PAGE_READ	(1<<23)
248c2ecf20Sopenharmony_ci#define _PAGE_CACHED	(1<<24)	/* C: data access cacheable */
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci/*
278c2ecf20Sopenharmony_ci * Software defined bits. They are ignored by the hardware and always read back
288c2ecf20Sopenharmony_ci * as zero, but can be written as non-zero.
298c2ecf20Sopenharmony_ci */
308c2ecf20Sopenharmony_ci#define _PAGE_PRESENT	(1<<25)	/* PTE contains a translation */
318c2ecf20Sopenharmony_ci#define _PAGE_ACCESSED	(1<<26)	/* page referenced */
328c2ecf20Sopenharmony_ci#define _PAGE_DIRTY	(1<<27)	/* dirty page */
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#endif /* _ASM_NIOS2_PGTABLE_BITS_H */
35