Commit Graph

63823 Commits

Author SHA1 Message Date
milek7
7c69ebda17 arm64: Add mapping of all memory in kernel virtual space at KERNEL_PMAP_BASE.
Change-Id: I828b1ba8c0add614e9df6bba1e14c5e514ec1bad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5258
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-03 20:27:18 +00:00
Lt-Henry
2684c64083 usb_hid: Update HID Consumer usage page constants to 1.3 spec
Change-Id: I5ffbcda41547b1a31049b5d7ba73f7327bb8cf04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5288
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 19:04:30 +00:00
Jérôme Duval
459f1bcd8d intel_extreme: irq hotplug support for IceLake and newer PCH.
we enable every port interrupt instead of relying on the ports found in the VBT.
ATM only log the plug state when it changes.

Change-Id: I5175fb137d11f0114beb2915a4f363341cfe8e36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5287
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 18:15:48 +00:00
Jérôme Duval
46bbf334f6 intel_extreme: parse VBT device configs, use this to skip unused ports
* BDB version from 111
* for DDI from Gen9
* for HDMI and DisplayPort from Gen6
* use the first port to create the mode list
* also probe DDI Port A
* the aux channel helps to select the correct dp aux registers.

Change-Id: I80549a6ec0477bed768cc5f388959b606d50c1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5286
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 08:48:34 +00:00
Autocomitter
2aac05508f Update translations from Pootle 2022-04-30 08:15:54 +00:00
Jessica Hamilton
2798df0e80 HaikuDepot: fix build rules
* Fixes a couple issues with independent target warnings, causing
  parallel build problems.

Change-Id: Id968709094c9d5efa4cb443c62c41c83c9622355
2022-04-29 15:24:03 +00:00
David Karoly
83f755b5d8 kernel/arm: add memory barriers for page table ops
Introduce memory barriers according to ARMARM,
section G.5.3 TLB maintenance operations and barriers

Sequence for mapping memory in (both L1 and L2):
* DSB
* Invalidate i-cache (TODO)
* Insert new entry in page directory / page table
* DSB
* ISB

Sequence for mapping memory out:
* Remove page table entry
* DSB
* Invalidate TLB entry
* DSB
* ISB

Sequence for updating a page table entry:
* Update page table entry
* DSB
* Invalidate TLB entry
* Invalidate branch predictor (TODO)
* DSB
* ISB

Note: i-cache invalidation and branch predictor invalidation is
not implemented yet as this commit focuses on implementing memory
barriers.

Change-Id: I192fa80f6b43117236a4be6fa8c988afca90e015
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5241
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-28 19:57:49 +00:00
Jérôme Duval
cf5f513b3b file_systems: add entry_cache_(add/missing) in btrfs,ext2,exfat lookup methods.
Change-Id: I77857421a65f371bc885f1d4eb66ef2ab4376e56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5252
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-28 19:16:48 +00:00
Mashijams
2cecdeed2e xfs : fix build with trace enabled, improve error checks
- Remove referencing an undeclared identifier

    - Instead of an assert, just log an error for XFS V5 filesystems
      and don't try to mount them

Change-Id: I67303aff89b81a28b7333569fea8113b6020dc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5204
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-28 19:16:12 +00:00
Jérôme Duval
1d2cf139a8 strace: trace fcntl and wait_for_child syscalls parameters
Change-Id: I774e8343139a2bdb3c2f60f37cab3a7207739c7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5251
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-27 06:00:58 +00:00
Augustin Cavalier
68d1b97e4f Clean up mouse functions in InterfaceDefs.
* Fully remove unused and deprecated functions.
 * Comment as to which functions are deprecated.
 * Rename _by_name functions to be without the suffix, as this is C++
   and there's no reason not to use overloads here.

