Okay, now you don't have to take my word for it
Notices by Drew DeVault (drewdevault@fosstodon.org), page 4
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:04 JST Drew DeVault -
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:04 JST Drew DeVault ✓ Userspace
No user I/O yet though so you have to take my word for it
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:03 JST Drew DeVault There we go. That's probably all for today.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:03 JST Drew DeVault Day 8 was all about getting userspace online. We are loading ELF programs, jumping into userspace, and we have working interrupts and syscalls
Day 9 will start implementing more useful syscalls and fleshing out I/O
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:02 JST Drew DeVault Okay, reorganized the source tree to make a lot more sense before we move any further into userspace. Took some inspiration from the BSD layouts, since I intend to ship kernel and userspace as one cohesive project.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:02 JST Drew DeVault I confess that I rushed into userspace without a plan, so I have a bit of a mess to figure out once I decide how to actually structure the project properly.
But that aside, I implemented a handful of syscalls today, notably readv, write, and mmap (MAP_ANON only, for allocations)
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:01 JST Drew DeVault Day 10 is getting fork working (and preemptive multitasking)
Getting there.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:00 JST Drew DeVault exec works, but there's still some kind of bug in fork+exec
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:36:00 JST Drew DeVault There we go!
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:59 JST Drew DeVault Next up is signals and waitpid? Or openat et al. We shall see.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:59 JST Drew DeVault Summary of work up to day 10:
* AHCI driver
* MBR and GPT partitions
* ext4
* VFS
* Userspace
* Preemptive multitasking
* Syscalls: readv, writev, lseek, close, mmap, munmap, mprotect, fork, execve -
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:59 JST Drew DeVault ayy
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:58 JST Drew DeVault Signals are hard. Might do some refactoring instead, particularly with respect to files
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:57 JST Drew DeVault Nice, that's the bulk of the scheduler refactoring done. No pretty screenshot since there are no user-visible changes, but the short of it is that we can context switch to and from the kernel rather than only to and from userspace.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:57 JST Drew DeVault So today is refactoring, particularly for scheduling and file management.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:56 JST Drew DeVault (no, I have not set up kernel preemption yet, there are no locks in the kernel and interrupts are always disabled when the kernel is running; as a consequence of that I can only cooperatively context switch the kernel right now)
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:55 JST Drew DeVault open syscall works, though it's kind of shitty
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:55 JST Drew DeVault Hey my waitqueue implementation worked on the first try
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:54 JST Drew DeVault End of day 11:
New syscalls: getpid, getppid, openat
Scheduler refactored, AHCI driver yields while waiting on I/O and handles errors from the block device properly
Some filesystem refactoring done: inodes moved around in the codebase, fs::walk can terminate at the last entry (e.g. for creat(2) or mkdir, etc)
Next up is probably one of the following:
* Implement console device files
* finish openat (i.e. flags like O_CREAT, enforce RDONLY etc)
* inode lifecycle
* signals/waitpid -
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:53 JST Drew DeVault Elaborating a bit: the scheduler can now switch tasks while in the kernel and return to the kernel when the thread wakes up, and accordingly waitqueues have been implemented for this purpose.
The problem with console devices is that their file descriptors are fake, namely they do not store an inode reference. This is problematic for a few reasons, such as (1) Bunnix lacks a device file abstraction generally; (2) files without an inode blocks adding fstat; (3) we can't mount them in /dev.