68059 Commits
Author SHA1 Message Date
Undefine 05ec8eddae Kernel: Implement ACPI shutdown 2026-11-07 13:27:30 +01:00
Undefine b2c515561a Kernel: Actually parse the DSDT 2026-11-07 13:27:30 +01:00
Undefine 53b4ea3d31 Kernel: Add make_generic_address_from_io_port
This will be needed to deduplicate ACPI shutdown code for accessing both
the new generic address field and the legacy x86 port field.
2026-11-07 13:27:30 +01:00
Undefine f85dbe582f Kernel: Add read_generic_address
This will be needed to properly implement ACPI shutdown. It's also
missing PCI configuration space support unlike write_generic_address,
because it would require messing with the PCI subsystem and it's not
necessary for now.
2026-11-07 13:27:30 +01:00
Undefine 373a238d63 Kernel: Clean up access_generic_address into write_generic_address
Rename the function as it will also get a read counterpart. While at it
clean it up to make it more correct and more readable.
2026-11-07 13:27:30 +01:00
Undefine d215f42829 Kernel: Move ACPI access_generic_address to a seperate file
This is not Parser specific code and it makes the file cleaner.
2026-11-07 13:27:30 +01:00
Undefine 991222fcdb LibACPI: Add structures for PM1ControlRegister and SleepControlRegister 2026-11-07 13:27:30 +01:00
Undefine 41ffa1d87b LibACPI: Add GenericAddressStructure::is_null 2026-11-07 13:27:30 +01:00
Undefine fb809ea9ff Kernel: Remove Parser::can_shutdown
This was never called.
2026-11-07 13:27:30 +01:00
Undefine efe9f8d527 Kernel: Remove enable_aml_parsing
This never did anything.
2026-11-07 13:27:30 +01:00
Undefine 4808dbe934 Kernel: Print a message about an ACPI reboot only when ACPI is enabled
When ACPI is disabled we don't try an ACPI reboot so let's not print
a message pretending we do.
2026-11-07 13:27:30 +01:00
Undefine 5ebe978d8f LibACPI: Make all objects containing a buffer explicitly noncopyable 2026-11-07 13:27:30 +01:00
Undefine d191b2f5d0 Tests: Use release_as in TestAML
This avoids copies.
2026-11-07 13:27:30 +01:00
Undefine 2e0c8483fc LibACPI: Explicitly clone a value when evaluating a NameNode 2026-11-07 13:27:30 +01:00
Undefine 452662dd52 LibACPI: Avoid a bunch of copies in the interpreter 2026-11-07 13:27:30 +01:00
Undefine 1895e5e413 LibACPI: Finalize an operand by moving the object into the frame
This avoids a copy.
2026-11-07 13:27:30 +01:00
Undefine 7d59d6911d LibACPI: Add a non-const way to get the operand from an OpcodeFrame
This will be needed to move objects out of the OpcodeFrame.
2026-11-07 13:27:30 +01:00
Undefine 4285c1b888 LibACPI: Avoid copies when formatting an Object 2026-11-07 13:27:30 +01:00
Undefine e5bb8b4afe LibACPI: Allow initializing an Object by moving a value 2026-11-07 13:27:30 +01:00
Undefine ee1cf23dec LibACPI: Add a failable way to clone an Object
This will be needed in the kernel.
2026-11-07 13:27:30 +01:00
Undefine 3db136af6e LibACPI: Make String, Buffer and Package getters const
Those objects should stay immutable and these getters need to be
accessible from const references.
2026-11-07 13:27:30 +01:00
Undefine a5e466bc2c LibACPI: Add Object::as_pointer and Object::release_as
Those will be needed to avoid some copies that are not allowed in the
kernel.
2026-11-07 13:27:30 +01:00
Undefine b408275768 LibACPI: Ensure reading QWordData compiles correctly
Later when finish_operand starts taking Object&& the compiler gets
confused and required this to be cast to u64 explicitly.
2026-11-07 13:27:30 +01:00
Undefine 7d522782c2 AK: Hide non fallible ByteBuffer and StringBuilder APIs in the kernel
This follows what we already do in structure like the Vector.
2026-11-06 20:34:06 +01:00
Undefine 9ae1edc095 AK: Improve error propagation in Stream code 2026-11-06 20:34:06 +01:00
Undefine 4160b111f3 AK: Explicitly ensure capacity in Hex and UUID code when in kernel
The implicit ensure capacity will be unavailable in kernel.
2026-11-06 20:34:06 +01:00
Undefine 8c2cef2490 AK: Make StringBuilder::trim use trim and not resize
The ByteBuffer trim function is not fallible but resize is, use trim to
keep this function from returning errors.
2026-11-06 20:34:06 +01:00
Undefine 6c5c413108 AK: Use more of the fallible StringBuilder APIs in formatting code
Unfortunately in some places MUST is used because the whole code really
doesn't handle errors at all and uses MUST all over the place.
2026-11-06 20:34:06 +01:00
Undefine 1a43db2d50 Kernel: Remove two remaining uses of fallible APIs 2026-11-06 20:34:06 +01:00
Undefine d89d71596d Kernel: Improve error propagation in ProcessExposed 2026-11-06 20:34:06 +01:00
Undefine 8ab8e7db0f Kernel: Improve error propagation in CommandLine code 2026-11-06 20:34:06 +01:00
Undefine 74ea69459c LibVT: Don't use fallable StringBuilder APIs in code used by the kernel
While this is quite ugly for now, realistically it points out a real
issue and this change is needed so the kernel compiles after a later
change.
2026-11-06 20:34:06 +01:00
Undefine 3e01ecd498 LibEDID: Clone a ByteBuffer using clone
The copy operator will be unavailable in the kernel, so use the clone
function explicitly.
2026-11-06 20:34:06 +01:00
Undefine 147b06ad2f AK: Add ByteBuffer::clone
This adds a function to clone a ByteBuffer with a way to propagate
errors if they occur.
2026-11-06 20:34:06 +01:00
Undefine adede105a1 LibDeviceTree: Switch two calls to try_appendff
The rest of the calls used the fallible APIs already, but those were
missed.
2026-11-06 20:34:06 +01:00
Undefine 6c0c3c2f17 Kernel: Use try_append in FATFS SFNUtilities 2026-11-06 20:34:06 +01:00
Undefine d1cb637ec3 Kernel: Propagate errors better in x86_64 ProcessorInfo
This used some of the non fallible APIs which will be removed from the
kernel.
2026-11-06 20:34:06 +01:00
Sönke Holz d2d78ed715 LibC: Add Kernel/API/POSIX/winsize.h to HEADERS
I forgot to do this in be0e1aaf8f.