Change-Id: I4e2152f17806605eb965795417013cea800e661e
2022-04-26 19:59:01 -04:00
Augustin Cavalier
467ffecdbb HaikuDepot: Temporarily disable viewing usage statistics.
It causes crashes (see #17689) and I was unable to determine the cause;
and it causes very noticeable lag (see #16879.) It can be reinstated
once those problems are fixed.
2022-04-26 17:51:51 -04:00
Augustin Cavalier
7d7de13527 HaikuDepot: Fix leak of ProcessCoordinators.
This function is supposed to take ownership of the coordinator item,
but it didn't do that in all cases. Use a BReference(..., true)
to do that.
2022-04-26 17:50:53 -04:00
Augustin Cavalier
a173592b40 Tracker: Fix memory leak in IconCache::SetIcon.
How often this would have occurred before thumbnail support I'm not sure,
but at least now that we have thumbnails, the icons are changed out
with not insignificant frequency, especially on read-only filesystems.
2022-04-26 15:03:01 -04:00
Augustin Cavalier
a64cdd1dcc Tracker: Overhaul thumbnail generation logic.
* Use a JobQueue and BJobs to generate the thumbnails, instead of
   spawning a potentially unlimited number of threads (which can
   of course rapidly exhaust resources.) Use two threads: one for
   smaller files, and another for larger files.

 * Directly insert the new thumbnails into the icon cache once they
   have been generated, avoiding the port-search dance on filesystems
   that do not support writing attributes (or at least large ones.)

 * Skip calling mimeset, is it not needed after the previous commit.

 * Combine all the duplicated image-scaling logic into one function.

May help with or fix #17225, #17619, and other thumbnail-related matters
e.g. #17557. Also addresses comments from the mailing list last summer.
2022-04-26 14:55:12 -04:00
Augustin Cavalier
6750cef9ca Tracker: Thumbnail attribute changes should cause an icon refresh.
This way, a full mimeset need not be run to trigger an icon update,
and also other applications can write thumbnails and trigger updates.
2022-04-26 14:44:12 -04:00
Augustin Cavalier
5192c3bfff Tracker: Move thumbnail-manipulation code to its own file.
Preparatory work for refactoring thumbnail generation to not use
so many resources (threads, ports, etc.)
2022-04-25 23:10:03 -04:00
Augustin Cavalier
457d8a9282 Tracker: Remove unused rgb_color creation function.
Nothing seems to use it. make_color should be used instead.
2022-04-25 22:28:46 -04:00
Augustin Cavalier
c6b6adc407 Tracker: Replace custom LooperAutoLocker with AutoLocker<BLooper>. 2022-04-25 22:28:45 -04:00
Jessica Hamilton
a43a4e9fbf Terminal: fix missing attribute state for the history buffer.
* This presented itself as 24-bit colour rendering as white on black
  when scrolling through the history.
2022-04-26 13:24:02 +12:00
Augustin Cavalier
07b83028cd emulex_oce: Remove.
It doesn't seem to work anymore, and it doesn't look to be particularly
maintained on FreeBSD's side of things. I think kallisti5 was the only
person who ever even attempted to use it.
2022-04-25 19:26:10 -04:00
Augustin Cavalier
acfde4597c kernel/condition_variable: Downgrade another panic into a debug print.
Fixes #17686.
2022-04-25 19:20:31 -04:00
Augustin Cavalier
acdd772db0 DiskProbe: Check we actually have a buffer before computing the offset.
Fixes #17709.
2022-04-25 19:16:28 -04:00
Augustin Cavalier
925b83a85a HaikuDepot: Fix scrolling the list triggering "looping."
If two PACKAGE_SELECTED messages were queued at once, then we would
wind up in a loop between the two, triggering the "looping" behavior.
Instead, do not send a PACKAGE_SELECTED message when programatically
changing what package is selected, which is more efficient anyway.

Fixes #11732.
2022-04-25 18:59:55 -04:00
Augustin Cavalier
a386685453 HaikuDepot: Cause and wait for the package-populator thread to exit on window close.
May help with #17689.
2022-04-25 18:46:13 -04:00
Augustin Cavalier
4e16be4fa0 kernel: Do not invoke memalign with 0 as the alignment argument.
The memalign() function has special semantics for its arguments
even when -fno-builtin is enabled, it seems (that may be a problem
on Clang's part, however.) The alloc_align attribute, which we apply
to the memalign_etc function, does not seem to have the same problems;
at least its documentation at GCC gives no indication that 0 is not a
legal value to pass.

Change-Id: Ie5ba090b924ac3577775165d20f11f9696be97f3
2022-04-25 18:14:44 -04:00
Augustin Cavalier
8f68daed84 kernel: Make use of the new ConditionVariable lock-switching APIs in a few places. 2022-04-25 17:59:50 -04:00
Augustin Cavalier
8af7b72d8d OS.h: Remove set_timezone function from header, place behind _BEOS_R5_COMPATIBLE_.
Long ago deprecated, not used in the tree.
2022-04-25 17:25:55 -04:00
Dale Cieslak
d39b5bfd0c DeskCalc: make input Locale-aware
Accepts input with separators based on user's Locale.  For example,
with a European locale, "1.234,56" is valid input. With a US locale,
"1,234.56" is accepted.  The grouping separator is ignored and
removed, and the decimal separator is kept.

Supports multi-byte decimal separator and grouping separators.

The keypad localization is based on the user's Language setting,
but the separators come from the Formatting. Thus if the Language
is set to English, but the Formatting is set to, for example,
German, the keypad will show '.', but when pressed it will emit
',' to match the number Formatting. Otherwise the keypad breaks
the localized formatting.

Fixes #8503

Change-Id: I0d112bdca67a4e4898e37062102343194ed47f8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4965
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:57:20 +00:00
Adrien Destugues
cda13c638d ARM: add support for Allwinner A10 interrupt controller
Untested so far.

Change-Id: I3453115599cf2112858a194173212401ae4ac1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5104
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:50:04 +00:00
David Karoly
41ed7a1ed6 boot/efi/arm: use GICv2 driver for GIC-400
The GIC-400 is compliant with Version 2 of the ARM GIC Architecture Specification.

Untested.

see:
* ARM Generic Interrupt Controller Architecture Specification
* CoreLink GIC-400 Generic Interrupt Controller Technical Reference Manual

Change-Id: I4e062173c56dddcc579c04050ca62cb341b60959
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5240
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 20:49:48 +00:00
Jessica Hamilton
914b10c17e wait_for_thread_etc: expose as syscall/make public.
* This will be needed for the following commit that implements
  `pthread_tryjoin_np` and `pthread_timedjoin_np`.

Change-Id: Idccb1aa588d6d10825294d14925d9bd046b65f19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5098
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-25 19:47:26 +00:00
Jérôme Duval
f123acc1d9 Terminal: COLORTERM=truecolor to mean 24 bit color support
this fixes mc support for 256-color skins.
bug #17719

Change-Id: Ifead9fc3acf396cada6f9ce4d83579657b74c86f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5249
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-25 19:27:21 +00:00
Jérôme Duval
5847cd11a6 net_stack: don't write notify listen sockets
bug #17714

Change-Id: I91f6340bcda142b5eea12c0739b36e2f90af8ad3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5247
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-25 19:26:05 +00:00
Jérôme Duval
305aa60f0c mime_db: New audio/x-scpls MIME type for PLS Playlist
Change-Id: I1a8437c611285f96a3bc90201c6781a7fbd861f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5248
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-25 06:48:56 +00:00
Jim906
2bda927298 MediaPlayer: add .pls playlist support
* Add PlaylistFileReader class and derived M3uReader and PlsReader classes.
* Move most of the code from Playlist::AppendM3uToPlaylist to PlaylistFileReader::_AppendItemToPlaylist
* For each File line in the .pls file, a PlaylistItem is added to the MediaPlayer playlist.
* For each Title/Length line, the data is applied to the most recently added PlaylistItem.
* The NumberOfEntries and Version lines are read to make them available for future use, but currently they have no effect.
* Fixes #6813

Change-Id: Ifa23d0df2e4d5b466aa7b85649a78276cff986ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5201
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-24 15:55:51 +00:00
X512
06d109315e jam: fix nightly-raw build for riscv64
Change-Id: Ife616cba1e294febf8ead772160af6cd21f8bce3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5246
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-23 19:55:31 +00:00
X512
9e19c5aea4 libagg: use size_t for operator new argument
Fix Clang 14 build.

Change-Id: Iad914d4be13f19e60a2ad708321cd04db5096d09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5245
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-23 19:55:31 +00:00
X512
11e682bebb StorageKit: add missing forward definition
Change-Id: Iaa220548485f97589adb4779d7cb0012251e22ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5244
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-23 19:55:31 +00:00
X512
98ed158acf StorageKit: remove old C++ header usage
Change-Id: I601639653798ddfe452ebb0d8d747b276e4d5f1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5243
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-23 19:55:31 +00:00
David Karoly
dea541c4f4 docs/arm: update info for Raspberry Pi 2 & 3
Add some more details on peripherals.

Change-Id: I65e6ce5ff32cd8b40b95a707460a870f0f4d688e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5239
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 18:18:13 +00:00
David Karoly
e5165df648 docs/arm: remove TODO item for soft-float
soft-float/hard-float mismatch issues are tackled by introducing
libgcc-boot, libgcc_eh-boot, libsupc++-boot libraries in the
gcc_bootstrap package

Change-Id: I4d3eff12c4c78804cd1dd32d6c1c5c8a9b5ad51a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5238
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 18:17:19 +00:00
urnenfeld
ce72745ebe arm64: Reuse possible TTBR1 allocations only if we come from a valid EL1 context.
* This allows rPI3 reaching the kernel
* Handling & reporting this value helps understanding the behaviour of the different boot contexts
* As long as more real HW platforms are being ported, reusing this value needs to be reevaluated

Change-Id: I1a3b6d8e1df7c9a131875daf2c7abb64b6061ce8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5234
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-23 14:59:22 +00:00
Adrien Destugues
8b858379e2 sdhci: do the wait for interrupts the straightforward way again
In a previous commit I flipped this around because the command interrupt
doesn't always trigger on Ricoh controllers. However, this leads to
command execution continuing before the interrupt actually triggers on
some other controllers.

Might solve #17031 but it could also break things on other hardware.

Change-Id: I96cba90358f0b04ef1ac319aead898c0f4155114
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4985
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-23 14:31:03 +00:00
David Karoly
745a40d78a kernel/arm: implement memory attributes
Set AP[2:0] and XN flags based on page attributes.
PXN is not implemented as it seems to be available only
in L1 descriptors on ARMv7.

Set TEX, B, C flags based on memoryType:
* B_MTR_UC is mapped to Strongly Ordered (TEX=0, B=0, C=0)
* B_MTR_WC is mapped to Shareable Device Memory (TEX=0, B=1, C=0)
* B_MTR_WT is mapped to Outer and Inner Write-Through, no Write-Allocate (TEX=0, B=0, C=1)
* B_MTR_WB is mapped to Outer and Inner Write-Back, no Write-Allocate (TEx=0, B=1, C=1)
* B_MTR_WP has no direct equivalent on the ARM so it's mapped as B_MTR_WB
* default is Write-Back

Implement ARMPagingMethod32Bit::AttributesToPageTableEntryFlags()
for mapping from page attributes to AP[2:0] and XN flags.

Implement ARMPagingMethod32Bit::PageTableEntryFlagsToAttributes()
for the reverse mapping used in Query() and QueryInterrupt()
i.e. recover page attributes from AP[2:0] and XN flags.

Implement ARMPagingMethod32Bit::MemoryTypeToPageTableEntryFlags()
fr mapping from memoryType to TEX, B, C flags.

Implement ARMVMTranslationMap32Bit::Protect() which used to be commented out.

Accessed and modified flags are not implemented yet, so no such
flags are returned from Query() and QueryInterrupt().

Also because of this, we just invalidate TLB on any call to Protect()
without checking whether the page has been accessed.

Change-Id: I027af5c02bd6218d9f92a58044aeb26373e1956b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5236
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-23 12:52:59 +00:00
PulkoMandy
d0c94afe0c docs/develop: fix incorrect title level 2022-04-23 13:59:49 +02:00
David Karoly
ba0c49863a docs/arm: add info on Raspberry Pi 4
Change-Id: Ic8cc47394c9e49f05e30b5ba54ff70557b1e2c47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5237
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 09:18:03 +00:00
Autocomitter
f9f01bef57 Update translations from Pootle 2022-04-23 08:12:11 +00:00
PulkoMandy
1da90c98f2 Enable and fix WError in add-ons/kernel/busses/
Change-Id: I94e1580444faffdfc362dc8f59c39152d67a7076
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5235
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-22 20:28:47 +00:00
Adrien Destugues
ad398477d6 Enable some more Werror and fix compiler warnings
- All servers are now Werror
- All bus_managers are now Werror
- All input_server add-ons are now Werror
- Some more things in bin/ are Werror

Only tested on x86_64, I'll let the buildbot test on x86_gcc2 and RISC-V

Change-Id: I5ec86512eac729c862828a45d8431f85c4ec422b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5226
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-22 14:25:48 +00:00