/* * Determine i/o configuration for a machine. */ void cpu_configure(void) { startrtclock(); #if NBIOS32 > 0 bios32_init(); platform_init(); #endif x86_64_proc0_tss_ldt_init(); if (config_rootfound("mainbus", NULL) == NULL) panic("configure: mainbus not configured"); #ifdef INTRDEBUG intr_printconfig(); #endif #if NIOAPIC > 0 ioapic_enable(); #endif #ifdef MULTIPROCESSOR cpu_init_idle_lwps(); #endif spl0(); lcr8(0); }
/* * Determine i/o configuration for a machine. */ void cpu_configure(void) { #if NBIOS32 > 0 bios32_init(); #endif x86_64_proc0_tss_ldt_init(); if (config_rootfound("mainbus", NULL) == NULL) panic("configure: mainbus not configured"); intr_printconfig(); #if NIOAPIC > 0 lapic_set_lvt(); ioapic_enable(); #endif #ifdef MULTIPROCESSOR cpu_init_idle_pcbs(); #endif lcr8(0); spl0(); 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); } if (has_rdrand) { timeout_set(&rdrand_tmo, rdrand, &rdrand_tmo); rdrand(&rdrand_tmo); } #ifdef CRYPTO /* * Also, if the chip has crypto available, enable it. */ if (amd64_has_xcrypt) viac3_crypto_setup(); if (amd64_has_aesni) aesni_setup(); #endif }
void interface_init(void) { // Running at new code address - do code relocation fixups malloc_init(); // Setup romfile items. qemu_cfg_init(); coreboot_cbfs_init(); // Setup ivt/bda/ebda ivt_init(); bda_init(); // Other interfaces boot_init(); bios32_init(); pmm_init(); pnp_init(); kbd_init(); mouse_init(); }
/* * Determine i/o configuration for a machine. */ void cpu_configure(void) { struct pcb *pcb; startrtclock(); #if NBIOS32 > 0 bios32_init(); platform_init(); #endif #ifdef PCIBIOS pcibios_init(); #endif if (config_rootfound("mainbus", NULL) == NULL) panic("configure: mainbus not configured"); #ifdef INTRDEBUG intr_printconfig(); #endif #if NIOAPIC > 0 ioapic_enable(); #endif fpuinit(&cpu_info_primary); /* resync cr0 after FPU configuration */ pcb = lwp_getpcb(&lwp0); pcb->pcb_cr0 = rcr0() & ~CR0_TS; #ifdef MULTIPROCESSOR /* propagate this to the idle pcb's. */ cpu_init_idle_lwps(); #endif spl0(); #if NLAPIC > 0 lapic_tpr = 0; #endif }