Commit graph

3312 commits

Author SHA1 Message Date
Nico Weber
18c9afe0c2 Meta: Make unzip buildable on lagom
Useful for profiling deflate performance for enwik8.zip.
2024-08-23 14:10:37 -04:00
Sönke Holz
77a44df92b Meta: Download and use the Raspberry Pi 3 devicetree for running in qemu 2024-08-20 21:52:12 -04:00
Sönke Holz
c990c85d52 Meta: Use the correct build directory environment variable in run.py 2024-08-20 21:52:12 -04:00
Sönke Holz
1ffb7afba7 Kernel/aarch64: Make the kernel bootable from any physical load address
Instead calculate the load offset at runtime.

The mapping of the initial stack is now done explicitly. It was
previously included in the 2 MiB-aligned kernel range.

We need to use kernel8.img now, as we no longer hard-code the physical
addresses of all sections in the linker script. QEMU would otherwise
try to load us at KERNEL_MAPPING_BASE.
2024-08-20 21:52:12 -04:00
Nico Weber
5b15951518 Meta: Port recent changes to the GN build
59aaef08d9 LibMedia: Rename LibVideo to LibMedia
aa2f5df0a9 AK: Add a helper to detect which CPU features are supported
0bbf42bca7 LibJS: Introduce the CanonicalizeKeyedCollectionKey AO
e06d74c314 LibWeb: Give DOM Elements a CountersSet
07fe3e57c6 LibWeb: Implement CounterStyleValue
1bc896fa60 LibWeb: Implement counter-[increment,reset,set] properties
78a22f5098 LibWeb: Replace templated retarget function with a regul...
e4fa0e7f63 LibWeb: Implement fetch record from the fetch spec
a8c4f34bff LibWeb: Create separate DedicatedWorkerGlobalScope class

Also add Services to include_dirs for LibWeb. This is necessary
due to the <WebWorker/DedicatedWorkerHost.h> include added in #24870.
2024-08-20 21:45:17 -04:00
doctor-rd
2a8032bc68 Meta: Remove /mod
This directory was introduced with
commit a43b115a6c
and is no longer needed.
2024-08-10 10:13:52 -04:00
Sönke Holz
c247aac15e Meta: Add ahci option to SERENITY_BOOT_DRIVE 2024-08-07 18:30:06 -04:00
Sönke Holz
bb9aa6c7c6 Meta: Allow choosing between UHCI and xHCI HCs for USB storage in run.py 2024-08-07 18:30:06 -04:00
Sönke Holz
c7903e30f4 Meta: Combine boot drive environment variables into SERENITY_BOOT_DRIVE
This allows you to simply use e.g. SERENITY_BOOT_DRIVE=usb instead of
setting SERENITY_NVME_ENABLE=0 and SERENITY_USE_USBDRIVE=1.
2024-08-07 18:30:06 -04:00
Sönke Holz
f2d3202e1d Meta: Remove unnecessary sdhci-pci devices from run.py
This allows us to have a more stable device address "root=sd0:0:0" for
SERENITY_USE_SDCARD.
2024-08-07 18:30:06 -04:00
Sönke Holz
de3e864a80 Meta: Remove microvm machine type from run.py
Running in the microvm doesn't work anymore, since we removed IDE
support. Currently, we only support PCI(e)-attached storage devices,
which are not compatible with the microvm, as it doesn't support PCI(e)
at all.
2024-08-07 18:30:06 -04:00
Sönke Holz
4c307e9073 Meta: Remove bochsrc
Running in bochs was broken at least since the removal of IDE support.
2024-08-07 18:30:06 -04:00
Logkos
ad73adef5d Kernel/Net: Rename IPv4-specific files and structs 2024-07-29 09:49:56 -04:00
Jamie Mansfield
f82e976df4 LibWeb: Implement DOMStringList
(cherry picked from commit 75216182c9a04741b2f773eb2f26ceb7a96bfbba)
(cherry picked from commit 2a55ab13ef9c735a16674006a518c0e5acf7c88f)

Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2024-07-29 09:14:06 -04:00
bbb651
6c93feee99 WebAudio: Stub AudioDestinationContext
And expose it through `BaseAudioContext::destination`

(cherry picked from commit 779e3072f93369cf3adef0379bf27ea55475b38b)
2024-07-29 06:30:08 -04:00
Jamie Mansfield
9bbf50b755 LibWeb: Stub BroadcastChannel interface
This is enough to get the 1Password login page to load :^)

