Commit Graph

63162 Commits

Author SHA1 Message Date
Jérôme Duval
65496b3a28 matrox: SMAP fixes
tested with success at least on VGA, see #16069. Thanks TmTFx and rudolfc!

Change-Id: I4183416b09216b111984658eb8b23c8f62a0e36d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2762
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-10-04 15:15:22 +00:00
Rudolf Cornelissen
66af68c2e6 intel_extreme: only primary accelerant should kill the locks. Should fix trouble after closing clones. 2021-10-03 13:49:40 +00:00
Augustin Cavalier
7aa5574713 kernel & addons: Build with the non-legacy GCC even on x86_gcc2h.
Only one code change: for some reason, GCC chokes on the cr3 functions
as macros (throwing errors about invalid registers.) The BSDs have them
as inline functions instead, so they are converted to that here.

Tested and working. There seems to be about a 10% decrease in CPU time
on some compilation benchmarks that I briefly tried.

Change-Id: I31666297394d7619f83fca6ff5f933ddd6f07420
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4515
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-02 18:29:40 +00:00
Jérôme Duval
407f08de29 usb_disk: fix SMAP violation for B_GET_MEDIA_STATUS ioctl
should fix #17283. To be tested.

Change-Id: If594129a6e16b50c314efa2a7bb1d18e01cdad15
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4505
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-02 15:06:29 +00:00
Autocomitter
92c0f8bf27 Update translations from Pootle 2021-10-02 08:46:11 +00:00
Augustin Cavalier
c4eec9f1e8 Distinguish KERNEL_ARCH_DIR from KERNEL_ARCH.
On x86_64, the KERNEL_ARCH should really be "x86_64", but it was "x86"
as the architecture sources/headers directory is shared between 32 and 64 bit.

Should not be a functional change on any platform outside x86_64.
2021-10-01 16:26:45 -04:00
Murai Takashi
2cc1b23d48 boot/platform/efi/arch/x86_64: fix -Warray-bounds
Size of gBootGDT[] is 'USER_DATA_SEGMENT + 1' defined at line 26,
and it equals USER_CODE_SEGMENT, so gBootGDT[USER_CODE_SEGMENT]
is out of bounds at line 44.

Change-Id: I1374f4d1185b6a47f910ac128d49a07cdd80d925
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4536
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-10-01 13:55:43 +00:00
Augustin Cavalier
1496cfe1de Remove now-unused WiFi firmware binaries from the repository.
They were outsourced in the previous commit.
2021-09-30 19:24:03 -04:00
Augustin Cavalier
7fd8b4addd Outsource most WiFi firmwares.
Some are still in-tree and need to be removed, but this takes care
of all recent Intel, Realtek, and also the old Ralink chips.

This cuts down the size of haiku.hpkg by close to 10MB.
2021-09-30 19:23:22 -04:00
Augustin Cavalier
e8a8e39533 Update build-packages for x86_64.
Introduces libraw and libavif for the translators.
2021-09-30 19:12:43 -04:00
Augustin Cavalier
30e3418589 Revert "Jamfiles: Repace TARGET_PACKAGING_ARCH with TARGET_KERNEL_ARCH in a few places."
This reverts commit 6683314327.
2021-09-30 18:47:40 -04:00
Augustin Cavalier
e87395438a Revert "Jamfiles: Repace TARGET_PACKAGING_ARCH with TARGET_KERNEL_ARCH in a few places."
Previous revert inadvertently staged a different version. That's what I get for
rebasing 3 things at one time...

This reverts commit 6683314327.
2021-09-30 18:44:16 -04:00
Augustin Cavalier
24e15920a2 Update build-packages for x86_gcc2.
zstd is left disabled on GCC2 despite being added due to problems in kernel-land.
2021-09-30 18:40:06 -04:00
Augustin Cavalier
4319e24c4e Revert "Jamfiles: Repace TARGET_PACKAGING_ARCH with TARGET_KERNEL_ARCH in a few places."
This reverts commit 6683314327.

Apparently, on closer inspection, this is not actually correct:
TARGET_KERNEL_ARCH is "x86" even on gcc2, and not an index into
the TARGET_CC_* etc. variable sets. That is pretty confusing and should
probably be fixed.
2021-09-30 18:36:05 -04:00
Augustin Cavalier
1bcecb98c3 nvme_disk: Add structure padding for 32-bit.
The static asserts are broken on GCC2 and so did not catch this. It appears
nobody has ever tried to use this structure on 32-bit plaforms in the upstream
libraries or SPDK/DPDK?

