Lines Matching refs:ds

256 set_live_debug_state32(cpu_data_t *cdp, x86_debug_state32_t *ds)
258 __asm__ volatile ("movl %0,%%db0" : :"r" (ds->dr0));
259 __asm__ volatile ("movl %0,%%db1" : :"r" (ds->dr1));
260 __asm__ volatile ("movl %0,%%db2" : :"r" (ds->dr2));
261 __asm__ volatile ("movl %0,%%db3" : :"r" (ds->dr3));
263 cdp->cpu_dr7 = ds->dr7;
266 extern void set_64bit_debug_regs(x86_debug_state64_t *ds);
269 set_live_debug_state64(cpu_data_t *cdp, x86_debug_state64_t *ds)
275 set_64bit_debug_regs(ds);
276 cdp->cpu_dr7 = ds->dr7;
280 debug_state_is_valid32(x86_debug_state32_t *ds)
282 if (!dr7_is_valid(&ds->dr7))
290 if (ds->dr7 & 0x1)
291 if (ds->dr0 >= (unsigned long)HIGH_MEM_BASE)
294 if (ds->dr7 & (0x1<<2))
295 if (ds->dr1 >= (unsigned long)HIGH_MEM_BASE)
298 if (ds->dr7 & (0x1<<4))
299 if (ds->dr2 >= (unsigned long)HIGH_MEM_BASE)
302 if (ds->dr7 & (0x1<<6))
303 if (ds->dr3 >= (unsigned long)HIGH_MEM_BASE)
311 debug_state_is_valid64(x86_debug_state64_t *ds)
313 if (!dr7_is_valid((uint32_t *)&ds->dr7))
320 if (ds->dr7 & 0x1)
321 if (ds->dr0 >= VM_MAX_PAGE_ADDRESS)
324 if (ds->dr7 & (0x1<<2))
325 if (ds->dr1 >= VM_MAX_PAGE_ADDRESS)
328 if (ds->dr7 & (0x1<<4))
329 if (ds->dr2 >= VM_MAX_PAGE_ADDRESS)
332 if (ds->dr7 & (0x1<<6))
333 if (ds->dr3 >= VM_MAX_PAGE_ADDRESS)
341 set_debug_state32(thread_t thread, x86_debug_state32_t *ds)
349 if (debug_state_is_valid32(ds) != TRUE) {
369 copy_debug_state32(ds, ids, FALSE);
375 set_debug_state64(thread_t thread, x86_debug_state64_t *ds)
383 if (debug_state_is_valid64(ds) != TRUE) {
402 copy_debug_state64(ds, ids, FALSE);
408 get_debug_state32(thread_t thread, x86_debug_state32_t *ds)
415 copy_debug_state32(saved_state, ds, TRUE);
417 bzero(ds, sizeof *ds);
421 get_debug_state64(thread_t thread, x86_debug_state64_t *ds)
428 copy_debug_state64(saved_state, ds, TRUE);
430 bzero(ds, sizeof *ds);
631 if (ts->ds == 0) ts->ds = USER_DS;
641 ts->ds = USER_DS;
648 ts->ds,
666 saved_state->ds = ts->ds;
743 ts->ds = saved_state->ds;
813 state->ds,
854 saved_state->ds = state->ds;
1198 state->ds = saved_state->ds & 0xffff;
1565 state->ds = saved_state->ds & 0xffff;
1645 state->uts.ts32.ds = saved_state->ds & 0xffff;
1976 x86_debug_state32_t ds;
1982 x86_debug_state64_t ds;
2020 (thread_state_t)&ic64->ds,
2054 (thread_state_t)&ic32->ds,