Commit Graph

46174 Commits

Author SHA1 Message Date
Sam Atkins
ba51e2dd3f Services: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
b592629fe5 Profiler: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
33ab3a212f Inspector: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
141aa37eda HackStudio: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
6fdfa9f313 SystemMonitor: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
2df57d5ae0 SystemMonitor: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
4b17cba074 Spreadsheet: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
c84e11c154 SpaceAnalyzer: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
74452ffc50 Presenter: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
c36de98223 PixelPaint: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
ecbe317413 NetworkSettings: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
3a48009022 KeyboardSettings: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
22b0089783 Browser: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins
0716b2afdc Applets: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Nico Weber
87f1a0e957 LibGfx+icc: ICCProfile's primary_platform() should be optional
Found by running `icc` on a jpeg file produced by a Pixel phone
after #17195.
2023-01-27 12:01:58 +00:00
Poseydon42
3cd04f40e1 LibCpp: Parse 'using namespace' declarations
This gets us a little bit closer to a fully capable C++ parser.
2023-01-27 12:40:40 +01:00
Timon Kruiper
2896d7796d Kernel/aarch64: Set Access Permission (writable bit) on PageTableEntry
This will cause page faults to be generated. Since the previous commits
introduced the handling of page faults, we can now actually correctly
handle page faults.
2023-01-27 11:41:43 +01:00
Timon Kruiper
1d58663298 Kernel/aarch64: Implement switching page directories
The code in PageDirectory.cpp now keeps track of the registered page
directories, and actually sets the TTBR0_EL1 to the page table base of
the currently executing thread. When context switching, we now also
change the TTBR0_EL1 to the page table base of the thread that we
context switch into.
2023-01-27 11:41:43 +01:00
Timon Kruiper
1f30a5e4d9 Kernel/aarch64: Store and initialize TTBR0_EL1 in ThreadRegisters 2023-01-27 11:41:43 +01:00
Timon Kruiper
9e90932bfb Kernel/aarch64: Add helper to get the current TTBR0_EL1 2023-01-27 11:41:43 +01:00
Timon Kruiper
d9946c8e89 Kernel/aarch64: Keep track of root page table and kernel directory table 2023-01-27 11:41:43 +01:00
Timon Kruiper
697c5ca5e5 Kernel: Move Memory/PageDirectory.{cpp,h} to arch-specific directory
The handling of page tables is very architecture specific, so belongs
in the Arch directory. Some parts were already architecture-specific,
however this commit moves the rest of the PageDirectory class into the
Arch directory.

While we're here the aarch64/PageDirectory.{h,cpp} files are updated to
be aarch64 specific, by renaming some members and removing x86_64
specific code.
2023-01-27 11:41:43 +01:00
Timon Kruiper
55d756a813 Kernel/aarch64: Implement initial page fault handling
The shared code is moved to a common PageFault.cpp file.
2023-01-27 11:41:43 +01:00
Timon Kruiper
a532d28905 Kernel/aarch64: Add stub for handle_safe_access_fault 2023-01-27 11:41:43 +01:00
Timon Kruiper
ade27fa6b9 Kernel: Refactor PageFault for use in the aarch64 port
The class used to look at the x86_64 specific exception code to figure
out what kind of page fault happend, however this refactor allows
aarch64 to use the same class.
2023-01-27 11:41:43 +01:00
Timon Kruiper
fb10774862 Kernel: Factor our PreviousMode into RegisterState::previous_mode
Various places in the kernel were manually checking the cs register for
x86_64, however to share this with aarch64 a function in RegisterState
is added, and the call-sites are updated. While we're here the
PreviousMode enum is renamed to ExecutionMode.
2023-01-27 11:41:43 +01:00
Timon Kruiper
247109cee6 Kernel/aarch64: Execute kernel with SP_EL1 instead of SP_EL0
Until now the kernel was always executing with SP_EL0, as this made the
initial dropping to EL1 a bit easier. This commit changes this behaviour
to use the corresponding SP_ELx for each exception level.

