Commit graph vbos/usr.bin
Author SHA1 Message Date
7cc7da0f54 utest: add syscall test
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-19 21:43:37 -04:00
c5091ea5d9 usr.bin: add .gitignore to usr.bin projects
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-19 21:33:20 -04:00
5c93e8de81 remove utest binary
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-19 21:32:33 -04:00
cc84d4a5a2 proc: setup usr.bin
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-18 23:22:31 -04:00
f47a4bfa2c usr.bin: add usr.bin
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-18 15:28:53 -04:00
Michael Shaw
d2ef885e8d v2 initial commit 2026-04-11 11:35:31 -04:00
Michael Shaw
174c1e7bf0 shtest: remove garbage 2025-02-16 11:01:21 -05:00
Michael Shaw
5159a530c6 ext2: increment block on large reads 2025-02-14 16:31:16 -05:00
Michael Shaw
4ec7ff5aaa ipc: add fifo 2025-02-12 20:01:48 -05:00
Michael Shaw
b496366469 slab: add umalloc 2025-02-12 17:21:15 -05:00
Michael Shaw
a28088aea6 proc: fix deadlock after process exit 2025-02-12 09:57:44 -05:00
Michael Shaw
f92e88597d sched: fix page faulting on process switching
This is the first version of the kernel with fully isolated threads for
user and kernel tasks, where process 0 is only used for scheduling and
interrupt handling.

User process have a "buddy" kernel process that handles its tasks in the
kernel.

This system allows for easy blocking of threads without much need for
thought. Just `sswtch` in an infinite read loop, and your userspace
process will be blocked.

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2025-02-11 21:11:49 -05:00
Michael Shaw
72827c1e00 sched: improve thread handling on system calls 2025-02-11 18:58:00 -05:00
Michael Shaw
89672d02f4 sched: add kthread interface for system calls 2025-02-09 20:56:25 -05:00
Michael Shaw
e3ea41d297 entry: improve control flow for syscalls 2025-02-09 19:46:08 -05:00
Michael Shaw
02c0a70a30 vfs: refcount file structs used in fdescs 2024-08-21 15:44:50 -04:00
Michael Shaw
744c3b266f syscall: implement fork fully 2024-08-21 15:10:16 -04:00
Michael Shaw
e7133a473f proc: add proc_fork and accompanying syscall
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2024-06-18 11:14:15 -04:00
Michael Shaw
b753afd4fb sched: properly implement blocking for read
This is a milestone update, as userspace applications are now able to
properly read from TTY devices, be blocked while waiting, and write the
output back. Userspace development will move much faster now that these
kinks have been worked out.

This version will be tagged as vbos v0.01

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2024-06-17 22:19:25 -04:00
Michael Shaw
2c42102cea usr.bin/shtest: remove debug write 2024-02-19 02:47:24 -05:00
Michael Shaw
a1559a1664 sched: unblock process after blocking read syscall 2024-02-19 02:46:35 -05:00
Michael Shaw
05103a8122 usr.bin: create bin folder in make.sh 2024-02-19 02:35:36 -05:00
Michael Shaw
3b1dc7e153 usr.bin: add shtest
shtest is a simple userland shell test program that accepts input and
echoes it back to the user
2024-02-19 02:25:34 -05:00
Michael Shaw
e9f5935d48 Makefile: change usr.bin build system 2024-02-13 14:16:07 -05:00
Michael Shaw
ab1989c965 usr.bin: add vfs test for device files 2024-02-13 00:30:19 -05:00
Michael Shaw
9c544a85cb Makefile: fix multi-compilation 2024-02-08 14:13:45 -05:00
Michael Shaw
0aad59dca9 remove iotest 2024-01-24 21:32:18 -05:00
Michael Shaw
e2d9609bf7 console: rename console_write to console_putchar 2023-11-29 19:33:56 -05:00
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
271d9a1fea elf: correctly load data segment 2023-11-22 20:15:24 -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
bcf6906e72 usr: add first userspace program 2023-11-15 15:13:53 -05:00