Home | History | Annotate | Download | only in asm
      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_SEGMENT_H
     20 #define _ASM_SEGMENT_H
     21 #define GDT_ENTRY_TLS_ENTRIES 3
     22 #define GDT_ENTRY_TLS_MIN 6
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
     25 #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
     26 #define GDT_ENTRY_DEFAULT_USER_CS 14
     27 #define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS * 8 + 3)
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define GDT_ENTRY_DEFAULT_USER_DS 15
     30 #define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS * 8 + 3)
     31 #define GDT_ENTRY_KERNEL_BASE 12
     32 #define GDT_ENTRY_KERNEL_CS (GDT_ENTRY_KERNEL_BASE + 0)
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define __KERNEL_CS (GDT_ENTRY_KERNEL_CS * 8)
     35 #define GDT_ENTRY_KERNEL_DS (GDT_ENTRY_KERNEL_BASE + 1)
     36 #define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
     37 #define GDT_ENTRY_TSS (GDT_ENTRY_KERNEL_BASE + 4)
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define GDT_ENTRY_LDT (GDT_ENTRY_KERNEL_BASE + 5)
     40 #define GDT_ENTRY_PNPBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 6)
     41 #define GDT_ENTRY_APMBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 11)
     42 #define GDT_ENTRY_ESPFIX_SS (GDT_ENTRY_KERNEL_BASE + 14)
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define __ESPFIX_SS (GDT_ENTRY_ESPFIX_SS * 8)
     45 #define GDT_ENTRY_PERCPU (GDT_ENTRY_KERNEL_BASE + 15)
     46 #define __KERNEL_PERCPU 0
     47 #define GDT_ENTRY_DOUBLEFAULT_TSS 31
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define GDT_ENTRIES 32
     50 #define GDT_SIZE (GDT_ENTRIES * 8)
     51 #define GDT_ENTRY_BOOT_CS 2
     52 #define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
     55 #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
     56 #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0)
     57 #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1)
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 #define GDT_ENTRY_PNPBIOS_DS (GDT_ENTRY_PNPBIOS_BASE + 2)
     60 #define GDT_ENTRY_PNPBIOS_TS1 (GDT_ENTRY_PNPBIOS_BASE + 3)
     61 #define GDT_ENTRY_PNPBIOS_TS2 (GDT_ENTRY_PNPBIOS_BASE + 4)
     62 #define PNP_CS32 (GDT_ENTRY_PNPBIOS_CS32 * 8)
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64 #define PNP_CS16 (GDT_ENTRY_PNPBIOS_CS16 * 8)
     65 #define PNP_DS (GDT_ENTRY_PNPBIOS_DS * 8)
     66 #define PNP_TS1 (GDT_ENTRY_PNPBIOS_TS1 * 8)
     67 #define PNP_TS2 (GDT_ENTRY_PNPBIOS_TS2 * 8)
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 #define IDT_ENTRIES 256
     70 #define SEGMENT_RPL_MASK 0x3
     71 #define SEGMENT_TI_MASK 0x4
     72 #define USER_RPL 0x3
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 #define SEGMENT_LDT 0x4
     75 #define SEGMENT_GDT 0x0
     76 #define get_kernel_rpl() 0
     77 #define SEGMENT_IS_KERNEL_CODE(x) (((x) & 0xfc) == GDT_ENTRY_KERNEL_CS * 8)
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8)
     80 #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8)
     81 #endif
     82