Skip to content

Instantly share code, notes, and snippets.

@naoki9911
Created September 16, 2018 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoki9911/a76d564e81beff0f6c7008544829e720 to your computer and use it in GitHub Desktop.
Save naoki9911/a76d564e81beff0f6c7008544829e720 to your computer and use it in GitHub Desktop.
int
main(void)
{
kinit1(end, P2V(4*1024*1024)); // phys page allocator
kvmalloc(); // kernel page table
mpinit(); // detect other processors
lapicinit(); // interrupt controller
seginit(); // segment descriptors
picinit(); // disable pic
ioapicinit(); // another interrupt controller
consoleinit(); // console hardware
uartinit(); // serial port
pinit(); // process table
tvinit(); // trap vectors
binit(); // buffer cache
fileinit(); // file table
ideinit(); // disk
startothers(); // start other processors
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
userinit(); // first user process
mpmain(); // finish this processor's setup
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment