2013-06-20 20:30:54 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 Travis Geiselbrecht
|
|
|
|
|
*
|
2019-06-19 23:28:14 -07:00
|
|
|
* Use of this source code is governed by a MIT-style
|
|
|
|
|
* license that can be found in the LICENSE file or at
|
|
|
|
|
* https://opensource.org/licenses/MIT
|
2013-06-20 20:30:54 -07:00
|
|
|
*/
|
2015-02-16 22:55:01 -08:00
|
|
|
#include <kernel/debug.h>
|
|
|
|
|
#include <kernel/mp.h>
|
2015-11-20 14:43:27 -08:00
|
|
|
#include <kernel/port.h>
|
2019-07-13 17:21:00 -07:00
|
|
|
#include <kernel/thread.h>
|
|
|
|
|
#include <kernel/timer.h>
|
|
|
|
|
#include <lk/compiler.h>
|
|
|
|
|
#include <lk/debug.h>
|
2013-06-20 20:30:54 -07:00
|
|
|
|
2019-06-19 20:54:28 -07:00
|
|
|
void kernel_init(void) {
|
2016-02-14 12:24:01 -08:00
|
|
|
// if enabled, configure the kernel's event log
|
|
|
|
|
kernel_evlog_init();
|
2013-06-20 20:30:54 -07:00
|
|
|
|
2016-02-14 12:24:01 -08:00
|
|
|
// initialize the threading system
|
|
|
|
|
dprintf(SPEW, "initializing mp\n");
|
|
|
|
|
mp_init();
|
2015-02-16 22:55:01 -08:00
|
|
|
|
2016-02-14 12:24:01 -08:00
|
|
|
// initialize the threading system
|
|
|
|
|
dprintf(SPEW, "initializing threads\n");
|
|
|
|
|
thread_init();
|
2013-06-20 20:30:54 -07:00
|
|
|
|
2016-02-14 12:24:01 -08:00
|
|
|
// initialize kernel timers
|
|
|
|
|
dprintf(SPEW, "initializing timers\n");
|
|
|
|
|
timer_init();
|
2015-11-20 14:43:27 -08:00
|
|
|
|
2016-02-14 12:24:01 -08:00
|
|
|
// initialize ports
|
|
|
|
|
dprintf(SPEW, "initializing ports\n");
|
|
|
|
|
port_init();
|
2013-06-20 20:30:54 -07:00
|
|
|
}
|
|
|
|
|
|