Commit graph

6173 commits

Author SHA1 Message Date
Jelle Raaijmakers 7a2a0c1052 Kernel: Implement AC97 audio device driver 2021-11-23 10:06:24 +01:00
Jelle Raaijmakers 1aafb6cd23 Kernel: Teach DeviceManagement to handle multiple audio devices 2021-11-23 10:06:24 +01:00
Jelle Raaijmakers 61d77274db Kernel: Move SB16 to Audio subdirectory 2021-11-23 10:06:24 +01:00
Andreas Kling f99af1bef0 Kernel: Make sure OpenFileDescription is kept alive while read() blocks
It's not safe to store OpenFileDescription in a raw pointer when
blocking, since another thread may decide to close the corresponding
file descriptor.
2021-11-21 20:22:48 +01:00
Andreas Kling c0deafe457 Kernel: Avoid repeated memory zeroing while generating coredumps
Reuse the same buffer-full-of-zeroes for every un-paged-in page that we
dump out.
2021-11-21 20:22:48 +01:00
Andreas Kling e1779b064a Kernel: Remove bogus TODO in coredump generation
When dumping the memory contents of a process, we should not page in
things from inodes that were not already paged in.
2021-11-21 20:22:48 +01:00
Andreas Kling f2c3a41a8f Kernel: Make UserOrKernelBuffer::for_user_buffer() return ErrorOr<T>
This simplifies EFAULT propagation with TRY(). :^)
2021-11-21 20:22:48 +01:00
Andreas Kling b820ae2828 Kernel: Share code between DoubleBuffer's read() and peek()
The only difference between these is whether the buffer index is
advanced after the read.
2021-11-21 20:22:48 +01:00
Andreas Kling 9387271049 Everywhere: Fix spelling of "offsetted"
This word is actually pretty awkward in context, but this patch merely
fixes the spelling instead of finding a better word.
2021-11-21 20:22:48 +01:00
Andreas Kling daef7e2c71 Kernel+LibC: Fix misspelled "VERTICAL" in framebuffer ioctls 2021-11-21 20:22:48 +01:00
Itamar 38ddf301f6 Kernel+LibC: Fix ptrace for 64-bit
This makes the types used in the PT_PEEK and PT_POKE actions
suitable for 64-bit platforms as well.
2021-11-20 21:22:24 +00:00
Andreas Kling e08d213830 Kernel: Use DistinctNumeric for filesystem ID's
This patch adds the FileSystemID type, which is a distinct u32.
This prevents accidental conversion from arbitrary integers.
2021-11-18 21:11:30 +01:00
Andreas Kling 578a576a98 Kernel: Make VirtualRangeAllocator setup functions propagate errors
If an internal allocation failure occurs while setting up a new VRA,
we'll now propagate the error to our caller instead of panicking.
2021-11-18 21:11:30 +01:00
Andreas Kling 0f22ba5bf2 AK: Make RedBlackTree::try_insert() return ErrorOr<void> instead of bool 2021-11-18 21:11:30 +01:00
Andreas Kling b285323d91 Kernel: Propagate Vector append failures from Inode::apply_flock() 2021-11-18 21:11:30 +01:00
Andreas Kling 1f894cee59 Kernel: Automatically sync shared file mappings when unmapped
To make sure we don't lose changes, shared file mappings will now be
fully synced when they are unmapped, whether explicitly or implicitly
(by the program exiting/crashing/etc.)

This can incur a lot of work, since we don't keep track of dirty pages,
but that's something we can optimize down the road. :^)
2021-11-17 19:35:53 +01:00
Andreas Kling af6358e1e1 Kernel: Allow mmap() with PROT_WRITE+MAP_SHARED
Now that we have a way to flush changes back to disk, let's allow this
type of mapping.
2021-11-17 19:35:13 +01:00
Andreas Kling 32aa37d5dc Kernel+LibC: Add msync() system call
This allows userspace to trigger a full (FIXME) flush of a shared file
mapping to disk. We iterate over all the mapped pages in the VMObject
and write them out to the underlying inode, one by one. This is rather
naive, and there's lots of room for improvement.

