Age | Commit message (Collapse) | Author |
|
|
|
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! :^)
|
|
We don't actually react to these in any meaningful way other than
crashing, but let's at least print the correct information. :^)
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
I caught myself wondering what "pdb" stood for, so let's rename this
to something more obvious.
|
|
|
|
These were looking a bit messy after we started using 32-bit fields
to store segment registers in RegisterDumps.
|
|
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! :^)
|
|
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 :^)
|
|
Turns out we were setting the wrong bit here. Now we will actually keep
kernel memory mappings in the TLB across context switches.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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).
|
|
|
|
GVariant now supports unsigned ints :^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are now separate from the Window and WindowText colors.
|
|
|
|
|
|
This ensures that a module has the chance to run its cleanup functions
before it's taken out of service.
|
|
|
|
"SC2115: Declare and assign separately to avoid masking return values."
|
|
These scripts assume that they are called from within Kernel/ directory.
For convenience, set the current working directory in the scripts to the
path where they are located.
|
|
|
|
|
|
This allows us to use all the same fun memory protection features as the
rest of the system for ring0 processes. Previously a ring0 process could
over- or underrun its stack and nobody cared, since kmalloc_eternal is the
wild west of memory.
|
|
|
|
|
|
|
|
|
|
Color themes are loaded from .ini files in /res/themes/
The theme can be switched from the "Themes" section in the system menu.
The basic mechanism is that WindowServer broadcasts a SharedBuffer with
all of the color values of the current theme. Clients receive this with
the response to their initial WindowServer::Greet handshake.
When the theme is changed, WindowServer tells everyone by sending out
an UpdateSystemTheme message with a new SharedBuffer to use.
This does feel somewhat bloated somehow, but I'm sure we can iterate on
it over time and improve things.
To get one of the theme colors, use the Color(SystemColor) constructor:
painter.fill_rect(rect, SystemColor::HoverHighlight);
Some things don't work 100% right without a reboot. Specifically, when
constructing a GWidget, it will set its own background and foreground
colors based on the current SystemColor::Window and SystemColor::Text.
The widget is then stuck with these values, and they don't update on
system theme change, only on app restart.
All in all though, this is pretty cool. Merry Christmas! :^)
|
|
m_roll_notes[] is an array of 2 bools, pressed and playing. A roll note
is highlighted if it is pressed or in the currently playing column, but
the note is only actually played if the roll note is both pressed and
playing.
We change columns every m_tick which is currently 10 frames. The delay
is synchronised with this. change_roll_column() tracks the previous
column and current column to be played. Each roll note in the previous
column is set to "not playing" and the underlying audio note is turned
off if it was pressed. For the current column, each roll note is set to
playing and the underlying audio note is turned on if pressed.
|