Commit Graph

7128 Commits

Author SHA1 Message Date
Timon Kruiper
1f3977b303 Kernel: Remove Prekernel namespace in the aarch64 Kernel
Now that we merged all the Prekernel files into the Kernel files, we can
get rid of the Prekernel namespace as well.
2022-05-12 23:14:05 +02:00
Timon Kruiper
c96a3f0c48 Kernel: Move the aarch64 boot.S out of the Prekernel directory 2022-05-12 23:14:05 +02:00
Timon Kruiper
e88cd338f1 Kernel: Move Prekernel{CPU, Exceptions}.cpp out of Prekernel directory
This lets us delete the Prekernel.h file, and gets us closer to deleting
the Prekernel from the aarch64 Kernel.
2022-05-12 23:14:05 +02:00
Timon Kruiper
e7c5fd978b Kernel: Move Prekernel assembly utils to aarch64/ASM_wrapper.h
By moving these functions to the ASM_wrapper.h file, we can get rid of
another Prekernel file.
2022-05-12 23:14:05 +02:00
Timon Kruiper
e80d8d697c Kernel: Replace Prekernel::halt with Processor::halt in aarch64 build
This allows us to get rid of one more Prekernel file.
2022-05-12 23:14:05 +02:00
Daniel Bertalan
fd3e3d5e28 LibC+Kernel: Prevent string functions from calling themselves
Most of the string.h and wchar.h functions are implemented quite naively
at the moment, and GCC's pattern recognition pass might realize what we
are trying to do, and transform them into libcalls. This is usually a
useful optimization, but not when we're implementing the functions
themselves :^)

Relevant discussion from the GCC Bugzilla:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102725

This prevents the infamous recursive `strlen`.

A more proper fix would be writing these functions in assembly. That
would likely give a small performance boost as well ;)
2022-05-12 13:12:37 +02:00
Daniel Bertalan
f157ad8a35 Kernel: Do not implement VERIFY_NOT_REACHED() as VERIFY(false)
If a switch case ends in VERIFY_NOT_REACHED(), gcc 12 thinks it might
fall through.
2022-05-12 13:12:37 +02:00
Timon Kruiper
b8854549f2 Kernel: Sort aarch64 CMake sources alphabetically 2022-05-09 21:12:56 +02:00
Timon Kruiper
c515e1341a Kernel: Add initial implementation of Processor in aarch64
Instead of storing the current Processor into a core local register, we
currently just store it into a global, since we don't support SMP for
aarch64 anyway. This simplifies the initial implementation.
2022-05-09 21:12:56 +02:00
Timon Kruiper
ed4bfaed12 Kernel: Call the constructors in the aarch64 init function
Now that we have separated the kmalloc.cpp constructors into a separate
library, we can actually call the constructors in the init function.
2022-05-09 21:12:56 +02:00
Timon Kruiper
2e49d6b001 Kernel: Separate kmalloc.cpp into a separate library similar to x86_64
This will allow the call the constructors of the kmalloc.cpp file
before calling the other constructors in the Kernel.
2022-05-09 21:12:56 +02:00
Timon Kruiper
d449fef606 Kernel: Reorder sections in aarch64 linker script to save space
By putting the NOLOAD sections (.bss and .super_pages) at the end of the
ELF file, objcopy does not have to insert a lot of zeros to make sure
that the .ksyms section is at the right place in memory. Now the .ksyms
section comes before the two NOLOAD sections. This shrinks the
kernel8.img with 6MB, from 8.3M to 2.3M. :^)
2022-05-09 21:12:56 +02:00
Timon Kruiper
a1b352fdc0 Kernel: Add some mission sections to the aarch64 linker script
The sections did end up in the ELF file, however they weren't
explicitely mentioned in the linker.ld script. In the future, we can add
the --orphan-handling=error flag to the linker options, which will
enforce that the sections used in the sources files also are mentioned
in the linker script.
2022-05-09 21:12:56 +02:00
Liav A
9bec9c2b78 Kernel: Force y offset 0 when switching between console & graphics modes
This fixes a weird bug that when sometimes a user tried to switch to
console mode, the screen was frozen on graphics mode. After a hour of
debugging this, it became apparent that the problem was that we left the
y offset of the bochs graphics device in an invalid state, so it was not
zero because the WindowServer changed it, and the framebuffer console
code is not aware of horizontal and vertical offsets of the framebuffer
screen, leading to the problem that the framebuffer console updates the
first framebuffer (y offset = 0), but hardware was indicated to show the
second framebuffer (y offset = first framebuffer height).