Note that shared file mappings are currently not possible since mmap()
returns ENOTSUP for PROT_WRITE+MAP_SHARED. That restriction will be
removed in a subsequent commit. :^)
2021-11-17 19:34:15 +01:00
Andreas Kling f2d5548d7a Kernel: Add MemoryManager::copy_physical_page()
This is a handy helper that copies out the full contents of a physical
page into a caller-provided buffer. It uses quickmapping internally
(and takes the MM lock for the duration.)
2021-11-17 19:32:07 +01:00
Andreas Kling 216e21a1fa AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
This isn't a complete conversion to ErrorOr<void>, but a good chunk.
The end goal here is to propagate buffer allocation failures to the
caller, and allow the use of TRY() with formatting functions.
2021-11-17 00:21:13 +01:00
Daniel Bertalan 304c03f457 Kernel: Reject writable shared file mappings
We have no way of writing changes to memory-mapped files back to disk,
and software relying on this functionality for output would fail
miserably. Let's just return ENOTSUP instead to allow callers to fall
back to standard file IO instead of silently discarding writes.

This makes the LLD port work, which uses memory-mapped files to write
its output by default.
2021-11-17 00:15:30 +01:00
Andrew Kaster f1d8978804 AK+Kernel: Remove implicit conversion from Userspace<T*> to FlatPtr
This feels like it was a refactor transition kind of conversion. The
places that were relying on it can easily be changed to explicitly ask
for the ptr() or a new vaddr() method on Userspace<T*>.

FlatPtr can still implicitly convert to Userspace<T> because the
constructor is not explicit, but there's quite a few more places that
are relying on that conversion.
2021-11-16 00:13:22 +01:00
Andrew Kaster 7243bcb7da Kernel: Use static_ptr_cast to convert between Userspace<T*> types
Some calls of copy_to_user were converting Userspace<T*> to
Userspace<U*> via the implicit conversion to FlatPtr. Change them to use
the static_ptr_cast overload that is designed to express this conversion
2021-11-16 00:13:22 +01:00
Andrew Kaster 194456efdc Kernel: Remove unnecessary StringBuilder from sys$create_thread()
A series of refactors changed Threads to always have a name, and to
store their name as a KString. Before the refactors a StringBuilder was
used to format the default thread name for a non-main thread, but it is
since unused. Remove it and the AK/String related header includes from
the thread syscall implementation file.
2021-11-16 00:13:22 +01:00
Andrew Kaster b1d5d3cc34 Kernel: Avoid redundant bool comparisons in Kernel::Thread
Two instances of comparing a bool with == true or == false, and one
instance where we can just return an expression instead of checking it
to return true on succeess and false on failure.
2021-11-14 22:52:35 +01:00
Andrew Kaster c9d1c12efa Kernel: Remove unused forward declaration of Syscall::StringArgument
The real struct is in Kernel::Syscall::StringArgument, so the namespace
was wrong anyway. But regardless, this forward declaration was unused.
2021-11-14 22:52:35 +01:00
Andrew Kaster 39993a8fab Kernel: Avoid else after return in Process and ThreadSafeRefCounted 2021-11-14 22:52:35 +01:00
Andrew Kaster eb1181b898 Kernel: Convert Process-related const member functions to static
Process::get_syscall_path_argument() and
ProcFSExposedComponent::modified_time() both are independent of this.
2021-11-14 22:52:35 +01:00
Andrew Kaster bc29c7f04f Kernel: Make OpenFileDescriptions::max_open() static and constexpr
This method was just returning a static constexpr member variable
verbatim, so there's no point requiring a member function to observe
its value.
2021-11-14 22:52:35 +01:00
Andrew Kaster fff265a9a9 Kernel: Suppress clang-tidy warning on declaration of s_mm_lock
Seems we are declaring this guy as extern RecursiveSpinLock s_mm_lock;
in both Thread.h and MemoryManager.h. Smells funny for sure.
2021-11-14 22:52:35 +01:00
Andrew Kaster 542640e766 Kernel: Mark private members of SharedCommittedCowPages as private
They were marked public, which seems like an obvious typo.
2021-11-14 22:52:35 +01:00
Andrew Kaster 16d8556472 Kernel: Remove redundant return statement from Spinlock::lock()
Also from RecursiveSpinlock::lock()
2021-11-14 22:52:35 +01:00
Andrew Kaster 5920b84696 Kernel: Stop truncating PageTableEntry::raw(), and make set_bit private
set_bit() in both PageDirectory and PageTableEntry are now private, and
remove a useless cast from PageTableEntry::raw().
2021-11-14 22:52:35 +01:00
Andrew Kaster e824bead54 Kernel: Resolve clang-tidy readability-qualified-auto warning
... In files included by Kernel/Process.cpp or Kernel/Thread.cpp
2021-11-14 22:52:35 +01:00
Andrew Kaster 65edc62c02 Kernel: Resolve clang-tidy readability-make-member-function-const
... In files included from Kernel/Thread.cpp or Kernel/Process.cpp