To make sure that the execution of the C++ code can continue, the
current stack pointer is copied into the corresponding SP_ELx just
before dropping an exception level.
2023-01-27 11:41:43 +01:00
Timon Kruiper
05659debd1 Kernel/aarch64: Move exception handler to Interrupts.cpp
Also dump the registers in a nicer format.
2023-01-27 11:41:43 +01:00
Julian Offenhäuser
22b1e1076a LibGfx: Make OTF prefer Cmap tables of the Windows platform again
As the different Cmap encoding records are guaranteed to be sorted by
their platform ID, we would previously prefer the Macintosh platform
because of its lower ID value. However, this platform is split up into
a lot of encoding formats for different languages, and usually only
English is included. This meant that we could not handle most unicode
characters anymore.

The Windows platform now takes precedence again, as it can handle
arbitrary code points in its supported encodings.

This solution is still far from perfect, but it makes this regression
disappear for now.
2023-01-27 10:59:52 +01:00
Andreas Kling
ddbdeb3ca0 Ladybird: Add --dump-layout-tree mode that dumps layout tree and exits 2023-01-27 10:41:24 +01:00
Andreas Kling
90fee39290 Ladybird: Fire the WebContentView::on_load_finish hook if set 2023-01-27 10:33:18 +01:00
Liav A
a7677f1d9b Kernel/PCI: Expose PCI option ROM data from the sysfs interface
For each exposed PCI device in sysfs, there's a new node called "rom"
and by reading it, it exposes the raw data of a PCI option ROM blob to
a user for examining the blob.
2023-01-26 23:04:26 +01:00
Liav A
1f9d3a3523 Kernel/PCI: Hold a reference to DeviceIdentifier in the Device class
There are now 2 separate classes for almost the same object type:
- EnumerableDeviceIdentifier, which is used in the enumeration code for
  all PCI host controller classes. This is allowed to be moved and
  copied, as it doesn't support ref-counting.
- DeviceIdentifier, which inherits from EnumerableDeviceIdentifier. This
  class uses ref-counting, and is not allowed to be copied. It has a
  spinlock member in its structure to allow safely executing complicated
  IO sequences on a PCI device and its space configuration.
  There's a static method that allows a quick conversion from
  EnumerableDeviceIdentifier to DeviceIdentifier while creating a
  NonnullRefPtr out of it.

The reason for doing this is for the sake of integrity and reliablity of
the system in 2 places:
- Ensure that "complicated" tasks that rely on manipulating PCI device
  registers are done in a safe manner. For example, determining a PCI
  BAR space size requires multiple read and writes to the same register,
  and if another CPU tries to do something else with our selected
  register, then the result will be a catastrophe.
- Allow the PCI API to have a united form around a shared object which
  actually holds much more data than the PCI::Address structure. This is
  fundamental if we want to do certain types of optimizations, and be
  able to support more features of the PCI bus in the foreseeable
  future.

This patch already has several implications:
- All PCI::Device(s) hold a reference to a DeviceIdentifier structure
  being given originally from the PCI::Access singleton. This means that
  all instances of DeviceIdentifier structures are located in one place,
  and all references are pointing to that location. This ensures that
  locking the operation spinlock will take effect in all the appropriate
  places.
- We no longer support adding PCI host controllers and then immediately
  allow for enumerating it with a lambda function. It was found that
  this method is extremely broken and too much complicated to work
  reliably with the new paradigm being introduced in this patch. This
  means that for Volume Management Devices (Intel VMD devices), we
  simply first enumerate the PCI bus for such devices in the storage
  code, and if we find a device, we attach it in the PCI::Access method
  which will scan for devices behind that bridge and will add new
  DeviceIdentifier(s) objects to its internal Vector. Afterwards, we
  just continue as usual with scanning for actual storage controllers,
  so we will find a corresponding NVMe controllers if there were any
  behind that VMD bridge.
