summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-05-30Kernel: Make the Process allocate_region* API's understand "int prot".Andreas Kling
Instead of having to inspect 'prot' at every call site, make the Process API's take care of that so we can just pass it through.
2019-05-30Kernel: Make fcntl(F_SETFL) actually update the append/blocking flags.Andreas Kling
2019-05-30Kernel: Add InodeFile, a File subclass for regular files.Andreas Kling
Finally everything that can be held by a FileDescriptor actually inherits from the File class.
2019-05-30Kernel: Pass 'prot' argument to File::mmap() and act on it.Andreas Kling
Nothing crazy, this just means that PROT_READ allocates readable regions, and that PROT_WRITE allocates writable ones.
2019-05-30Misc: Add a simple init processRobin Burchell
This doesn't do much right now, just fork off a bunch of stuff and set priorities.
2019-05-30Kernel/LibC: Implement sched_* functionality to set/get process priorityRobin Burchell
Right now, we allow anything inside a user to raise or lower any other process's priority. This feels simple enough to me. Linux disallows raising, but that's annoying in practice.
2019-05-30Kernel: Fix a bad printf, and stub out SO_ERROR a bit more fullyRobin Burchell
links requests SO_ERROR, so in not supporting it, things were unhappy. Supporting this properly looks a little messy. I guess Socket will need an m_error member it sets everywhere it returns an error. Or Syscall could set it, perhaps, but I don't know if that's the right thing to do, so let's just stub this for now and file a bug.
2019-05-28Add clang-format fileRobin Burchell
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
2019-05-28Kernel: Remove accidentally committer .orig file.Andreas Kling
2019-05-27tiled backgrounds no longer has strange off-by-one pixel errorsChristopher Dumas
2019-05-26IDEDiskDevice: Implement basic DMA writes.Andreas Kling
This could share more code with reads, and generally be better. But it works and it's considerably faster than PIO, so let's use it. :^)
2019-05-26Kernel: Sending a signal to yourself should block until dispatch.Andreas Kling
By moving the sending (and receiving) thread into the BlockedSignal state, we ensure that the thread doesn't continue executing until the signal has been dispatched.
2019-05-26Kernel: Send more specific signals when crashing due to CPU exceptions.Andreas Kling
- For division by zero, send SIGFPE. - For illegal instruction, send SIGILL. - For the rest, default to SIGSEGV.
2019-05-26Kernel: Support O_APPENDRobin Burchell
As per the manpage, this acts as a transparent lseek() before write.
2019-05-25Ext2FS: Block #0 can terminate an inode block list early.Andreas Kling
We were already handling this for the indirect blocks, but the direct ones would happily consider #0 to be a valid block list entry.
2019-05-25Ext2FS: Fix build with EXT2_DEBUG enabled, and tweak some variable names.Andreas Kling
2019-05-24Demos: Start working on a simple WidgetGallery app.Andreas Kling
It's good to have a place where we can try out all the different widgets. This needs some more work on a nice layout, and should also include more of the widgets. :^)
2019-05-24Launcher loads applications from Launcher.ini, is started by default, and is ↵Christopher Dumas
resized automatically Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
2019-05-24WindowServer: Add 2560x1440 resolution option.Andreas Kling
Also expand the QEMU VGA memory size to 64 MB, since otherwise we won't have enough memory for double-buffering the screen.
2019-05-24Kernel: Tidy up IDEDiskDevice a bit.Andreas Kling
The main cleanup here is putting the I/O address base in a member variable.
2019-05-23Always run QEMU with -debugcon stdio.Andreas Kling
If someone wants to run without this, they can disable it manually :^)
2019-05-23Kernel: Return ENOSYS if an invalid syscall number is requested.Andreas Kling
2019-05-23Kernel/AK: Move ELF loader to AKRobin Burchell
This is in preparation for eventually using it in userspace. LinearAddress.h has not been moved for the time being (as it seems to be only used by a very small part of the code).
2019-05-23Kernel: getpeername() should fail with ENOTCONN for non-connected sockets.Andreas Kling
2019-05-22Kernel: Forked children should inherit their RangeAllocator by copy.Andreas Kling
Otherwise we'll start handing out addresses that are very likely already in use by existing ranges.
2019-05-22Kernel: If a signal is ignored, make sure we unset BlockedSignal state.Andreas Kling
2019-05-22Kernel: Dump backtrace on illegal opcode exception.Andreas Kling
2019-05-21Kernel: Bump kernel stacks to 64 KB.Andreas Kling
This makes the ELF symbolication crash go away while I work out a smart fix.
2019-05-20Kernel: Add getpeername() syscall, and fix getsockname() behavior.Andreas Kling
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in, and we didn't set sa_family or sa_port.
2019-05-20Socket: Fix missing kprintf() args in setsockopt().Andreas Kling
2019-05-20Kernel: Let PageDirectory own the associated RangeAllocator.Andreas Kling
Since we transition to a new PageDirectory on exec(), we need a matching RangeAllocator to go with the new directory. Instead of juggling this in Process and MemoryManager, simply attach the RangeAllocator to the PageDirectory instead. Fixes #61.
2019-05-20LocalSocket: Make send() and sendto() work, too.Andreas Kling
2019-05-20LocalSocket: Bump internal buffer sizes to 16KB.Andreas Kling
This gives us some leeway for WindowServer to queue up a bunch of messages for one of its clients. Longer-term we should improve DoubleBuffer to be able to grow dynamically in a way that gets billed to some reasonable place.
2019-05-20Kernel: Add support for recv() with MSG_DONTWAIT.Andreas Kling
Passing this flag to recv() temporarily puts the file descriptor into non-blocking mode. Also implement LocalSocket::recv() as a simple forwarding to read().
2019-05-20LocalSocket: Fix mismatch between can_write() and write() logic.Andreas Kling
can_write() was saying yes in situations where write() would overflow the internal buffer. This patch adds a has_attached_peer() helper to make it easier to understand what's going on in these functions.
2019-05-20Kernel: Report EAGAIN from read() on a non-blocking socket if the buffer is ↵Robin Burchell
empty This is not EOF, and never should have been so -- can trip up other code when porting. Also updates LibGUI and WindowServer which both relied on the old behaviour (and didn't work without changes). There may be others, but I didn't run into them with a quick inspection.
2019-05-19Kernel+LibC: Implement getsockname() syscall.Andreas Kling
2019-05-19LibC: Add mmap_with_name() that names the allocation immediately.Andreas Kling
This allows us to skip the separate call to set_mmap_name() in code that we control, e.g malloc() and GraphicsBitmap.
2019-05-19IDEDiskDevice: Add sysctl variable for turning DMA on/off.Andreas Kling
2019-05-19Kernel: Check can_write for blocking writeRobin Burchell
This way the socket write buffer sizes are respected, and things that exceed them get sent EAGAIN.
2019-05-19Kernel: Add the ability to debug poll/select independently of read/writeRobin Burchell
2019-05-19IDEDiskDevice: Support reading multiple sectors at a time with DMA.Andreas Kling
This is another sizable improvement to GCC compile times.
2019-05-19IDEDiskDevice: Use wait_for_irq() when waiting for DMA transfers.Andreas Kling
Also make sure we return any device errors to caller.
2019-05-19IDEDiskDevice: Add support for DMA reads.Andreas Kling
I've only tested this with the PIIX3 chipset QEMU emulates, but it works pretty well here. GCC compile times are cut roughly in half :^)
2019-05-19Kernel: Remove an unused ELFLoader member.Andreas Kling
2019-05-19Kernel: Remove relocation-related code since it's not used by the kernel.Andreas Kling
If/when we need this in the future, we can bring it back. Right now it's just sitting there making the ELF code look huge when it's not.
2019-05-18Kernel: Don't page in entire file immediately on mmap().Andreas Kling
If we just don't do anything, the page fault handler will load the file incrementally as-needed instead. :^)
2019-05-18FileDescriptor: It's actually okay to seek past the end of a file. :^)Andreas Kling
2019-05-18Kernel: Make sure we never put the colonel thread in the runnable list.Andreas Kling
This would cause it to get scheduled unnecessarily.
2019-05-18Kernel: Add a Thread::set_thread_list() helper to keep logic in one place.Andreas Kling