Commit Graph

17409 Commits

Author SHA1 Message Date
Liav A
c4463cb5df Kernel: Add basic AHCI functionality
The hierarchy is AHCIController, AHCIPortHandler, AHCIPort and
SATADiskDevice. Each AHCIController has at least one AHCIPortHandler.

An AHCIPortHandler is an interrupt handler that takes care of
enumeration of handled AHCI ports when an interrupt occurs. Each
AHCIPort takes care of one SATADiskDevice, and later on we can add
support for Port multiplier.

When we implement support of Message signalled interrupts, we can spawn
many AHCIPortHandlers, and allow each one of them to be responsible for
a set of AHCIPorts.
2021-03-05 11:29:34 +01:00
Liav A
4a5cf8c789 AK: Add a full memory barrier function based on atomic operations
We use atomic_signal_fence and atomic_thread_fence together to prevent
reordering of memory accesses by the CPU and the compiler.

The usage of these functions was suggested by @tomuta so we can be sure
that important memory accesses happen in the expected order :)
2021-03-05 11:29:34 +01:00
Liav A
b59e45e65c Kernel: Use global mechanism to determine minor number of Storage Device 2021-03-05 11:29:34 +01:00
Liav A
566c10b8b8 Kernel: Make ATA macros to be public 2021-03-05 11:29:34 +01:00
Liav A
0e9a2345f9 Kernel: Add enum values for later implementation of AHCI 2021-03-05 11:29:34 +01:00
Liav A
4f32dc2043 Kernel: Add Declaration of IDEChannel class in PATADiskDevice.h 2021-03-05 11:29:34 +01:00
Linus Groh
50ea0c3500 Profiler: Get perfcore file from ArgsParser
Fixes #5641.
2021-03-05 09:52:22 +01:00
Ben Wiederhake
15b675a804 Shell: Document all supported PROMPT flags 2021-03-04 22:17:18 +01:00
Ben Wiederhake
06debb1832 Meta: Search for the correct ccache cache key
"Hmm, 'toolchain' is a better name here!" I said, and changed the key name.
And then I promptly forgot to update the restore-key value. D'oh!
2021-03-04 19:40:49 +01:00
Mițca Dumitru
a13e8d49cf LibC: Fix typo in fenv.h
`FE_TOWARDSZERO` is actually spelled `FE_TOWARDZERO` (without the 'S')
2021-03-04 19:40:40 +01:00
Andreas Kling
50632af4de Kernel: Define a KERNEL_VIRTUAL_BASE in the linker script
Slightly nicer than saying "0xc0000000" over and over.
2021-03-04 18:25:01 +01:00
Andreas Kling
adb2e6be5f Kernel: Make the kernel compile & link for x86_64
It's now possible to build the whole kernel with an x86_64 toolchain.
There's no bootstrap code so it doesn't work yet (obviously.)
2021-03-04 18:25:01 +01:00
Andreas Kling
aae91dda66 Kernel: Remove repeated_{in,out}16()
These were some wrappers around x86 "insw/outsw" that are no longer
used for anything, so let's remove them.
2021-03-04 18:25:01 +01:00
thankyouverycool
2e5d5eb3d8 SystemMonitor: Return icon display data as GUI::Icons
And delete the generic icon member which has been dormant since
switching to FileIconProvider. Fixes icon column not being properly
painted as icon cells.
2021-03-04 16:28:12 +01:00
thankyouverycool
af581cbd91 LibGUI: Increase row height in Table/ColumnViews and center icons
16x16 icons are now guaranteed at least 1px margins between rows
2021-03-04 16:28:12 +01:00
Andreas Kling
2871df6f0d Kernel: Stop trying to keep InodeVMObject in sync with disk changes
As it turns out, Dr. POSIX doesn't require that post-mmap() changes
to a file are reflected in the memory mappings. So we don't actually
have to care about the file size changing (or the contents.)

IIUC, as long as all the MAP_SHARED mappings that refer to the same
inode are in sync, we're good.