Therefore, when doing a switch between these modes, always set the y
offset to be zero.
2022-05-06 18:05:14 +02:00
Liav A
cd08c4a5aa Kernel/HID: Take a spinlock when calling KeyboardClient::on_key_pressed
The KeyboardClient class member could be updated due to TTY switch, so
we must ensure we always use a valid pointer.
2022-05-06 18:05:14 +02:00
Liav A
b8493bf70f Kernel/Graphics: Protect the list of display connectors with a Spinlock
This list could be updated in runtime if an hotplug event occurs, so we
must protect it with a spin lock to avoid corruption of the list.
2022-05-06 18:05:14 +02:00
Liav A
340773ddb7 Kernel/Graphics: Implement basic support for VMWare SVGA adapter 2022-05-06 18:04:57 +02:00
Liav A
a0a1ac0656 Kernel/Graphics: Use boot console if the subsystem is disabled
This lets us actually to initialize VirtualConsoles later on.
2022-05-06 12:28:19 +02:00
Liav A
0d784de3a6 Kernel/Graphics: Implement basic cursor for FramebufferConsole 2022-05-06 12:28:02 +02:00
MacDue
d951e2ca97 Kernel: Add /proc/{pid}/children to ProcFS
This exposes the child processes for a process as a directory
of symlinks to the respective /proc entries for each child.

