processor-flags.h revision 1308ad3ab33294c3abfd96da12b6df58b381ce52
1abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes/**************************************************************************** 2abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes **************************************************************************** 3abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** 4abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** This header was automatically generated from a Linux kernel header 5abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** of the same name, to make information necessary for userspace to 6abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** call into the kernel available to libc. It contains only constants, 7abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** structures, and macros generated from the original header, and thus, 8abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** contains no copyrightable information. 9abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** 10abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** To edit the content of this header, modify the corresponding 11abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** source file (e.g. under external/kernel-headers/original/) then 12abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** run bionic/libc/kernel/tools/update_all.py 13abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** 14abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** Any manual change here will be lost the next time this script will 15abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** be run. You've been warned! 16abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes *** 17abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes **************************************************************************** 18abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes ****************************************************************************/ 19abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#ifndef _UAPI_ASM_X86_PROCESSOR_FLAGS_H 20abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define _UAPI_ASM_X86_PROCESSOR_FLAGS_H 2138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#include <linux/const.h> 2238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_CF_BIT 0 2338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_CF _BITUL(X86_EFLAGS_CF_BIT) 2438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_FIXED_BIT 1 2538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_FIXED _BITUL(X86_EFLAGS_FIXED_BIT) 2638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_PF_BIT 2 2738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_PF _BITUL(X86_EFLAGS_PF_BIT) 2838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_AF_BIT 4 2938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_AF _BITUL(X86_EFLAGS_AF_BIT) 3038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_ZF_BIT 6 3138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_ZF _BITUL(X86_EFLAGS_ZF_BIT) 3238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_SF_BIT 7 3338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_SF _BITUL(X86_EFLAGS_SF_BIT) 3438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_TF_BIT 8 3538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_TF _BITUL(X86_EFLAGS_TF_BIT) 3638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_IF_BIT 9 3738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_IF _BITUL(X86_EFLAGS_IF_BIT) 3838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_DF_BIT 10 3938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_DF _BITUL(X86_EFLAGS_DF_BIT) 4038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_OF_BIT 11 4138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_OF _BITUL(X86_EFLAGS_OF_BIT) 4238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_IOPL_BIT 12 43d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define X86_EFLAGS_IOPL (_AC(3, UL) << X86_EFLAGS_IOPL_BIT) 4438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_NT_BIT 14 4538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_NT _BITUL(X86_EFLAGS_NT_BIT) 4638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_RF_BIT 16 4738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_RF _BITUL(X86_EFLAGS_RF_BIT) 4838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VM_BIT 17 4938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VM _BITUL(X86_EFLAGS_VM_BIT) 5038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_AC_BIT 18 5138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_AC _BITUL(X86_EFLAGS_AC_BIT) 5238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VIF_BIT 19 5338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VIF _BITUL(X86_EFLAGS_VIF_BIT) 5438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VIP_BIT 20 5538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_VIP _BITUL(X86_EFLAGS_VIP_BIT) 5638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_ID_BIT 21 5738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_EFLAGS_ID _BITUL(X86_EFLAGS_ID_BIT) 5838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_PE_BIT 0 5938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_PE _BITUL(X86_CR0_PE_BIT) 6038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_MP_BIT 1 6138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_MP _BITUL(X86_CR0_MP_BIT) 6238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_EM_BIT 2 6338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_EM _BITUL(X86_CR0_EM_BIT) 6438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_TS_BIT 3 6538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_TS _BITUL(X86_CR0_TS_BIT) 6638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_ET_BIT 4 6738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_ET _BITUL(X86_CR0_ET_BIT) 6838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_NE_BIT 5 6938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_NE _BITUL(X86_CR0_NE_BIT) 7038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_WP_BIT 16 7138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_WP _BITUL(X86_CR0_WP_BIT) 7238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_AM_BIT 18 7338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_AM _BITUL(X86_CR0_AM_BIT) 7438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_NW_BIT 29 7538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_NW _BITUL(X86_CR0_NW_BIT) 7638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_CD_BIT 30 7738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_CD _BITUL(X86_CR0_CD_BIT) 7838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_PG_BIT 31 7938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR0_PG _BITUL(X86_CR0_PG_BIT) 8038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR3_PWT_BIT 3 8138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR3_PWT _BITUL(X86_CR3_PWT_BIT) 8238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR3_PCD_BIT 4 8338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR3_PCD _BITUL(X86_CR3_PCD_BIT) 84d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define X86_CR3_PCID_MASK _AC(0x00000fff, UL) 8538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_VME_BIT 0 8638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_VME _BITUL(X86_CR4_VME_BIT) 8738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PVI_BIT 1 8838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PVI _BITUL(X86_CR4_PVI_BIT) 8938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_TSD_BIT 2 9038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_TSD _BITUL(X86_CR4_TSD_BIT) 9138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_DE_BIT 3 9238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_DE _BITUL(X86_CR4_DE_BIT) 9338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PSE_BIT 4 9438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PSE _BITUL(X86_CR4_PSE_BIT) 9538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PAE_BIT 5 9638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PAE _BITUL(X86_CR4_PAE_BIT) 9738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_MCE_BIT 6 9838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_MCE _BITUL(X86_CR4_MCE_BIT) 9938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PGE_BIT 7 10038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PGE _BITUL(X86_CR4_PGE_BIT) 10138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PCE_BIT 8 10238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PCE _BITUL(X86_CR4_PCE_BIT) 10338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSFXSR_BIT 9 10438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSFXSR _BITUL(X86_CR4_OSFXSR_BIT) 10538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSXMMEXCPT_BIT 10 10638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSXMMEXCPT _BITUL(X86_CR4_OSXMMEXCPT_BIT) 1071308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define X86_CR4_LA57_BIT 12 1081308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define X86_CR4_LA57 _BITUL(X86_CR4_LA57_BIT) 10938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_VMXE_BIT 13 11038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_VMXE _BITUL(X86_CR4_VMXE_BIT) 11138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMXE_BIT 14 11238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMXE _BITUL(X86_CR4_SMXE_BIT) 11338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_FSGSBASE_BIT 16 11438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_FSGSBASE _BITUL(X86_CR4_FSGSBASE_BIT) 11538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PCIDE_BIT 17 11638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_PCIDE _BITUL(X86_CR4_PCIDE_BIT) 11738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSXSAVE_BIT 18 11838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_OSXSAVE _BITUL(X86_CR4_OSXSAVE_BIT) 11938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMEP_BIT 20 12038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMEP _BITUL(X86_CR4_SMEP_BIT) 12138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMAP_BIT 21 12238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define X86_CR4_SMAP _BITUL(X86_CR4_SMAP_BIT) 123106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#define X86_CR4_PKE_BIT 22 124106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT) 125d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define X86_CR8_TPR _AC(0x0000000f, UL) 126abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_PCR0 0x20 127abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_GCR 0xb8 128abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR0 0xc0 12938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define CX86_CCR1 0xc1 130abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR2 0xc2 131abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR3 0xc3 132abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR4 0xe8 13338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define CX86_CCR5 0xe9 134abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR6 0xea 135abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_CCR7 0xeb 136abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_PCR1 0xf0 13738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define CX86_DIR0 0xfe 138abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_DIR1 0xff 139abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_ARR_BASE 0xc4 140abd626117cfd366faa16a5d0ac4621f608a5c887Elliott Hughes#define CX86_RCR_BASE 0xdc 14138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#endif 142