162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch> 362306a36Sopenharmony_ci * Copyright (C) 2009 Wind River Systems Inc 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 662306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 762306a36Sopenharmony_ci * for more details. 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#ifndef _ASM_NIOS2_PGTABLE_BITS_H 1162306a36Sopenharmony_ci#define _ASM_NIOS2_PGTABLE_BITS_H 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* 1462306a36Sopenharmony_ci * These are actual hardware defined protection bits in the tlbacc register 1562306a36Sopenharmony_ci * which looks like this: 1662306a36Sopenharmony_ci * 1762306a36Sopenharmony_ci * 31 30 ... 26 25 24 23 22 21 20 19 18 ... 1 0 1862306a36Sopenharmony_ci * ignored........ C R W X G PFN............ 1962306a36Sopenharmony_ci */ 2062306a36Sopenharmony_ci#define _PAGE_GLOBAL (1<<20) 2162306a36Sopenharmony_ci#define _PAGE_EXEC (1<<21) 2262306a36Sopenharmony_ci#define _PAGE_WRITE (1<<22) 2362306a36Sopenharmony_ci#define _PAGE_READ (1<<23) 2462306a36Sopenharmony_ci#define _PAGE_CACHED (1<<24) /* C: data access cacheable */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/* 2762306a36Sopenharmony_ci * Software defined bits. They are ignored by the hardware and always read back 2862306a36Sopenharmony_ci * as zero, but can be written as non-zero. 2962306a36Sopenharmony_ci */ 3062306a36Sopenharmony_ci#define _PAGE_PRESENT (1<<25) /* PTE contains a translation */ 3162306a36Sopenharmony_ci#define _PAGE_ACCESSED (1<<26) /* page referenced */ 3262306a36Sopenharmony_ci#define _PAGE_DIRTY (1<<27) /* dirty page */ 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* We borrow bit 31 to store the exclusive marker in swap PTEs. */ 3562306a36Sopenharmony_ci#define _PAGE_SWP_EXCLUSIVE (1<<31) 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#endif /* _ASM_NIOS2_PGTABLE_BITS_H */ 38