Commit Graph

63379 Commits

Author SHA1 Message Date
Alex Hitech
370623a923 Russian keymap: the Rouble currency sign was mistakenly on the Capslock key, and vice versa.
Change-Id: I3d907da00cfc0d5092ef04bfa50f413ba261e5e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4822
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-18 09:39:47 +00:00
Augustin Cavalier
e0842c10af kernel/condition_variable: Pause between iterations.
Should hopefully resolve the remaining problem in #17455.

Change-Id: I6e00286508c069705e07c9a0b59af2cf5e15e427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4819
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-12-18 07:52:47 +00:00
Jérôme Duval
101dc0ba83 strace: fix revents output for poll syscall
each poll_fd struct should be checked, valid when not -1 and revents not zero.

Change-Id: Ia624ad1369ad1a6066c9970a47cfac63fa773702
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4821
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-17 20:40:55 +00:00
Jérôme Duval
3285dcae22 tcp: reset receive.low_water_mark when nothing to read anymore
the socket interface module checks the receive.low_water_mark to automatically
notify a read event. available_data will be zero, thus enabling the notification.

fixes the test poll_nm in NSPR.

Change-Id: I5354faec439df96671506550cdb144a45f6082b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4820
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-17 20:40:55 +00:00
David Karoly
18e885db51 boot/efi: implement convert_kernel_args for 32-bit
Change-Id: I528d6f8ca576b38c50dc314972636e7156d24705
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4784
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-17 08:58:57 +00:00
David Karoly
af90bfd3bb boot/efi: introduce arch_convert_kernel_args
Change-Id: Iabb321564d6733c6cf481ec2548fa287e308ae89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-17 08:58:57 +00:00
Augustin Cavalier
e94ea7bc22 UDP: Fix double-reference of DomainSupport.
PulkoMandy in cb3199681e changed
the _GetDomainSupport functions to always Ref() the the object.
However, that means in the case of the second _GetDomainSupport
function, which is implemented in terms of the first, we should
not call Ref() as this will create a double-reference.

Fixes a memory leak.

Change-Id: Ib82b2dadc0c8cc8d8f95efcffeb2430ac602a0a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4791
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-16 08:55:55 +00:00
David Karoly
c1e0007eea virtio-mmio: add initialization for legacy mode (version 1)
Change-Id: I4dcfca8cfabafad592b638b28215225b1cca35d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4657
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-15 15:55:50 +00:00
David Karoly
f0adfe2a54 boot/efi: fix dummy reloc for x86
Change-Id: Ia61d593c8d131bd6780688ea932b5b92bd629764
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4748
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 19:56:21 +00:00
David Karoly
1a7afaa45b boot/efi: fix for garbled first item returned by mmu_next_region()
Change-Id: Ic9d02800bccbb5508eeb0b2c1ee1ed1326d0829f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4783
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 19:48:38 +00:00
David Karoly
20efe26dfa boot/efi/arm: fix printout of kernel entry address on startup
Change-Id: If3d592983e1c22210c6b4d3a6ceaf2a7641e7e7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4785
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 19:46:50 +00:00
David Karoly
1f6e2499db ldscripts/x86: add ldscript for EFI loader
Linker script is adapted from elf_ia32_efi.lds in GNU-EFI.
see:
https://sourceforge.net/p/gnu-efi/code/ci/master/tree/gnuefi/elf_ia32_efi.lds

The only significant change is the additions of ctors.

Change-Id: I1091f610129f806f124d714fd9a42cf932fa1c2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4746
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 19:44:23 +00:00
David Karoly
d223f9d9c2 boot/efi/serial: fix legacy mode for x86
Change-Id: I44fd33289da94e9520c6c202ac96c4ca8e511638
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4754
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 13:19:14 +00:00
David Karoly
a857758352 boot/efi/x86: fix address for arch args
Change-Id: If9a3bb32cb8d290f97cee2e8e821dcbf8b8852a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4789
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-12-14 11:15:37 +00:00
Jérôme Duval
d057f0aedd lgtm.yml: disable Wformat-diag when building gcc
LGTM seems to provide GCC 9.2, for which the flag -Wformat-diag is falsely
detected as supported.

Change-Id: I95a5946d9c6cd2af73e85070973f855fba3fcc39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4786
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-12-14 06:06:41 +00:00
David Karoly
3896dbcb1d kernel/arch/arm: fix missing return statement in rtc
Change-Id: Ib5a2e06884b6973ed102b30b1339a7b800c95418
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4781
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-13 14:47:10 +00:00
Murai Takashi
771516d7f0 lgtm.yml: add g++ to prerequisite software
LGTM build failed since -Wformat-diag check is failed.
So we add g++ to check its version in LGTM.
May help to fix #17460.