This makes for an easier and possibly more efficient way
to find and count a process's children. Previously the only
method was to parse the entire /proc/all JSON file.
2022-05-06 02:12:51 +04:30
MacDue
222079cd80 Kernel: Expose .length() of KBufferBuilder 2022-05-06 02:12:51 +04:30
Liav A
969e5fa163 Kernel/Console: Use 8x16 character font bitmap instead of old 8x8 bitmap
This in turn makes the built-in kernel console much more nicer to look
into, so let's remove the support for 8x8 bitmap and instead add 8x16
font bitmap.
2022-05-05 21:51:57 +02:00
Liav A
b96b2fb9be Kernel/Graphics: Simplify the GenericGraphicsAdapter class
The old methods are already can be considered deprecated, and now after
we removed framebuffer devices entirely, we can safely remove these
methods too, which simplfies the GenericGraphicsAdapter class a lot.
2022-05-05 20:55:57 +02:00
Liav A
d49a35df31 Kernel/Graphics: Simplify the feature level of the Graphics subsystem
Instead of letting the user to determine whether framebuffer devices
will be created (which is useless because they are gone by now), let's
simplify the flow by allowing the user to choose between full, limited
or disabled functionality. The determination happens only once, so, if
the user decided to disable graphics support, the initialize method
exits immediately. If limited functionality is chosen, then a generic
DisplayConnector is initialized with the preset framebuffer resolution,
if present, and then the initialize method exits. As a default, the code
proceeds to initialize all drivers as usual.
2022-05-05 20:55:57 +02:00
Liav A
e301af8352 Everywhere: Purge all support and usage of framebuffer devices
Long live the DisplayConnector object!
2022-05-05 20:55:57 +02:00
Liav A
aad968cc5e Everywhere: Rename fb prefix function names => graphics_connector 2022-05-05 20:55:57 +02:00
Liav A
10adc27eda Everywhere: Rename FB prefix structure names => Graphics 2022-05-05 20:55:57 +02:00
Liav A
d2e93ec50a Everywhere: Rename FB prefix name ioctls => GRAPHICS 2022-05-05 20:55:57 +02:00
Liav A
f15b93c9a1 Kernel/Graphics: Use DisplayConnector design with generic framebuffers 2022-05-05 20:55:57 +02:00
Liav A
c27c414ed1 Kernel/Graphics: Apply DisplayConnector design on the VirtIO driver 2022-05-05 20:55:57 +02:00
Liav A
4ff6150f1b WindowServer: Use FB_IOCTL_FLUSH_HEAD to flush a framebuffer if possible
This ioctl is more appropriate when the hardware supports flushing of
the entire framebuffer, so we use that instead of the previous default
FB_IOCTL_FLUSH_HEAD_BUFFERS ioctl.
2022-05-05 20:55:57 +02:00
Liav A
41283a2de6 Kernel/Graphics: Use VirtIO GPU3DDevice constructor indirectly
We shouldn't expose the VirtIO GPU3DDevice constructor as public method,
so instead, let's use the usual pattern of a static construction method
that uses the constructor within the method.
2022-05-05 20:55:57 +02:00
Liav A
728358c599 Kernel/Graphics: Migrate Intel driver to use the DisplayConnector design 2022-05-05 20:55:57 +02:00
Liav A
e9a74cbefb Kernel/Graphics: Use DisplayConnector design for the Bochs driver 2022-05-05 20:55:57 +02:00
Liav A
6d7e2596e0 WindowServer: Implement mechanism to restore safe mode setting
Such mechanism will be used by the Intel Graphics driver, because we
lack support of changing the resolution on this driver currently, so,
when WindowServer will try to mode-set the display then it will fail,
and will use the safe mode-setting call instead to be able to show
something on screen.
2022-05-05 20:55:57 +02:00
Liav A
d9a2706079 DisplaySettings+WindowServer: Add support for display connector devices 2022-05-05 20:55:57 +02:00
Liav A
e6ebf9e5c1 Kernel/Memory: Add TypedMapping base_address method
This method will be used to ease usage with the structure when we need
to do virtual pointer arithmetics.
2022-05-05 20:55:57 +02:00
Liav A
9f0b5b04ff Kernel/Graphics: Export Bochs definitions to a header file
These definitions will be used later when applying the DisplayConnector
design on the Bochs driver.
2022-05-05 20:55:57 +02:00
Liav A
912b8ab965 Kernel/Graphics: Introduce the DisplayConnector class
The DisplayConnector class is meant to replace the FramebufferDevice
class. The advantage of this class over the FramebufferDevice class is:
1. It removes the mmap interface entirely. This interface is unsafe, as
multiple processes could try to use it, and when switching to and from
text console mode, there's no "good" way to revoke a memory mapping from
this interface, let alone when there are multiple processes that call
this interface. Therefore, in the DisplayConnector class there's no
implementation for this method at all.
2. The class uses a new real-world structure called ModeSetting, which
takes into account the fact that real hardware requires more than width,
height and pitch settings to mode-set the display resolution.
3. The class assumes all instances should supply some sort of EDID,
so it facilitates such mechanism to do so. Even if a given driver does
not know what is the actual EDID, it will ask to create default-generic
EDID blob.
3. This class shifts the responsibilies of switching between console
mode and graphical mode from a GraphicsAdapter to the DisplayConnector
class, so when doing the switch, the GraphicsManagement code actually
asks each DisplayConnector object to do the switch and doesn't rely on
the GraphicsAdapter objects at all.
2022-05-05 20:55:57 +02:00
Liav A
ebf7225728 Kernel/Graphics: Declare BochsGraphicsAdapter::get_edid private method 2022-05-05 20:55:57 +02:00
Tim Schumacher
0ce43fae9c Kernel: Add IPv4 network class masks 2022-05-05 20:47:38 +02:00
Tim Schumacher
7dd4648565 Kernel: Add IPsec ESP and AH protocol numbers 2022-05-05 20:47:38 +02:00
Tim Schumacher
098af0f846 Kernel: Properly define IOV_MAX 2022-05-05 20:47:38 +02:00
Tim Schumacher
6d59d4d3d9 Kernel: Add the remaining POSIX MADV_* constants 2022-05-05 20:47:38 +02:00
Tim Schumacher
94ab75d3df Kernel: Add O_SYNC into fcntl.h 2022-05-05 20:47:38 +02:00
Timon Kruiper
2cf36a1ca2 Kernel: Panic when an assertion is failed in aarch64 Kernel
This in turn makes sure that we get a nice backtrace when an assertion
failed, or when a VERIFY_NOT_REACHED() is hit.
2022-05-03 21:53:36 +02:00
Timon Kruiper
771d0719ea Kernel: Remove unused aarch64 Prekernel::panic() function 2022-05-03 21:53:36 +02:00
Timon Kruiper
f8e4eecbfb Kernel: Replace calls to Prekernel::panic() with PANIC macro on aarch64 2022-05-03 21:53:36 +02:00
Timon Kruiper
e81e1fa9c8 Kernel: Implement __panic() for the aarch64 Kernel
Now that dump_backtrace() works, we can actually print a helpful
backtrace when the Kernel panics.
2022-05-03 21:53:36 +02:00
Timon Kruiper
e7cf591ec0 Kernel: Load the kernel symbol table for the aarch64 Kernel
Since kmalloc() now works, we can actually load the kernel symbol table!
This in turn allows us to call dump_backtrace(), and actually get a
useful backtrace in the aarch64 Kernel.
2022-05-03 21:53:36 +02:00
Timon Kruiper
b464321618 Kernel: Add kmalloc_init() to the init function of the aarch64 Kernel
With the previous commits, we are now able to call kmalloc() :^)
2022-05-03 21:53:36 +02:00
Timon Kruiper
3b4d2d9b51 Kernel: Remove VERIFY_NOT_REACHED in {current, idle}_thread for aarch64
These functions are called by kmalloc, and since there is no support for
threading in the aarch64 build yet, we can simply remove the
VERIFY_NOT_REACHED().
2022-05-03 21:53:36 +02:00
Timon Kruiper
8e0bd63b0c Kernel: Add bare-minimum implementation for aarch64 Spinlock 2022-05-03 21:53:36 +02:00
Timon Kruiper
9abcb6700c Kernel: Move Arch/x86/Spinlock.h and add stubs for aarch64
The code in Spinlock.h has no architectural specific logic, thus can be
moved to the Arch directory. This contains no functional change.

