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
Undefine
b339c4d6ea
LibACPI: Add a missing warnln to dbgln define
...
This was missed in TableStream.cpp.
2026-11-01 15:08:28 +01:00
Undefine
b25994bb29
Tests: Add some tests for new LibACPI features
...
Just as the previous test, the AML table was compiled with using
IASL 20260930 without any flags.
2026-11-01 15:08:28 +01:00
Undefine
5d5f089490
LibACPI: Add an evaluate overload for passing the path as StringView
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
e18c3fbcc5
LibACPI: Add missing predefined namespace objects
...
Now that we have all the primitives we need, let's add the missing
objects.
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
1b1cd99667
LibACPI: Add support for reading ProcessorOp
...
While this opcode is deprecated, it is still widely used and we need to
support it.
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
d597448c4e
LibACPI: Add support for packages
...
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine
96df4d227a
LibACPI: Allow repeating an operand over a count
...
Do this similarly to repeating over a byte count.
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
e55777838d
LibACPI: Add support for reading MutexOp
...
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
901266253a
LibACPI: Add support for buffers
...
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
7150a99e75
LibACPI: Add support for strings
...
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
afbe9b228c
LibACPI: Add support for reading DeviceOp
...
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
70f7715bca
LibACPI: Add support for reading methods
...
For now just create a node, but don't actually do anything with the
body as it's not needed for now.
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
c9e5fa6ada
LibACPI: Support reading OpRegionOp and FieldOp
...
Those two always come in pairs so lets do it in one commit. This
doesn't yet support evaluating fields as it's not yet needed and would
require setting up callbacks from the interpreter.
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine
cc1e5ef63b
LibACPI: Move object formatting to a dedicated formatter
2026-11-01 15:08:28 +01:00
Undefine
3b0289a11c
LibACPI: Make OpcodeFrame start point to right after the opcode
...
This makes some math later easier and less error prone since some
opcodes have two bytes.
2026-11-01 15:08:28 +01:00
Undefine
dbfa58bcbe
LibACPI: Remove the Node constructor
...
It was mistakenly added in the previous PR even though it never has any
other argument than nullptr.
2026-11-01 15:08:28 +01:00
Undefine and RatcheT2497
c4de12f577
LibACPI: Add missing opcodes to named_object_filter
...
The comment noted these should be added, but I accidentally left them
out when refactoring.
Co-authored-by: RatcheT2497 <[email protected] >
2026-11-01 15:08:28 +01:00
Undefine
beb73684de
LibACPI: Fix a crash on filtered opcode at root
...
When an opcode would get filtered at root it would try to get the
opcode value to print the error message, which is absent on the root
frame.
2026-11-01 15:08:28 +01:00
Undefine
e8b902135b
LibACPI: Add a finish_operand variant without an actual operand
...
Sometimes reading an operand doesn't produce an operand, but a node or
something else.
2026-11-01 15:08:28 +01:00
Undefine
e508d85725
LibACPI: Add missing AddressSpace enum values
2026-11-01 15:08:28 +01:00
Undefine
67f36a38ff
LibACPI: Add missing GenericAddressStructure spec links
2026-11-01 15:08:28 +01:00
Undefine
ea03a27ac6
LibACPI: Allow repeating an operand over a byte count
...
Some opcodes encode how many bytes a list of something takes, this
will be needed very soon.
2026-11-01 15:08:28 +01:00
Undefine
b5d4da532a
Tests: Add a simple test for the LibACPI AML Interpreter
...
The test .aml file was built with iASL 20260930, using
`iasl Tests/LibACPI/test-inputs/scope_and_name.dsl`
2026-10-28 18:13:04 +01:00
Undefine and RatcheT2497
bc4f17f9f1
Lagom: Build the acpi utility
...
It's very useful for testing LibACPI without having to boot Serenity
every time.
Co-authored-by: RatcheT2497 <[email protected] >
2026-10-28 18:13:04 +01:00
Undefine and RatcheT2497
d5710bef80
Utilities: Add a simple utility to test out LibACPI
...
This is a simple program meant to load a AML table and dump out the
root namespace afterwards.
Co-authored-by: RatcheT2497 <[email protected] >
2026-10-28 18:13:04 +01:00
Undefine and RatcheT2497
95ab8a7e1a
LibACPI: Add a skeleton of a AML interpreter
...
This a simple skeleton for a non recursive AML parser + interpreter.
For now it support very little stuff, only a couple of opcodes but that
is enough to load a very very simple AML table.
Co-authored-by: RatcheT2497 <[email protected] >
2026-10-28 18:13:04 +01:00
Undefine
fe4f387955
Kernel: Clean up ACPI::Parser::locate_main_system_description_table
2026-10-21 19:03:12 +02:00
Undefine
35eaa1c3ab
Kernel: Avoid a couple of C-style casts in ACPI code
2026-10-21 19:03:12 +02:00
Undefine
ffd990abcb
Kernel+LibACPI: Use enums for some fields instead of raw integers
...
This makes the code cleaner and allows us to avoid using a bunch of
casts.
2026-10-21 19:03:12 +02:00
Undefine
1ea6a6af79
Kernel: Move ACPISysFSComponent to a separate file
2026-10-21 19:03:12 +02:00
Undefine
efa976647d
Kernel: Move ACPISysFSDirectory to a separate file
2026-10-21 19:03:12 +02:00
Undefine
f23528bf56
Kernel: Move ACPI find_rsdp from StaticParsing.cpp to Initialize.cpp
...
That was the last method in that file and Initialize.cpp was it's only
user.
2026-10-21 19:03:12 +02:00
Undefine
a44aa4baee
Kernel: Remove ACPI::StaticParsing find_table code
...
After the previous commit this went unused.
2026-10-21 19:03:12 +02:00
Undefine
b854c700be
Kernel: Use the ACPI::Parser to find the MADT table in interrupt code
...
After the previous commit the full parser is available at this stage.
2026-10-21 19:03:12 +02:00
Undefine
d65ebd86d9
Kernel: Split ACPI init between early and full initilization
...
To get rid of the duplicate table parsing code we need the ACPI parser
during interrupt initilization, but to perform the full ACPI
initilization we setup an IRQ handler which needs interrupts to be
initialized. After this split during early initilization we only read
the information about the tables to make it available and do the rest
after interrupts are initilizated. This also keeps ACPI errors as being
not deadly.
2026-10-21 19:03:12 +02:00
Undefine
8207cfb956
Kernel: Move FADT finding code to Parser
...
There's no reason to find the table ahead of time now that we don't
need the interrupt line immedietely. It was also one of the only users
of the StaticParsing find_table code.
2026-10-21 19:03:12 +02:00
Undefine
3a825ccec0
Kernel: Split out the IRQHandler from ACPI parser and move IRQ lookup
...
Splitting it off allows initializing the later than right after Parser
creation, which allows us to move more resposibility to the Parser
instead of mapping the FADT twice.
2026-10-21 19:03:12 +02:00
Undefine
4ac5026d2c
Kernel: Improve error propagation in ACPI code
...
This should hopefully get rid of a handful of release_value_but_fixme,
while also making it more likely that we boot on systems where ACPI is
doing something weird (cases we cannot handle yet). While this is
unlikely to occur with our currect range of supported ACPI stuff, when
we add AML interpreting it's quite likely that we will encounter a
cursed DSDT at some point that should not crash the entire system
without a meaningful error.
2026-10-21 19:03:12 +02:00
Undefine
22115b4545
Kernel: Remove ACPI Parser::get_table_revision
...
This method was called only once and could be replaced with a clean
member access a little later.
2026-10-21 19:03:12 +02:00
Undefine
14b039b24f
Kernel+LibACPI: Move table validation code to LibACPI
...
It will be used outside of the kernel. While at it clean the function
up a bit to make it a little more readable.
2026-10-21 19:03:12 +02:00
Undefine
473ef7da92
LibACPI: Move all ACPI definitions to a new library
...
Some of those will be required outside of the kernel
2026-10-21 19:03:12 +02:00
Undefine
c45f5c6e2a
Kernel: Disable MSI interrupts when IOAPIC is disabled
...
MSI interrupts require the IOAPIC to be enabled, trying to run with
`enable_ioapic=off` would cause a kernel panic.
2026-10-18 14:02:20 +02:00
Undefine
31174c43bf
Kernel/FATFS: Implement a hacky replace_child
...
This is not a proper implementation, but it's good enough to get
the write support fully working.
2024-04-21 15:34:33 +02:00
Undefine
511b298a1d
Kernel/FATFS: Implement remove_child
2024-04-21 15:34:33 +02:00
Undefine
3b39a2f71b
Kernel/FATFS: Implement add_child
2024-04-21 15:34:33 +02:00
Undefine
5e87b78935
LibFileSystem: Ignore ENOTSUP when using chown and chmod during copy
...
With FAT write support copying the file would show two errors because
it does not support chown and chmod and would return ENOTSUP. After
this commit these errors are ignored in that case.
2024-04-21 15:34:33 +02:00
Undefine
2952401c58
Kernel/FATFS: Implement create_child
...
This is a large commit because it implements a lot of stuff to make
add_child simpler to get working. This allows us to create new files
on a FAT partition.
2024-04-21 15:34:33 +02:00
Undefine and implicitfield
098518cc57
Kernel/FATFS: Implement file modification
...
This is the first part of write support, it allows for full file
modification, but no creating or removing files yet.
Co-Authored-By: implicitfield <[email protected] >
2024-04-21 15:34:33 +02:00
Undefine
fde7bd9190
Kernel/FATFS: Make the debug logs nicer
...
They now look the same way as the ones in Ext2FS inodes which are
quite nice for debugging.
2024-04-21 15:34:33 +02:00
Undefine
33f00a7efb
Kernel/FATFS: Cache the cluster list and don't cache the InodeMetadata
...
Caching the cluster list allows us to fill the two fields in the
InodeMetadata. While at it, don't cache the metadata as when we
have write support having to keep both InodeMetadata and FATEntry
correct is going to get very annoying.
2024-04-21 15:34:33 +02:00
Undefine
d4badfac72
Kernel/FATFS: Store cluster list instead of block list
...
Once we have write support, managing clusters is going to be
way easier than managing blocks.
2024-04-21 15:34:33 +02:00
Undefine
92d58a91a6
Kernel/FATFS: Read the FAT32 FSInfo structure
...
This structure contains information about free clusters which
is going to be useful when allocating clusters.
2024-04-21 15:34:33 +02:00
Undefine
7e251c3b4f
Kernel/FATFS: Return ENOTSUP on chown and chmod
2024-04-21 15:34:33 +02:00
Undefine
eb2721d650
Kernel/FATFS: Pass the FATEntry location to FATInode constructor
...
This is going to be necessary to flush the metadata later on.
2024-04-21 15:34:33 +02:00
Undefine
de574b9ed9
Kernel/FATFS: Improve error propagation in FATInode
2024-04-21 15:34:33 +02:00
Undefine
1350c555f6
Kernel/FATFS: Factor out the FAT reading to a function
...
Move the FAT reading code to a fat_read function in FATFS and move the
required functions to FATFS too.
2024-04-21 15:34:33 +02:00
Undefine
0374351595
Shell: Properly detect the kill executable
2023-05-21 14:59:26 +01:00
Undefine
ab298ca106
Kernel: Dont crash if power states gets set to an invalid value
2023-02-18 23:52:20 +01:00
Undefine
ccc871e608
LibCore: Propagate errors in SecretString
2023-02-08 19:49:48 +01:00
Undefine
e0a904c852
LibWeb: Display DragonFly in the user agent string
...
Previously when build for DragonFly BSD we would error out with
unknown os error. Now we just define OS_STRING as DragonFly.
2022-12-09 12:08:05 +00:00
Undefine
135ca3fa1b
Kernel: Add support for the FAT32 filesystem
...
This commit adds read-only support for the FAT32 filesystem. It also
includes support for long file names.
2022-10-14 18:36:40 -06:00
Undefine
9718667bcf
AK: Add StringView::find_last_not
2022-10-14 18:36:40 -06:00
Undefine
97cc33ca47
Everywhere: Make the codebase more architecture aware
2022-07-27 21:46:42 +00:00