summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-02-06Kernel: Much improved BochsVGA (BXVGA) support.Andreas Kling
Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator VGA adapter by scanning the PCI bus. Then set up the desired video mode by sending device commands.
2019-02-05Kernel: Writing to a slave PTY should yield EIO if the master is closed.Andreas Kling
2019-02-05Kernel: Closing a MasterPTY should generate a TTY hangup.Andreas Kling
2019-02-05Kernel: Reading from a slave PTY should give EOF if master PTY is closed.Andreas Kling
2019-02-05Kernel: Add an InterruptFlagSaver helper class.Andreas Kling
This is useful instead of InterruptDisabler in some cases.
2019-02-05Add a simple close button ("X") to windows.Andreas Kling
Clicking the button generates a WindowCloseRequest event which the client app then has to deal with. The default behavior for GWindow is to close() itself. I also added a flag, GWindow::should_exit_event_loop_on_close() which does what it sounds like it does. This patch exposed some bugs in GWindow and GWidget teardown.
2019-02-05Clock: Turns the clock window from guitest2 into a separate program.Andreas Kling
We can't not have a desktop clock app. :^)
2019-02-05Show the amount of memory in GraphicsBitmaps in /bin/top.Andreas Kling
This seems like an extremely relevant metric to track.
2019-02-05WindowServer: Sever the WSWindow/Process link when the process dies.Andreas Kling
This fixes a deadlock where the WindowServer would get stuck trying to acquire a dead process's event stream lock.
2019-02-05Kernel: Invalidate file-backed VMO's when inodes are written.Andreas Kling
The current strategy is simply to nuke all physical pages and force reload them from disk. This is obviously not optimal and should eventually be optimized. It should be fairly straightforward.
2019-02-05mmap all the font files!Andreas Kling
Font now uses the same in-memory format as the font files we have on disk. This allows us to simply mmap() the font files and not use any additional memory for them. Very cool! :^) Hacking on this exposed a bug in file-backed VMObjects where the first client to instantiate a VMObject for a specific inode also got to decide its size. Since file-backed VMObjects always have the same size as the underlying file, this made no sense, so I removed the ability to even set a size in that case.
2019-02-04Kernel: Ignore SIGCHLD by default.Andreas Kling
Also use an enum for the rather-confusing return value in dispatch_signal(). I will go through the rest of the signals and set them up with the appropriate default dispositions at some other point.
2019-02-04Kernel: Process should send SIGCHLD to its parent when it dies.Andreas Kling
2019-02-04ProcFS: Fix wrong linkage for /proc/cpuinfo inode.Andreas Kling
2019-02-04Add a /bin/top program for process table monitoring.Andreas Kling
It automagically computes %CPU usage based on the number of times a process has been scheduled between samples. The colonel task is used as idle timer. This is pretty cool. :^)
2019-02-04Kernel: Process should disassociate from its TTY when it dies.Andreas Kling
Just because we die doesn't mean we got waited on yet, so keeping around a dangling TTY pointer is just asking for trouble.
2019-02-03Kernel: Add a /proc/all process table dump.Andreas Kling
This will be useful for implementing some process-related utilities.
2019-02-03Get nyancat nyanning in Serenity.Andreas Kling
I found a cute program that renders an animated nyancat in the terminal. This patch adds enough hackery to get it working correctly. :^)
2019-02-03Add /dev/{stdin,stdout,stderr} as symlinks to /proc/self/fd/{0,1,2}Andreas Kling
Also change /bin/cat to open /dev/stdin if no arguments are provided.
2019-02-03Kernel: Rewrite ProcFS.Andreas Kling
Now the filesystem is generated on-the-fly instead of manually adding and removing inodes as processes spawn and die. The code is convoluted and bloated as I wrote it while sleepless. However, it's still vastly better than the old ProcFS, so I'm committing it. I also added /proc/PID/fd/N symlinks for each of a process's open fd's.
2019-02-03Kernel: stat(), fstat() and lstat() didn't return some error codes.Andreas Kling
2019-02-03Kernel: Oops, I mixed up st_dev and st_rdev in struct stat.Andreas Kling
2019-02-03Kernel: Add /proc/self, a symlink to the /proc/$PID.Andreas Kling
This will be useful for implementing things like /dev/stdin.
2019-02-03Ext2FS: Avoid a kmallocation every time we fetch an inode from disk.Andreas Kling
2019-02-03Kernel: Increase default userspace stack size to 64 kilobytes.Andreas Kling
2019-02-03Kernel: Remove unnecessary assertion in page_in_from_inode().Andreas Kling
Turns out I had confused myself about the situation. Just because a page has been paged in by another process doesn't mean that the *current* process's page directory has the present bit set! D'oh. :^)
2019-02-03Kernel: Improve crash info if page_in_from_inode() is called redundantly.Andreas Kling
2019-02-03Kernel: Let's have cli() and sti() clobber memory.Andreas Kling
I don't like the idea of the compiler reordering anything around either cli() or sti(), so let's make sure it doesn't.
2019-02-03Kernel: When entering page_in_from_inode(), assert that !physical_page.Andreas Kling
It would be really weird to enter here with a physical page already present in the VMObject's page slot. Let's assert that this doesn't happen.
2019-02-03Make font loading use mmap().Andreas Kling
This exposed a serious race condition in page_in_from_inode(). Reordered the logic and added a paging lock to VMObject. Now, only one process can page in from a VMObject at a time. There are definitely ways to optimize this, for instance by making the locking be per-page instead. It's not something that I'm going to worry about right now though.
2019-02-02Start working on a simple graphical font editor.Andreas Kling
Editing fonts by editing text files is really slow and boring. A simple font editor seems like a good way to take LibGUI for a spin.
2019-02-02Add basic automatic dependency management to Makefiles.Andreas Kling
2019-02-01Kernel: VFS::open/create should take base Inode& instead of InodeIdentifier.Andreas Kling
2019-02-01Kernel: mkdir() should use the containing directory's FS for inode creation.Andreas Kling
2019-02-01Kernel: mkdir() should fail if the pathname is empty.Andreas Kling
2019-02-01Implement event loop timers.Andreas Kling
GObjects can now register a timer with the GEventLoop. This will eventually cause GTimerEvents to be dispatched to the GObject. This needed a few supporting changes in the kernel: - The PIT now ticks 1000 times/sec. - select() now supports an arbitrary timeout. - gettimeofday() now returns something in the tv_usec field. With these changes, the clock window in guitest2 finally ticks on its own.
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2019-01-31LibC: Add mktime().Andreas Kling
2019-01-31Kernel: Make Process a Weakable class.Andreas Kling
Use this to fix a use-after-free in ~GraphicsBitmap(). We'd hit this when the WindowServer was doing a deferred destruction of a WSWindow whose backing store referred to a now-reaped Process.
2019-01-31Kernel: Include absolute paths of mount points in /proc/mountsAndreas Kling
2019-01-31Add uid and gid to CharacterDevices.Andreas Kling
The vast majority of them will be owned by 0:0 (the default.) However, PTY pairs will now be owned by the uid:gid of the opening process.
2019-01-31Make stat() work on device files again.Andreas Kling
FileDescriptor will now keep a pointer to the original inode even after opening it resolves to a character device. Fixed up /bin/ls to display major and minor device numbers instead of size for device files.
2019-01-31Ext2FS: Remove an unnecessary heap allocation in create_inode().Andreas Kling
2019-01-31Kernel: Actually zero-fill eagerly committed regions.Andreas Kling
Previously, calling Region::commit() would make sure to allocate any missing physical pages, but they would contain uninitialized data. This was very obvious when allocating GraphicsBitmaps as they would have garbage pixels rather than being filled with black. The MM quickmap mechanism didn't work when operating on a non-active page directory (which happens when we're in the middle of exec, for example.) This patch changes quickmap to reside in the shared kernel page directory. Also added some missing clobber lists to inline asm that I stumbled on.
2019-01-31Remove the last remaining #ifndef SERENITY blocks.Andreas Kling
2019-01-30Add support for keyboard arrow keys.Andreas Kling
Also have them send the appropriate escape sequences in Terminal. Basic history browsing now works in bash. How nice! :^)
2019-01-30Rename the default user to "anon" and give him a home directory.Andreas Kling
2019-01-30Kernel: Don't try to dump invalid code memory in page fault handler.Andreas Kling
2019-01-30LibGUI: Implement destroying individual windows without exiting the process.Andreas Kling
2019-01-30Destroy all remaining windows in a process when it dies.Andreas Kling