Commit graph

17683 commits

Author SHA1 Message Date
Tom
8a8bdb2cd7 AK: Add decrement operator to Checked 2021-03-13 10:17:28 +01:00
Itamar
8688259ed9 LanguageServers/Cpp: Support jumping to declaration of preprocessor
.. definitions.
2021-03-13 10:17:02 +01:00
Itamar
7bf6eca9d8 LanguageServers/Cpp: Complete Preprocessor definitions
Preprocessor definitions now appear in the AutoComplete suggestions box
as well as in the Locator.
2021-03-13 10:17:02 +01:00
Itamar
5b22f6f45a LibCpp: Parser no longer holds the program's source
After we moved to storing the text of each token in the token itself,
we no longer have to store the source of the program in the Parser.

This makes more sense because the parser should deal with tokens, not
with raw source code.
2021-03-13 10:17:02 +01:00
Itamar
8a102fe3ec LibCpp: Implement Parser::text_in_range using text of tokens
It was previously implemented by directly iterating over the program's
source.
2021-03-13 10:17:02 +01:00
Itamar
97f2cd596b LibCpp: Remove node_span_size, add index_of_node_at 2021-03-13 10:17:02 +01:00
Itamar
26d9485562 LibCpp: Store the text of a token as a StringView member 2021-03-13 10:17:02 +01:00
Itamar
5cd1c69b96 LibCpp: Access Cpp::Token members via getter functions 2021-03-13 10:17:02 +01:00
Itamar
d0b4f9cc0e LibCpp: Move Cpp::Token to a separate file 2021-03-13 10:17:02 +01:00
Itamar
3658c4c567 LibCpp: Replace defined preprocessor values when parsing 2021-03-13 10:17:02 +01:00
Brendan Coles
f21af0922a QuickShow: Add help documentation 2021-03-13 10:00:59 +01:00
Hendiadyoin1
7f60090c43 Kernel: Add Test for munmap of multiple regions
Tests: Improve munmap-test

We now Unmap page aligned and check if the regions were really unmappped etc.

Tests: Cleanup Munmap-test

added a cleanup and removed a useless cast
2021-03-13 10:00:46 +01:00
Hendiadyoin1
eba3fa5e72 Kernel: Make munmap more posix compliant
In case someone tries to unmap a not mapped region (fallback) we should
not return an error, but silently do nothing
2021-03-13 10:00:46 +01:00
Hendiadyoin1
b7f1171a1c Kernel: munmap multiple regions at a time
This implements a fallback to munmap that unmaps multiple regions at a
time, with splitting some when needed.

The way it is implemented is possibly not optimal, due to it searching
without looking into the cache
2021-03-13 10:00:46 +01:00
Hendiadyoin1
61f0aa6e75 Kernel: Implement helper to find multiple Regions in a Range 2021-03-13 10:00:46 +01:00
Hendiadyoin1
7874b89426 Kernel: Add a Range::intersect(other) helper 2021-03-13 10:00:46 +01:00
Brendan Coles
7b22fb70a2 Terminal: Add support for fullscreen view 2021-03-13 09:55:11 +01:00
Liav A
793d315994 Kernel: Don't reset AHCI ports during boot unless requested
Instead of blindly resetting every AHCI port, let's just reset only the
controller by default. The user can still request to reset everything
with a new kernel boot argument called ahci_reset_mode which is set
by default to "controller", so the code will only invoke an HBA reset.

This kernel boot argument can be set to 3 different values:
1. "controller" - reset the HBA and skip resetting AHCI ports
2. "none" - don't reset anything, so we rely on the firmware to
initialize the AHCI HBA and ports for us.
3. "complete" - reset the AHCI HBA and ports.
2021-03-13 09:52:31 +01:00
Liav A
a93dc8c8c9 Kernel: Don't wait for AHCI port to reset the signature
Instead of waiting for the AHCI HBA to reset the signature after SATA
reset sequence, let's just check if the Port x Serial ATA Status
register was set to value 3, indicating that device was detected
and phy communication was established.
2021-03-13 09:52:31 +01:00
Liav A
2929dc6bd7 Kernel: Change the timings when initiating AHCI port reset
The intention is to make the boot to be faster, therefore we should
decrease the time deltas in timeout loops to allow earlier break
from these.