(cherry picked from commit d4a7cfb68fddbcfaaaddbd7f159c502c869281bf)
2024-07-28 16:44:35 -04:00
Shannon Booth
daa4dc63f5 Bindings: Remove exception handling for named_item_value
(cherry picked from commit 9b59dc5e8b88d311089e57fe134a1377a39242cb)
2024-07-28 14:12:04 -04:00
Sam Atkins
07fe3e57c6 LibWeb: Implement CounterStyleValue
This is `counter(name, style?)` or `counters(name, link, style?)`. The
difference being, `counter()` matches only the nearest level (eg, "1"),
and `counters()` combines all the levels in the tree (eg, "3.4.1").

(cherry picked from commit 576a4314084e5c3b839006da00dddb16e58b3503)
2024-07-28 13:31:02 -04:00
Andreas Kling
1901e96786 LibWeb: Stop trying to guess include paths in IDL codegen
It turns out we were already generating all the necessary include
statements, and we can simply remove all this goofy code soup that
uses the C preprocessor to speculatively look for include files.

(cherry picked from commit 2daaa22a15c69b89120a64d1144f99ca13ac689c)
2024-07-28 07:31:08 -04:00
Logkos
a1fdac2fc0 Base: Add 4 emojis 2024-07-27 13:29:43 -04:00
Idan Horowitz
3dec9aa54e Kernel: Add a minimal xHCI driver implementation
This adds a minimal (that is, just enough to make USB mouse/keyboard
work) implementation of an xHCI driver, to let us use serenity on
modern baremetal machines.
2024-07-26 14:25:49 -04:00
Idan Horowitz
79607f7e0b Meta: Unbreak kernel debugging script after Prekernel/Kernel merge
The script was updated to assume the merged Kernel/Prekernel, but it is
only used on x86-64.
2024-07-26 14:25:49 -04:00
Idan Horowitz
47e3c6204a Meta: Remove default -d int flag from serenity.sh gdb command
There's no reason for this to be the default. On RISC-V this logs on
every exception (e.g. syscall) as well, so it slows everything down to
a halt.
2024-07-26 14:25:49 -04:00
logkos
568bd04b61 Base: Add more emojis 2024-07-25 08:27:35 -04:00
Xexxa
d371e68995 Base: Add more emoji
🧙 - U+1F9D9 MAGE
🧙‍♂️ - U+1F9D9 U+200D U+2642 MAN MAGE
🧙‍♀️ - U+1F9D9 U+200D U+2640 WOMAN MAGE
🦟 - U+1F99F MOSQUITO
🏣 - U+1F3E3 JAPANESE POST OFFICE
🏬 - U+1F3EC DEPARTMENT STORE
🚊 - U+1F68A TRAM
🎎 - U+1F38E JAPANESE DOLLS
2024-07-24 08:08:33 -04:00
bbb651
a6ba31af93 WebAudio: Stub BiquadFilterNode
(cherry picked from commit 64663d53fa466dcb9b62becc352c92e3d932353b)
2024-07-23 13:06:46 -04:00
bbb651
db21801fbc WebAudio: Stub AudioBufferSourceNode
(cherry picked from commit 6672fb4b47ee0da35678f55088b4afdfce5fd10b)
2024-07-23 13:06:46 -04:00
Andrew Kaster
a8c4f34bff LibWeb: Create separate DedicatedWorkerGlobalScope class
This is how it's supposed to have been from the beginning, we were just
lazy :).

(cherry picked from commit 40a2bb32c3ab3fb0a5e298a31f674a5eb80b4870)
2024-07-22 21:29:21 -04:00
Andrew Kaster
f2e3d117a2 LibWeb: Initialize HTML::EventLoop with its type
(cherry picked from commit 5d8784318d8240413e555bf2e55bc00d95ea0749)
2024-07-22 21:29:21 -04:00
Jamie Mansfield
3719a8f76a LibWeb: Prevent infinite loop in create_an_inheritance_stack
This would continually loop on the same interface.

Co-authored-by: Matthew Olsson <matthewcolsson@gmail.com>
(cherry picked from commit e8fe7c0ee3a2cdfe55d0240e06fae288f5be5063)
2024-07-21 14:19:52 -04:00
Diego Frias
e4d3b9060a LibWeb: Implement the :has() pseudo-class
See https://drafts.csswg.org/selectors-4/#relational.