Change-Id: I9400dbbab7800c522bf7ed797adae48299581a4e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4780
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-12-13 13:59:38 +00:00
Alexander von Gluck IV
000310809f debugger: fix warning format-overflow= '%s' directive arg is null
Change-Id: Iba00fbcc3f8fde088bed62b93c4e3acae4e0b902
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4777
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-13 10:23:24 +00:00
Alexander von Gluck IV
4c8e85b316 3rdparty/docker/bootstrap: Fix bootstrap container
* Update for newer git (init -b support)
* Fix configure args for new cross-tools-source

Change-Id: I757a1a48affb8cd98ddd8a0890393bdb6bc2a81f
2021-12-12 14:24:21 -06:00
X512
8ca0f03d0c riscv64/smp: Implement multi-processor support
* Working under qemu smp 1,2+
* Working on SiFive Unmatched
* x86_64 efi not broken by smp_boot_other_cpus change

Change-Id: I32ebc17913e46ed082be9ade8f56448bbf12f16e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4705
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-12-12 15:35:24 +00:00
Augustin Cavalier
0cdb323800 app_server & Application Kit: Fix bitmap cursor handling.
Using a memcpy here is supremely dangerous, because we are writing to
an app_server buffer that we chose the length for, but using a size
that came from the client. And, indeed, because the buffer can contain
padding if the BBitmap was allocated with a non-standard BytesPerRow,
we will overflow the buffer and corrupt memory, causing app_server to crash.

So, instead, reorganize parameters a bit, and pass BytesPerRow along
with the other data needed to instantiate the bitmap, and then use
ImportBits.

Fixes an app_server crash I triggered with the experimental libX11
compatibility layer.
2021-12-11 21:44:59 -05:00
Alexander von Gluck IV
662912945f radeon_hd/pll: Guard bpc on non-HDMI under table 1.5,1.6
* Cut extra calls to display_get_encoder_mode
* Correct incorrect ucMiscInfo on table 1.6 via atombios
  comments

Change-Id: Ib6d7938269b8421d3711c1344eab0b9842336932
2021-12-11 10:30:43 -06:00
Alexander von Gluck IV
3084929f81 radeon_hd/pll: Fix pll MiscInfo on table 1.5
* Looks like some error in atombios. AMD just
  reversed the values instead of fixing the atom.h
  defines in Linux.

Change-Id: I440682af5708ce0da1625e8f50e8cb77595c8397
2021-12-11 10:19:13 -06:00
X512
98296c4a29 haiku_loader.efi: fix build for riscv64
Change-Id: I83f4b45ea950e81fdd712644433266401c0747bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4774
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 15:35:02 +00:00
Alexander von Gluck IV
e87cba3470 radeon_hd: Add handling of connector routing
* A first attempt at improving on #17377
* We haven't actually seen any cards using this
  routing stuff yet pre-navi.
* We don't use the router information yet... but this might
  improve things a bit on new cards.

Change-Id: I17962dfd8bb09e619a6084cd9571ccb9832fb19a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4697
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 14:19:00 +00:00
David Karoly
6e28efbb5f platform/efi/devices: fix build when TRACE is enabled
Change-Id: If9ea3212b7908aaa6c9c6774cb68a6dbf635a5ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4761
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 14:16:34 +00:00
David Karoly
1103466926 build ARM EFI bootloader with soft-float
Change-Id: If7feffafea4fc6d295d04f696127c8f0fbd8fb9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4704
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-12-11 14:07:06 +00:00
David Karoly
69f4a74149 link bootloader with libgcc-boot.a and libsupc++-boot.a on ARM
Change-Id: Ia7f41191136db3ea34ed6abee97ae627bb7b1727
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4703
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 14:07:06 +00:00
David Karoly
123aa1325c boot/efi/arm: enable FPU before jumping to kernel
Change-Id: I37bb2146102a207e97355e099f6b4160d644c326
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4701
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 14:07:06 +00:00
Jérôme Duval
17e8767959 intel_extreme: define bdb header values, check panel type.
Change-Id: I2e5b61da9aecc11be13178a0b48211d172454d94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4773
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-11 13:30:20 +00:00
Rudolf Cornelissen
d2e4af7873 intel_extreme: expand bios scan for panel a bit, might help ticket #17451 2021-12-11 12:21:42 +00:00
Augustin Cavalier
84c9ff3ee5 net80211: Work around #17458.
Until the cause can be properly determined, anyway.
2021-12-10 21:48:27 -05:00
Augustin Cavalier
08236b3b59 libroot: Force __cxa_pure_virtual to be linked in libroot_debug too. 2021-12-10 21:34:44 -05:00
Augustin Cavalier
7959ac39f1 kernel/condition_variable: Unblock after unset, if possible.
The previous round of this code unblocked after unset universally,
but that was incorrect in the case where the thread was not in
the "waiting" state before we unset. Yesterday I changed that to
just unblock before unset universally.

