forked from xamidev/pepperOS
Setup kernel stack; but process is failing
This commit is contained in:
17
src/kmain.c
17
src/kmain.c
@@ -37,6 +37,8 @@ void hcf()
|
||||
// Doing nothing (can be interrupted)
|
||||
void idle() {for(;;)asm("hlt");}
|
||||
|
||||
uint8_t kernel_stack[KERNEL_STACK_SIZE] __attribute__((aligned(16)));
|
||||
|
||||
void panic(struct cpu_status_t* ctx, const char* str)
|
||||
{
|
||||
CLEAR_INTERRUPTS;
|
||||
@@ -68,17 +70,13 @@ extern struct process_t* current_process;
|
||||
|
||||
void pedicel_main(void* arg)
|
||||
{
|
||||
panic(NULL, "we did it!");
|
||||
printf("Hello, world from a KERNEL PROCESS!");
|
||||
//panic(NULL, "WE DID IT! Hello, world from a PROCESS!!!!");
|
||||
}
|
||||
|
||||
void two_main(void* arg)
|
||||
void idle_main(void* arg)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void three_main(void* arg)
|
||||
{
|
||||
|
||||
for(;;)asm("hlt");
|
||||
}
|
||||
|
||||
// This is our entry point
|
||||
@@ -113,8 +111,7 @@ void kmain()
|
||||
vmm_init();
|
||||
|
||||
struct process_t* pedicel = process_create("pedicel", (void*)pedicel_main, 0);
|
||||
//struct process_t* two = process_create("two", (void*)two_main, 0);
|
||||
//struct process_t* three = process_create("three", (void*)three_main, 0);
|
||||
|
||||
process_display_list(processes_list);
|
||||
|
||||
scheduler_init();
|
||||
|
||||
Reference in New Issue
Block a user