Commit graph

505 commits

Author SHA1 Message Date
stelar7 1f33c517df Meta: Do not use gl=on if building in WSL 2021-06-27 15:48:08 +02:00
Sahan Fernando 44174a44bd Meta: Use virtio-vga instead of virtio-gpu if using multiple monitors 2021-06-26 18:45:35 +02:00
Tom 8fe52b8306 Meta: Force relative mouse coordinates with multiple screens
QEMU appears to always relay absolute mouse coordinates relative to the
screen that the mouse is pointed to, without any way for us to know
what screen it was. So, when dealing with multiple displays force using
relative coordinates only.
2021-06-25 23:54:37 +02:00
Tom 3d5340d033 Meta: Add SERENITY_SCREENS environment variable
This allows specifying how many screens we should use. This also then
only enables virtio-gpu if more than one display is requested.

This also adds an environment variable SERENITY_QEMU_DISPLAY_BACKEND
which allows overriding the default qemu display backend, as it may
not be available.
2021-06-25 22:20:55 +02:00
Sahan Fernando b9ad6058aa Kernel: Add VirtIOGPU graphics device 2021-06-25 19:26:30 +02:00
kleines Filmröllchen 988763c0ef Toolchain: Add the AFLACLOADER_DEBUG macro
This enables FLAC debugging output, which is used
with the new FLAC loader introduced in later commits.
2021-06-25 20:48:14 +04:30
Gunnar Beutner f17b4e561f Meta: Increase RAM amount for Bochs
Booting with 128 MB of RAM is kind of tough.
2021-06-25 15:19:09 +02:00
Gunnar Beutner c9747a3236 Kernel: Build the x86_64 kernel as an ELF32 executable
Multiboot only supports ELF32 executables. This changes the build
process to build an ELF32 executable which has a 32-bit entry point,
but consists of mostly 64-bit code.
2021-06-25 15:19:09 +02:00
Gunnar Beutner 1979c7d185 Meta: Run 64-bit kernels with qemu-system-x86_64 2021-06-25 15:19:09 +02:00
Jan de Visser 4198f7e1af LibSQL: Move Lexer and Parser machinery to AST directory
The SQL engine is expected to be a fairly sizeable piece of software.
Therefore we're starting to restructure the codebase for growth.
2021-06-24 00:36:53 +02:00
coderdreams 9ffb3e7e30 LibCore: Add unit test for File::read_line 2021-06-22 18:54:40 +04:30
Ali Mohammad Pur 79d4913f76 LibWasm: Generate all spec tests, even ones that aren't valid modules
`wasm-as` will do some semantic analysis on the modules, which is not
something we're looking for here.
Instead, use `wat2wasm` to generate the exact module.
2021-06-22 00:26:25 +04:30
Ali Mohammad Pur 9c5d38b7db Meta+LibWasm: Add support for module linking tests
This commit makes the linking tests in the wasm spec test run.
2021-06-22 00:26:25 +04:30
Peter Bocan 4d5ffd364a LibCrypto+LibTLS: Split and move test suite into Tests directory
This change splits test-crypto.cpp from Userland into separate test
suites located in Tests/ directory.
2021-06-19 19:05:36 +04:30
Itamar 03ef2a479a LibCoreDump: Include source locations of inlined functions in backtrace 2021-06-19 14:51:18 +02:00
Luke f29036dc98 Lagom/Fuzzers: Add fuzzers for all current hashing functions
Namely MD5, SHA1, SHA256, SHA384 and SHA512.
2021-06-18 21:44:56 +01:00
Sam Atkins 0e680cb17a Meta: Ensure long messages fit in commit tweet
Abbreviating the commit message to 240 characters was not always enough.
As a bonus, we now add an ellipsis to abbreviated messages.
2021-06-18 13:34:17 +01:00
sin-ack e2215cc0e1 Lagom: Add an install target
This is used by libjs-test262-runner to be able to copy the libraries
within its own build directory in order to link with them.
2021-06-17 21:20:24 +01:00
Gunnar Beutner 6e094b8dbe Meta: Increase additional space for disk images
Previously we'd add 100MB on top of what du returned for the Root
directory. This increases that to 500MB.
2021-06-17 11:03:51 +02:00
Gunnar Beutner d7a03397af Meta: Allow building images without most utilities
Previously the build script assumed that certain utilities were always
available.
2021-06-17 11:03:51 +02:00
Gunnar Beutner 0dd03413d6 Meta: Add support for declaring components
Components are a group of build targets that can be built and installed
separately. Whether a component should be built can be configured with
CMake arguments: -DBUILD_<NAME>=ON|OFF, where <NAME> is the name of the
component (in all caps).

