Commit Graph

5691 Commits

Author SHA1 Message Date
Andreas Kling
d3b40547f7 LibDraw: Fix 1px wide glitch in progress bar painting at some widths
Make sure we always line up the "hole" in the progress bar with the
right side of the paint rect. This fixes a 1px wide glitch seen when
using a darker system theme.
2019-12-25 21:59:37 +01:00
Andreas Kling
69277f5538 LibGUI: Add space for sort order indicators in autosized table columns 2019-12-25 21:52:26 +01:00
Andreas Kling
56a28890eb Kernel: Clarify the various input validity checks in mmap()
Also share some validation logic between mmap() and mprotect().
2019-12-25 21:50:13 +01:00
William McPherson
6cf4468506 Piano: Factor wave rendering to its own function 2019-12-25 16:14:11 +01:00
William McPherson
bc65971df6 Piano: Use switch statements on m_wave_type 2019-12-25 16:14:11 +01:00
William McPherson
e80061c808 Piano: Move m_front_buffer/m_back_buffer off heap 2019-12-25 16:14:11 +01:00
William McPherson
b3b522bae2 Piano: Initialize m_note_on[]
This was being read before initialization.
2019-12-25 16:14:11 +01:00
William McPherson
2573c33ffe Piano: Rename "release" to "decay"
That's not release!
2019-12-25 16:14:11 +01:00
William McPherson
27ebf3ff32 Piano: Initialize keys[] at member definition 2019-12-25 16:14:11 +01:00
Andreas Kling
aeefcd6ddb run: Run QEMU with "-cpu max"
This should give us access to the largest set of CPU features available
on the host machine.
2019-12-25 15:19:13 +01:00
Andreas Kling
1e419b482a LibProtocol: Make build depend on ProtocolServer for IPC endpoints 2019-12-25 14:15:28 +01:00
Andreas Kling
419e0ced27 Kernel: Don't allow mmap()/mprotect() to set up PROT_WRITE|PROT_EXEC
..but also allow mprotect() to set PROT_EXEC on a region, something
we were just ignoring before.
2019-12-25 13:35:57 +01:00
Andreas Kling
33efeaf71a crash: Add "-X" option for attempting to execute non-executable memory 2019-12-25 13:35:57 +01:00
Andreas Kling
ce5f7f6c07 Kernel: Use the CPU's NX bit to enforce PROT_EXEC on memory mappings
Now that we have PAE support, we can ask the CPU to crash processes for
trying to execute non-executable memory. This is pretty cool! :^)
2019-12-25 13:35:57 +01:00
Andreas Kling
c22a4301ed Kernel: Interpret "reserved bit violation" page faults correctly
We don't actually react to these in any meaningful way other than
crashing, but let's at least print the correct information. :^)
2019-12-25 13:35:57 +01:00
Andreas Kling
52deb09382 Kernel: Enable PAE (Physical Address Extension)
Introduce one more (CPU) indirection layer in the paging code: the page
directory pointer table (PDPT). Each PageDirectory now has 4 separate
PageDirectoryEntry arrays, governing 1 GB of VM each.

A really neat side-effect of this is that we can now share the physical
page containing the >=3GB kernel-only address space metadata between
all processes, instead of lazily cloning it on page faults.

This will give us access to the NX (No eXecute) bit, allowing us to
prevent execution of memory that's not supposed to be executed.
2019-12-25 13:35:57 +01:00
Andreas Kling
4883176fd8 Build: Make sure we build everyone's STATIC_LIB_DEPS first
If a program's compilation depends on something generated by a library,
we need to make sure that library is built before any of the program's
own compilation units.
2019-12-25 13:35:57 +01:00
joshua stein
ec1db803f0 Build: add explicit 'all' target in root Makefile 2019-12-25 10:11:09 +01:00
joshua stein
c127d16326 Build: support library and generator dependencies
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each
subdirectory Makefile listing the libraries needed for
building/linking such as "LIB_DEPS = Core GUI Draw IPC Core".

This adds each library as an -L and -l argument in LDFLAGS, but
also adds the library.a file as a link dependency on the current
$(PROGRAM).  This causes the given library to be (re)built before
linking the current $(PROGRAM), but will also re-link any binaries
depending on that library when it is modified, when running make
from the root directory.

Also turn generator tools like IPCCompiler into dependencies on the
files they generate, so they are built on-demand when a particular
directory needs them.

This all allows the root Makefile to just list directories and not
care about the order, as all of the dependency tracking will figure
it out.
2019-12-25 10:11:09 +01:00
joshua stein
2aeae2aea9 LibCore: compile puff.c as a separate object 2019-12-25 10:11:09 +01:00
joshua stein
0343be3837 Build: support compilation of .c files 2019-12-25 10:11:09 +01:00
Andreas Kling
c087abc48d Kernel: Rename PageDirectory::find_by_pdb() => find_by_cr3()
I caught myself wondering what "pdb" stood for, so let's rename this
to something more obvious.
2019-12-25 02:58:03 +01:00
Andreas Kling
7a0088c4d2 Kernel: Clean up Region access bit setters a little 2019-12-25 02:58:03 +01:00
Andreas Kling
336ac9e8e7 Kernel: Clean up CPU fault register dumps
These were looking a bit messy after we started using 32-bit fields
to store segment registers in RegisterDumps.
2019-12-25 02:58:03 +01:00
Andreas Kling
c9a5253ac2 Kernel: Uh, actually *actually* turn on CR4.PGE
I'm not sure how I managed to misread the location of this bit twice.
But I did! Here is finally the correct value, according to Intel:

    "Page Global Enable (bit 7 of CR4)"

