345 p0.p_t1_lgrpid = LGRP_NONE;
346 p0.p_tr_lgrpid = LGRP_NONE;
347 psecflags_default(&p0.p_secflags);
348
349 sigorset(&p0.p_ignore, &ignoredefault);
350
351 CPU->cpu_thread = &t0;
352 bzero(&cpu0_disp, sizeof (disp_t));
353 CPU->cpu_disp = &cpu0_disp;
354 CPU->cpu_disp->disp_cpu = CPU;
355 CPU->cpu_dispthread = &t0;
356 CPU->cpu_idle_thread = &t0;
357 CPU->cpu_flags = CPU_READY | CPU_RUNNING | CPU_EXISTS | CPU_ENABLE;
358 CPU->cpu_dispatch_pri = t0.t_pri;
359
360 CPU->cpu_id = 0;
361
362 CPU->cpu_pri = 12; /* initial PIL for the boot CPU */
363
364 /*
365 * The kernel doesn't use LDTs unless a process explicitly requests one.
366 */
367 p0.p_ldt_desc = null_sdesc;
368
369 /*
370 * Initialize thread/cpu microstate accounting
371 */
372 init_mstate(&t0, LMS_SYSTEM);
373 init_cpu_mstate(CPU, CMS_SYSTEM);
374
375 /*
376 * Initialize lists of available and active CPUs.
377 */
378 cpu_list_init(CPU);
379
380 pg_cpu_bootstrap(CPU);
381
382 /*
383 * Now that we have taken over the GDT, IDT and have initialized
384 * active CPU list it's time to inform kmdb if present.
385 */
386 if (boothowto & RB_DEBUG)
387 kdi_idt_sync();
388
389 if (BOP_GETPROPLEN(bootops, "efi-systab") < 0) {
|
345 p0.p_t1_lgrpid = LGRP_NONE;
346 p0.p_tr_lgrpid = LGRP_NONE;
347 psecflags_default(&p0.p_secflags);
348
349 sigorset(&p0.p_ignore, &ignoredefault);
350
351 CPU->cpu_thread = &t0;
352 bzero(&cpu0_disp, sizeof (disp_t));
353 CPU->cpu_disp = &cpu0_disp;
354 CPU->cpu_disp->disp_cpu = CPU;
355 CPU->cpu_dispthread = &t0;
356 CPU->cpu_idle_thread = &t0;
357 CPU->cpu_flags = CPU_READY | CPU_RUNNING | CPU_EXISTS | CPU_ENABLE;
358 CPU->cpu_dispatch_pri = t0.t_pri;
359
360 CPU->cpu_id = 0;
361
362 CPU->cpu_pri = 12; /* initial PIL for the boot CPU */
363
364 /*
365 * Initialize thread/cpu microstate accounting
366 */
367 init_mstate(&t0, LMS_SYSTEM);
368 init_cpu_mstate(CPU, CMS_SYSTEM);
369
370 /*
371 * Initialize lists of available and active CPUs.
372 */
373 cpu_list_init(CPU);
374
375 pg_cpu_bootstrap(CPU);
376
377 /*
378 * Now that we have taken over the GDT, IDT and have initialized
379 * active CPU list it's time to inform kmdb if present.
380 */
381 if (boothowto & RB_DEBUG)
382 kdi_idt_sync();
383
384 if (BOP_GETPROPLEN(bootops, "efi-systab") < 0) {
|