1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _ASM_ADDRSPACE_H 20 #define _ASM_ADDRSPACE_H 21 #include <spaces.h> 22 #ifdef __ASSEMBLY__ 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define _ATYPE_ 25 #define _ATYPE32_ 26 #define _ATYPE64_ 27 #define _CONST64_(x) x 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #else 30 #define _ATYPE_ __PTRDIFF_TYPE__ 31 #define _ATYPE32_ int 32 #define _ATYPE64_ __s64 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define _CONST64_(x) x ## LL 35 #endif 36 #ifdef __ASSEMBLY__ 37 #define _ACAST32_ 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define _ACAST64_ 40 #else 41 #define _ACAST32_ (_ATYPE_)(_ATYPE32_) 42 #define _ACAST64_ (_ATYPE64_) 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #endif 45 #define KSEGX(a) ((_ACAST32_ (a)) & 0xe0000000) 46 #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) 47 #define XPHYSADDR(a) ((_ACAST64_(a)) & _CONST64_(0x000000ffffffffff)) 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define CKSEG0ADDR(a) (CPHYSADDR(a) | KSEG0) 50 #define CKSEG1ADDR(a) (CPHYSADDR(a) | KSEG1) 51 #define CKSEG2ADDR(a) (CPHYSADDR(a) | KSEG2) 52 #define CKSEG3ADDR(a) (CPHYSADDR(a) | KSEG3) 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define KSEG0ADDR(a) (CPHYSADDR(a) | KSEG0) 55 #define KSEG1ADDR(a) (CPHYSADDR(a) | KSEG1) 56 #define KSEG2ADDR(a) (CPHYSADDR(a) | KSEG2) 57 #define KSEG3ADDR(a) (CPHYSADDR(a) | KSEG3) 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define KUSEG 0x00000000 60 #define KSEG0 0x80000000 61 #define KSEG1 0xa0000000 62 #define KSEG2 0xc0000000 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define KSEG3 0xe0000000 65 #define CKUSEG 0x00000000 66 #define CKSEG0 0x80000000 67 #define CKSEG1 0xa0000000 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define CKSEG2 0xc0000000 70 #define CKSEG3 0xe0000000 71 #define K_CALG_COH_EXCL1_NOL2 0 72 #define K_CALG_COH_SHRL1_NOL2 1 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define K_CALG_UNCACHED 2 75 #define K_CALG_NONCOHERENT 3 76 #define K_CALG_COH_EXCL 4 77 #define K_CALG_COH_SHAREABLE 5 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define K_CALG_NOTUSED 6 80 #define K_CALG_UNCACHED_ACCEL 7 81 #define PHYS_TO_XKSEG_UNCACHED(p) PHYS_TO_XKPHYS(K_CALG_UNCACHED, (p)) 82 #define PHYS_TO_XKSEG_CACHED(p) PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p)) 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define XKPHYS_TO_PHYS(p) ((p) & TO_PHYS_MASK) 85 #define PHYS_TO_XKPHYS(cm, a) (_CONST64_(0x8000000000000000) | (_CONST64_(cm) << 59) | (a)) 86 #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) 87 #define COMPAT_K1BASE32 _CONST64_(0xffffffffa0000000) 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define PHYS_TO_COMPATK1(x) ((x) | COMPAT_K1BASE32) 90 #define KDM_TO_PHYS(x) (_ACAST64_ (x) & TO_PHYS_MASK) 91 #define PHYS_TO_K0(x) (_ACAST64_ (x) | CAC_BASE) 92 #endif 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94