Also add the Spinlock.cpp file for aarch64 which contains stubs for the
lock and unlock functions.
2022-05-03 21:53:36 +02:00
Timon Kruiper
0d6d4508df Kernel: Add the .ksyms section to the aarch64 Kernel binary
Previously the embedmap.sh script generated a warning, since there was
no section defined where the actual kernel.map could be stored. This is
necesarry for generating kernel backtraces.
2022-05-03 21:53:36 +02:00
Timon Kruiper
9f76b16124 Kernel: Implement safe_memcpy for the aarch64 build
The implementation just calls the regular memcpy, and is not safe yet.
This can be done later.
2022-05-03 21:53:36 +02:00
Timon Kruiper
feba7bc8a8 Kernel: Move Kernel/Arch/x86/SafeMem.h to Kernel/Arch/SafeMem.h
The file does not contain any specific architectural code, thus it can
be moved to the Kernel/Arch directory.
2022-05-03 21:53:36 +02:00
Timon Kruiper
267febae55 Kernel: Add KSyms.cpp to the aarch64 build
This is the first step in making dump_backtrace() work.
2022-05-03 21:53:36 +02:00
Timon Kruiper
442800db3e Kernel: Fetch the frame pointer using __builtin_frame_address()
This compiler builtin abstracts away the specifics of fetching the frame
pointer. This will allow the KSyms.cpp to be build for the aarch64
target. While we're here, lets also change the
PerformanceEventBuffer.cpp to not rely on x86_64 specifics.
2022-05-03 21:53:36 +02:00
Timon Kruiper
15f32379bb Kernel: Remove UART::{print_num, print_hex} since they are unused 2022-05-03 00:59:35 +02:00
Timon Kruiper
47a58c51c6 Kernel: Modify UART::print_str() to also take into account the length
Previously in the aarch64 Kernel, this would cause dbgln() to actually
print more characters of the next string in memory, because strings in
the Kernel are not zero terminated by default. Prevent this by using the
passed in length of the string.
2022-05-03 00:59:35 +02:00
Timon Kruiper
4a2dcea685 Kernel: Remove aarch64/Utils.{cpp, h} since they are not used anymore 2022-05-03 00:59:35 +02:00
Timon Kruiper
83265b4cb2 Kernel: Replace calls to UART::print_str() with dbgln()
Since we can now use dbgln() in the aarch64 Kernel, lets use it! :^)
2022-05-03 00:59:35 +02:00
Timon Kruiper
b046c82f75 Kernel: Let Processor::is_initialized() of aarch64 return false
When calling dbgln(), the formatting code in AK/Format.h calls
Processor::is_initialized() to determine whether to add some text about
the current processor to the debug output. Instead of crashing, we just
return false, such that we can use dbgln() etc in the aarch64 Kernel.
2022-05-03 00:59:35 +02:00
Timon Kruiper
b9944ca905 Kernel: Add aarch64 version of kprintf.cpp
This allows us to use the AK formatting functions in the aarch64 Kernel.
Also add FIXME to make sure that this file will be removed when the
proper abstractions are in place in the normal Kernel/kprintf.cpp.
2022-05-03 00:59:35 +02:00
Timon Kruiper
b3346aa08d Kernel: Fix aarch64 build by adding -Wno-nonnull flag
The compiler figured out that the MemoryManager is not initialised, and
thus MemoryManager::the() cannot return a valid reference. Once the
necesarry code is in place, this compiler flag can be removed.
2022-05-03 00:59:35 +02:00
Patrick Meyer
0bd131ad06 Kernel: Stop requiring working malloc for syscall.h includes
Fixes #13869
2022-05-02 12:44:34 +02:00
Andrew Kaster
f08e91f67e Kernel: Don't check pledges or veil against code coverage data files
Coverage tools like LLVM's source-based coverage or GNU's --coverage
need to be able to write out coverage files from any binary, regardless
of its security posture. Not ignoring these pledges and veils means we
can't get our coverage data out without playing some serious tricks.

