Commit | Line | Data |
---|---|---|
57319d80 QR |
1 | #ifndef _ASM_X86_MPX_H |
2 | #define _ASM_X86_MPX_H | |
3 | ||
4 | #include <linux/types.h> | |
5 | #include <asm/ptrace.h> | |
6 | ||
7 | #ifdef CONFIG_X86_64 | |
8 | ||
9 | /* upper 28 bits [47:20] of the virtual address in 64-bit used to | |
10 | * index into bounds directory (BD). | |
11 | */ | |
12 | #define MPX_BD_ENTRY_OFFSET 28 | |
13 | #define MPX_BD_ENTRY_SHIFT 3 | |
14 | /* bits [19:3] of the virtual address in 64-bit used to index into | |
15 | * bounds table (BT). | |
16 | */ | |
17 | #define MPX_BT_ENTRY_OFFSET 17 | |
18 | #define MPX_BT_ENTRY_SHIFT 5 | |
19 | #define MPX_IGN_BITS 3 | |
20 | ||
21 | #else | |
22 | ||
23 | #define MPX_BD_ENTRY_OFFSET 20 | |
24 | #define MPX_BD_ENTRY_SHIFT 2 | |
25 | #define MPX_BT_ENTRY_OFFSET 10 | |
26 | #define MPX_BT_ENTRY_SHIFT 4 | |
27 | #define MPX_IGN_BITS 2 | |
28 | ||
29 | #endif | |
30 | ||
31 | #define MPX_BD_SIZE_BYTES (1UL<<(MPX_BD_ENTRY_OFFSET+MPX_BD_ENTRY_SHIFT)) | |
32 | #define MPX_BT_SIZE_BYTES (1UL<<(MPX_BT_ENTRY_OFFSET+MPX_BT_ENTRY_SHIFT)) | |
33 | ||
34 | #define MPX_BNDSTA_ERROR_CODE 0x3 | |
35 | ||
36 | #endif /* _ASM_X86_MPX_H */ |