267
268 if (is_x86_feature(x86_featureset, X86FSET_TSCP))
269 (void) wrmsr(MSR_AMD_TSCAUX, 0);
270
271 /*
272 * Let's get the other %cr4 stuff while we're here.
273 */
274 if (is_x86_feature(x86_featureset, X86FSET_DE))
275 setcr4(getcr4() | CR4_DE);
276
277 if (is_x86_feature(x86_featureset, X86FSET_SMEP))
278 setcr4(getcr4() | CR4_SMEP);
279 #endif /* __xpv */
280
281 /*
282 * initialize t0
283 */
284 t0.t_stk = (caddr_t)rp - MINFRAME;
285 t0.t_stkbase = t0stack;
286 t0.t_pri = maxclsyspri - 3;
287 t0.t_schedflag = TS_LOAD | TS_DONT_SWAP;
288 t0.t_procp = &p0;
289 t0.t_plockp = &p0lock.pl_lock;
290 t0.t_lwp = &lwp0;
291 t0.t_forw = &t0;
292 t0.t_back = &t0;
293 t0.t_next = &t0;
294 t0.t_prev = &t0;
295 t0.t_cpu = cpu[0];
296 t0.t_disp_queue = &cpu0_disp;
297 t0.t_bind_cpu = PBIND_NONE;
298 t0.t_bind_pset = PS_NONE;
299 t0.t_bindflag = (uchar_t)default_binding_mode;
300 t0.t_cpupart = &cp_default;
301 t0.t_clfuncs = &sys_classfuncs.thread;
302 t0.t_copyops = NULL;
303 THREAD_ONPROC(&t0, CPU);
304
305 lwp0.lwp_thread = &t0;
306 lwp0.lwp_regs = (void *)rp;
307 lwp0.lwp_procp = &p0;
|
267
268 if (is_x86_feature(x86_featureset, X86FSET_TSCP))
269 (void) wrmsr(MSR_AMD_TSCAUX, 0);
270
271 /*
272 * Let's get the other %cr4 stuff while we're here.
273 */
274 if (is_x86_feature(x86_featureset, X86FSET_DE))
275 setcr4(getcr4() | CR4_DE);
276
277 if (is_x86_feature(x86_featureset, X86FSET_SMEP))
278 setcr4(getcr4() | CR4_SMEP);
279 #endif /* __xpv */
280
281 /*
282 * initialize t0
283 */
284 t0.t_stk = (caddr_t)rp - MINFRAME;
285 t0.t_stkbase = t0stack;
286 t0.t_pri = maxclsyspri - 3;
287 t0.t_schedflag = 0;
288 t0.t_procp = &p0;
289 t0.t_plockp = &p0lock.pl_lock;
290 t0.t_lwp = &lwp0;
291 t0.t_forw = &t0;
292 t0.t_back = &t0;
293 t0.t_next = &t0;
294 t0.t_prev = &t0;
295 t0.t_cpu = cpu[0];
296 t0.t_disp_queue = &cpu0_disp;
297 t0.t_bind_cpu = PBIND_NONE;
298 t0.t_bind_pset = PS_NONE;
299 t0.t_bindflag = (uchar_t)default_binding_mode;
300 t0.t_cpupart = &cp_default;
301 t0.t_clfuncs = &sys_classfuncs.thread;
302 t0.t_copyops = NULL;
303 THREAD_ONPROC(&t0, CPU);
304
305 lwp0.lwp_thread = &t0;
306 lwp0.lwp_regs = (void *)rp;
307 lwp0.lwp_procp = &p0;
|