This makes us actually install that header into the sysroot, unbreaking
ports like openssl, which previously failed to build with:
"fatal error: Kernel/API/POSIX/winsize.h: No such file or directory"
2026-11-05 14:53:49 +01:00
Lucas Chollet 3e6b6a88c5 LibSSH+SSHServer: Provide a properly set environment to children
Before this patch, exec commands were inheriting the environment of the
SSHServer instance while interactive shell spawned with an almost empty
env. Now, both paths start with the same basic environment and also
include modifications requested by the ssh client.

This should improve compatibility in a lot of situations but most
visibly it makes syntax highlighting and autocompletion work in
interactive shells.

The list of default environment variables is heavily inspired by what
OpenSSH is doing. Compared to what it produces on my system, we only
lack XDG_*, SSH_* and DBUS_SESSION_BUS_ADDRESS variables. As noted in
the FIXME the value of PATH also differs.
2026-11-05 09:17:57 +01:00
Lucas Chollet fe92281611 LibCore: Support passing environment variables to Process::spawn 2026-11-05 09:17:57 +01:00
Lucas Chollet 7cba67db00 LibCore: Turn ArgvList into a more general C-string array
This will be soon be used for the environment too. And put it in an
anonymous namespace while at it.
2026-11-05 09:17:57 +01:00
Lucas Chollet e984357e1f LibCore: Move the explicit cast to ArgvList::get
This makes the call site easier to read.
2026-11-05 09:17:57 +01:00
Linus Groh e5966bd819 Ports: Build kiesel with Zig 0.17.1
Combined revert of c08851738 and the version bump.
2026-11-04 10:07:57 +01:00
Linus Groh b30c321e75 Ports: Update Zig to 0.17.1
The dropped patches were upstreamed[1][2].

Also remove the manual fetch and update of the vendored Zig in
zig-bootstrap, upstream does this as part of the release process[3].

[1]: https://codeberg.org/ziglang/zig/commit/245d477879b3b1646ef42c53317e94464325ccaa
[2]: https://codeberg.org/ziglang/zig/commit/ffafcac41573a73f613d9cd2f241d7217a9cca16
[3]: https://codeberg.org/ziglang/zig-bootstrap/commit/b31ecaa6627d4b9e5509f84117a65978909a2700
2026-11-04 10:07:57 +01:00
Sönke Holz be0e1aaf8f Kernel: Make both Ioctl.h and POSIX/termios.h define struct winsize
FreeBSD also makes it available from both sys/ioctl.h and termios.h.
glibc doesn't have the POSIX 2024 tc{set,get}winsize() wrappers yet,
so it doesn't even define it in termios.h at the moment.

LLVM relies on sys/ioctl.h defining struct winsize, so the llvm port and
the zig port failed to build after 312b4440bf.
2026-11-04 10:04:39 +01:00
Lucas Chollet 31d7c87c68 LibSSH/SFTP: Allow relative paths in the OPEN command
Now that SSHServer sets us in the user's home directory, there is no
need to block them as they will resolve correctly according to the spec:
"File names starting with a slash are "absolute", and are relative to
 the root of the file system.  Names starting with any other character
 are relative to the user's default directory (home directory)."

Also note that we were only refusing relative paths in the OPEN command,
but STAT was already accepting them (and resolving them incorrectly).
2026-11-04 09:47:43 +01:00
Lucas Chollet cf26f5faa4 SSHServer: Set the current directory to the user's home on login
We were already changing the home directory for interactive shells, but
with this change single commands also get executed from the user's home
and SFTP relative paths will also resolve from the correct directory.
(Relative paths are still not allowed in the SFTP layer, but everything
will fall in place once we remove that restriction.)
2026-11-04 09:47:43 +01:00
Lucas Chollet 280b0b2bd5 SSHServer: Send the actual exit status of commands
We now report the actual value instead of simply returning 0/-1. We're
now using the conventional representation for signal-terminated
processes and return an exit-status of 128 + signal number.
2026-11-04 09:47:43 +01:00
Lucas Chollet 207c2f6c5f SSHServer: Use the user's default shell instead of hardcoding it 2026-11-04 09:47:43 +01:00
Sönke Holz 312b4440bf Kernel: Move struct winsize definition to API/POSIX/termios.h
POSIX requires it to be defined in this header:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html
"The <termios.h> header shall define the winsize structure, [...]"

This unbreaks the readline port after 8e34c970b5, which made it
use tc{get,set}winsize() instead of the ioctl.
Previously, it failed to compile with a -Wincompatible-pointer-types
warning:

"expected 'struct winsize *' but argument is of type 'struct winsize *'"

ioctl() takes the argument as a vararg, so it didn't trigger this
warning.
2026-11-03 13:18:30 -05:00