blob: 9c22a0bd5daeb0319d5c168666cf76a9bd03fb20 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Elliott Hughesabd62612013-11-08 11:45:48 -08007#ifndef _ASM_X86_LDT_H
8#define _ASM_X86_LDT_H
9#define LDT_ENTRIES 8192
10#define LDT_ENTRY_SIZE 8
Elliott Hughesabd62612013-11-08 11:45:48 -080011#ifndef __ASSEMBLY__
12struct user_desc {
Tao Baod7db5942015-01-28 10:07:51 -080013 unsigned int entry_number;
14 unsigned int base_addr;
Tao Baod7db5942015-01-28 10:07:51 -080015 unsigned int limit;
16 unsigned int seg_32bit : 1;
17 unsigned int contents : 2;
18 unsigned int read_exec_only : 1;
Tao Baod7db5942015-01-28 10:07:51 -080019 unsigned int limit_in_pages : 1;
20 unsigned int seg_not_present : 1;
21 unsigned int useable : 1;
Elliott Hughesabd62612013-11-08 11:45:48 -080022#ifdef __x86_64__
Tao Baod7db5942015-01-28 10:07:51 -080023 unsigned int lm : 1;
Elliott Hughesabd62612013-11-08 11:45:48 -080024#endif
25};
26#define MODIFY_LDT_CONTENTS_DATA 0
Elliott Hughesabd62612013-11-08 11:45:48 -080027#define MODIFY_LDT_CONTENTS_STACK 1
28#define MODIFY_LDT_CONTENTS_CODE 2
29#endif
30#endif