Commit Graph

62874 Commits

Author SHA1 Message Date
Augustin Cavalier
db0b7d8401 build: Use $rmAttrs and $(RM) in more places instead of 'rm' directly.
Should not result in a functional change in most cases, but it might
on some systems without full xattrs or emulation.
2021-09-06 15:59:44 -04:00
Augustin Cavalier
d8ffdea39e build/scripts: Add missing set -e to rm_attrs. 2021-09-06 15:58:03 -04:00
Alexander von Gluck IV
08d9e48492 servers/bluetooth: Fix scaling of deskbar icon
Change-Id: Id83a1aeb9736be1d08ba10bb52ab81f2cab11625
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4426
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-06 16:22:31 +00:00
Adrien Destugues
85ab8ef650 ps2 synaptics: don't spam the syslog when nothing happens
Some logs are emitted even when nothing at all is happening, constantly
spamming the syslog. Log them only the first time they happen.

Change-Id: I81511a7ce245c2141fa3dcd141b2f3732d9b51ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4424
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-05 23:49:44 +00:00
Adrien Destugues
fdbbdccc05 ps2: allow more selective tracing
In some cases, we don't need the full tracking of every byte received at
the PS2 level, but higher level traces from specific devices will be
enough.

Change-Id: I31984e6b7784b5d033b457f43f3793f772213f4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4423
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-05 23:49:44 +00:00
Augustin Cavalier
cadaf7583f XHCI: Resolve TODO about referencing the specification in isochronous handling. 2021-09-04 13:12:25 -04:00
Augustin Cavalier
16414ce406 USB: Add assert that GetObjectNoLock is only called from the debugger. 2021-09-04 13:11:31 -04:00
Augustin Cavalier
549e9a3cdc USB: Adjust comment about stack drivers for clarity.
No code changes.
2021-09-04 13:11:02 -04:00
Alexander von Gluck IV
4a70391472 arm: make sure fdt bus_mananger is added for arm
* Fixes build and arm arch alignment for
  AddBootModuleSymlinksToContainer

Change-Id: I39c8270623bf00e484c5eb0335be6da33f1604aa
2021-09-03 17:34:42 -05:00
Augustin Cavalier
39fb148abd UHCI: Disable isochronous transfers support.
It busyloops, and at least on QEMU, does not seem to work at all.
2021-09-03 17:27:48 -04:00
Augustin Cavalier
b99d228dce usb_audio: Set real_time from the time during device buffers exchange.
As opposed to driver/userland buffers exchange. This is what the other
multi_audio drivers do.
2021-09-03 17:27:10 -04:00
Augustin Cavalier
ccb3e7120c usb_audio: Clean up buffer management.
* Get rid of fPacketSize and use fSamplesCount in GetBuffers instead.

 * Clarify logic in _TransferCallback.

 * Properly multiply in kSamplesBufferCount to fAreaSize
   (this should be the only functional change in here.)

The larger buffers (now similarly sized to HDA at least in the
default cases of 44100 or 48000) seem to help with jittering
and discontinuities, which are significantly reduced now,
at least under emulation.
2021-09-03 17:25:21 -04:00
Augustin Cavalier
34352671ed usb_audio: Yet more code cleanup.
Slight logic tweaks but no real behavioral changes intended.
2021-09-03 17:21:47 -04:00
Augustin Cavalier
7a3c48b407 kernel/apic: Add missing include.
This only is needed on certain build configurations for some reason.
Thanks to augiedoggie for reporting.
2021-09-03 13:53:51 -04:00
Augustin Cavalier
d92c60dc03 multi_audio: Rework validity checks in the constructor.
In hrev55048, checks were added to bail on initialization if invalid
audio formats were present either in inputs or outputs, which broke
any audio nodes that supported only one or the other. Now, instead,
we check channels first, and even then do not bail on invalid formats,
but simply do not declare support for inputs or outputs respectively.

