Commit graph vbos/init
Author SHA1 Message Date
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
52ba70f4b7 dev: remove console driver, merge into serial
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2024-06-17 20:32:44 -04:00
Michael Shaw
f86ce66c75 sched: reschedule on sched interrupt 2024-06-17 18:00:32 -04:00
Michael Shaw
f03a30e07e irq: enable LAPIC timer
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2024-06-17 17:53:55 -04:00
Michael Shaw
9ed457728d exception: initialize explicit exception handlers 2024-06-13 22:52:59 -04:00
Michael Shaw
4a997cec35 trap: explicitly handle certain exceptions 2024-06-13 22:51:18 -04:00
Michael Shaw
e4116bd3e8 lib: move lock/atomic into lib folder 2024-03-19 00:19:42 -04:00
Michael Shaw
f482174458 atomic: clean up atomic_cmpxchg 2024-03-19 00:15:28 -04:00
Michael Shaw
aed0510075 main: include mistakenly removed header 2024-02-22 03:45:25 -05:00
Michael Shaw
9d9f4f24c3 main: destroy semaphore after use 2024-02-22 03:38:19 -05:00
Michael Shaw
0af0c3cbdc main: use semaphore to wait for AP init 2024-02-22 03:37:40 -05:00
Michael Shaw
2009a9adb7 cmd: ls: close dir file when done 2024-02-13 00:12:31 -05:00
Michael Shaw
42acd462b3 cmd: ls: print file name when file is not dir 2024-02-13 00:03:16 -05:00
Michael Shaw
3b247ad5e9 devfs: add console to devfs 2024-02-12 23:24:15 -05:00
Michael Shaw
285086d77d vfs: remove opendir, readdir, closedir 2024-02-12 22:47:18 -05:00
Michael Shaw
c487c4c9dd devfs: add vnodes to devfs tree 2024-02-12 21:11:56 -05:00
Michael Shaw
a6b7d9b42d lib: add basic stack type
I can't believe I've made it this far without needing one
2024-01-30 22:08:36 -05:00
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
bd9786cbe0 init: init processes before AHCI 2023-11-26 22:27:59 -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
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
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
2fe0b0068b sched: begin scheduling module 2023-11-13 22:23:06 -05:00
Michael Shaw
36c6f7b92c boot: print list of block devices on mount fail 2023-11-01 19:55:44 -04:00
Michael Shaw
f880efe02d main: add comments explaining ap_kmain and kmain 2023-11-01 19:19:24 -04:00
Michael Shaw
eaf5254b3b apic: enable LAPIC on application processors 2023-11-01 19:18:31 -04:00
Michael Shaw
e7ceff19ec gdt: increase GDT size 2023-11-01 17:47:09 -04:00
Michael Shaw
2c88b77edd init: correct TSS impl, generalize stack loading 2023-11-01 17:43:27 -04:00
Michael Shaw
c2daea8b18 gdt: add TSS entries for application processors 2023-11-01 15:55:29 -04:00
Michael Shaw
b1c7737d0e main: disable interrupts on BSP entry
this prevents boot failure due to unallocated memory being written to
during early boot
2023-11-01 15:35:26 -04:00
Michael Shaw
d813fabae9 boot: start APs after BSP init 2023-11-01 15:29:45 -04:00
Michael Shaw
1cf54c7fd3 panic: add panic function
also remove print messages from APIC driver
2023-10-27 22:41:10 -04:00
Michael Shaw
e27faa1a02 apic: enable IOAPIC and LAPIC, disable 8259 2023-10-27 00:54:51 -04:00
Michael Shaw
4dc4f07dc6 mem: improve device memory mapping
MMIO ports will no longer directly map to HHDM addresses and will need
to be searched for in the memory mapping tree
2023-10-24 22:16:33 -04: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