18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_TRAP_PF_H 38c2ecf20Sopenharmony_ci#define _ASM_X86_TRAP_PF_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* 68c2ecf20Sopenharmony_ci * Page fault error code bits: 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * bit 0 == 0: no page found 1: protection fault 98c2ecf20Sopenharmony_ci * bit 1 == 0: read access 1: write access 108c2ecf20Sopenharmony_ci * bit 2 == 0: kernel-mode access 1: user-mode access 118c2ecf20Sopenharmony_ci * bit 3 == 1: use of reserved bit detected 128c2ecf20Sopenharmony_ci * bit 4 == 1: fault was an instruction fetch 138c2ecf20Sopenharmony_ci * bit 5 == 1: protection keys block access 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_cienum x86_pf_error_code { 168c2ecf20Sopenharmony_ci X86_PF_PROT = 1 << 0, 178c2ecf20Sopenharmony_ci X86_PF_WRITE = 1 << 1, 188c2ecf20Sopenharmony_ci X86_PF_USER = 1 << 2, 198c2ecf20Sopenharmony_ci X86_PF_RSVD = 1 << 3, 208c2ecf20Sopenharmony_ci X86_PF_INSTR = 1 << 4, 218c2ecf20Sopenharmony_ci X86_PF_PK = 1 << 5, 228c2ecf20Sopenharmony_ci}; 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#endif /* _ASM_X86_TRAP_PF_H */ 25