However this is pretty terrible for normal exeuction, so only skip these
checks when we explicitly configured userspace for coverage.
2022-05-02 01:46:18 +02:00
Maciej
66ab4d61a4 Kernel: Stop exposing gateway field
It doesn't make sense after introduction of routing table which allows
having multiple gateways for every interface, and isn't used by any of
the userspace programs now.
2022-05-01 13:34:27 +02:00
brapru
0866a0cd1e Kernel+route: Support global routing table deletion 2022-04-30 16:24:33 +02:00
brapru
863c14c4f4 Kernel: Make Route's operator== overload const 2022-04-30 16:24:33 +02:00
Peter Elliott
12c7b954e1 Kernel+WindowServer: Move setting tty graphical mode to Userspace
This will allow using the console tty and WindowServer regardless of
your kernel command line. Also this fixes a bug where, when booting in
text mode, the console was in graphical mode, and would not accept
input.
2022-04-29 19:52:32 +02:00
Peter Elliott
4b0be17c71 Kernel: Support userspace TTY graphics modesetting
This is a copy of linux's KDSETMODE/KDGETMODE console ioctl(2)
interface.
2022-04-29 19:52:32 +02:00
Liav A
5ed3f7c6bf Kernel/Storage: Migrate the partition code to use the ErrorOr container
That code used the old AK::Result container, which leads to overly
complicated initialization flow when trying to figure out the correct
partition table type. Instead, when using the ErrorOr container the code
is much simpler and more understandable.
2022-04-28 22:13:54 +02:00
brapru
19912a0b32 Kernel+Utilities: Add the route utility
This exposes the global routing table in the /proc directory and adds
the userspace utility to query dynamically add from the table.
2022-04-28 08:41:11 -07:00
brapru
419cd479e2 Kernel: Use TRY to handle string copies in GlobalProcessExposed
Each of these string copies are already inside of an ErrorOr context so
any failed copy should propagate.
2022-04-28 08:41:11 -07:00
brapru
8596b1e0c3 Kernel: Add a global routing table
Previously the system had no concept of assigning different routes for
different destination addresses as the default gateway IP address was
directly assigned to a network adapter. This default gateway was
statically assigned and any update  would remove the previously existing
route.

