feat: Added syscalls and began on usermode support, still no scheduler
This commit is contained in:
parent
49867193d5
commit
e7b9f44384
8 changed files with 140 additions and 2 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <sys/apic/lapic.h>
|
||||
#include <sys/apic/ioapic.h>
|
||||
#include <dev/pit.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
__attribute__((used, section(".limine_requests"))) static volatile LIMINE_BASE_REVISION(3);
|
||||
__attribute__((used, section(".limine_requests"))) static volatile struct limine_memmap_request memmap_request = {
|
||||
|
@ -72,6 +73,11 @@ void tick(struct register_ctx *)
|
|||
log_early("tick on CPU %d", get_cpu_local()->cpu_index);
|
||||
}
|
||||
|
||||
void user_func()
|
||||
{
|
||||
syscall(69, 69, 420, 420);
|
||||
}
|
||||
|
||||
void emk_entry(void)
|
||||
{
|
||||
__asm__ volatile("movq %%rsp, %0" : "=r"(kstack_top));
|
||||
|
@ -210,7 +216,10 @@ void emk_entry(void)
|
|||
ioapic_init();
|
||||
|
||||
/* Setup timer */
|
||||
pit_init(tick);
|
||||
pit_init(NULL);
|
||||
|
||||
/* Call our user space function */
|
||||
user_func(); // No good way to run in usermode, yet
|
||||
|
||||
/* Finished */
|
||||
log_early("%s", LOG_SEPARATOR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue