1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 06:05:08 +00:00
Commit graph

4461 commits

Author SHA1 Message Date
Andreas Kling
f8951afe17 Ext2FS: Fix broken logic for accessing inode and block bitmaps.
This logic only worked for the very first block group.
2019-02-11 12:46:56 +01:00
Andreas Kling
298a49c688 IDEDiskDevice: Detect disk errors and report failure to clients.
Previously we'd just fail silently if there was an I/O error of any kind.
2019-02-11 11:38:14 +01:00
Andreas Kling
443b043b49 WindowServer: Start implementing a menu system.
I'm going with a global top-of-the-screen menu instead of per-window menus.
The basic idea is that menus will live in the WindowServer and clients can
create menus via WindowServer requests.
2019-02-11 09:47:10 +01:00
Andreas Kling
6b2d2cc5e3 Create /dev files for null, full, zero and random. 2019-02-11 06:59:28 +01:00
Andreas Kling
18962bf102 Kernel: Oops, the kernel image access validator thought 0x0 was allowed.
We forgot to look at the ELF segment type when validating accesses.
We should only consider accesses inside non-empty LOAD segments.
2019-02-11 06:05:12 +01:00
Andreas Kling
7014daa235 Kernel: Add an LRU block cache.
This papers over some of the incredibly inefficient access patterns in the
Ext2FS implementation for a while longer. :^)
2019-02-10 20:07:14 +01:00
Andreas Kling
ae4811fbae ProcFS: Show region flags in /proc/PID/vm
It's useful to be able to see the readable, writable and bitmap flags.
2019-02-10 13:02:38 +01:00
Andreas Kling
6103e374cc Kernel: Drop the "helper" region after ELF load is finished.
The individual segment mappings will keep the VMObject alive.
2019-02-10 12:47:15 +01:00
Andreas Kling
9860e55047 Kernel: Put page fault logspam behind PAGE_FAULT_DEBUG. 2019-02-10 11:37:59 +01:00
Andreas Kling
5e8d6b1bf4 Base: Rename /users to /home.
I didn't like seeing /users next to /usr. /home looks nicer.
2019-02-10 11:18:12 +01:00
Andreas Kling
2def3d8d3f LibGUI: Start adding an automatic widget layout system.
My needs are really quite simple, so I'm just going to add what I need
as I go along. The first thing I needed was a simple box layout with
widgets being able to say whether they prefer fixed or fill for both
their vertical and horizontal sizes.

I also made a simple GStatusBar so FileManager can show how many bytes
worth of files are in the current directory.
2019-02-10 11:07:13 +01:00
Andreas Kling
2cf1dd5b6f Move apps into a top-level Applications/ directory. 2019-02-10 08:35:01 +01:00
Andreas Kling
cc04ba9cc9 ProcFS: /proc/sys entries should always be regular 644 files. 2019-02-10 06:10:01 +01:00
Andreas Kling
4d5fe39494 FileManager: Start building a file manager. 2019-02-09 09:22:04 +01:00
Andreas Kling
c4e984ca49 Kernel: Allow mmap() with a size that's not a multiple of page size.
We just round it up to the next multiple of page size anyway.
2019-02-09 08:44:46 +01:00
Andreas Kling
fa241747af Kernel: When donating ticks to a lock holder, cap the donation.
When donating ticks to a lock holder, never donate more ticks than
that process would normally get from the scheduler.
2019-02-08 22:06:30 +01:00
Andreas Kling
6274208eb9 Ext2FS: Fix bitmap overrun when reaching outside the first block group. 2019-02-08 17:14:51 +01:00
Andreas Kling
a6f9ddbb58 Let's have two wallpapers installed so we can test switching. 2019-02-08 17:14:47 +01:00
Andreas Kling
d4ba155711 Kernel: Break retain cycle between Inode and VMObject.
There's no need for an Inode to keep its corresponding VMObject alive.
Obviously there are huge benefits to keeping a filesystem cache,
but leaking everything is hardly the right strategy. :^)
2019-02-08 16:40:48 +01:00
Andreas Kling
e1be5a468d Userland: Add a /bin/pape helper program to switch the desktop wallpaper. 2019-02-08 16:22:54 +01:00
Andreas Kling
33d34d9b26 Kernel: Use a Lockable<bool> for sysctl booleans as well. 2019-02-08 16:18:24 +01:00
Andreas Kling
f8fc892bac Remove _fs_contents.stock and generate it on the fly instead. 2019-02-08 09:56:39 +01:00
Andreas Kling
a3799cb71e ProcFS: Add sysctl strings.
They are backed by a Lockable<String> to ensure that access is synchronized.
2019-02-08 09:46:46 +01:00
Andreas Kling
7e623e7ff2 Process: Dump regions when a ring0 process crashes. 2019-02-08 09:45:53 +01:00
Andreas Kling
90d3375dc2 WindowServer: Support desktop wallpapers.
For now, you don't get to choose the wallpaper, but it's still pretty cool.
2019-02-08 08:45:59 +01:00
Andreas Kling
2736957701 Ext2FS: Fix dumb bitmap size bug in *_inode_allocation_state(). 2019-02-08 08:43:08 +01:00
Andreas Kling
736e852525 LibC: Implement enough missing stuff to get bash-5.0 running. :^) 2019-02-08 02:38:21 +01:00
Andreas Kling
f4bce03716 Kernel: When validating a string read, validate the pointer first.
Calling strlen() on an invalid pointer is just gonna crash the process.
2019-02-08 00:10:01 +01:00
Andreas Kling
887b4a7a1a Start working on a simple Launcher app.
Let GButton have an optional icon (GraphicsBitmap) that gets rendered in the
middle of the button if present.