This patch is a beginning step towards implementing #180. It implements
a simple global routing table that is referenced during the routing
process. With this implementation it is now possible for a user or
service (i.e. DHCP) to dynamically add routes to the table.

The routing table will select the most specific route when possible. It
will select any direct match between the destination and routing entry
addresses. If the destination address overlaps between multiple entries,
the Kernel will use the longest prefix match, or the longest number of
matching bits between the destination address and the routing address.
In the event that there is no entries found for a specific destination
address, this implementation supports entries for a default route to be
set for any specified interface.

This is a small first step towards enhancing the system's routing
capabilities. Future enhancements would include referencing a
configuration file at boot to load pre-defined static routes.
2022-04-28 08:41:11 -07:00
brapru
0718b20df0 Kernel: Generalize the UpdateArp table to UpdateTable
We can use the same enum cases to apply to updates on different
networking tables within the Kernel (i.e. a routing table)
2022-04-28 08:41:11 -07:00
b14ckcat
c65a6b6b22 Kernel: Use C++17 namespace style for nested PCI namespace
Adjust the nested namespace formatting in PCI files to use the nicer
and more consistent C++17 style.
2022-04-26 22:56:45 +02:00
b14ckcat
d8d7b5d82c Kernel: Put USB request constants in namespace
Moved constants in USBRequest.h from global scope to the Kernel::USB
namespace.
2022-04-26 22:56:45 +02:00
Linus Groh
cd3e337487 Kernel: Strip null terminators from all CPUID strings, not just brand
I've noticed that the KVM hypervisor vendor ID string contained null
terminators in the serialized JSON string in /proc/cpuinfo - let's avoid
that, and err on the side of caution and strip them from all strings
built from CPUID register values. They may not be fixed width after all.
2022-04-26 20:20:44 +02:00
Andreas Kling
b85c8a0b80 Kernel: Add FIOCLEX and FIONCLEX ioctls
These allow you to turn the close-on-exec flag on/off via ioctl().
2022-04-26 14:32:12 +02:00
Andreas Kling
20d21fad7b Kernel: Add ESTALE errno code (stale network file handle) 2022-04-26 14:05:49 +02:00
sin-ack
bc7c8879c5 Kernel+LibC+LibCore: Implement the unlinkat(2) syscall 2022-04-23 10:43:32 -07:00
b14ckcat
70a55ccf73 Kernel: Fix typo in Ramdisk
Remove the duplicate/extraneous access specifier.
2022-04-22 22:20:57 -07:00
Jesse Buhagiar
48c3c01de4 Kernel/USB: Send correct data for Root Hub Configuration Descriptor
A request of `GET_DESCRIPTOR` should be sending the entire configuration
chain, and not just the configuration descriptor.
2022-04-22 15:16:56 +02:00
Jesse Buhagiar
300dcb6f5e Kernel/USB: Get all interface descriptors on enumeration
This creates all interfaces when the device is enumerated, with a link
to the configuration that it is a part of. As such, a new class,
`USBInterface` has been introduced to express this state.
2022-04-22 15:16:56 +02:00
Jesse Buhagiar
d313fa98ec Kernel/USB: Add new USBHIDDescriptor type 2022-04-22 15:16:56 +02:00
Jesse Buhagiar
a1df8a1896 Kernel/USB: Add control_transfer() function USB::Device
Some other parts of the USB stack may require us to perform a control
transfer. Instead of abusing `friend` to expose the default pipe, let's
just expose it via a function.
2022-04-22 15:16:56 +02:00
Jesse Buhagiar
dac26f89cb Kernel/USB: Fetch configuration descriptors on enumeration
This also introduces a new class, `USBConfiguration` that stores a
configuration. The device, when instructed, sets this configuration and
holds a pointer to it so we have a record of what configuration is
currently active.
2022-04-22 15:16:56 +02:00
Andreas Kling
5e4d5a436e Kernel: Allow sys$bind() on local sockets with short socket address
Previously, we required local socket addresses to be exactly
sizeof(sockaddr_un). There was no real reason for this, so let's not
enforce it.
2022-04-21 16:31:53 +02:00
Andreas Kling
8e9676c28c Kernel: Report AF_UNIX address family when accepting local sockets
Previously we just wrote the local socket bind path into the sockaddr_un
buffer. With this patch, we actually report the family as well.
2022-04-21 16:31:53 +02:00
kleines Filmröllchen
b0a2572577 Kernel: Don't require AnonymousFiles to be mmap'd completely
AnonymousFile always allocates in multiples of a page size when created
with anon_create. This is especially an issue if we use AnonymousFile
shared memory to store a shared data structure that isn't exactly a
multiple of a page in size. Therefore, we can just allow mmaps of
AnonymousFile to map only an initial part of the shared memory.

