18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef __ASM_CSKY_PGTABLE_BITS_H
58c2ecf20Sopenharmony_ci#define __ASM_CSKY_PGTABLE_BITS_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/* implemented in software */
88c2ecf20Sopenharmony_ci#define _PAGE_ACCESSED		(1<<3)
98c2ecf20Sopenharmony_ci#define PAGE_ACCESSED_BIT	(3)
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define _PAGE_READ		(1<<1)
128c2ecf20Sopenharmony_ci#define _PAGE_WRITE		(1<<2)
138c2ecf20Sopenharmony_ci#define _PAGE_PRESENT		(1<<0)
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define _PAGE_MODIFIED		(1<<4)
168c2ecf20Sopenharmony_ci#define PAGE_MODIFIED_BIT	(4)
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/* implemented in hardware */
198c2ecf20Sopenharmony_ci#define _PAGE_GLOBAL		(1<<6)
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#define _PAGE_VALID		(1<<7)
228c2ecf20Sopenharmony_ci#define PAGE_VALID_BIT		(7)
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#define _PAGE_DIRTY		(1<<8)
258c2ecf20Sopenharmony_ci#define PAGE_DIRTY_BIT		(8)
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define _PAGE_CACHE		(3<<9)
288c2ecf20Sopenharmony_ci#define _PAGE_UNCACHE		(2<<9)
298c2ecf20Sopenharmony_ci#define _PAGE_SO		_PAGE_UNCACHE
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define _CACHE_MASK		(7<<9)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define _CACHE_CACHED		(_PAGE_VALID | _PAGE_CACHE)
348c2ecf20Sopenharmony_ci#define _CACHE_UNCACHED		(_PAGE_VALID | _PAGE_UNCACHE)
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#define HAVE_ARCH_UNMAPPED_AREA
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* __ASM_CSKY_PGTABLE_BITS_H */
39