Jeez! :^)
2019-12-25 02:58:03 +01:00
Shannon Booth
0e45b9423b Kernel: Implement recursion limit on path resolution
Cautiously use 5 as a limit for now so that we don't blow the stack.
This can be increased in the future if we are sure that we won't be
blowing the stack, or if the implementation is changed to not use
recursion :^)
2019-12-24 23:14:14 +01:00
Andreas Kling
3623e35978 Kernel: Oops, actually enable CR4.PGE (page table global bit)
Turns out we were setting the wrong bit here. Now we will actually keep
kernel memory mappings in the TLB across context switches.
2019-12-24 22:45:27 +01:00
Andreas Kling
caa5191f74 LibGUI: Use ColorRole::BaseText for the GCheckBox checkmark 2019-12-24 22:33:11 +01:00
Andreas Kling
d8d86ec38d CPUGraph.MenuApplet: Use a palette color for the graph 2019-12-24 22:21:52 +01:00
Andreas Kling
7ca7595012 LibDraw: Teach progress bar painting about palettes 2019-12-24 22:17:11 +01:00
Andreas Kling
aae54bdbde LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base) 2019-12-24 22:01:32 +01:00
Andreas Kling
a79bac428b LibGUI+LibDraw: Add "Palette" concept for scoped color theming
GApplication now has a palette. This palette contains all the system
theme colors by default, and is inherited by a new top-level GWidget.
New child widgets inherit their parents palette.

It is possible to override the GApplication palette, and the palette
of any GWidget.

The Palette object contains a bunch of colors, each corresponding to
a ColorRole. Each role has a convenience getter as well.

Each GWidget now has a background_role() and foreground_role(), which
are then looked up in their current palette when painting. This means
that you no longer alter the background color of a widget by setting
it directly, rather you alter either its background role, or the
widget's palette.
2019-12-24 21:27:16 +01:00
Mauri de Souza Nunes
cb4e51a7a5 Userland: Add syscall -l option and man page 2019-12-24 20:23:37 +01:00
Andreas Kling
b6eba388e3 LibDraw: Add Selection and SelectionText system theme colors 2019-12-24 12:13:49 +01:00
Conrad Pankoff
033de7efe2 Base: Describe kernel modules, syscalls, and programs 2019-12-24 11:52:01 +01:00
Conrad Pankoff
efa7141d14 Kernel: Fail module loading if any symbols can not be resolved 2019-12-24 11:52:01 +01:00
Andrés Vieira
488d755ccd Docs: Add cal(1) man page 2019-12-24 11:48:16 +01:00
Andrés Vieira
5f9c408a08 Userland: Add support for printing multiple columns to the cal command
Now cal is able to print the entire year when only that is passed
as an argument. For example: `cal 1992`.

However this meant breaking the highlighted day escape sequence
as it messed up the layout and the character count for each of the
rows :(

Now the current day is specified like 17* (for example for day 17).
2019-12-24 11:48:16 +01:00
anon
d058a9319d Meta: refresh-serenity-qtcreator.sh now checks if SERENITY_ROOT is set 2019-12-24 11:12:00 +01:00
Shannon Booth
bbe99ae960 SystemMonitor: Remove uneeded cast from unsigned to int
GVariant now supports unsigned ints :^)
2019-12-24 11:11:13 +01:00
Andreas Kling
c1e8590a40 LibDraw: Use SystemColor::ThreedHighlight everywhere in StylePainter 2019-12-24 02:38:30 +01:00
Andreas Kling
b25600a7ef LibGUI: Respect more theme colors in GTextEditor 2019-12-24 02:38:18 +01:00
Andreas Kling
a3257a7c6c LibGUI: Respect more system theme colors in GToolBar 2019-12-24 02:37:56 +01:00
Andreas Kling
7b78f63f85 LibGUI: More system theme support in GTabWidget and GTableView 2019-12-24 02:25:50 +01:00
Andreas Kling
8ae826f5c3 LibDraw: Give Color::lightened() an amount argument 2019-12-24 02:25:50 +01:00
Andreas Kling
2cdab2c925 Themes: Add a simple "Dark" theme :^) 2019-12-24 02:25:50 +01:00
Andreas Kling
df3a2dba43 LibDraw: Add Button and ButtonText system theme colors
These are now separate from the Window and WindowText colors.
2019-12-24 02:25:50 +01:00
Andreas Kling
9171aef724 LibGUI: Use SystemColor::Text in more places 2019-12-24 02:25:50 +01:00
Andreas Kling
79f7482ad3 WindowServer: Paint window frame button symbols in SystemColor::Text 2019-12-24 02:25:50 +01:00
Conrad Pankoff
9a8032b479 Kernel: Disallow loading a module twice without explicitly unloading it
This ensures that a module has the chance to run its cleanup functions
before it's taken out of service.
2019-12-24 02:20:37 +01:00