diff options
Diffstat (limited to 'arch/riscv')
| -rw-r--r-- | arch/riscv/include/tcb.h | 9 | ||||
| -rw-r--r-- | arch/riscv/kernel/cpu.c | 6 | ||||
| -rw-r--r-- | arch/riscv/kernel/main.c | 8 |
3 files changed, 16 insertions, 7 deletions
diff --git a/arch/riscv/include/tcb.h b/arch/riscv/include/tcb.h new file mode 100644 index 0000000..d1e0717 --- /dev/null +++ b/arch/riscv/include/tcb.h @@ -0,0 +1,9 @@ +#ifndef ARCH_RISCV_TCB_H +#define ARCH_RISCV_TCB_H + +struct arch_tcbd { + /* empty for now, but should probably be filled with stuff like register + * saving of something */ +}; + +#endif /* ARCH_RISCV_TCB_H */ diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c new file mode 100644 index 0000000..34b7a32 --- /dev/null +++ b/arch/riscv/kernel/cpu.c @@ -0,0 +1,6 @@ +#include <apos/cpu.h> + +unsigned cpu_id() +{ + return 0; /* VERY MUCH TEMP */ +} diff --git a/arch/riscv/kernel/main.c b/arch/riscv/kernel/main.c index 1964514..e519697 100644 --- a/arch/riscv/kernel/main.c +++ b/arch/riscv/kernel/main.c @@ -144,7 +144,7 @@ static struct pm_layout_t setup_pmem(void *fdt) /* mark init stack, at the moment always mapped to 2M */ mark_used(PM_STACK_BASE, MM_MPAGE); - /* mark kernel, at the moment it is always mapped to a 2M partition */ + /* mark kernel, at the moment with a 2M partition */ mark_used(PM_KERN, MM_MPAGE); /* mark fdt and initrd */ @@ -269,12 +269,6 @@ static void init_proc(void *fdt, struct vm_branch_t *b) __asm__("mv " QUOTE(reg) ", %0" :: "rK" (reg) : );\ } -static void update_stack() -{ - __va_reg(sp); - __va_reg(gp); -} - void __main main(void *fdt) { __va_reg(sp); |