It seems, however, that thread_unblock is so time-consuming
that the other thread will wake up and begin doing things
before unblock returns for us, and then it will hit the timeout
before we have a chance to unset. So, now we unblock later
if it is possible to do so.

It seems very strange, though, that thread_unblock will
not return in a small but significant number of cases
before the unblocked thread actually starts running (note
that we are in interrupts-disabled mode here, so that is
not the problem.) That sounds like a problem for another day.

Should fix #17455, possibly in tandem with the previous commit.
2021-12-08 17:39:02 -05:00
Augustin Cavalier
145526308a kernel/condition_variable: Increase tries count.
Should help with timeout panics occurring, at least somewhat.
2021-12-08 17:33:08 -05:00
Augustin Cavalier
6ae7f1f12d XHCI: Consolidate xhci_device cleanup routine and use it in AllocateDevice.
This also fixes a leak of slots when initializing devices failed.
Fixes #16323, although there is some other underlying problem
which led to that error in the first place.
2021-12-08 12:59:45 -05:00
Augustin Cavalier
2b4a870a7f packagefs: Prevent signed integer overflow in Query::IndexGetWeightedScore.
As the comment already noted, the maximum input score is 2048,
and 2048*1024*1024 overflows int32. Subtract 1 from maxFactor
to prevent this.
2021-12-08 12:26:30 -05:00
Augustin Cavalier
fb25e7349d scsi_cd: Remove unused code. 2021-12-08 12:25:09 -05:00
Augustin Cavalier
ca89fd65a6 HaikuPorts: Mesa on x86_gcc2h needs llvm9. 2021-12-07 22:43:06 -05:00
Augustin Cavalier
f207629e04 MACLib: Only define min & max if we are on GCC2.
Otherwise they will be pulled in from <algorithm>.
2021-12-07 22:19:31 -05:00
Augustin Cavalier
36a1e12f21 kernel/vm: Cast temporary to uint32.
It is defined as a uint32:1, which apparently becomes an "int" on
newer GCC versions, which thus triggers a -Werror=format. So,
convert it explicitly in order to prevent the error.
2021-12-07 21:24:00 -05:00
Augustin Cavalier
a81d165008 Update build-packages for GCC 11 upgrade. 2021-12-07 14:26:24 -05:00
Augustin Cavalier
c52bbf73b5 ArchitectureRules: Adjustments to Werror flags for GCC 11. 2021-12-07 14:24:15 -05:00
Augustin Cavalier
dbaef85011 configure: Use IS_LEGACY_GCC instead of manually comparing GCC versions. 2021-12-07 14:22:54 -05:00
Augustin Cavalier
f0213b4407 EXTranslator: Disambiguate clamp(). 2021-12-07 14:22:24 -05:00
Augustin Cavalier
365c228de7 RTFTranslator: Remove some dynamic exception specifications. 2021-12-07 14:22:12 -05:00
Augustin Cavalier
db911197a0 libroot: Force __cxa_pure_virtual to be linked in.
In GCC 8 builds it is by default, in GCC 11 builds it is weakly
defined, which runtime_loader does not yet support properly,
so we force it to be included.
2021-12-07 14:21:52 -05:00
Augustin Cavalier
7ce3c9283e kernel/condition_variable: Unblock earlier and simplify the code more.
Unblocking after unsetting fVariable just causes too many headaches
and corner cases to deal with; the code as-is did not actually handle
all of them, as it missed the case where the entry thread had called
thread_prepare_to_block but had not yet actually blocked.

Hopefully the last fix for #17444.
2021-12-07 14:15:54 -05:00
Augustin Cavalier
acdd232ad5 kernel/condition_variable: Check thread->state before unblock.
See inline comments. Should help with #17444.
2021-12-07 13:30:36 -05:00
David Karoly
b3780b5658 kernel/arch/arm/int: enable OMAP3 and PXA intc drivers
Change-Id: I83ab8cd4c474bd374f66a39d9a60c778dd7033e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4757
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-07 10:58:24 +00:00