Fixes #15212.
2021-09-30 18:05:16 -04:00
Augustin Cavalier
6683314327 Jamfiles: Repace TARGET_PACKAGING_ARCH with TARGET_KERNEL_ARCH in a few places.
This is more technically correct.
2021-09-30 18:03:29 -04:00
Augustin Cavalier
ec29597345 freebsd_network: Put MII and USB headers in the common generated directory.
They are not in any way architecture-specific. Simplifies the various driver Jamfiles.
This also paves the way for some upcoming changes that make the kernel always be built
with the non-legacy GCC...
2021-09-30 18:03:29 -04:00
Augustin Cavalier
2aaa4f6aad package_infos: Fold x86_gcc2/haiku into generic.
Only a few #ifdefs now required. Verified the generated packageinfos
are identical at the end.
2021-09-30 14:06:45 -04:00
Augustin Cavalier
7f4c5a1fe7 launch_daemon: Do not return errors from RegisterExternalEvent.
We will pick up events that have no match later on, and if we return
an error here, it will prevent the job from being initialized, which
we definitely do not want.

Fixes #17291.
2021-09-30 13:25:54 -04:00
Augustin Cavalier
63b76faeea Break translators out of haiku.hpkg into a separate haiku_datatranslators.hpkg.
Translators and media-plugins are the main source of dependencies in haiku.hpkg,
and thus the main source of packages being pulled into chroots, especially
HaikuPorter chroots. (FFmpeg pulls in a rather large array of sub-
dependencies, itself.) So, here we break all the translators into their
own sub-package.

For now, haiku.hpkg is declared to depend on haiku_datatranslators,
so that users will not suddenly update and have no translators.
In the future, this will be dropped.

Note that this is only done for the primary arch at present.
Secondary architecture translators remain in the main secondary package
for now.

Change-Id: Id0b352f34f7110b79ec7787792bf3ae0edab4054
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4477
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-30 16:38:36 +00:00
Franck LeCodeur
7b1db53111 network/datalink_protocols: Enable Werror as there are no related warnings
Part of #9460

Change-Id: Ibcc30af0c2d351742cbedd6df15b2880b92edfee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4513
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-30 13:33:30 +00:00
Franck LeCodeur
521f76b999 network/stack: Enable Werror as there are no related warnings
Part of #9460

Change-Id: I4958c99c828a34343481b8e6ada877c9124411a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4512
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-30 13:33:30 +00:00
Augustin Cavalier
81eacf8d4f highpoint_ide_pci: Rework tracing.
* Rename TRACE to INFO as it is always enabled.
 * Rename TRACE_EXT to TRACE in line with other drivers.
 * Move most previously-TRACE-now-INFO message to TRACE,
   removing them from debug output.

This should get rid of the Highpoint-IDE syslog spam in every boot log.
2021-09-29 15:37:56 -04:00
Augustin Cavalier
627dc1ffed USB: Less-than-equals comparison for length and MAX_FRAGMENT_SIZE.
We want to continue iterating until we have either reached the end
of the vectors or until we know that length is greater than MAX_FRAGMENT_SIZE,
so we need <= here, not <.
2021-09-29 13:35:32 -04:00
Augustin Cavalier
895e0c8a32 launch/system: Use single-line "on" trigger.
The "user" launch file already uses this everywhere, so
we may as well save a few characters.
2021-09-29 13:33:21 -04:00
Alexander von Gluck IV
4ef28d2f12 image/definition: Add missing empty control_look, opengl dirs
Change-Id: I3db814c7a05666f4755f3375ec7d5f4295b24d84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4507
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:50:02 +00:00
Andrew Lindesay
7f86c21945 HaikuDepot: Fix language selection
Fixes a problem that can arise with the
selection of language when adding or
editing user ratings.

Fixes #11316

Change-Id: I85625cdc156458d88f4d1ca01ae889d954364ffd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4511
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:48:38 +00:00
Augustin Cavalier
ce308ddc6b launch_daemon: Trigger sticky-already-triggered external events immediately.
If the external event is sticky and already triggered, then we want
to trigger any newly-added events immediately. This fixes "boot hangs
on rocket" regressions following 4f126f690c,
which seems to have exacerbated this already-existing race condition.

