/* * Determine i/o configuration for a machine. */ void configure() { startrtclock(); if (config_rootfound("mainbus", NULL) == NULL) panic("configure: mainbus not configured"); printf("biomask %x netmask %x ttymask %x\n", (u_short)imask[IPL_BIO], (u_short)imask[IPL_NET], (u_short)imask[IPL_TTY]); spl0(); cold = 0; /* Set up proc0's TSS and LDT (after the FPU is configured). */ i386_proc0_tss_ldt_init(); /* XXX Finish deferred buffer cache allocation. */ i386_bufinit(); }
/* * Determine i/o configuration for a machine. */ void cpu_configure(void) { /* * Note, on i386, configure is not running under splhigh unlike other * architectures. This fact is used by the pcmcia irq line probing. */ gdt_init(); /* XXX - pcibios uses gdt stuff */ /* Set up proc0's TSS and LDT */ i386_proc0_tss_ldt_init(); #ifdef KVM86 kvm86_init(); #endif if (config_rootfound("mainbus", NULL) == NULL) panic("cpu_configure: mainbus not configured"); #if NIOAPIC > 0 if (nioapics > 0) goto nomasks; #endif printf("biomask %x netmask %x ttymask %x\n", (u_short)IMASK(IPL_BIO), (u_short)IMASK(IPL_NET), (u_short)IMASK(IPL_TTY)); #if NIOAPIC > 0 nomasks: ioapic_enable(); #endif proc0.p_addr->u_pcb.pcb_cr0 = rcr0(); #ifdef MULTIPROCESSOR /* propagate TSS and LDT configuration to the idle pcb's. */ cpu_init_idle_pcbs(); #endif spl0(); /* * We can not know which is our root disk, defer * until we can checksum blocks to figure it out. */ cold = 0; /* * At this point the RNG is running, and if FSXR is set we can * use it. Here we setup a periodic timeout to collect the data. */ if (viac3_rnd_present) { timeout_set(&viac3_rnd_tmo, viac3_rnd, &viac3_rnd_tmo); viac3_rnd(&viac3_rnd_tmo); } #ifdef CRYPTO /* * Also, if the chip has crypto available, enable it. */ if (i386_has_xcrypt) viac3_crypto_setup(); #endif }