This means that VMObjects don't need resizing capabilities. I'm sure
there are ways we can take advantage of this fact.
2021-03-04 15:42:51 +01:00
Dan MacDonald
9547846a18 Documentation: Re-arrange Linux prerequisites in build instructions 2021-03-04 15:42:29 +01:00
Ben Wiederhake
04eb6bd379 Meta: Use and cache ccache on Github Actions 2021-03-04 15:42:10 +01:00
Andreas Kling
38c8dc22cf Kernel: Remove unused KMALLOC_DEBUG_LARGE_ALLOCATIONS mode
This was a thing back when the system was so little that any kernel
allocation above 1 MiB was basically guaranteed to be a bug. :^)
2021-03-04 11:25:45 +01:00
Andreas Kling
1208fc7d37 AK: Simplify Bitmap and implement in terms of BitmapView
Add Bitmap::view() and forward most of the calls to BitmapView since
the code was identical.

Bitmap is now primarily concerned with its dynamically allocated
backing store and BitmapView deals with the rest.
2021-03-04 11:25:45 +01:00
Andreas Kling
ed9ab38b3b LibCrypto: Use BitmapView instead of Bitmap::wrap() 2021-03-04 11:25:45 +01:00
Andreas Kling
a1d1a3b50b Kernel: Use BitmapView instead of Bitmap::wrap() 2021-03-04 11:25:45 +01:00
Andreas Kling
40552bb5fb AK: Add BitmapView class (like StringView but for bitmaps)
AK::Bitmap is an awkwardly modal class which can either own or wrap
the underlying data. To get ourselves out of this unpleasant situation,
this patch adds BitmapView to replace the wrapped mode.

A BitmapView is simply a { data pointer, bit count } tuple internally
and provides all the convenient functionality of a bitmap class.
2021-03-04 11:25:45 +01:00
Linus Groh
b8a5b1131a CI: Build with -DENABLE_PCI_IDS_DOWNLOAD=OFF
Closes #5611.
2021-03-04 11:21:55 +01:00
Linus Groh
3775507613 Build: Download and uncompress gzipped version of pci.ids
Partially addresses #5611.
2021-03-04 11:21:55 +01:00
Linus Groh
15ae22f7cc Build: Add ENABLE_PCI_IDS_DOWNLOAD CMake option
This allows disabling the download of the pci.ids database at build
time.

Addresses concerns raised in #5410.
2021-03-04 11:21:55 +01:00
AnotherTest
e59a631511 HackStudio/LanguageServers: Move some components out of Cpp
This makes them available for use by other language servers.
Also as a bonus, update the Shell language server to discover some
symbols and add go-to-definition functionality :^)
2021-03-04 11:21:43 +01:00
AnotherTest
0d17cf121c LibGUI: Handle some edge cases in the spanned text drawing algorithm
This commit makes it skip invalid ranges and whine about overlapping
spans before ignoring them (instead of crashing).
2021-03-04 11:21:43 +01:00
AnotherTest
2089b24ab5 Shell: Adjust syntax highlighting logic for the new TextPosition logic 2021-03-04 11:21:43 +01:00
AnotherTest
afc1097023 Shell: Make Node::hit_test_position() const 2021-03-04 11:21:43 +01:00
William McPherson
2479ead718 Everywhere: Remove unnecessary clang-format offs
Mostly due to the fact that clang-format allows aligned comments via
AlignTrailingComments.

