Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 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 Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 7 | #ifndef _ASM_X86_LDT_H |
| 8 | #define _ASM_X86_LDT_H |
| 9 | #define LDT_ENTRIES 8192 |
| 10 | #define LDT_ENTRY_SIZE 8 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 11 | #ifndef __ASSEMBLY__ |
| 12 | struct user_desc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 13 | unsigned int entry_number; |
| 14 | unsigned int base_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | unsigned int limit; |
| 16 | unsigned int seg_32bit : 1; |
| 17 | unsigned int contents : 2; |
| 18 | unsigned int read_exec_only : 1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | unsigned int limit_in_pages : 1; |
| 20 | unsigned int seg_not_present : 1; |
| 21 | unsigned int useable : 1; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 22 | #ifdef __x86_64__ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | unsigned int lm : 1; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 24 | #endif |
| 25 | }; |
| 26 | #define MODIFY_LDT_CONTENTS_DATA 0 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 27 | #define MODIFY_LDT_CONTENTS_STACK 1 |
| 28 | #define MODIFY_LDT_CONTENTS_CODE 2 |
| 29 | #endif |
| 30 | #endif |