Components can be marked as REQUIRED if they're necessary for a
minimally functional base system or they can be marked as RECOMMENDED
if they're not strictly necessary but are useful for most users.

A component can have an optional description which isn't used by the
build system but may be useful for a configuration UI.

Components specify the TARGETS which should be built when the component
is enabled. They can also specify other components which they depend on
(with DEPENDS).

This also adds the BUILD_EVERYTHING CMake variable which lets the user
build all optional components. For now this defaults to ON to make the
transition to the components-based build system easier.

The list of components is exported as an INI file in the build directory
(e.g. Build/i686/components.ini).

Fixes #8048.
2021-06-17 11:03:51 +02:00
Brian Gianforcaro f0fbaa00a4 Meta: Remove gdb pretty printer for AK::InlineLinkedList 2021-06-16 10:40:01 +02:00
Ali Mohammad Pur 1414c7b049 LibJS: Add a basic pass manager and add some basic passes
This commit adds a bunch of passes, the most interesting of which is a
pass that merges blocks together, and a pass that places blocks that
flow into each other next to each other, and a very simply pass that
removes duplicate basic blocks.
Note that this does not remove the jump at the end of each block in that
pass to avoid scope creep in the passes.
2021-06-15 22:06:33 +04:30
networkException 472721b774 Everywhere: Use new discord invite url :^)
Replaces all instances of the previous discord invite link
with a shiny new vanity url.
2021-06-14 22:41:37 +01:00
Apoorv Mishra f32ab73acc
Meta: Fix QEMU version check in run.sh
The QEMU version check in `Meta/run.sh` fails on macOS because the BSD
version of `grep` does not support the `-P` option. Using `sed` instead.
2021-06-13 12:05:48 +01:00
Jesse Buhagiar 06f1edb516 USB: Further Implement USB Structures
These are the actual structures that allow USB to work (i.e the ones
actually defined in the specification). This should provide us enough
of a baseline implementation that we can build on to support
different types of USB device.
2021-06-12 18:17:25 +04:30
x-yl ac712b07f9 Meta: Fuzz the LibIMAP Parser 2021-06-11 23:58:28 +04:30
Gunnar Beutner 87b1da4441 Revert "Meta: Use Intel 82574 instead of Intel 82540 in the run script"
This reverts commit 84b2dc0fb8.
2021-06-11 11:32:19 +02:00
Idan Horowitz a898e01d4d Kernel: Add driver for RTL8168 & RTL8111 NICs
These are pretty common on older LGA1366 & LGA1150 motherboards.

NOTE: Since the registers datasheets for all versions of the chip
besides versions 1 - 3  are still under NDAs i had to collect
several "magical vendor constants" from the *BSD driver and the
linux driver that i was not able to name verbosely, and as such
these are labeled with the comment "vendor magic values".
2021-06-10 21:54:51 +02:00
Liav A 84b2dc0fb8 Meta: Use Intel 82574 instead of Intel 82540 in the run script 2021-06-09 22:44:09 +04:30
Liav A c6480a0426 Kernel/Net: Support Intel 82574 adapter
We call it E1000E, because the layout for these cards is somewhat not
the same like E1000 supported cards.

