Commit graph vbos/init/cmd.c
Author SHA1 Message Date
Michael Shaw
a10509f1e5 lib: move lib headers into lib directory 2024-01-30 22:00:20 -05:00
Michael Shaw
2f20777a47 fs: move directory parsing to vfs
Previously, the vfs heavily relied on the physical filesystem for
directory parsing, which limited capabilities to a single filesystem,
save letter-based indexing which will not be used.

Now, vnodes are parsed in the VFS, and only requested on-demand, greatly
reducing complexity and reliance on physical drivers for handling.

This temporarily removes the ability to create files with the current
drivers.
2024-01-30 18:54:59 -05:00
Michael Shaw
d61edcbe7b ext2: use struct vnode instead of struct file 2024-01-26 18:41:09 -05:00
Michael Shaw
b7c10e80c2 vfs: complete restructure of vfs 2024-01-24 18:15:04 -05:00
Michael Shaw
e2d9609bf7 console: rename console_write to console_putchar 2023-11-29 19:33:56 -05:00
Michael Shaw
3dda839cdd syscall: implement write syscall 2023-11-22 23:27:39 -05:00
Michael Shaw
f8b801236a vfs: remove kernel file descriptor numbers 2023-11-22 21:09:05 -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
Michael Shaw
d60da85470 load: add basic elf loading 2023-11-16 23:22:27 -05:00
Michael Shaw
4a00007e32 misc: change prompt 2023-11-15 13:49:25 -05:00
Michael Shaw
a85be6eb62 elf: add basic elf parsing 2023-11-15 12:50:46 -05:00
Michael Shaw
c186d3846c fs: add unlink operation 2023-10-24 01:09:33 -04:00
Michael Shaw
b2cacaf6cd ext2: fix issues with inode dirent allocation 2023-10-23 19:46:54 -04:00
Michael Shaw
19f32aef3f ext2: add ability to create files 2023-10-23 17:03:20 -04:00
Michael Shaw
d5ffbda67d cat: print newline after file contents 2023-10-22 23:55:56 -04:00
Michael Shaw
0a1b73edc2 ext2: slightly clean up indirect read/alloc 2023-10-21 14:25:28 -04:00
Michael Shaw
ca8e1521df cmd: close fd on cat 2023-10-21 01:07:25 -04:00
Michael Shaw
ad2de927e2 ext2/vfs: implement read fs call
also implement the cat command!
2023-10-21 00:46:42 -04:00
Michael Shaw
0029621ada cmd: add initial commands ls and help 2023-10-20 23:56:01 -04:00