(cherry picked from commit f63a945ba0300551417c740e450957f29c9b73d1)
2024-07-21 11:10:11 -04:00
Liav A.
c4db586b53 Meta: Remove the x86 ISA-PC machine type as a target
Since we removed ATA IDE support, and now the VGA text mode console,
there's no point of keeping this machine being pickable to use anymore.
2024-07-21 12:21:02 +02:00
Liav A.
3699c2e8ac Kernel/GPU: Remove legacy VGA text mode support
Plain old VGA text mode functionality was introduced in 1987, and is
obviously still used on some (even modern) x86 machines.

However, it's very limited in what it gives to us, because by using a
80x25 text mode console, it's guaranteed that no desktop functionality
is available during such OS runtime session.

It's also quite complicated to handle access arbitration on the VGA ISA
ports which means that only one VGA card can work in VGA mode, which
makes it very cumbersome to manage multiple cards at once.

Since we never relied on the VGA text mode console for anything serious,
as booting on a QEMU machine always gives a proper framebuffer to work
with, VGA text mode console was used in bare metal sessions due to lack
of drivers.
However, since we "force" multiboot-compatible bootloaders to provide us
a framebuffer, it's basically a non-issue to have a functional console
on bare metal machines even if we don't have the required drivers.
2024-07-21 12:21:02 +02:00
Liav A.
fdcfa23e01 Userland+Base: Introduce userspace implementation for running containers
Together with a first JSON file for bringing up a fully functional
BuggieBox container, we allow users to take advantage of the kernel
unsharing features that were introduced in earlier commits.
2024-07-21 11:44:23 +02:00
Liav A.
dd59fe35c7 Kernel+Userland: Reduce jails to be a simple boolean flag
The whole concept of Jails was far more complicated than I actually want
it to be, so let's reduce the complexity of how it works from now on.
Please note that we always leaked the attach count of a Jail object in
the fork syscall if it failed midway.
Instead, we should have attach to the jail just before registering the
new Process, so we don't need to worry about unsuccessful Process
creation.

The reduction of complexity in regard to jails means that instead of
relying on jails to provide PID isolation, we could simplify the whole
idea of them to be a simple SetOnce, and let the ProcessList (now called
ScopedProcessList) to be responsible for this type of isolation.

Therefore, we apply the following changes to do so:
- We make the Jail concept no longer a class of its own. Instead, we
  simplify the idea of being jailed to a simple ProtectedValues boolean
  flag. This means that we no longer check of matching jail pointers
  anywhere in the Kernel code.
  To set a process as jailed, a new prctl option was added to set a
  Kernel SetOnce boolean flag (so it cannot change ever again).
- We provide Process & Thread methods to iterate over process lists.
  A process can either iterate on the global process list, or if it's
  attached to a scoped process list, then only over that list.
  This essentially replaces the need of checking the Jail pointer of a
  process when iterating over process lists.
2024-07-21 11:44:23 +02:00
Diego
1b93c75c86 LibWasm: Ignore tests that check that we don't support 2+ memories
Since we support the multi-memory proposal, we should skip tests that
validate that we have only one memory. Once multi-memory gets included
in the main WebAssembly specification (and the testsuite is updated), we
can revert this commit.

(cherry picked from commit 98ac8d98510e61665cf8a6b96f5cd4874a561cd7)
2024-07-16 17:35:43 +02:00
Diego
6867abcf35 LibWasm: Properly check for indeterminate NaNs in SIMD tests
Because `nan:arithmetic` and `nan:canonical` aren't bound to a single
bit pattern, we cannot check against a float-containing SIMD vector
against a single value in the tests. Now, we represent `v128`s as
`TypedArray`s in `testjs` (as opposed to using `BigInt`s), allowing us
to properly check `NaN` bit patterns.

(cherry picked from commit d84a3f91272a4a047332bd6cc4ecbbb239f5995a)
2024-07-16 17:35:43 +02:00
Diego
bf0e336d2f LibWasm: Check for correct NaN bit patterns in tests
Some spec-tests check the bit pattern of a returned `NaN` (i.e.
`nan:canonical`, `nan:arithmetic`, or something like `nan:0x200000`).
Previously, we just accepted any `NaN`.

(cherry picked from commit ae7a46a862b1af8b5bf4a89326bc03b835b26086)
2024-07-16 17:35:43 +02:00
Diego
cbf9f9d29d LibWasm: Fix spec-test gen for inline commands and special characters
`linking.wast` has an unusual pattern for invoke commands, which is now
accounted-for. Also, special unicode characters are now properly
serialized in JavaScript as string literals (this is only relevant for
`names.wast`).