Fixes #17289.

Change-Id: Ie405826cc50255895c8831c34b8bdf902e584eb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4510
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:44:35 +00:00
Augustin Cavalier
b19b3d9b39 launch_daemon: Refactor handling of ExternalEventSources.
* Refactor ResolveExternalEvent to actually return the resolved event,
   not just whether or not one was found, and then skip resolution
   in TriggerExternalEvent and ResetStickyExternalEvent, which now
   should only be passed ExternalEvents.

 * ExternalEventSources now store destination Events, not Jobs,
   following on that refactor.

 * The second variant of ResolveExternalEvents is dropped,
   and instead the Register/Unregister functions are implemented.

 * Trigger and ResetSticky are now done in ExternalEventSource,
   which now keeps track of whether it has been sticky-triggered
   or not, though it does not use this information yet.

These changes should not affect behavior, they largely constitute
a reorganization (though some TODOs are resolved.)

Change-Id: I46a51cac0edb90e90b154ef9c94791cb7a1aad94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4509
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:44:35 +00:00
Augustin Cavalier
ffc83aa24a USB bus drivers: Add missing iterator increments.
Should fix boot hang regressions introduced in hrev55455
in the fix for #17275.
2021-09-28 14:36:44 -04:00
Augustin Cavalier
337b483bd8 XHCI: Use MutexLocker in _LinkDescriptorForPipe.
No functional change.
2021-09-28 13:25:27 -04:00
Augustin Cavalier
3ff662a5a2 PCI: Remove dprintfs and now-dead code following RISCV64 merge.
It appears kallisti5 forgot to remove these.
2021-09-28 12:43:30 -04:00
Augustin Cavalier
4f126f690c mount_server: Connect on-demand to app_server.
This is similar to with the registrar and debug_server,
both of which are started before app_server, already do.
In the case where we cannot connect to app_server for
_SuggestMountFlags, we default to read-only.

(This should however never happen, at present.)
2021-09-27 18:38:03 -04:00
Augustin Cavalier
65fc7380ca power_daemon: Use BServer and do not connect to app_server.
Just like syslog_daemon in the previous commit, power_daemon
does nothing GUI-related, so we can skip connecting to app_server.
2021-09-27 18:35:30 -04:00
Augustin Cavalier
ba56491ea0 syslog_daemon: Use BServer and do not connect to app_server.
axeld did all the hard work in 4bf862e368
but did not actually change the instantiation to use BServer. We now
do that, and pass "false" for "initGUI" to avoid connecting to app_server,
as syslog_daemon never does anything GUI related.
2021-09-27 18:34:45 -04:00
Augustin Cavalier
2aa85f5f78 VirtualKeyboard: Fold KeyboardLayoutView back into the Keymap preferences one.
Only one #ifdef, the rest is all in basic if-tests. Relatively minimal changes,
and now the virtual keyboard device gets all the improvements made to the keyboard
layout view over the last 6 years.
2021-09-27 18:25:44 -04:00
Augustin Cavalier
ae61e1b716 USB bus drivers: Return error when combining other transfers with a fragmented one.
The drivers do not support this properly at present, they would
run the other transfers interspersed with fragments from the fragemented one,
which is obviously the wrong thing to do.

No USB device drivers seem to do this at present (it would cause data
corruption if they had.)