2023-01-26 23:04:26 +01:00
Evan Smal
3226ce3d83 LibJS: Remove some usage of DeprecatedString usage from Lexer
This changes the filename member from DeprecatedString to String. Parser
has also been updated to meet the updated Lexer interface.
2023-01-26 20:25:25 +00:00
Evan Smal
cfa6b4d815 LibJS: Remove DeprecatedString usage from Token 2023-01-26 20:25:25 +00:00
Evan Smal
93674e4383 LibJS: Remove DeprecatedString usage from SourceCode
This change also requires updates to some users of the SourceCode
interface since it no longer use DeprecatedString.
2023-01-26 20:25:25 +00:00
Tim Schumacher
82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Tim Schumacher
1971bff314 Documentation: Document the "Fallible Constructor" pattern 2023-01-26 20:24:16 +00:00
Tim Schumacher
03c3d7edbc Documentation: Note that MUST does not replace error propagation 2023-01-26 20:23:08 +00:00
Xexxa
6607336b38 Base: Add more emoji
👩‍❤️‍👨 - U+1F469 U+200D U+2764 U+200D U+1F468
COUPLE WITH HEART: WOMAN, MAN
👨‍❤️‍👨 - U+1F468 U+200D U+2764 U+200D U+1F468
COUPLE WITH HEART: MAN, MAN
🦙 - U+1F999 LLAMA
🦡 - U+1F9A1 BADGER
🦃 - U+1F983 TURKEY
🌺 - U+1F33A HIBISCUS
🍲 - U+1F372 POT OF FOOD
🫗 - U+1FAD7 POURING LIQUID
🥄 - U+1F944 SPOON
🗾 - U+1F5FE MAP OF JAPAN
🏪 - U+1F3EA CONVENIENCE STORE
🎪 - U+1F3AA CIRCUS TENT
🎆 - U+1F386 FIREWORKS
🎇 - U+1F387 SPARKLER
🎽 - U+1F3BD RUNNING SHIRT
🎭 - U+1F3AD PERFORMING ARTS
🧶 - U+1F9F6 YARN
🎷 - U+1F3B7 SAXOPHONE
🎺 - U+1F3BA TRUMPET
📽️ - U+1F4FD FILM PROJECTOR
🗳️ - U+1F5F3 BALLOT BOX WITH BALLOT
🔏 - U+1F50F LOCKED WITH PEN
2023-01-26 20:21:54 +00:00
Linus Groh
959a891df0 LibJS: Port parse_iso_date_time() to String 2023-01-26 20:20:54 +00:00
Linus Groh
6c8c650a55 LibJS: Port temporal_zoned_date_time_to_string() to String 2023-01-26 20:20:54 +00:00
Linus Groh
70e8a9bc8b LibJS: Remove unused is_valid_time_zone_numeric_utc_offset_syntax()
...as well as the underlying function:
parse_time_zone_numeric_utc_offset_syntax()
2023-01-26 20:20:54 +00:00
Linus Groh
bb0362ec3b LibJS: Port builtin_time_zone_get_offset_string_for() to String 2023-01-26 20:20:54 +00:00
Linus Groh
95becb22ef LibJS: Port format_iso_time_zone_offset_string() to String 2023-01-26 20:20:54 +00:00
Linus Groh
c2656f4ee7 LibJS: Port format_time_zone_offset_string() to String 2023-01-26 20:20:54 +00:00
Linus Groh
5a2dfc52f8 LibJS: Port create_temporal_time_zone() to String 2023-01-26 20:20:54 +00:00
Linus Groh
ae98eddc9f LibJS: Port temporal_year_month_to_string() to String 2023-01-26 20:20:54 +00:00
Linus Groh
cfb4b44691 LibJS: Port temporal_time_to_string() to String 2023-01-26 20:20:54 +00:00
Linus Groh
b6e13f451f LibJS: Port temporal_date_time_to_string() to String 2023-01-26 20:20:54 +00:00