Some places the warning is suppressed, because we do not want a const
object do have non-const access to the returned sub-object.
2021-11-14 22:52:35 +01:00
Andrew Kaster a92132e44a Kernel: Resolve clang-tidy readability-implicit-bool-conversion warnings
... In files included from Kernel/Process.cpp and Kernel/Thread.cpp
2021-11-14 22:52:35 +01:00
Andrew Kaster 7014d37dd6 AK+Kernel: Suppress clang-tidy warnings from the cert-* category
cert-dcl50-cpp: No variadic functions, suppressed in RefCounted and
ThreadSafeRefCounted for implementing the magic one_ref_left and
will_be_destroyed functions.

cert-dcl58-cpp: No opening ::std, suppressed in the places we put names
in ::std to aid tools (move, forward, nullptr_t, align_val_t, etc).
2021-11-14 22:52:35 +01:00
Liav A 0e5983e603 Kernel/AHCI: Simplify wait and timeout pattern significantly
Instead of repeating ourselves with the pattern of waiting for some
condition to be met, we can have a general method for this task,
and then we can provide the retry count, the required delay and a lambda
function for the checked condition.
2021-11-13 23:35:27 +01:00
Liav A 557351724a Kernel/AHCI: Remove unnecessary AHCIPort class member 2021-11-13 23:35:27 +01:00
Liav A 3ea49259df Kernel/Storage: Don't use interrupts when resetting SATA AHCI devices
Don't use interrupts when trying to reset a device that is connected to
a port on the AHCI controller, and instead poll for changes in status to
break out from the loop. At the worst case scenario we can wait 0.01
seconds for each SATA reset.
2021-11-13 12:53:57 +01:00
Liav A 1ae76676a5 Kernel/Storage: Don't use interrupts when identifying AHCI devices
Don't use interrupts when trying to identify a device that is connected
to a port on the AHCI controller, and instead poll for changes in status
to end the transaction.

Not only this simplifies the initialization sequence, it ensures that
for whatever reason the controller doesn't send an IRQ, we are never
getting stuck at this point.
2021-11-13 10:05:22 +01:00
Liav A 4dc3617f3c Kernel/Storage: Move all ATA related code to a new subdirectory
Like what happened with the PCI and USB code, this feels like the right
thing to do because we can improve on the ATA capabilities and keep it
distinguished from the rest of the subsystem.
2021-11-13 10:05:22 +01:00
Daniel Bertalan 648a139af3 Kernel+LibC: Pass off_t to pread() via a pointer
`off_t` is a 64-bit signed integer, so passing it in a register on i686
is not the best idea.

This fix gets us one step closer to making the LLVM port work.
2021-11-13 10:04:46 +01:00
Jelle Raaijmakers 86a1ff5204 Kernel: Drain I8042 PS/2 keyboard output after enabling
As soon as we enable the first PS/2 port on the I8042 controller, the
output buffer may become full. We need to drain it before attempting
any new commands with the controller (such as enabling the second PS/2
port).

