Commit graph

64562 commits

Author SHA1 Message Date
Sönke Holz
60bb8edd7b Kernel/xHCI: Support xHCI controllers defined in the devicetree 2025-01-13 19:30:54 +01:00
Sönke Holz
980bc4ddf0 Kernel/xHCI: Split PCI-specific code into a new subclass
This will allow us to add support for xHCI controllers that are not
connected via PCI.
2025-01-13 19:30:54 +01:00
Sönke Holz
e88594005b Kernel/DeviceTree: Ignore nodes with status != "okay"
status = "okay" means the device is operational. We should ignore
devices that have a different status property value.

The BCM2835TimerDriver force disable hack can be removed, since that
timer is disabled in the Pi 4 devicetree.

But we have to introduce another hack that force enables the Pi 3 system
timer, as we otherwise wouldn't have any timer that we support for the
Pi 3.
2025-01-13 19:30:54 +01:00
Sönke Holz
0d11e70cfe Kernel/MM: Set the correct memory type for mmap()s
Make the MemoryType used by mmap() configurable by
File::vmobject_and_memory_type_for_mmap overrides (previously called
vmobject_for_mmap).

All mmap()s were previously MemoryType::Normal.
2025-01-13 19:30:54 +01:00
Sönke Holz
b92907f339 Kernel/MM: Make allocate_region_with_vmobject MemoryType-aware 2025-01-13 19:30:54 +01:00
Sönke Holz
d73a8fe750 Kernel/MM: Synchronize executable memory after handling an inode fault
ARM requires an explicit cache flush when modifying executable memory:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/caches-and-self-modifying-code

