Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/machdep.c
Show First 20 Lines • Show All 2,131 Lines • ▼ Show 20 Lines | |||||
register_t | register_t | ||||
init386(int first) | init386(int first) | ||||
{ | { | ||||
struct gate_descriptor *gdp; | struct gate_descriptor *gdp; | ||||
int gsel_tss, metadata_missing, x, pa; | int gsel_tss, metadata_missing, x, pa; | ||||
struct pcpu *pc; | struct pcpu *pc; | ||||
struct xstate_hdr *xhdr; | struct xstate_hdr *xhdr; | ||||
caddr_t kmdp; | |||||
int late_console; | int late_console; | ||||
thread0.td_kstack = proc0kstack; | thread0.td_kstack = proc0kstack; | ||||
thread0.td_kstack_pages = TD0_KSTACK_PAGES; | thread0.td_kstack_pages = TD0_KSTACK_PAGES; | ||||
/* | /* | ||||
* This may be done better later if it gets more high level | * This may be done better later if it gets more high level | ||||
* components in it. If so just link td->td_proc here. | * components in it. If so just link td->td_proc here. | ||||
▲ Show 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | #endif | ||||
* This loses mainly printf()s in getmemsize() and early debugging. | * This loses mainly printf()s in getmemsize() and early debugging. | ||||
*/ | */ | ||||
late_console = 1; | late_console = 1; | ||||
TUNABLE_INT_FETCH("debug.late_console", &late_console); | TUNABLE_INT_FETCH("debug.late_console", &late_console); | ||||
if (!late_console) { | if (!late_console) { | ||||
cninit(); | cninit(); | ||||
i386_kdb_init(); | i386_kdb_init(); | ||||
} | } | ||||
kmdp = preload_search_by_type("elf kernel"); | |||||
link_elf_ireloc(kmdp); | |||||
vm86_initialize(); | vm86_initialize(); | ||||
getmemsize(first); | getmemsize(first); | ||||
init_param2(physmem); | init_param2(physmem); | ||||
/* now running on new page tables, configured,and u/iom is accessible */ | /* now running on new page tables, configured,and u/iom is accessible */ | ||||
if (late_console) | if (late_console) | ||||
▲ Show 20 Lines • Show All 677 Lines • Show Last 20 Lines |