This solves the initial cause of #17235. However, that ticket refers to
an unrelated problem this bug merely exposed, and so it should remain
open until that is resolved.
2021-09-03 11:18:27 -04:00
Augustin Cavalier
625b5fc8fa XHCI: Use a more approriate error code.
Stalls cause "HALTED" conditions on endpoints, so use B_DEV_STALLED.
Also clarify the comment referencing the specification, and add a
missing linebreak to the error message.
2021-09-03 11:15:48 -04:00
Augustin Cavalier
7b2bc8351a usb_audio: Properly separate kernel and userland data.
* Allocate the descriptors array separately from the data area.
 * Clone the data area for kernel use separately from userland use.

Fixes the remaining SMAP problems with this driver.
2021-09-03 11:14:34 -04:00
Augustin Cavalier
140c408d7b usb_audio: Correct mixup between Input terminals and Input streams.
An "Input" terminal in USB audio terms refers to any stream of audio
going "in" to the USB device, whether that be from the outside world
(e.g. a line in jack) or from the computer (e.g. via USB OUT endpoints.)

So we cannot rely on the terminal type to tell us whether it is an in
or an out for our purposes, we have to check the stream type, and then
use that to declare to multi_audio what kind of stream we have.

Fixes USB audio mixing up inputs and outputs, especially on devices
that only have one or the other and not both. (QEMU manifested
this problem.)
2021-09-03 11:13:29 -04:00
Augustin Cavalier
3f7da9312e usb_audio: Code cleanup.
No functional changes intended.
2021-09-03 11:08:18 -04:00
Murai Takashi
95682340fb lgtm yml: remove buildtools archive after unzip it.
This may help fixing lgtm build failure "There is not enough space on the disk".

Change-Id: I5db5748b73e611ec6b66a8effdf5ad39969f9bde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4415
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-03 11:49:54 +00:00
Augustin Cavalier
e755ecb584 USB: Move usb_iso_packet_descriptor to a separate header.
The USB Kit uses it, so this allows the USB Kit to stop including
USB3.h.

Change-Id: Ifde025ec41bef92013fda0440d60b7216cfdbe4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4413
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-02 16:00:17 +00:00
Gerasim Troeglazov
9ac8709cef CodyCam: fix position and size for ControlWindow
Change-Id: I8a305cab294c788179d8e81d12a9be768d5fb925
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4406
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2021-09-02 15:52:07 +00:00
Augustin Cavalier
2331cde84f XHCI: Fix RemoveEndpointForPipe.
It seems this has been broken since I originally wrote it in 2019,
but it only gets called in two scenarios: on device unplug (where
it does not really matter), and on interface changes (where it does.)
Apparently very few people tried to use devices that depend on interface
changes, because those would have been totally broken by this.

There were actually two bugs here:

1. ConfigureEndpoint should not be called with the Deconfigure bit set.
(See inline comment.)

2. The first bit must be set in the context add flags.

Fixes #14971 at least, and possibly others as well.
2021-09-01 19:48:19 -04:00
Augustin Cavalier
ad245b6cdb XHCI: Fix endpoint flags bits macros.
There can be up to 32 endpoints, so the correct mask is 0x1f.
Checked against FreeBSD.
2021-09-01 19:44:37 -04:00
Augustin Cavalier
22002cf4a5 USB: Rename usb_endpoint_companion_descriptor...
...to usb_endpoint_superspeed_companion_descriptor, as it is
really SuperSpeed-specific (there are more companion descriptors
introduced in SuperSpeedPlus.)

No functional change, and this is a private struct at present.
2021-09-01 14:41:12 -04:00
Augustin Cavalier
6425e173b1 Add more missing headers following previous commits.
These also are only a problem on riscv64; I guess thread.h
must not be included in some arch header there.
2021-09-01 14:15:17 -04:00
Alexander von Gluck IV
372b901dfe riscv: cleanup architecture macro checks
* We really should get out of the habbit of making up
  our own architecture defines.