This makes SharedSingleProducerCircularQueue work when it's introduced
later.
2022-04-21 13:55:00 +02:00
Tim Schumacher
71f2c342c4 Kernel: Limit free space between randomized memory allocations 2022-04-21 13:16:56 +02:00
Liav A
bf16061142 Kernel: Take WorkQueue item as reference instead of pointer in do_queue 2022-04-20 19:47:18 +02:00
Liav A
1462211ccf Kernel: Allow WorkQueue items allocation failures propagation
In most cases it's safe to abort the requested operation and go forward,
however, in some places it's not clear yet how to handle these failures,
therefore, we use the MUST() wrapper to force a kernel panic for now.
2022-04-20 19:47:18 +02:00
Liav A
02566d8091 Kernel: Move VMWareBackdoor to new directory in the Firmware directory 2022-04-20 19:21:32 +02:00
Liav A
063ea0088e Kernel: Enable PS2 keyboard scan code translation if not already enabled
On the QEMU microvm machine type, it became apparent that the BIOS was
not setting the i8042 controller to function as expected. To ensure that
the controller is always outputting correct scan codes, set it to scan
code 2 and enable first port translation to ensure all scan codes are
translated to scan code set 1. This is the expected behavior when using
SeaBIOS, but on qboot (the BIOS for the QEMU microvm machine type), the
firmware doesn't take care of this so we need to do this ourselves.
2022-04-18 19:36:42 +03:00
Tim Schumacher
cf7a0821b5 Kernel: Increase the default userspace stack size to 4 MiB
This makes the main thread stack size the same as the default stack
size when creating new threads.
2022-04-12 16:48:15 +02:00
Tim Schumacher
a1686db2de Kernel: Skip setting region name if none is given to mmap
This keeps us from accidentally overwriting an already set region name,
for example when we are mapping a file (as, in this case, the file name
is already stored in the region).
2022-04-12 01:52:21 +02:00