Also add GraphicsBitmap::load_from_file() which allows mmap'ed RGBA32 files.
I wrote a little program to take "raw" files from GIMP and swizzle them into
the correct byte order.
2019-02-07 23:17:06 +01:00
Andreas Kling
71b9ec1ae0 Kernel: Add basic process priority support.
For now, the WindowServer process will run with high priority,
while the Finalizer process will run with low priority.
Everyone else gets to be "normal".

At the moment, priority simply determines the size of your time slices.
2019-02-07 12:21:17 +01:00
Andreas Kling
ee2bb98b88 Kernel: Increase default time slice to 20ms. 2019-02-07 11:53:45 +01:00
Andreas Kling
dc7f257c01 Kernel: Remove a bunch of unnecessary InterruptDisablers. 2019-02-07 11:24:09 +01:00
Andreas Kling
5582a0a254 Kernel: When a lock is busy, donate remaining process ticks to lock holder.
Since we know who's holding the lock, and we're gonna have to yield anyway,
we can just ask the scheduler to donate any remaining ticks to that process.
2019-02-07 11:14:58 +01:00
Andreas Kling
4df92709c8 Kernel: Add proper locking to SynthFS and stop disabling interrupts. 2019-02-07 10:47:11 +01:00
Andreas Kling
b5e5541cbc Kernel: Remove an unnecessary InterruptDisabler in SynthFS. 2019-02-07 10:42:00 +01:00
Andreas Kling
3fc3a8d7bc Kernel: Remove some unnecessary zero initialization now that BSS is cleared. 2019-02-07 10:31:32 +01:00
Andreas Kling
2e663eda36 Kernel: Don't disable interrupts to access the system hostname. 2019-02-07 10:29:26 +01:00
Andreas Kling
458706c4cf Kernel: Let's try disabling the CPU's page-level caching for framebuffers. 2019-02-07 09:24:41 +01:00
Andreas Kling
443d1c2237 WindowServer: Coordinate double-buffering with the BochsVGA card.
Use the BochsVGA card's virtual-height + virtual-y features to implement
a "hardware double buffering" type scheme.

This is a performance degradation since we now draw a bunch more than before.
But there's also no tearing or cursor flickering. I'm gonna commit this and
try to improve upon it. :^)
2019-02-07 08:56:26 +01:00
Andreas Kling
1f159eaab0 Add a fast memcpy() using MMX when we're moving >= 1KB.
This is a nice speedup for WindowServer. I'll eventually have to do this
with SSE but the kernel doesn't support SSE yet so this is it for now.
2019-02-07 08:46:52 +01:00
Andreas Kling
a537d78ac0 Kernel: Drivers for PS/2 mouse and keyboard kept stealing from each other.
We need to look at the i8042 status register to see if the packets in the
PS/2 controller's output buffer are mouse or keyboard packets.

This fixes occasionally surprising inputs while using both devices.
2019-02-07 07:58:26 +01:00
Andreas Kling
26f4301521 Kernel: Stop spamming the kernel log buffer when loading ksyms. 2019-02-06 18:52:12 +01:00
Andreas Kling
6cba80510e Kernel: Add a Finalizer process to take care of dying processes.
Instead of processes themselves getting scheduled to finish dying,
let's have a Finalizer process that wakes up whenever someone is dying.
This way we can do all kinds of lock-taking in process cleanup without
risking reentering the scheduler.
2019-02-06 18:45:21 +01:00
Andreas Kling
e05237485c Kernel: Various stability improvements.
- Don't cli() in Process::do_exec() unless current is execing.
  Eventually this should go away once the scheduler is less retarded
  in the face of interrupts.

- Improved memory access validation for ring0 processes.
  We now look at the kernel ELF header to determine if an access
  is appropriate. :^) It's very hackish but also kinda neat.

- Have Process::die() put the process into a new "Dying" state where
  it can still get scheduled but no signals will be dispatched.
  This way we can keep executing in die() but won't get our EIP
  hijacked by signal dispatch. The main problem here was that die()
  wanted to take various locks.
2019-02-06 17:34:27 +01:00
Andreas Kling
03c0e836f0 Kernel: Fix some broken debugging code in VFS. 2019-02-06 17:34:27 +01:00
Andreas Kling
a1b63bb6d4 Bootloader: Locate the kernel's data segment and clear it.
This was a constant source of stupid bugs and I kept postponing it because
I wasn't in the mood to write assembly code. Until now! :^)
2019-02-06 16:02:10 +01:00
Andreas Kling
8cc6e304ca Kernel: Clean up around Scheduler::yield() a bit.
Also add assertion in Lock that the scheduler isn't currently active.
I've been seeing occasional fuckups that I suspect might be someone called
by the scheduler trying to take a busy lock.
2019-02-06 15:06:48 +01:00
Andreas Kling
27263b6172 Clean up LDFLAGS a bit.
While working on the ELF loader I was trying to keep binaries as simple as
possible so I could understand them easily. Now that the ELF loader is mature
and working fine, we can move closer towards ld defaults.
2019-02-06 14:48:09 +01:00
Andreas Kling
353b191a49 Clean up some uninteresting log spam. 2019-02-06 11:32:23 +01:00
Andreas Kling
b3b28b8b15 Kernel: Add /proc/pci so we can see what's on the PCI bus. 2019-02-06 10:29:35 +01:00