Path: blob/master/arch/um/sys-x86_64/shared/sysdep/host_ldt.h
10820 views
#ifndef __ASM_HOST_LDT_X86_64_H1#define __ASM_HOST_LDT_X86_64_H23#include <asm/ldt.h>45/*6* macros stolen from include/asm-x86_64/desc.h7*/8#define LDT_entry_a(info) \9((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))1011/* Don't allow setting of the lm bit. It is useless anyways because12* 64bit system calls require __USER_CS. */13#define LDT_entry_b(info) \14(((info)->base_addr & 0xff000000) | \15(((info)->base_addr & 0x00ff0000) >> 16) | \16((info)->limit & 0xf0000) | \17(((info)->read_exec_only ^ 1) << 9) | \18((info)->contents << 10) | \19(((info)->seg_not_present ^ 1) << 15) | \20((info)->seg_32bit << 22) | \21((info)->limit_in_pages << 23) | \22((info)->useable << 20) | \23/* ((info)->lm << 21) | */ \240x7000)2526#define LDT_empty(info) (\27(info)->base_addr == 0 && \28(info)->limit == 0 && \29(info)->contents == 0 && \30(info)->read_exec_only == 1 && \31(info)->seg_32bit == 0 && \32(info)->limit_in_pages == 0 && \33(info)->seg_not_present == 1 && \34(info)->useable == 0 && \35(info)->lm == 0)3637#endif383940