Commit graph vbos/sched/syscall.c
Author SHA1 Message Date
Michael Shaw
0297f4a34c syscall: imeplement basic file IO syscalls
also fix a bug where the RAX register would be restored to its initial
state instead of carrying the syscall return value
2023-11-27 02:48:52 -05:00
Michael Shaw
3dda839cdd syscall: implement write syscall 2023-11-22 23:27:39 -05:00
Michael Shaw
0a0235612e syscall: change handling of exceptions and traps 2023-11-21 19:19:35 -05:00
Michael Shaw
37518aea81 usr: implement user process switching
This is a rather large commit, so the gist of it is this:

User context switching is now functional, after a change to the TSS, and
a few minor details in the scheduler and loader.

ELF parsing is rather primitive, but basically functional, as long as it
only loads code.

The interrupt 0x80 is for syscalls, and will switch from user mode to
kernel mode. It is currently the only interrupt that can be called from
user mode

This adds the syscall functionality, which currently uses a red-black
tree to store the function pointers, although when the table is more
flushed out, it will probably be replaced with an array

The pager now correctly marks the parent nodes with attributes as it
allocates them. Without doing this, the page table entries will never be
reached in lower privilege modes, causing page faults

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-11-20 22:07:35 -05:00