Fixes #10872.
2021-11-12 07:35:18 +01:00
Andreas Kling 80d4e830a0 Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
Andreas Kling 8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Andreas Kling ad5d217e76 Kernel/Ext2FS: Propagate HashMap errors instead of panicking 2021-11-11 01:27:46 +01:00
Andreas Kling 9d1f238450 AK: Make HashTable and HashMap try_* functions return ErrorOr<T>
This allows us to use TRY() and MUST() with them.
2021-11-11 01:27:46 +01:00
Andreas Kling f86ee71f65 Kernel/Ext2FS: Propagate errors from block list computation functions 2021-11-10 21:58:58 +01:00
Andreas Kling 4661ca5f15 Kernel: Propagate Vector append errors in two places in Ext2FS
There are a bunch more of these, just taking care of some simple ones.
2021-11-10 21:58:58 +01:00
Andreas Kling 5ce753b74d Kernel: Make Inode::traverse_as_directory() callback return ErrorOr
This allows us to propagate errors from inside the callback with TRY().
2021-11-10 21:58:58 +01:00
Andreas Kling 88b6428c25 AK: Make Vector::try_* functions return ErrorOr<void>
Instead of signalling allocation failure with a bool return value
(false), we now use ErrorOr<void> and return ENOMEM as appropriate.
This allows us to use TRY() and MUST() with Vector. :^)
2021-11-10 21:58:58 +01:00
Andreas Kling 5f7d008791 AK+Everywhere: Stop including Vector.h from StringView.h
Preparation for using Error.h from Vector.h. This required moving some
things out of line.
2021-11-10 21:58:58 +01:00
Ben Wiederhake ad5061bb7a Kernel: Make (f)statvfs report filesystem ID correctly 2021-11-10 16:13:10 +01:00
Ben Wiederhake 631447da57 Kernel: Fix TOCTOU in fstatvfs
In particular, fstatvfs used to assume that a file that was earlier
opened using some path will forever be at that path. This is wrong, and
in the meantime new mounts and new filesystems could take up the
filename or directories, leading to a completely inaccurate result.
This commit improves the situation:
- All filesystem information is now always accurate.
- The mount flags *might* be erroneously zero, if the custody for the
  open file is not available. I don't know when that might happen, but
  it is definitely not the typical case.
2021-11-10 16:13:10 +01:00
Ben Wiederhake bf7a2ff941 AK+Kernel: Make BitmapView read-only 2021-11-10 14:39:42 +01:00
Ben Wiederhake 850db15d66 Everywhere: Remove unused AK/Bitmap includes 2021-11-10 14:39:42 +01:00
Andreas Kling 79fa9765ca Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace!
This was a slightly tedious refactoring that took a long time, so it's
not unlikely that some bugs crept in.

Nevertheless, it does pass basic functionality testing, and it's just
real nice to finally see the same pattern in all contexts. :^)
2021-11-08 01:10:53 +01:00
Ben Wiederhake 3582184d8c Kernel: Expose inode information in /proc/pid/fds 2021-11-08 00:34:58 +01:00
AMACB 60362ef401 Kernel: Initialize regs.fs in Processor::init_context
Commit f285241c replaced the line that sets regs.fs with a line that
sets regs.gs, but not vice versa.
2021-11-06 11:54:28 +01:00
Liav A 066b1183cd Kernel: Return ENOTIMPL when trying to read from SysFS inodes
Instead of asserting, just return reasonable error back to userland.
2021-11-05 16:26:45 +02:00
Jelle Raaijmakers a4b1c0fd0c Kernel: Process available VMWare mouse events immediately
The Qemu I8042 controller does not send one IRQ per event, it sends
over four since it will not stop trying to emulate the PS/2 mouse.

If the VMWare backdoor is active, a fake I8042 mouse event will be sent
that we can then use to check if there are VMWare mouse events present.
However, we were only processing one mouse event at a time, even though
multiple events could have been queued up. Luckily this does not often
lead to issues, since after the first IRQ we would still get three
additional interrupts that would then empty the queue.

This change makes sure we always empty the event queue immediately,
instead of waiting on the next interrupt to happen. Functionally this
changes nothing - it could merely improve latency by not waiting for
new interrupts to come in.

Coincidently, this brings our implementation closer to how Linux deals
with the VMMouse.
2021-11-04 18:53:37 +01:00
Jelle Raaijmakers 8a65a9c30f Kernel: Clean up VMWareMouseDevice and VMWareBackdoor
No functional changes.
2021-11-04 18:53:37 +01:00
Andreas Kling 652042e680 Revert "Kernel: Prevent VMWareMouseDevice from handling invalid mouse packets"
This reverts commit 4131b35851.

We're swallowing way too many mouse events from QEMU with this code
enabled. Something is not right, so let's revert it for now.
2021-11-03 16:48:42 +01:00
Brian Gianforcaro 9f6eabd73a Kernel: Move TTY subsystem to use KString instead of AK::String
This is minor progress on removing the `AK::String` API from the Kernel
in the interest of improving OOM safety.
2021-11-02 11:34:31 +01:00
Brian Gianforcaro 71f05c70b4 Kernel: Remove duplicate constructor from TTY/VirtualConsole
This removes some code dupe from the constructors.

