Age | Commit message (Collapse) | Author |
|
|
|
This is really neat. :^)
|
|
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.
|
|
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.
|
|
AK::Function is very handy, but costs us an 8-byte allocation.
Let's not have kmalloc() calls in the scheduler hot path.
|
|
Process now has a number of Regions.
Each Region is backed by a VMObject.
A VMObject can be file-backed or anonymous. These can be shared.
|
|
All right, we can now mmap() a file and it gets magically paged in from fs
in response to an NP page fault. This is really cool :^)
I need to refactor this to support sharing of read-only file-backed pages,
but it's cool to just have something working.
|
|
|
|
sys$fork() now clones all writable regions with per-page COW bits.
The pages are then mapped read-only and we handle a PF by COWing the pages.
This is quite delightful. Obviously there's lots of work to do still,
and it needs better data structures, but the general concept works.
|
|
|
|
|
|
Tweak the kmalloc space layout a bit. Get the spawn stress test up
and running again.
|
|
The naive spinlock was not nearly enough to protect kmalloc from
reentrancy problems.
I don't want to deal with coming up with a fancy lock for kmalloc
right now, so I made an InterruptDisabler thingy instead.
It does CLI and then STI iff interrupts were previously enabled.
|
|
- Turn Keyboard into a CharacterDevice (85,1) at /dev/keyboard.
- Implement MM::unmapRegionsForTask() and MM::unmapRegion()
- Save SS correctly on interrupt.
- Add a simple Spawn syscall for launching another process.
- Move a bunch of IO syscall debug output behind DEBUG_IO.
- Have ASSERT do a "cli" immediately when failing.
This makes the output look proper every time.
- Implement a bunch of syscalls in LibC.
- Add a simple shell ("sh"). All it can do now is read a line
of text from /dev/keyboard and then try launching the specified
executable by calling spawn().
There are definitely bugs in here, but we're moving on forward.
|
|
Also move Keyboard to a class implementation using this pattern.
|
|
This leaves interrupts enabled while we're in the kernel, which is
precisely what we want.
This uncovered a horrendous problem with kernel tasks silently
overflowing their stacks. For now I've simply increased the stack size
but I need a more MMU-y solution for this eventually.
|
|
|
|
The test userspace process now runs at linear address 0x300000 which is
mapped to a dynamically allocated page from the MemoryManager. Cool!
|
|
This is really rickety, but it kinda sorta works for my test GPF!
|
|
It's a lot crappier than I remembered it. It's gonna need a lot of work.
|