summaryrefslogtreecommitdiff
path: root/service/kjarna.c
blob: 1240c97a3664b54dbbb1be20c05078d3d5940233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <kjarna/interface.h>

struct kjarna_entry_params *entry_params;

extern int main(int argc, char **argv);

int kjarna_entry(struct kjarna_entry_params *params)
{
	entry_params = params;

	__asm__ ("leaq kc_image_base(%%rip), %%rax" ::: "rax");

	bool wait = true;

	while(wait)
	{
		__asm__ volatile("hlt");
	}

	return main(params->argc, params->argv);
}