By removing this duplicate constructor we can utilize the main
VirtualConsole::create factory implementation and call that from the
VirtualConsole::create_with_preset_log factory method.
2021-11-02 11:34:31 +01:00
Brian Gianforcaro 2c85f65519 Kernel: Switch BIOSSysFSComponent constructor to AK::StringView
These are constants, they don't need to be dynamically allocated.
Another minor step towards removing `AK::String` from the Kernel
and improving OOM safety.
2021-11-02 11:34:31 +01:00
SeekingBlues b9da877941 Kernel: Do not try opening the same file when dumping perfcore
Dumping perfcore would always fail with EEXIST. This regressed in #10707
because of an incorrect indentation in the for loop.
2021-10-31 21:10:17 +01:00
Ben Wiederhake e3b7c305bc Kernel: Don't crash on writes to ProcFS 2021-10-31 18:44:12 +01:00
Marcin Undak 588ba72fe7 Kernel: Draw picture on screen when booting Raspberry Pi 2021-10-31 12:35:53 +01:00
Marcin Undak e7141c4230 Kernel: Add very simple PPM parser for Aarch64
This is much simpler and more embeddable version than libGFX one.
Solely purpose is to draw initial boot logo on screen before kernel
is even booted.
2021-10-31 12:35:53 +01:00
Marcin Undak dbb61620be Kernel: Add Framebuffer class for Raspberry Pi
It initializes framebuffer and exposes access to its properties.
2021-10-31 12:35:53 +01:00
Marcin Undak 3cc5752a69 Kernel: Refactor Aarch64 MailBox class
The goal was to reduce common setup of messages. Changes:
* MailBox turned into singleton to follow existing patterns
* Removed device specific messages from MailBox requiring
  clients to know the details instead
* Created base Message class which clients should deriver from

It really simplify the usage for more complicated message queues
like framebuffer setup - see followup commits.
2021-10-31 12:35:53 +01:00
Marcin Undak 82a73b8499 Kernel: Add temporary debug printing utilities for Aarch64
Added dbgln() and warnln() debug functions to help bootstraping.
Eventually they are going to be replaced by AK/Format.h implementation.
2021-10-31 12:35:53 +01:00
Ben Wiederhake 9a4e125468 Kernel: Remove misleading FIXME in DevTmpFS
This FIXME does not seem to apply anymore. Yes, symbolic links in all
filesystems appear to be slightly broken, but that has nothing to do
with File::absolute_path. Let's remove the wrong FIXME instead of adding
to the confusion.
2021-10-31 12:06:28 +01:00
Ben Wiederhake c05c5a7ff4 Kernel: Clarify ambiguous {File,Description}::absolute_path
Found due to smelly code in InodeFile::absolute_path.

In particular, this replaces the following misleading methods:

File::absolute_path
This method *never* returns an actual path, and if called on an
InodeFile (which is impossible), it would VERIFY_NOT_REACHED().

OpenFileDescription::try_serialize_absolute_path
OpenFileDescription::absolute_path
These methods do not guarantee to return an actual path (just like the
other method), and just like Custody::absolute_path they do not
guarantee accuracy. In particular, just renaming the method made a
TOCTOU bug obvious.

