summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-08-18Inspector: Add a GUI tool for viewing a remote process's CObject graphAndreas Kling
Here comes the foundation for a neat remote debugging tool. Right now, it connects to a remote process's CEventLoop RPC socket and retreives the remote object graph JSON dump. The remote object graph is then reconstructed and exposed through a GModel subclass, which is then displayed in a GTreeView. It's pretty cool, I think. :^)
2019-08-18Kernel: Implement generic VGA device using multiboot infoConrad Pankoff
This implements a very basic VGA device using the information provided to us by the bootloader in the multiboot header. This allows Serenity to boot to the desktop on basically any halfway modern system.
2019-08-18Kernel: Implement generic framebuffer ioctls in BXVGAConrad Pankoff
This also hides some functions that were previously public, since that same functionality is now exposed via ioctl functions.
2019-08-18Kernel: Add framebuffer ioctls; wrap raw ioctls with a C APIConrad Pankoff
2019-08-18LibC: Move duplicated winsize struct definition into ioctl_numbers.hConrad Pankoff
2019-08-18Kernel: Disable VGA console in graphical modeConrad Pankoff
2019-08-17Kernel: Make crash dumps look aligned once againAndreas Kling
This broke with the recent changes to make printf hex fields behave a bit more correctly.
2019-08-17FloppyDiskDevice: Fixed hang on wait_for_irq() (#458)Jesse
It turns out that the `SenseInterrupt` command is actually very important! The system hangs if it's not there! Whoops...!
2019-08-17Kernel: Do the umount() by the guest's root inode identifierAndreas Kling
It was previously possible to unmount a filesystem mounted on /mnt by doing e.g "umount /mnt/some/path".
2019-08-17Ext2FS: Clean up prepare_to_unmount() a little bitAndreas Kling
2019-08-17Kernel+SystemServer: Mount filesystems and start TTYServer in userspaceSergey Bugaev
2019-08-17Kernel: Expose info about source devices of mounts in /proc/dfSergey Bugaev
2019-08-17Kernel+LibC+Userland: Support mounting other kinds of filesystemsSergey Bugaev
2019-08-17DevPtsFS: Do not assume there is one of itSergey Bugaev
Unfortunately, that also means it can no longer inherit from SynthFS.
2019-08-17ProcFS: Do not assume there is one of itSergey Bugaev
The complication is around /proc/sys/ variables, which were attached to inodes. Now they're their own thing, and the corresponding inodes are lazily created (as all other ProcFS inodes are) and simply refer to them by index.
2019-08-17IntrusiveList: Make Iterator::operator* return a T&Andreas Kling
This makes iteration a little more pleasant :^)
2019-08-17LocalSocket: Make recvfrom() return 0 to signal EOF when peer is goneAndreas Kling
Once the peer has disconnected, recvfrom() should always return 0 once the socket buffer has been drained.
2019-08-17Meta: Fix up clean buildsAndreas Kling
This is kind of a mess, but because IPC client code depending on the IPC protocol definition artifacts in the server code, we have to build the IPC servers first. And their dependencies before that, etc. One more drop in the "maybe we should switch to CMake" bucket..
2019-08-17Meta: Rearrange makeall.sh for more consistent buildsConrad Pankoff
makeall.sh used to build the AK tests and leave some binary objects laying around that would get in the way of further incremental builds. There also wasn't a lot of structure to the order things were built in. This patch improves both of those things.
2019-08-17Kernel: Added unmount ability to VFSJesse Buhagiar
It is now possible to unmount file systems from the VFS via `umount`. It works via looking up the `fsid` of the filesystem from the `Inode`'s metatdata so I'm not sure how fragile it is. It seems to work for now though as something to get us going.
2019-08-15Kernel+LibC: Add get_process_name() syscallAndreas Kling
It does exactly what it sounds like: int get_process_name(char* buffer, int buffer_size);
2019-08-15Kernel: Add TmpFSSergey Bugaev
This is an FS that stores all of its contents directly in memory. It's mounted on /tmp by default.
2019-08-15Kernel: Stop eagerly loading entire executablesAndreas Kling
We were forced to do this because the page fault code would fall apart when trying to generate a backtrace for a non-current thread. This issue has been fixed for a while now, so let's go back to lazily loading executable pages which should make everything a little better.
2019-08-14ProcessManager: Rename it to SystemMonitorSergey Bugaev
This is a more appropriate name now that it does a lot more than just manage processes ^)
2019-08-14Libraries: Add LibPCIDB for reading PCI device information from pci.idsConrad Pankoff
2019-08-14Userland: Implement simple lspci commandConrad Pankoff
2019-08-14Kernel: Hide PCI logs behind a debug flag like other logsConrad Pankoff
2019-08-14Kernel: Reimplement /proc/pci as JSON, add some more fieldsConrad Pankoff
2019-08-14Kernel: Add more PCI configuration reading functionsConrad Pankoff
2019-08-12Kernel: Show region access bits (R/W/X) in crash dump region listsAndreas Kling
It's pretty helpful to be able to see the various access bits for each region in a crash dump. :^)
2019-08-12Kernel+LibC+crash: Add mprotect() syscallAndreas Kling
This patch adds the mprotect() syscall to allow changing the protection flags for memory regions. We don't do any region splitting/merging yet, so this only works on whole mmap() regions. Added a "crash -r" flag to verify that we crash when you attempt to write to read-only memory. :^)
2019-08-12LibVT: Factor out terminal emulation from Terminal to make it reusableAndreas Kling
Now that we're bringing back the in-kernel virtual console, we should move towards having a single implementation of terminal emulation. This patch rips out the emulation code from the Terminal application and turns it into the beginnings of LibVT. The basic design idea is that users of VT::Terminal will implement and provide a VT::TerminalClient subclass to handle presentation-specific things. We'll need to iterate on this, but it's a start. :^)
2019-08-12Kernel: Use a CircularQueue for input rather than a DoubleBufferConrad Pankoff
TTY::emit is called from an IRQ handler, and is used to push input data into a buffer for later retrieval. Previously this was using DoubleBuffer, but that class wants to take a lock. Our lock code wants to make sure interrupts are enabled, but they're disabled while an IRQ handler is running. This made the kernel sad, but this CircularQueue cheers it up by avoiding the lock requirement completely.
2019-08-12VirtualConsole: Only consume data from key-down eventsConrad Pankoff
2019-08-12Kernel: Restore alt+n hijacking for virtual console switchingConrad Pankoff
2019-08-12Kernel: Don't forward hijacked keypresses in keyboard driverConrad Pankoff
2019-08-12Server: Add TTYServer, a rudimentary text console managerConrad Pankoff
This should probably call out to a login program at some point. Right now it just puts a root terminal on tty{1,2,3}. Remember not to leave your Serenity workstation unattended!
2019-08-12Kernel: Fix non-DMA writes to IDE drivesConrad Pankoff
Our logic for using the ATA_CMD_CACHE_FLUSH functionality was a bit wrong, and now it's better. The ATA spec says these two things: > The device shall enter the interrupt pending state when: > 1) any command except a PIO data-in command reaches command completion > successfully; > ... > The device shall exit the interrupt pending state when: > 1) the device is selected, BSY is cleared to zero, and the Status > register is read; This means that our sequence of actions was probably never going to work. We were waiting in a loop checking the status register until it left the busy state, _then_ waiting for an interrupt. Unfortunately by checking the status register, we were _clearing_ the interrupt we were about to wait for. Now we just wait for the interrupt - we don't poll the status register at all. This also means that once we get our `wait_for_irq` method sorted out we'll spend a bunch less CPU time waiting for things to complete.
2019-08-12Kernel: Use established device name and number for framebufferConrad Pankoff
This is to prepare for other framebuffer implementations, for which it would be inappropriate to use the /dev/bxvga device name.
2019-08-12Kernel: Allow boot without mouse attached by checking for presenceConrad Pankoff
2019-08-11ProcFS: Expose local sockets in /proc/net/localSergey Bugaev
2019-08-11Kernel: Customize absolute_path() for more file typesSergey Bugaev
2019-08-11Net: Store an acceptor PID alongside the origin PID in a socketSergey Bugaev
* The origin PID is the PID of the process that created this socket, either explicitly by calling socket(), or implicitly by accepting a TCP connection. Note that accepting a local socket connection does not create a new socket, it reuses the one connect() was called on, so for accepted local sockets the origin PID points to the connecting process. * The acceptor PID is the PID of the process that accept()ed this socket. For accepted TCP sockets, this is the same as origin PID.
2019-08-11Net: Store all the LocalSockets in an InlineLinkedListSergey Bugaev
2019-08-11Net: Add LocalSocket::socket_path()Sergey Bugaev
This is a little utility function to safely extract the path without manually dealing with sun_path and null-termination.
2019-08-11Net: Override LocalSocket::class_name()Sergey Bugaev
2019-08-11Net: Fix initializing sockaddr_un.sun_path copy buffersSergey Bugaev
The whole point of allocating an extra byte for the null terminator is to initialize it to zero.
2019-08-11Kernel: Move socket role tracking to the Socket class itselfSergey Bugaev
This is more logical and allows us to solve the problem of non-blocking TCP sockets getting stuck in SocketRole::None. The only complication is that a single LocalSocket may be shared between two file descriptions (on the connect and accept sides), and should have two different roles depending from which side you look at it. To deal with it, Socket::role() is made a virtual method that accepts a file description, and LocalSocket internally tracks which FileDescription is the which one and returns a correct role.
2019-08-11Net: Simplify how LocalSocket tracks open fdsSergey Bugaev
Now that there can't be multiple clones of the same fd, we only need to track whether or not an fd exists on each side. Also there's no point in tracking connecting fds.
2019-08-11Kernel: Fix cloning file descriptions on forkSergey Bugaev
After a fork, the parent and the child are supposed to share the same file description. For example, modifying the current offset of a file description is visible in both of them.