Commit Graph

63890 Commits

Author SHA1 Message Date
milek7
e9d04b25e6 arm64: Add thread exit syscall in commpage.
Change-Id: Ia8e7e4626add623735fefefa1af151b7338adc35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5265
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
milek7
d1c3213a6d arm64: Add exception handling, handle pagetables access and dirty flags.
Change-Id: I751d78eb458da16098d236f3829d0c26540fbc17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5264
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
milek7
78ea9ffc9b arm64: Implement kernel thread switching.
Change-Id: I87cca66ad89cfa85ba98a9ec828c5e357d7406b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5263
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
Autocomitter
e4d6c87ca2 Update translations from Pootle 2022-05-28 08:14:56 +00:00
Augustin Cavalier
122765f7d9 tests: Fix build of CookieTest. 2022-05-27 17:03:37 -04:00
Augustin Cavalier
44604448de freebsd_network: Automatically switch to jumbo-sized MTUs if possible.
Unfortunately there is no way to ask if a device supports jumbo MTUs
besides actually activating it. But that's fine, because for now,
Haiku's own network stack does not actually support changing MTUs
at the device level! Probably that should be fixed, too, but that
is a problem for another day.

With preceding commits, this fixes #17728, and all BSD network drivers
will use jumbo frames if possible by default.
2022-05-27 17:01:41 -04:00
Augustin Cavalier
3ea7c99119 network/ethernet: Use read/write buffers for scattered I/O.
This solves a long-standing TODO about scattered writes returning errors,
which was not a problem before now because we did not actually support
jumbo-sized MTUs. But now we will, so create temporary buffers if needed
in order to be able to read/write data larger than one buffer's worth.
2022-05-27 16:59:40 -04:00
Augustin Cavalier
ca6a44c133 freebsd_network: Overhaul device read/write functions.
* In read, check that we actually have enough buffer capacity
   to read the next buffer on the queue. Otherwise return E2BIG.
   (This fixes data being silently discarded if the mbuf was larger
    than the passed read buffer, but that should not usually happen
    anyway based on MTU buffer sizing.)

 * In write, use m_get2 to get an appropriately sized mbuf (which may
   be up to 16K) instead of clamping all writes to the cluster size.

These changes are needed for jumbo-frames to be actually read and written
as one unit. However, they are not yet enabled, as more changes are needed
above this point both in ioctl() here and in the stack.
2022-05-27 16:42:07 -04:00
Augustin Cavalier
3ed5041315 freebsd_network: Fix SIOCSIFMTU handling in ether_ioctl.
We cannot set anything below ETHERMIN nor greater than ETHERMTU here,
because we do not know what capabilities the driver actually has.
(The driver will have already caught and handled this ioctl if it
supports something more than the required minimum.)
2022-05-27 16:37:23 -04:00
Augustin Cavalier
41faeb1df9 net_interface & datalink: Fix MTU handling.
The device is what actually controls the MTU, and it has its own
field for this, so having a second one just meant the MTU never
got updated after startup.

Remove the "mtu" field from the interface, use the "device->mtu" directly,
and then actually invoke device->module->set_mtu when updating.
2022-05-27 16:36:12 -04:00
Mashijams
05cb1b0e05 Filesystem : move crc files to shared folder
Moved crc32.c, CRCTable.cpp, CRCTable.h from ext2, and crc_table.c from the UDF filesystem to shared directory

Modified Jam files to use these files from shared directory for ext2 and UDF filesystem

Change-Id: Ie2c79ce0a3ec7d1ea497e725a288c31528dcaa86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5343
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-27 17:12:06 +00:00
Jérôme Duval
a8db4bae55 libroot: system() should ignore SIGINT, SIGQUIT while waiting
https://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html
Change-Id: Ic9919e403fb4e6ee4406b0c33789fe8b00b22d1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5341
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-26 18:48:02 +00:00
Adrien Destugues
4b0d8831c2 HaikuBook: better doc and example for BList::DoForEach
The description of the callback function was still quite confusing. The
main usage for the return argument from the callback function is not
handling failures, but knowing wether the function did something in the
list or not, and stopping the iteration if only one item was looked for.