We could also use raw string literals in inline asm, which clang-format
deals with properly (and would be nicer in a lot of places).
2021-03-04 11:01:48 +01:00
Andreas Kling
2119c9e801 Base: Remove two outdated aliases from /etc/shellrc 2021-03-04 10:28:46 +01:00
Andreas Kling
4515652001 Kernel: Remove 1 level of indirection for AnonymousVMObject CoW bitmaps
Instead of keeping AnonymousVMObject::m_cow_map in an OwnPtr<Bitmap>,
just make the Bitmap a regular value member. This increases the size
of the VMObject by 8 bytes, but removes some of the kmalloc/kfree spam
incurred by sys$fork().
2021-03-04 10:11:37 +01:00
Andreas Kling
ddaeb294dc AK: Add Bitmap::is_null()
This class has a null state but there was no API to check for it.
2021-03-04 10:11:37 +01:00
Itamar
c1c37cc5bd TextEditor: Don't attempt to stop the autocomplete timer if it is null
Closes #5567
2021-03-04 10:11:01 +01:00
Brendan Coles
953f4f7e60 Kernel: Create /dev/full with mode 0666 2021-03-04 09:19:38 +01:00
Luke
28a705d3c7 Lagom/Fuzzers: Add fuzzers for LibCompess
Adds fuzzers for Deflate, Gzip and Zlib.
2021-03-04 09:19:29 +01:00
Brendan Coles
89265be167 Base: Add man pages for null/zero/full character devices 2021-03-04 09:19:15 +01:00
Idan Horowitz
45a11ead9a Meta: Stop excluding getopt.cpp from linting
This file was already "serenified" by @bugaevc long ago.
2021-03-03 23:42:32 +01:00
Idan Horowitz
c12781a6a2 LibCore+LibHTTP+LibGfx: Switch to LibCompress
This commit removes the only 3rd party library (and its usages)
in serenity: puff, which is used for deflate decompression. and
replaces it with the existing original serenity implementation
in LibCompress. :^)
2021-03-03 23:42:32 +01:00
Andreas Kling
373a595c56 Profiler: Symbolicate addresses in non-PIE ELF objects
This is a little bit messy, but basically if an ELF object is non-PIE,
we have to account for the executable mapping being at a hard-coded
offset and subtract that when doing symbolication.

There's probably a nicer way to solve this, I just hacked this together
so we can see "cc1plus" and friends in profiles. :^)
2021-03-03 23:13:26 +01:00
TheMorc
538975b713 Ports: Add libpng 1.6.37 2021-03-03 23:12:53 +01:00
Linus Groh
a5d6962148 AK+Kernel: Remove NO_DISCARD macro hack
This was added as clang-format would mess up the formatting when using
[[nodiscard]] on a class, which is no longer the case.
2021-03-03 23:08:42 +01:00
Elliot Maisl
95b49691c5 Documentation: Add instruction about entitlements in BuildInstructions
The QEMU's `--accel hvf` command was recently enabled in the `run.sh`
script, but it sadly doesn't work on macOS Big Sur: you need to first
sign your code by adding an `entitlements.xml` file and running a
simple command.
2021-03-03 23:08:25 +01:00
Andreas Kling
a819eb5016 Kernel: Skip TLB flushes while cloning regions in sys$fork()
Since we know for sure that the virtual memory regions in the new
process being created are not being used on any CPU, there's no need
to do TLB flushes for every mapped page.
2021-03-03 22:57:45 +01:00
Andreas Kling
8fd69e9e56 LibJS: Fix a handful of clang-tidy complaints in AST.cpp 2021-03-03 22:57:45 +01:00
Andreas Kling
0fc3983c8d Profiler: Cache and reuse mapped ELF objects
In multi-process profiles, the same ELF objects tend to occur many
times (everyone has libc.so for example) so we will quickly run out
of VM if we map each object once per process that uses it.

Fix this by adding a "mapped object cache" that maps the path of
an ELF object to a cached memory mapping and wrapping ELF::Image.
2021-03-03 22:57:45 +01:00
Bui Quang Minh
faed0e63dc HackStudio: Allow multi-selection in project view tree 2021-03-03 21:59:22 +01:00
Zac
6d68ae45b4 FileManager: Add launch handler actions to desktop context menu
Extracted a method from the code in the File Manager application which
added actions for activating launch handlers found for the selected
file from the context menu. Applied this method to desktop files
and shortcuts.

Note: made some launch handler related methods in the DirectoryView
static or const which allows passing const DirectoryView& to certain
methods.
2021-03-03 21:53:01 +01:00
davidot
9fd9ce1f9e LibWeb: Stop scrolling above content in BlockBox 2021-03-03 21:48:51 +01:00