* __riscv with an additional  __riscv_xlen is the
  standard that developed... let's just roll with it.

Change-Id: Ieb777d48340ae25a6d66f66133afa0ec5c6da9b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4402
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-01 18:04:59 +00:00
Augustin Cavalier
f40bacae87 kernel/slab: Add another missing include following previous commits.
Somehow, this only errored on riscv64. Go figure.
2021-09-01 13:53:05 -04:00
Augustin Cavalier
1029af1793 Add missing includes following previous commit.
All these files were making use of headers included indirectly
through AutoLock.h that are now no longer following the previous commit.
2021-09-01 13:10:04 -04:00
Augustin Cavalier
057fe1910d kernel: Break thread-related AutoLockers into a separate header.
Including thread.h brings a massive array of things with it from
the kernel thread arch headers, team and thread definitions,
hash tables, linked lists, Referenceable, etc. that the vast majority
of AutoLock.h consumers neither want nor need.

So, put these in a separate header, and adjust all consumers of these
lockers to include the new file.

This change exposes the fact that a lot of files were inadvertently
making use of headers included indirectly through thread.h. Those
will be fixed in the next commit.
2021-09-01 13:08:49 -04:00
X512
a0c6f022c4 device_manager: add path and module name attributes
* Set driver module name of device_node.
* Set device module name and path for published devices.

This helps to understand what driver is used, and it's /dev path in the
Devices app.

Change-Id: Ibd902a322da7e4276052bd4429a7b869a56a592b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3390
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-01 02:23:54 +00:00
Augustin Cavalier
0ac46a4ae9 kernel/debug: Adjust range marker macros.
Previously these were just using the raw function name, which led
to markers like "Slab_begin". Now we prefix RANGE_MARKER_ so there
is absolutely no chance of confusion, and the symbols are clearly
visible in dumps.

Also add a note that the kernel must be built with -fno-toplevel-reorder
for these to work. (It seems when this was implemented, GCC had not yet
implemented top-level reordering.)

They are only used for debugging with the tracing system in a handful
of places, and -ftoplevel-reorder is enabled with optimizations for
a reason, so it makes more sense just to note this and not to enable
that option by default (i.e. in the off chance someone will want to
use these in non-debug builds, like I did.)
2021-08-31 22:00:36 -04:00
Fredrik Holmqvist
f65d15c59a AARCH64: Do not add uboot to bootoloader
Aiming for RPi4 and there we can do UEFI + ACPI:
https://rpi4-uefi.dev/about/
2021-08-31 20:25:23 +02:00
Fredrik Holmqvist
336321b113 AARCH64: Implement enough of relocations to get kernel loaded 2021-08-31 20:22:15 +02:00
Coldfirex
e4f758ee83 Update missing arch relocations
Change-Id: I2d48b810f5e3143377fa58e1de5801ebf0be82cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4409
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-08-31 18:05:45 +00:00
Coldfirex
3d4afef9cb Bump vmx files to virtualHW.version = '13'
Will allow USB3, 64vCPU, NVME, etc.  Versions below 13 are only for vmware products currently EOL.

Change-Id: I83303ab985f615852267e2539b350f72f05231e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4410
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-08-31 16:05:50 +00:00
Augustin Cavalier
6c0b410650 kernel/slab: Fix build with SLAB_ALLOCATION_TRACING enabled.
Unfortunately it does not work, I get this when invoking
allocations_per_caller at the kdebug prompt:

     92513     9162096  0x0000000000000000  <NULL> + 0x0 (commpage) (nearest)
     12602     2108408  0xffffffff80132a50  _Z23add_alloc_tracing_entryP11ObjectCachejPv + 0x70 (kernel_x86_64)