Fixes #17275.
2021-09-27 16:28:01 -04:00
Rudolf Cornelissen
1681f7f4fe intel extreme: fixed virtualscreen panning glitches on pre-Haswell. Smooth now.. 2021-09-27 22:23:21 +00:00
Augustin Cavalier
d5f7f40504 tests/interface/bshelf: Import Container and ShelfInspector.
These come from the Haiku Newsletter, issue 56 article 2, which I
managed to retrieve the source from the Wayback Machine. (They
are based on applications from Be's Sample Code distributions.)

Jamfiles not yet included; the source is in unmodified form,
except the RSRCs have been decompiled to RDEFs.
2021-09-27 16:18:54 -04:00
Jérôme Duval
08d9716a9a video_producer_demo: fix comparison warnings
Change-Id: Ibfc8780c55e229190573918a4cf1f119b5e345c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4504
Reviewed-by: Franck LeCodeur <cassisian@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-27 12:15:05 +00:00
Rudolf Cornelissen
fe8f9e2326 intel_extreme: set B_SCROLL, share current mode. Cloning and BWindowScreen now work OK. 2021-09-27 10:19:43 +00:00
Rudolf Cornelissen
1e0fdd6d98 accelerants common:BWindowScreen.CanControlFrameBuffer() now says OK. Note that these mode.flags are _outputs_ from the accelerants 2021-09-27 10:16:59 +00:00
Jérôme Duval
bb187c91d8 interface: add colorspaces support for RGB48 and RGBA64
these colorspaces are packed as RGB or RGBA, not BGR or BGRA.
RGB48_BIG and RGBA64 only differ in the endianess of the channel the 2-byte value.

this is a big difference with RGB24_BIG and RGBA32_BIG, in which case _BIG
means the order is RGB (BGR) and not BGR (BGRA).
BGR48, BGRA64 could indeed be added, if needed.

I chose 0x11 and 0x12 arbitrarily, but given the order of channels 0x1011
and 0x1012 might make more sense. This would mean using another bit for "real"
bigendian colorspaces.

Only the color conversion to 32-bits is implemented.

Tested with the RAWTranslator modified to output 16bpp with success.

Found some references in enum AVPixelFormat in libavutil/pixfmt.h.

Change-Id: I4b023dec85d01f1e63e1b053139e5bb5d263a0e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4468
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-27 07:21:27 +00:00
Autocomitter
c1432f757f Update translations from Pootle 2021-09-25 08:45:01 +00:00
X512
ad3f57ef5a kernel/debug/frame_buffer: Lock should always be initalized
* Without this, kernel will crash on boot when a framebuffer
  isn't provided by bootloader. (like on the riscv64 today)

Change-Id: I5ec64db30972c7c3b19e4cdb31f0fe72b5982c0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4494
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:50:21 +00:00
Alexander von Gluck IV
3ea6c00608 radeon_hd/riscv64: Add radeon_hd to minimum image
Change-Id: I44211b3533f99338d7246e88593fc8838628904c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4485
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-24 00:48:50 +00:00
Alexander von Gluck IV
2e8ad9a706 bus_managers/pci: Init controller before io regs
* For riscv64,arm,etc, the controller init is used to
  parse the fdt to detect the PCI controller.
* Without the controller being init'ed, we don't yet know
  the base registers of the PCI controller for io activity
  on a lot of architectures / platforms
* x86 doesn't seem to use the io regs until well after
  controller init

Change-Id: I2a04e30e4dc675657b5cd9183240dafd35473998
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4484
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:48:50 +00:00
X512
9720782947 bus_managers/pci: add riscv64 support v2
* Refactored version of X512's original work to split out
  the ecam and fu740 PCI Controllers

Change-Id: I631885af03b0118fb0084ed7aa4a5aa0a355b0fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4435
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:46:59 +00:00
Franck LeCodeur
e5928728d5 JPEG2000Translator: Fix -Werror warnings
This fix is for ticket #9460 to potentially enable -Werror for JPEG2000Translator.
Original warning: 'char* strncpy(char*, const char*, size_t)' specified bound equals destination size [-Wstringop-truncation]

- Replaced several occurrences of same string with existing constant.
- Use strcmp instead of strncmp as one string is guaranteed to be null-terminated
- Replace strncpy use with strlcpy as seen in other code places.

Change-Id: I5e7ed0de10dc40447a64fe77a7909af577e128ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4472
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-22 07:27:07 +00:00
Niels Sascha Reedijk
158b8fdab2 libroot: return EOPNOTSUPP from posix_fallocate
The pre-allocate functionality was added to Haiku in hrev54704. It needs
support at the file system level though, and it is yet to be implemented by
BFS. Some applications (and glibc!) implement a fallback mechanism using
ftruncate(), including the LLVM tools, but they go to this fallback
mechanism when it is clear that the operation is not supported. In particular
they look for EOPNOTSUPP.

The current implementation returns B_UNSUPPORTED from the vfs layer when a
file system does not implement the feature. This error code this not map to
a POSIX error. This change converts it to EOPNOTSUPP.

Change-Id: Ief382b0f4d462dfedf84c731f68f69731de4498c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4492
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-21 10:22:10 +00:00