Add an example use of the function return value to implement a linear
search in the list and remove the note about the function "failing",
which is not what this parameter was meant to do (and I think that lead
to the initial inversion of "true" and "false" values.

Change-Id: If8cae8b8ee21ced2c899aef6033a89ab8dbf1621
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-26 07:49:01 +00:00
Jim906
f7eda03757 WebPositive: Don't display '...' icon when empty
* Conditionally add/remove fOverflowMenu to BookmarkBar when window
  is resized or a bookmark is added/removed.
* Improve handling of large window size changes (e.g. zoom button)
  which require moving multiple bookmarks to/from fOverflowMenu in a
  single call to FrameResized.
* Fixes #17616.

Change-Id: Id3e991167ec8d7aa540dd0644749cad1612de293
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5324
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-26 07:42:49 +00:00
Augustin Cavalier
27f95c84d7 drivers/audio: Adjust physical memory mapping after recent VM changes.
Fixes more KDLs.
2022-05-25 12:32:51 -04:00
Augustin Cavalier
aef561c99a AHCI: Adjust memory allocation after recent VM changes.
Fixes #17758.
2022-05-25 12:32:17 -04:00
Alexander von Gluck IV
6ec74693c7 docs/develop: Document how to build source hpkgs
Change-Id: I86a6cef5773c543e1b46d85091b9e73a7e3c016c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5342
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-25 12:48:27 +00:00
Dale Cieslak
143253c873 DeskCalc: Fix Locale-aware display
Expression parser was made aware of Locale-specific separators in
hrev56067. However, the Expression view was still using only '.' as
separator. This change passes the Locale-specific decimal separator
to the ExpressionTextView class and uses that to parse the value for
display.

Fixes #17754

Change-Id: I7386eed51afe929a9b3eee69334f9199a3d06c4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5338
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-25 06:22:21 +00:00
Trung Nguyen
956f45070d kernel/vm: Remove default kernel read/write flags
`fix_protection` will not apply `B_KERNEL_READ_AREA` and
`B_KERNEL_WRITE_AREA` by default.

Kernel drivers that directly call `create_area` or `create_area_etc`
and do not pass any protection flags have been updated to
apply `B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA` instead.

Bug: #17751
Change-Id: I43e7ee6b5396e0309cdcff750e28262942c6d01c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5330
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-24 16:37:29 +00:00
Jérôme Duval
9e991b61fe intel_extreme: switch FDI to i915 register naming
Change-Id: Ib7382240a2bc07dbbd2aed7647b06f14a6c5cb4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5335
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-24 15:52:46 +00:00
Jérôme Duval
59ce1ffe61 intel_extreme: check internal crt feature in VBT for analog probe on DDI
* also uses the BAR size when dumping regs (as done by the intel_reg tool).

Change-Id: Ie29768afc8f9c42bb9a03b2866db34c4b0e43b7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5334
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-24 15:52:46 +00:00
Jessica Hamilton
5e5bb3318e BStringList: update DoForEach to abort the iteration early.
* This matches `BList::DoForEach`, and the passed in function
  was already returning a boolean, but was not used.

Change-Id: Ifac94734b6181663726cb7aaa7966c5c0ca59bc8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5337
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-24 04:35:46 +00:00
Jessica Hamilton
a0a83410c4 docs/BList: fix DoForEach to match BeOS.
* The function passed to `DoForEach` returns `true` to terminate
  the loop early

Change-Id: If445836b14c44b981d169564e7beab8c0ecac36f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-24 04:35:46 +00:00
Andrew Lindesay
7d137fd96a HaikuDepot: Issue with Version Dates
Resolves an issue where package version dates are not
updated in the UI as they are updated in the model.

Change-Id: Ic21954f91abb9c6f9bf0907500e189215adb70de
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5333
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-23 20:25:23 +00:00
Pascal Abresch
eb9ff8e5a7 libtracker: Fix Tests.cpp compilation
Change-Id: I5a738e71a92846cfe7cc46727be65ff0f57d4c39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5328
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-21 14:54:29 +00:00
Autocomitter
193c594405 Update translations from Pootle 2022-05-21 08:14:41 +00:00
Alexander von Gluck IV
ea166fa97e build/repo/riscv64: Bump python to 3.9.1, add libffi
Change-Id: I2f15f2ce856fa8c6a105cdb09efe9da90694bb50
2022-05-20 22:31:01 -05:00
Alexander von Gluck IV
f8ef244100 system/riscv64: Use dtb-based time cv for system_time
* Fixes speedy-system_time in qemu

Change-Id: I07ae4d984c09f2f2503bd45acc415c219f3b3f11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5327
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-20 21:54:45 +00:00
Augustin Cavalier
6c675bab59 XHCI: Defer writing the cycle bits for the "wrapping" link TRB.
There is already a comment above this that some controllers choke if the
target of a link TRB is invalid, and thus to not write the cycle bit
of the link TRB until said target is valid, but we did not follow that
when writing the link TRB to go back to the beginning of the ring.

Also put in a memory_write_barrier before writing the cycle bits,
just to be sure.

Tested in QEMU. May help with errors seen in #17749.
2022-05-20 17:32:17 -04:00
Alexander von Gluck IV
ca49b33f40 build/repo: Adjust riscv64 packages to older icu57
* This is a temporary workaround for #17468.  Using the older
  riscv64 icu-57 package (compiled with gcc 8.x) removes
  the userspace hang on startup of Haiku.
* Thanks to X512 for the workaround.
* icu66, icu70 compiled with gcc 11.2.0 exhibits the
  userspace hang at startup.
* We have a lot of bootstrap work to do, and this gives us
  a riscv64 image which boots for testing + building software
  in a native environment.

Change-Id: I503a1e99ff38450628c0863100450c883139a25a
2022-05-20 12:48:00 -05:00
Jessica Hamilton
f5dd7d3c7b libroot_build: fix stat of files in a symlinked directory
Only manifested itself with the host build tools, where looking
up a file inside a directory that is a symlink would fail, as the
cached stat info in NodeRef would fail to match the stat info to
check that the path still exists, as `lstat` returned the stat info
of the resolved symlink. Replacing `lstat` with `stat` fixes the
mismatching stat information cached in the NodeRef.

* Fixes #17750

Change-Id: I7cc360dd4678d2c4cf1186e9f39490a6bfd946a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5325
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2022-05-20 17:19:28 +00:00
Jaidyn Ann
87db9cb2a6 MediaPlayer: Add per-track scripting items
Somewhat restructures scripting interface: Playlist items can be
accessed/added/removed through PlaylistTrack, current item can be
accessed through CurrentTrack. Also adds an IsPlaying property.

Fixes #13881

Change-Id: Iad333ec20ab00ff57147c7e1359a24dea04d6aa2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5316
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-20 16:05:44 +00:00
Jaidyn Ann
cc9bc8c6fb Move DateTimeEdit into libshared
BInvoker methods are now used, and input-handling is also tweaked.

Change-Id: I120cca8df9f11c11aac80911108d62fb49488f8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4927
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-20 05:19:05 +00:00
Augustin Cavalier
f43b88e836 freebsd_network: Use Haiku's PCI capability finding functions.
Instead of reimplementing them in here, for which there is no need.
2022-05-19 23:07:01 -04:00
Augustin Cavalier
458c40fb27 freebsd_network: Drop arpcom from if_arp.h.
It was dropped from FreeBSD somewhere between 9 and 13.
OpenBSD has an equivalent structure but it is not compatible.
Best to avoid it altogether.
2022-05-19 22:04:43 -04:00
Jérôme Duval
c35e9b906a ScreenMode: add some manufacturers
Change-Id: Id3eea56f5e0d453817eaedb4f1d6a6014af8f9e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5321
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-19 19:17:50 +00:00
Alexander von Gluck IV
071f4aad57 kernel/user_debugger: Show the thread name in addition to the id
* Helps in debugging early boot issues where you won't have
  access to the list of thread id's

Change-Id: Ic06bd0b53ccceccd8c911156724a799ca6a1c28b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5322
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-19 16:55:27 +00:00
milek7
088321c119 arm64: Fix typos in arm_registers, add define for nGnRE.
Change-Id: I43aa971f2ead3a171af3c707539cbe08ff60cae5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5262
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-19 09:42:42 +00:00
milek7
a25542e7ef arm64: MMU WIP.
Change-Id: I19b2b9617fcb7bc047f9bea156801ec78786532e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5261
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-19 09:42:42 +00:00
Jérôme Duval
514c42d740 intel_extreme: improve DpAux support on HSW/SNB/IVB
hraw_clock is possibly dynamic, but for the usecase this seems good enough.
Tested on SandyBridge and Haswell laptops.

Change-Id: I045b3c03f6b37bbffb3d8688658ffaa2a97311ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5319
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-18 22:02:01 +00:00
Jérôme Duval
fe3aff01c0 intel_extreme: probe DP AUX or/and DDC on DDI ports
* the VBT tells whether DDI ports can have both DP and HDMI/DVI as outputs.
* tested on Dell Optiplex 9020 Gen7/Haswell with an HDMI/DP adapter on a DP connector.
* avoids enabling a down DDI port when an EDID is found: the display isn't setup by the BIOS.

Change-Id: I69487a2fcb74899d7c22d04e955e776b0e739151
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5317
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-17 18:36:42 +00:00
Jim906
07d5dba065 kernel/drivers/disk: enable Werror
* For NVMe library, disable warnings.
* Otherwise, change code to avoid generating warnings.
* No functional change.
* Fixes #9460.

Change-Id: Ia790de391e6b230c909dff7023f00a19bdd574be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5284
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-17 11:33:25 +00:00
Jim906
9570ee3534 FileTypes: Improve ApplicationTypeWindow cascading
* Using StyledEditApp as a model, ensure that multiple Application Type windows do not cascade so far that they open partially off-screen.
* Add a dedicated function, FileTypes::_AppTypeCascade, to set the position of the next ApplicationTypeWindow to be constructed and save this position in FileTypes::fSettings.
* Unlike StyledEditApp, do not add an uncascade function, because existing code in ApplicationTypeWindow::QuitRequested already resets app_type_next_frame.
* Follows up on https://review.haiku-os.org/c/haiku/+/5164.

Change-Id: I9cbb58ba391ddafdd1ea136157e5c6129bf41ebd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5307
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-17 11:31:12 +00:00
PulkoMandy
6ee62ca6c6 Installer: make sure there is space for 5 lines of text in the status view
Fixes #17095

Change-Id: I53752d6ee60a913f230dc44eddac7f872db6c184
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5314
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-17 11:29:20 +00:00
Mashijams
b666bf3fd8 xfs : Enabling -Werror and fixing all build issues that result
This patch will fix almost all warnings we have in xfs code.
There are some which I haven't fixed yet, I added comments on
part of code which is giving error and its type as well.

I tested all the changes on xfs_shell and everything is
working fine.

Change-Id: I1af1d09e7eab7f2c2397193bd5a584c5d40c424c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5257
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-17 11:28:43 +00:00
Máximo Castañeda
2e75ef07fe Fix 32bit build
Change-Id: If7c2da0a28302f5535eda25999b1f877cbca1152
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5315
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-16 16:05:09 +00:00
Augustin Cavalier
9e85b9ea2a network/stack: Return immediately from device_reader_thread after calling device_removed.
Otherwise we can and will use-after-free the device structures.
It seems this code has been broken this way since it was first added
in cc8eceb0af (2010).
2022-05-14 11:52:19 -04:00
PulkoMandy
3ad6b5ecba usb_rndis: accept incoming USB transfers up to 0x4000 size
As required by the spec. Then split them into multiple ethernet frames
as needed.

Fixes #17738.

Change-Id: I71ebff0fe1fc5c8a342d6d06b26eda8e87115e04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5312
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-14 15:48:51 +00:00
Augustin Cavalier
a806e3678a network/stack: Update and add comments in down_device_interface.
The function names in the comment were not been updated in some time,
so synchronize those with how things presently look.

Also add another possible codepath, from device_removed. This one can
and is invoked from the device_reader_thread, in the case where
we get B_DEVICE_NOT_FOUND from receive_data. That is now taken care of
by having wait_for_thread return EDEADLK, we need only note it here.

Change-Id: I18320c2831dce99a34b07de862a0a5c8b4e4e98d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5311
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-14 15:26:32 +00:00
Augustin Cavalier
d9694912a7 kernel: Have wait_for_thread fail with EDEADLK when the current thread is specified.
This behavior is not required by POSIX (for pthread_join), but it
is recommended and other OSes seem to implement it.

This constitutes a behavioral change from BeOS, which just deadlocked
as we do before this commit (I checked.) Preserving this behavior does
not seem very useful, though if in the future we need to, adding a check
to libroot is easy enough.

This fixes a deadlock encountered when the usb_rndis driver is unplugged;
the network stack has a removal path that invokes wait_for_thread on
the receive thread, but the function can itself be called from the
receive thread.

Change-Id: Id3639d98a513f2b0f0bacc90d8d27abb5078857b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5310
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-14 15:26:32 +00:00