(cherry picked from commit 5b9a026bde930a5543b5de454cca0ead47c7bd6d)
2024-07-16 17:35:43 +02:00
Ali Mohammad Pur
46f44ea18c Meta: Update Wasm LibJS build for "recent" emscripten changes
- `_free` is no longer exported by default, export it manually
- `allocateUTF8` is deprecated, and replaced with `stringToNewUTF8`
2024-07-15 20:27:00 -04:00
Caitlin Potter
8de61581cf LibWeb: Implement WebIDL constructor flow for derived classes
Following the rules in the algorithm from
https://webidl.spec.whatwg.org/#js-platform-objects, "To Internally
create a new object implementing the interface interface", this change
incorporates the steps to load a prototype from new.target, and write
it to the created instance returned from constructor_impl(). This
mirrors the code for generate_html_constructor(), which incorporates
additional steps needed by Custom Elements.

Bug LadybirdBrowser/ladybird#334

(cherry picked from commit 80cd3712c2c52bf749a19cbd21af0c5c479a87c9)
2024-07-14 16:46:03 -04:00
Jamie Mansfield
6e9f9b5efc LibWeb: Implement EmbedderPolicy struct
(cherry picked from commit 190a41971569ad90c26662d7e7e850a61c55c8dd)
2024-07-14 16:45:35 -04:00
Jamie Mansfield
a09b52e40f LibWeb/HTML: Implement TextTrackList IDL interface
(cherry picked from commit ecad28657a0941c99870bdb72f3a6f09b6db6ee3)
2024-07-14 14:01:30 -04:00
Jamie Mansfield
0a1146c67a LibWeb/HTML: Stub TextTrack IDL interface
(cherry picked from commit 67e3ac8916d7354c8485b4bbe9c4162392e0e99c)
2024-07-14 06:57:14 -04:00
Maciej
1e41585416 LibWeb: Implement HTML DragEvent class
This just defines the class, drag events aren't actually fired yet.

(cherry picked from commit 65d8d205ee5d7ef356da58f8238e610949773683)
2024-07-13 22:52:06 -04:00
Dan Klishch
56b7f9e404 Meta: Globally disable -Wpsabi
This warning is triggered when one accepts or returns vectors from a
function (that is not marked with [[gnu::target(...)]]) which would have
been otherwise passed in register if the current translation unit had
been compiled with more permissive flags wrt instruction selection (i.
e. if one adds -mavx2 to cmdline). This will never be a problem for us
since we (a) never use different instruction selection options across
ABI boundaries; (b) most of the affected functions are actually
TU-local.

Moreover, even if we somehow properly annotated all of the SIMD helpers,
calling them across ABI (or target) boundaries would still be very
dangerous because of inconsistent and bogus handling of
[[gnu::target(...)]] across compilers. See
https://github.com/llvm/llvm-project/issues/64706 and
https://www.reddit.com/r/cpp/comments/17qowl2/comment/k8j2odi .
2024-07-12 18:30:07 -04:00
Diego
085b575d19 LibWasm: Fix lossy NaN bit pattern conversions in spec-test gen
(cherry picked from commit c103001f167d39fd68c4f04649332f76b7dd0b2e)
2024-07-10 01:10:12 +02:00
Diego
d6524b3e3f LibWasm: Preserve sign bit across JS boundary in test-wasm
A `Uint8Array` can now be passed in the Wasm testjs files to be
transmuted into a Wasm value.

(cherry picked from commit 6493acf2f46f6e4522a0f1f01e12d0e48347562e)
2024-07-10 01:10:12 +02:00
Daniel Bertalan
72a1c69a84 CI: Remove esvu LibJS REPL jobs
As of https://github.com/devsnek/esvu/pull/57, `esvu` now pulls the
LibJS binaries from the Ladybird repo, so these artifacts being created
has no purpose. As far as I can tell, nothing else uses them.

Maybe if the two LibJS versions start going their separate ways enough
to warrant both being available, we could consider re-adding this job.
But no point in using up CI resources for that right now.
2024-07-07 09:40:18 -06:00
Liav A.
ef243d42fc Kernel: Remove the ConsoleManagement singleton
We don't really need it, and the entire functionality can be organically
intergrated into the VirtualConsole class, to switch between the Virtual
consoles, and manage initialization of all consoles in the global array.
2024-07-04 22:20:35 +02:00