Also, this card supports advanced features that are not supported on
8254x cards.
2021-06-09 22:44:09 +04:30
Apoorv Mishra 5d57384bc4 Meta: Check installed QEMU version
`ninja install` fails with a clueless error message if the installed
QEMU version is less than 5.0.
2021-06-09 18:53:32 +02:00
Andreas Kling 675b0aee24 Websites: Some updates for the serenityos.org front page
- Add link to the Discord server
- Remove reference to Freenode IRC channel since it's no longer used
- Add sponsorship links for Linus :^)
2021-06-08 10:56:52 +02:00
Andreas Kling 7cbe4daa7c LibJS: Move bytecode debug spam behind JS_BYTECODE_DEBUG :^) 2021-06-07 18:11:59 +02:00
FalseHonesty 403bb07443 LibVideo: Scaffold LibVideo and implement simplistic Matroska parser
This commit initializes the LibVideo library and implements parsing
basic Matroska container files. Currently, it will only parse audio
and video tracks.
2021-06-06 17:47:00 +02:00
Ali Mohammad Pur 51c2c69357 AK+Everywhere: Disallow constructing Functions from incompatible types
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
2021-06-06 00:27:30 +04:30
Ali Mohammad Pur d7ba15371b Meta: Don't make wasm tests pass when they cannot read a module
Instead, just let them be treated as failing their respective test.
2021-06-04 16:07:42 +04:30
NonStandardModel c4c577b2bf Meta: Sort debug macros alphabetically 2021-06-03 18:44:45 +01:00
Ali Mohammad Pur 6b5d1eedcb Meta: Make the wasm test generator cast numbers to i32 when needed
Otherwise the sign would be out of whack
2021-06-02 16:09:16 +04:30
Ali Mohammad Pur 7fb458b7c9 Meta: Generate failing tests for unsupported assertions in wasm tests
Let's not ignore a test just because our test generator doesn't
understand it, assume the worst and generate a failing test case
instead.
2021-06-02 16:09:16 +04:30
Linus Groh 21a62fe836 Meta: Remove duplicated ensure_toolchain from serenity.sh 2021-06-02 00:34:41 +01:00
Jelle Raaijmakers 468bb54677 Meta: Make serenity.sh invoke cmake when build.ninja is missing 2021-06-01 11:33:56 +01:00
Max Wipfli 0d0ed4962f AK: Add a new, spec-compliant URLParser
This adds a new URL parser, which aims to be compliant with the URL
specification (https://url.spec.whatwg.org/). It also contains a
rudimentary data URL parser.
2021-06-01 09:28:05 +02:00
Nick Miller 10ba6f254c Kernel: Rename instances of IO port 0xe9 to BOCHS_DEBUG_PORT 2021-05-31 19:06:13 +01:00
Luke 3bc2527ce7 Lagom/Fuzzers: Add SQL parser fuzzer 2021-05-31 17:07:52 +04:30
Brian Gianforcaro 26cb64573c CMake: Hide KMALLOC_VERIFY_NO_SPINLOCK_HELD so folks don't find it
Since I introduced this functionality there has been a steady stream of
people building with `ALL_THE_DEBUG_MACROS` and trying to boot the
system, and immediately hitting this assert. I have no idea why people
try to build with all the debugging enabled, but I'm tired of seeing the
bug reports about asserts we know are going to happen at this point.

So I'm hiding this value under the new ENABLE_ALL_DEBUG_FACILITIES flag
instead. This is only set by CI, and hopefully no-one will try to build
with this thing (It's documented as not recommended).

Fixes: #7527
2021-05-31 11:30:47 +01:00
Gunnar Beutner 5f18cf75c5 AK: Replace ByteBuffer::grow with resize()/ensure_capacity()
Previously ByteBuffer::grow() behaved like Vector<T>::resize().
However the function name was somewhat ambiguous - and so this patch
updates ByteBuffer to behave more like Vector<T> by replacing grow()
with resize() and adding an ensure_capacity() method.

This also lets the user change the buffer's capacity without affecting
the size which was not previously possible.

Additionally this patch makes the capacity() method public (again).
2021-05-31 14:49:00 +04:30
Andreas Kling 33f2eeea4a pls: Drastically simplify this program
Since this program is setuid-root, it should be as simple as possible.

To that end, remove `/etc/plsusers` and use filesystem permissions to
achieve the same thing. `/bin/pls` is now only executable by `root` or
members of the `wheel` group.

Also remove all the logic that went to great lengths to `unveil()` a
minimal set of filesystem paths that may be used for the command.
The complexity-to-benefit ratio did not seem justified, and I think
we're better off keeping this simple.

Finally, remove pledge promises the moment they are no longer needed.
2021-05-30 23:09:37 +02:00
Edwin Hoksberg e68780e1ad WebServer: Put dbgln's behind WEBSERVER_DEBUG
These dbgln's caused excessive load in the WebServer process,
accounting for ~67% of the processing time when serving a webpage
with a bunch of resources like serenityos.org/happy/2nd/.
2021-05-30 17:41:56 +01:00
Ben Wiederhake 774107f37c Fuzz+LibGfx: When fuzzing GIFLoader, try to load all frames 2021-05-30 14:42:34 +01:00