2022-12-21 08:29:33 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <socks/init.h>
|
2023-02-26 10:05:39 +00:00
|
|
|
#include <socks/test.h>
|
2023-02-03 20:51:23 +00:00
|
|
|
#include <socks/printk.h>
|
2023-03-06 11:08:02 +00:00
|
|
|
#include <socks/object.h>
|
2022-12-21 08:29:33 +00:00
|
|
|
#include <socks/machine/init.h>
|
2023-02-04 19:03:45 +00:00
|
|
|
#include <socks/machine/cpu.h>
|
|
|
|
|
|
|
|
|
|
extern unsigned long get_rflags(void);
|
2022-12-21 08:29:33 +00:00
|
|
|
|
2023-02-05 10:50:13 +00:00
|
|
|
extern char __pstart[], __pend[];
|
|
|
|
|
|
2023-02-04 19:19:48 +00:00
|
|
|
void print_kernel_banner(void)
|
|
|
|
|
{
|
|
|
|
|
printk("Socks kernel version " BUILD_ID);
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-21 08:29:33 +00:00
|
|
|
void kernel_init(uintptr_t arg)
|
|
|
|
|
{
|
2023-02-03 20:24:27 +00:00
|
|
|
ml_init(arg);
|
2023-02-26 10:05:39 +00:00
|
|
|
|
2023-03-06 11:08:02 +00:00
|
|
|
object_bootstrap();
|
|
|
|
|
|
2023-02-26 10:05:39 +00:00
|
|
|
run_all_tests();
|
2023-02-05 10:50:13 +00:00
|
|
|
|
2023-02-04 19:03:45 +00:00
|
|
|
ml_halt_cpu();
|
2022-12-21 08:29:33 +00:00
|
|
|
}
|