__builtin___clear_cache compiles to a no-op if no explicit flushing is
needed (like on x86):
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005f_005f_005fclear_005fcache
2025-01-13 19:30:54 +01:00
Sönke Holz
1d29f02274 Kernel/SDHC: Return ENOTSUP if no base clock frequency provided
We would otherwise crash here on the Raspberry Pi 4.
2025-01-13 19:30:54 +01:00
Sönke Holz
6fa8165d91 Kernel/MM: Use same memory type for zeroing pages as the actual mapping
On some architectures like ARM, using mismatched memory types for
different aliases of the same physical memory can lead to unexpected
behavior.
(https://developer.arm.com/documentation/102376/0200/Memory-aliasing-and-mismatched-memory-types)

Flushing the data cache and using appropriate memory barriers might be
enough, but should have worse performance.
2025-01-13 19:30:54 +01:00
Sönke Holz
6cdd659c94 Meta: Correct the Pi 3 devicetree blob path
ee891462b8 accidentally changed the path to the Pi 3 devicetree blob to
an incorrect one.
2025-01-13 16:06:07 +01:00
Marek Knápek
6073ad189a LibCrypto: Smaller stack usage
in portable version of SHA-1, SHA-256 and SHA-512.
2025-01-13 09:19:10 -05:00
Pavlo Ivashkov
31daabcf0a AK: Improve performance of u64 randoms 2025-01-13 09:08:55 -05:00
butter1125
1e935911f0 Ports/lcms2: Update to 2.16 2025-01-13 09:05:37 -05:00
butter1125
a59e22000a Ports/imagemagick: Update to 7.1.1-43 2025-01-12 19:37:09 -05:00
butter1125
0f24112e91 Ports/mawk: Update to 1.3.4-20240905 2025-01-12 19:36:45 -05:00
butter1125
b1bfe4448a Ports/gawk: Update to 5.3.1 2025-01-12 19:36:45 -05:00
butter1125
d3cc7a3135 Ports/libopus: Update to 1.5.2 2025-01-12 19:36:06 -05:00
butter1125
961191996a Ports/libffi: Update to 3.4.5 2025-01-12 19:36:06 -05:00
djwisdom
db31758768 Base+Fonts: Add Lucidity Mono Regular terminal font 2025-01-12 19:34:22 -05:00
djwisdom
a2fc8bbd36 Base+Fonts: Add Lucidity Mono Bold terminal font 2025-01-12 19:33:36 -05:00
butter1125
9bd47a85e2 Ports/file: Update to 5.46 2025-01-12 19:32:30 -05:00
butter1125
56c8c7cc42 Ports/ca-certificates: Update to version 2024-12-31 2025-01-12 19:32:00 -05:00
butter1125
6399069128 Ports/giflib: Update to 5.2.2 2025-01-12 19:31:26 -05:00
Nico Weber
bc469c3dd0 LibGfx: Only use draw_scaled_bitmap() fast path when not flipping image
If we're drawing a transform with a negative scale, we have to go
through the slow path since draw_scaled_bitmap() is unable to flip
images.

Fixes a regression from the 2nd commit in #24465.
2025-01-12 18:54:31 -05:00
Sönke Holz
524f699ae2 Kernel+LibC: Clean up assembly code
Some assembly files were previously inconsistently formatted.

- Use 4 spaces for indentation
- Use `.L` as the local label prefix
- Remove trailing whitespace
2025-01-10 12:31:16 +01:00
Sönke Holz
1e0e569273 Kernel: Don't allow text relocations
We don't have any text relocations in the kernel anymore.
This linker argument was added in bd6dc5ccec as a temporary workaround.

Removing this argument won't cause text relocations to be reported for
aarch64 and riscv64, as we currently compile the kernel with `--no-pie`
on those architectures.
2025-01-10 12:31:16 +01:00
Sönke Holz
95ec8d7f78 Kernel/aarch64: Don't use the ldr Rd, =label pseudoinstruction
This pseudoinstruction causes text relocations, as it stores the target
address in literal pools inside .text.

The bss clearing code now also matches the RISC-V implementation.
2025-01-10 12:31:16 +01:00
Sönke Holz
cfa16b767c Kernel/riscv64: Avoid generation of a text relocation in enable_paging
Manually calculate the target address instead of storing the target
address in .text.
2025-01-10 12:31:16 +01:00
Nico Weber
b50f3132ef imgcmp: Add a --write-diff-image option
This writes a bitmap that has pixels that are identical between
the two input images blended with 0.5 alpha against white, and
differing pixels are highlighted in red.

Use like so:

    imgcmp --write-diff-image diff.webp image1.png image2.webp
2025-01-10 06:22:01 -05:00
Nico Weber
bd5e5c1a0c Utilities+Meta: Add a simple imgcmp utility
For now, it checks if two images are completely identical, and if not,
it prints the first differing pixel.
2025-01-10 06:22:01 -05:00
Kevin F. Konrad
d46e90ce0f Meta: Omit -cpu arguments on windows for qemu 9 compatibility 2025-01-09 13:42:56 +01:00
Nico Weber
801d7e2ced LibGfx/JPEG2000: Add LRCP and RLCP progression iterators 2025-01-07 08:23:28 -05:00
Nico Weber
e99fe94cfb LibGfx: Add some tile math from the spec to JPEG2000Loader.cpp
Not used for anything yet, but will be used to figure out number of
codeblocks (and hence, size of tag trees) in a packet.
2025-01-07 08:23:28 -05:00
Nico Weber
1d6b0ebd18 LibGfx: Add an overview comment to JPEG2000Loader.cpp 2025-01-07 08:23:28 -05:00
butter1125
9332cb6f82 Ports/lynx: Update to version 2.9.2 2025-01-06 20:24:57 -05:00
butter1125
a830e20da1 Ports/md4c: Update to version 0.5.2 2025-01-06 20:24:30 -05:00
butter1125
d3a90980e3 Ports/nasm: Update to version 2.16.03 2025-01-06 20:24:03 -05:00
butter1125
be831f2bf1 Ports/bzip3: Update to version 1.5.1 2025-01-06 20:23:30 -05:00
butter1125
51d61a7f32 Ports/isl: Update to version 0.27 2025-01-06 20:23:03 -05:00
butter1125
96f1911ebd Ports/cpio: Update to version 2.15 2025-01-06 20:22:08 -05:00
Bastiaan van der Plaat
a24fb249ec FileManager: Add GPS location MapWidget to image properties window 2025-01-06 20:21:32 -05:00
Bastiaan van der Plaat
6fa29085e5 LibGfx: Add basic GPS exif tags parsing 2025-01-06 20:21:32 -05:00
Bastiaan van der Plaat
e0570a4060 LibMaps: Move MapWidget to new LibMaps library 2025-01-06 20:21:32 -05:00
MacDue
18cb48ae99 LibGfx: Fix title bar text clipping in Redmond Glass/Plastic
Previously, the title bar text could be painted under the buttons for
small window sizes (or long titles).
2025-01-06 20:20:19 -05:00
MacDue
fac74f51a3 ThemeEditor+LibGfx: Add WindowTheme to General section 2025-01-06 20:19:52 -05:00
MacDue
14baf6d0f0 ThemeEditor: Add TitleButtonInactiveAlpha to Inactive Window section 2025-01-06 20:19:52 -05:00
Sönke Holz
94a5e88aa8 Meta: Disable "Zoom To Fit" when using the gtk display backend
This option causes the window to not resize automatically on guest
display resolution changes.
QEMU has this option enabled by default when using virtio-gpu.
2025-01-06 01:50:28 +01:00
ddorando
fd789689aa Ports/SDL2: Sync scancode map with Kernel/API/KeyCode.h
We got out of sync in 965e1ba. Sync the names in order to fix build.
2025-01-05 01:44:46 +01:00
Ali Mohammad Pur
cbafa3ad19 LibRegex: Use the *actually* correct repeat start offset for Repeat
Fixes #2931 and various frequent crashes.

(cherry picked from commit 50733c564c3715cac570af6ee5b2907b4aa09b2a)
2025-01-02 13:35:26 -05:00
Ali Mohammad Pur
7c3331f93f LibRegex: Treat checks against nonexistent checkpoints as empty
Due to optimiser shenanigans in the tree alternative form, some
JumpNonEmpty ops might be moved before their Checkpoint instruction.
It is safe to assume the distance between the nonexistent checkpoint and
the current op is zero, so just do that.

(cherry picked from commit eee90f4aa23afd66ce6007faf4943d4ab56d4f22)
2025-01-02 13:35:26 -05:00
Ali Mohammad Pur
e998041b27 LibRegex: Pick the right target for OpCode_Repeat
Repeat's 'offset' field is a bit odd in that it is treated as a negative
offset, causing a backwards jump when positive; the optimizer didn't
correctly model this behaviour, which caused crashes and misopts when
dealing with Repeats.
This commit fixes that behaviour.

(cherry picked from commit 358378c1c073440ef830a3485e7d6cb9382e0c92)
2025-01-02 13:35:26 -05:00