The new method signatures use KResultOr, just like
try_serialize_absolute_path() already did.
2021-10-31 12:06:28 +01:00
Ben Wiederhake 88ca12f037 Kernel: Enable early-returns from VFS::for_each_mount 2021-10-31 12:06:28 +01:00
Ben Wiederhake 735da58d44 Kernel: Avoid OpenFileDescription::absolute_path 2021-10-31 12:06:28 +01:00
Ben Wiederhake fa018d3ba1 Kernel: Fix common misuse of KString in debug messages 2021-10-30 17:35:18 +02:00
Idan Horowitz a8bd78e634 LibC: Include sys/uio.h in sys/socket.h for struct iovec 2021-10-28 11:24:36 +02:00
Idan Horowitz 2882a90dec Kernel: Add the IFF_* SIOCGIFFLAGS flag macros 2021-10-28 11:24:36 +02:00
Idan Horowitz adc9939a7b Kernel+LibC: Add support for the IPv4 TOS field via the IP_TOS sockopt 2021-10-28 11:24:36 +02:00
Idan Horowitz 20c7fcfedf Kernel: Fix accidental memory over-read in getsockopt(IP_TTL)
We were accidentally casting the pointer to m_ttl from an u8* to an int*
which resulted in copying of 3 extra unrelated bytes (which turned out
to be padding in this case).
2021-10-28 11:24:36 +02:00
Idan Horowitz c45b1e1983 LibC: Add IPPROTO_ICMPV6 macro 2021-10-28 11:24:36 +02:00
Filiph Sandström c6247fe414 Everywhere: Rename back-click to backward-click
This matches the current forward-click terminology.
2021-10-27 22:05:58 +03:00
Liav A 8554952690 Kernel + WindowServer: Re-define the interface to framebuffer devices
We create a base class called GenericFramebufferDevice, which defines
all the virtual functions that must be implemented by a
FramebufferDevice. Then, we make the VirtIO FramebufferDevice and other
FramebufferDevice implementations inherit from it.
The most important consequence of rearranging the classes is that we now
have one IOCTL method, so all drivers should be committed to not
override the IOCTL method or make their own IOCTLs of FramebufferDevice.
All graphical IOCTLs are known to all FramebufferDevices, and it's up to
the specific implementation whether to support them or discard them (so
we require extensive usage of KResult and KResultOr, together with
virtual characteristic functions).
As a result, the interface is much cleaner and understandable to read.
2021-10-27 07:57:44 +03:00
Liav A 78e724a899 Kernel/Graphics: Rename GraphicsDevice => GenericGraphicsAdapter
We already use the term adapter for instances of this class, so let's
better represent this class by changing its name to what it really is.
2021-10-27 07:57:44 +03:00
Liav A c7eb761b7f Kernel/Graphics: Re-order parameters in VirtIO GraphicsAdapter methods
As suggested by @ccapitalK, it makes the interface more neat and clean.
The proper order is to get ScanoutID first, then ResourceID and after it
everything else that is needed to complete the operation successfully.
2021-10-27 07:57:44 +03:00
Liav A f476b49fd8 Kernel/Graphics: Merge VirtIO GraphicsAdapter and VirtIO GPU code
A VirtIO graphics adapter is really the VirtIO GPU, so the virtualized
hardware has no distinction between both components so there's no
need to put such distinction in software.

We might need to split things in the future, but when we do so, we must
take proper care to ensure that the interface between the components
is correct and use the usual codebase patterns.
2021-10-27 07:57:44 +03:00
Liav A a9538b5879 Kernel/Graphics: Convert type method => bool vga compatible method
We never used that type method except in initialization in
GraphicsManagement, and we used it there to query whether the device is
VGA compatible or not.
2021-10-27 07:57:44 +03:00
Liav A fb0ed2ae46 Kernel/Graphics: Force VirtIO Framebuffer to inherit FramebufferDevice
The distinction is not justified because a VirtIO Framebuffer device
acts much more like a regular FramebufferDevice than a pure BlockDevice.
2021-10-27 07:57:44 +03:00
Liav A 4815282a5f Kernel/Graphics: Rename VirtIO FrameBufferDevice => FramebufferDevice 2021-10-27 07:57:44 +03:00
Andreas Kling e0f0b6379a Kernel: Make WorkQueue::WorkItem slab allocated 2021-10-26 10:50:44 +02:00
Andreas Kling 44b273f3ac Kernel: Use SpinlockProtected<T> in WorkQueue 2021-10-26 10:44:10 +02:00
Andreas Kling b443e9e1a9 Kernel: Use a larger kmalloc chunk size on 64-bit platforms
This reduces test-js runtime by over 40% on my machine.

(And once again we find another way to defer writing a better kernel
heap allocator..)
2021-10-26 10:38:35 +02:00
Andreas Kling 25250590d0 Kernel: Take VMObject lock once in Region::remap_vmobject_page()
We were taking and releasing the lock repeatedly instead of holding it
across the entire remap operation.
2021-10-26 09:03:41 +02:00
Andreas Kling 0592f80186 Kernel: Add TimeManagement::is_initialized()
This allows clients to check whether TimeManagement is available before
trying to ask it about time related things.
2021-10-26 01:00:54 +02:00
Ben Wiederhake bf88adbcb6 Kernel: Avoid allocation when checking for vmmouse 2021-10-25 23:38:28 +02:00
Ben Wiederhake 8d13f6ddce Kernel+SystemServer: Change bootmode to system_mode
'bootmode' now only controls which set of services are started by
SystemServer, so it is more appropriate to rename it to system_mode, and
no longer validate it in the Kernel.
2021-10-25 23:38:28 +02:00
Ben Wiederhake 09432a8241 Kernel: Separate panic behavior from bootmode
Bootmode used to control panic behavior and SystemServer.
This patch factors panic behavior control into a separate flag.
2021-10-25 23:38:28 +02:00