The stack tracing system must be broken, or maybe it has never been
properly adjusted for x86_64.
2021-08-30 20:28:03 -04:00
Augustin Cavalier
084c6fa130 libuuid: Tweaks to Jamfiles.
* Do not define _KERNEL_MODE in the build variant.

 * Use KernelStaticLibrary so that _KERNEL_MODE
   is defined automatically in the kernel variant.
2021-08-30 18:50:46 -04:00
Gerasim Troeglazov
c7bd3e69fa Tracker: fix generating filename on duplicate
sizeof for the pointer can't be used for buffer size calculation

Change-Id: I9c6b04ebc7abc3864a64fb6202e457eeb8d6787f
2021-08-29 20:49:47 +10:00
Fredrik Holmqvist
caa2b52eaa Intial HaikuPorts config for ARM64 2021-08-28 17:47:22 +02:00
Fredrik Holmqvist
00ca8b4cf2 Avoid adding uboot for ARM64 bootloader
Maybe it will be needed on real hw later.
2021-08-28 17:42:31 +02:00
Fredrik Holmqvist
a6a9b8b703 Remove fdt from arm64 haiku image
Might be added back later, at the moment fdt code is not done
2021-08-28 17:34:10 +02:00
Augustin Cavalier
f27a660a6a kernel: Style fixup. 2021-08-27 19:02:20 -04:00
Augustin Cavalier
9c91c3b5a2 kernel: Adjust timeout computation for syscall_restart.
If the timeout is already >= B_INFINITE_TIMEOUT, we do not need
to do any of the following math (which would usually overflow anyway)
and can leave the timeout alone.

Spotted by kernel undefined behavior sanitizer.
2021-08-27 18:57:50 -04:00
Augustin Cavalier
3ca830e364 kernel/team: Adjust address_space assignment slightly.
For the kernel team, we now assign it in team_init instead of having
a special case in Team::Team(), making things more similar to the
userland team creation.

Should not change any real functionality as Team::Create calls
almost nothing outside of this file.
2021-08-27 18:57:50 -04:00
Emmanuel Gil Peyrot
147b47e086 Translators: Add an AVIF translator
This translator only supports still images for now, and supports both
decoding and encoding.

Encoding support has been tested only with aom, rav1e doesn’t build on
Haiku yet, see https://github.com/haikuports/haikuports/pull/5534 for
one of the missing dependencies.

Change-Id: I716f4b862ed316b89b227bfed38072d72074201f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3040
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-27 19:04:28 +00:00
Augustin Cavalier
6bb8ecb02b package_infos/generic: Remove ">= 66" from ICU.
The "update dependency versions" step automatically adds the requisite
versions to this file during the build based on whatever the build
system is actually using, so this is not necessary; and it seems
that some architectures besides GCC2 are still on a version of ICU
less than 66.
2021-08-27 14:08:45 -04:00
John Scipione
f7e7bce8e1 Tracker: Truncate long file names in middle
... so that you can see the extension.

Change-Id: I0c3cdcede912f6ccc7dfb8360bfd82599c8117c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4323
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-27 17:56:54 +00:00
Augustin Cavalier
822ee1243a fs_shell: Detect 64-bit by comparing LONG_MAX and INT_MAX.
This is how we do it within the kernel itself. Should fix build of fs_shell
on 64-bit platforms that are not x86.
2021-08-27 13:51:41 -04:00
Augustin Cavalier
e3acf8917b Fix usage of Zstd build feature.
We do not actually need a SetupFeatureObjcetsDir here, as this build feature
is used unconditionally if it is available (unlike OpenSSL which is not,
and which needs a feature objects directory.) It appears FeatureObjectsDir
expects to be called unconditionally, i.e. in an "else" as well as "if",
so this actually caused some build oddities.

Additionally, since it is built unconditionally if available, we have
to put it outside the "regular" checks in the PackageInfo so that it
will be included in the images. This fixes booting @minimum images,
which was apparently broken at some point when "zstd" was inadvertently
removed.
2021-08-27 13:50:07 -04:00