summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2018-12-03Some coding style fixes. I'm getting more comfortable with this style.Andreas Kling
2018-12-02Make it possible to build the Kernel on a macOS host.Andreas Kling
It still requires an ELF compiler and linker, but at least it builds. I need to get rid of the "Unix" namespace. This does a lot of that.
2018-12-02Move ELFLoader code into Kernel/.Andreas Kling
2018-11-29Add TIOCGWINSZ ioctl so userland can determine terminal geometry.Andreas Kling
(Don't) use this to implement short-form output in ls. I'm too tired to make a nice column formatting algorithm. I just wanted something concise when I type "ls".
2018-11-28Fix bug where a signal-interrupted waitpid() wouldn't return EINTR.Andreas Kling
2018-11-28Implement signal() via sigaction() and get rid of sys$signal().Andreas Kling
2018-11-28Let reap() communicate the dead process's exit status to the caller.Andreas Kling
This way the scheduler doesn't need to plumb the exit status into the waiter. We still plumb the waitee pid though, I don't love it but it can be fixed.
2018-11-28Drop any old signal stacks on exec().Andreas Kling
2018-11-19Add basic zero faults.Andreas Kling
mmap() will now map uncommitted pages that get allocated and zeroed upon the first access. I also made /proc/PID/vm show number of "committed" bytes in each region. This is so cool! :^)
2018-11-19Make /proc/PID/vm more readable.Andreas Kling
And move the unreadable detail-heavy mess to /proc/PID/vmo.
2018-11-18Finally hook up the mkdir code to a syscall.Andreas Kling
Added a /bin/mkdir that makes directories. How very neat :^) There are various limitations because of missing functionality.
2018-11-17Fix race condition in exec().Andreas Kling
...also hook up sys$fstat in the syscall dispatcher.
2018-11-17Tweak default hostname.Andreas Kling
2018-11-17Make bash-2.05b build with minimal changes.Andreas Kling
This is really neat. :^)
2018-11-16Add fcntl() F_DUPFD which is slightly different from dup2().Andreas Kling
2018-11-16Don't unblock a blocked process when it ignores a signal.Andreas Kling
2018-11-16Refactor TTY signal generation a bit.Andreas Kling
We now respect the VINTR and VQUIT control characters in the termios.
2018-11-16Minor TTY tweak.Andreas Kling
2018-11-16Add a DoubleBuffer thingy to allow TTY read/write to be interleaved.Andreas Kling
I feel like this concept might be useful in more places. It's very naive right now and uses dynamically growing buffers. It should really use static size buffers and never kmalloc().
2018-11-16Add templated helpers for read/write validation, and one for strings, too.Andreas Kling
2018-11-16Improve syscall address validation a bit.Andreas Kling
2018-11-16Reimplement tcsetattr/tcgetattr as ioctls.Andreas Kling
2018-11-16Add ioctl() and reimplement tcsetpgrp/tcsetpgrp as ioctls.Andreas Kling
2018-11-15Some more renaming:Andreas Kling
FileSystem -> FS SyntheticFileSystem -> SynthFS ProcFileSystem -> ProcFS Ext2FileSystem -> Ext2FS Ext2Inode -> Ext2FSInode
2018-11-15More VFS cleanup.Andreas Kling
2018-11-15A pass of style/naming cleanup in VFS.Andreas Kling
2018-11-15Rename:Andreas Kling
VirtualFileSystem -> VFS VirtualFileSystem::Node -> Vnode
2018-11-13More work on CoreInode.Andreas Kling
2018-11-13Add metadata to CoreInode.Andreas Kling
2018-11-13Make page_in_from_vnode 2x faster.Andreas Kling
...by adding a new class called Ext2Inode that inherits CoreInode. The idea is that a vnode will wrap a CoreInode rather than InodeIdentifier. Each CoreInode subclass can keep whatever caches they like. Right now, Ext2Inode caches the list of block indices since it can be very expensive to retrieve.
2018-11-13Add close-on-exec flag for file descriptors.Andreas Kling
I was surprised to find that dup()'ed fds don't share the close-on-exec flag. That means it has to be stored separately from the FileDescriptor object.
2018-11-13Reduce kmalloc() traffic in directory iteration.Andreas Kling
Pass the file name in a stack-allocated buffer instead of using an AK::String when iterating directories. This dramatically reduces the amount of cycles spent traversing the filesystem.
2018-11-12Add a braindead 10x speedup to kmalloc().Andreas Kling
Skip over entirely full buckets when scanning for a big-enough memory slot. This means I can postpone writing a better kmalloc() for a while longer! :^)
2018-11-12Make loading /bin/bash ~250x faster.Andreas Kling
The ELF loader was doing huge amounts of unnecessary work. Got rid of the "export symbols" and relocation passes since we don't need them. They were useful things when bringing up the ELF loading code. Also added a simple TSC-based Stopwatch RAII thingy to help debug performance issues.
2018-11-12Some minor termios debugging output.Andreas Kling
2018-11-12Add primitive FIFO and hook it up to sys$pipe().Andreas Kling
It's now possible to do this in bash: cat kernel.map | fgrep List This is very cool! :^)
2018-11-11Add a naive /bin/fgrep for testing pipes.Andreas Kling
2018-11-11Rage hacking to get bash to run. It finally runs. So cool! :^)Andreas Kling
2018-11-11Stub out a bunch more functions to get closer to that sweet bash build.Andreas Kling
2018-11-11Add ispunct() to LibC + some minor cleanups.Andreas Kling
2018-11-11A bunch of compat work (mostly stubs but some real implementations, too.)Andreas Kling
Another pass at getting bash-1.14.7 to build. Not that many symbols remain.
2018-11-10Some improvements to signals.Andreas Kling
- Add sigprocmask() and sigpending(). - Forked children inherit signal dispositions and masks. - Exec clears signal dispositions and masks.
2018-11-10Remove MM::allocate_physical_pages() since it wasn't used.Andreas Kling
Everyone was allocating one page at a time with allocate_physical_page().
2018-11-10Add /proc/PID/cwd, a symlink to the process's current directory.Andreas Kling
2018-11-10Rename ProcessInspectionScope to ProcessInspectionHandle.Andreas Kling
It might be useful to pass these things around.
2018-11-10Merge VGA into VirtualConsole.Andreas Kling
2018-11-10Merge Disk namespace into the IDEDiskDevice class.Andreas Kling
2018-11-10Before sys$write returns, check for pending unmasked signals.Andreas Kling
If there is one, put the process into a new BlockedSignal state which makes the next scheduler iteration dispatch the signal.
2018-11-10Make /bin/clear work again.Andreas Kling
After I made stdio buffered, we were dropping anything unflushed on exit. Since /bin/clear just prints out some escape sequences without a newline, the entire buffer was being discarded. Also add VirtualConsole::clear() that handles clearing of background VC's.
2018-11-09Use the VGA start address for fast VirtualConsole scrolling.Andreas Kling
Instead of memcpy'ing the entire screen every time we press enter at the bottom, use the VGA start address register to make a "view" onto the underlying memory that moves downward as we scroll. Eventually we run out of memory and have to reset to the start of the buffer. That's when we memcpy everything. It would be cool if there was some way to get the hardware to act like a ring buffer with automatic wrapping here but I don't know how to do that.