Also, there's no need to wait 10 milliseconds before setting
the interface state to "no action request" during the reset sequence.
2021-03-13 09:52:31 +01:00
Jean-Baptiste Boric
800dca3834 Kernel: Implement triply indirect block support in Ext2FSInode 2021-03-13 09:27:18 +01:00
Jean-Baptiste Boric
facd18113b Kernel: Modify block lists in place for Ext2FSInode::resize()
This significantly reduces the number of allocations/deallocations
inside the kernel when growing files as well as reducing spam in the
kernel logs.
2021-03-13 09:27:18 +01:00
Jean-Baptiste Boric
56ecb55d9f Userland: Create stress-truncate test program 2021-03-13 09:27:18 +01:00
Linus Groh
89602c6fc0 Meta: Support 'serenity.sh gdb lagom' 2021-03-12 21:27:09 +01:00
Linus Groh
eb5b2b4b4f Lagom: Add 'test' command to serenity.sh 2021-03-12 21:27:09 +01:00
Linus Groh
04fc4a8134 Meta: Make 'serenity.sh run lagom' run Lagom executables
Running the tests will be moved to a separate test command which can
then leverage the availability of different targets and run either unit
tests on the host or the image in QEMU in self-test mode. :^)
2021-03-12 21:27:09 +01:00
Linus Groh
1c85ce0324 Meta: Don't depend on toolchain for lagom target in serenity.sh
- Only call ensure_toolchain for non-lagom targets
- Use host addr2line, we can't expect the i686 toolchain's addr2line to
  support the host's binary executable format
- Don't export SERENITY_ARCH and TOOLCHAIN_DIR, don't need them anymore
2021-03-12 21:27:09 +01:00
Linus Groh
cab2982feb Meta: Add lagom_unsupported helper function to serenity.sh 2021-03-12 21:27:09 +01:00
Linus Groh
2d8362cceb LibJS: Implement 'Relative Indexing Method' proposal (.at())
Still stage 3, but already implemented in major engines and unlikely to
change - there isn't much to change here anyway. :^)

See:

- https://github.com/tc39/proposal-relative-indexing-method
- https://tc39.es/proposal-relative-indexing-method/
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at
2021-03-12 19:01:08 +01:00
Andreas Kling
9769542bc2 FuzzilliJs: Add missing <errno.h> include 2021-03-12 17:43:48 +01:00
Andreas Kling
f086d6db65 Kernel: Run clang-format on PIC.cpp 2021-03-12 17:38:49 +01:00
Andreas Kling
d3f112f9a2 AK+LibCore: Remove empty files 2021-03-12 17:38:17 +01:00
Andreas Kling
ef1e5db1d0 Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)
Good-bye LogStream. Long live AK::Format!
2021-03-12 17:29:37 +01:00
Andreas Kling
423ed53396 Kernel: Fix rounding of PT_LOAD mappings in sys$execve()
We were not rounding the mappings down/up correctly, which could lead
to executables missing the last 4 KB of text and/or data.
2021-03-12 17:26:24 +01:00
Andreas Kling
4c7f486f39 Kernel: Convert klog() => AK::Format in UHCIController 2021-03-12 15:22:35 +01:00
Andreas Kling
f432f104fc Kernel: Convert klog() => AK::Format in SB16 2021-03-12 15:22:35 +01:00
Andreas Kling
18e1d246b7 Kernel: Convert klog() => AK::Format in TestModule 2021-03-12 15:22:35 +01:00
Andreas Kling
73e06a1983 Kernel: Convert klog() => AK::Format in a handful of places 2021-03-12 15:22:35 +01:00
Andreas Kling
ad2f95e35a Kernel: Convert klog() => AK::Format in InterruptManagement 2021-03-12 15:22:35 +01:00
Andreas Kling
8a7fe86ee0 Kernel: Convert klog() => AK::Format in Storage 2021-03-12 15:22:35 +01:00
Andreas Kling
feda905c3f Kernel: Convert klog() => AK::Format in PCI 2021-03-12 15:22:35 +01:00
Andreas Kling
df65c8f2eb Kernel: Convert klog() => AK::Format in IOAPIC 2021-03-12 15:22:34 +01:00
Andreas Kling
a1f37ebcb8 Kernel: Convert klog() => AK::Format in DMI 2021-03-12 15:22:34 +01:00
Andreas Kling
77b8865538 Kernel: Convert klog() => AK::Format in TimeManagement 2021-03-12 15:22:34 +01:00
Andreas Kling
c7160400d7 Kernel: Convert klog() => AK::Format in SharedIRQHandler 2021-03-12 15:22:34 +01:00
Andreas Kling
8fc3f710b3 Kernel: Convert klog() => AK::Format in MultiProcessorParser 2021-03-12 15:22:34 +01:00
Brendan Coles
8c0723960b QuickShow: Replace posix_spawn with LibDesktop::Launcher
When multiple images are dragged and dropped onto the image widget,
QuickShow will use LibDesktop::Launcher to launch a new instance
of QuickShow for each item, rather than spawn a child QuickShow
process for each item with posix_spawn.

This allows `proc` and `exec` pledges to be removed :^)
2021-03-12 15:22:12 +01:00
Andreas Kling
612a5225fa Kernel: Convert klog() => AK::Format in StdLib 2021-03-12 12:28:27 +01:00
Andreas Kling
a8fcdb8314 Kernel: Convert klog() => AK::Format in APIC 2021-03-12 12:24:08 +01:00
Andreas Kling
6bfba0f576 Kernel: Convert klog() => AK::Format in IDEChannel 2021-03-12 12:16:06 +01:00