Lines Matching defs:desc
9 static inline void fill_ldt(struct desc_struct *desc,
12 desc->limit0 = info->limit & 0x0ffff;
13 desc->base0 = info->base_addr & 0x0000ffff;
15 desc->base1 = (info->base_addr & 0x00ff0000) >> 16;
16 desc->type = (info->read_exec_only ^ 1) << 1;
17 desc->type |= info->contents << 2;
18 desc->s = 1;
19 desc->dpl = 0x3;
20 desc->p = info->seg_not_present ^ 1;
21 desc->limit = (info->limit & 0xf0000) >> 16;
22 desc->avl = info->useable;
23 desc->d = info->seg_32bit;
24 desc->g = info->limit_in_pages;
25 desc->base2 = (info->base_addr & 0xff000000) >> 24;
30 desc->l = 0;
77 const u32 *desc = ptr;
78 return !(desc[0] | desc[1]);
97 #define write_ldt_entry(dt, entry, desc) \
98 native_write_ldt_entry(dt, entry, desc)
99 #define write_gdt_entry(dt, entry, desc, type) \
100 native_write_gdt_entry(dt, entry, desc, type)
122 const void *desc)
124 memcpy(&ldt[entry], desc, 8);
128 const void *desc, int type)
142 memcpy(&gdt[entry], desc, size);
145 static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
149 desc->a = ((base & 0xffff) << 16) | (limit & 0xffff);
150 desc->b = (base & 0xff000000) | ((base & 0xff0000) >> 16) |
153 desc->p = 1;
161 struct ldttss_desc64 *desc = d;
162 memset(desc, 0, sizeof(*desc));
163 desc->limit0 = size & 0xFFFF;
164 desc->base0 = PTR_LOW(addr);
165 desc->base1 = PTR_MIDDLE(addr) & 0xFF;
166 desc->type = type;
167 desc->p = 1;
168 desc->limit1 = (size >> 16) & 0xF;
169 desc->base2 = (PTR_MIDDLE(addr) >> 8) & 0xFF;
170 desc->base3 = PTR_HIGH(addr);
289 static inline unsigned long get_desc_base(const struct desc_struct *desc)
291 return (unsigned)(desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24));
294 static inline void set_desc_base(struct desc_struct *desc, unsigned long base)
296 desc->base0 = base & 0xffff;
297 desc->base1 = (base >> 16) & 0xff;
298 desc->base2 = (base >> 24) & 0xff;
301 static inline unsigned long get_desc_limit(const struct desc_struct *desc)
303 return desc->limit0 | (desc->limit << 16);
306 static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit)
308 desc->limit0 = limit & 0xffff;
309 desc->limit = (limit >> 16) & 0xf;