Commit Graph

63361 Commits

Author SHA1 Message Date
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
David Karoly
36d65a7890 kernel/arch/arm/int: add initialization code for GICv2
Change-Id: I4f98a4e0277ce37e758cabbb04806cf13f351f1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4674
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-07 10:58:24 +00:00
David Karoly
354655e136 boot/efi/dtb: implement interrupt controller detection
Change-Id: I045a94c5bcb7c16297bc6fdd1fa2981e5b3f3a62
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4756
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-12-07 10:58:24 +00:00
Jérôme Duval
09a8f74d70 intel_extreme: add PCH definitions for some platforms
Change-Id: Id91f8fb526825cc62cd4288bee4a6d08dfd6654a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4764
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-12-07 08:32:49 +00:00
Rudolf Cornelissen
a4493afb60 intel_extreme: fixed small error, forgot to (re)set default refclk for DP. 2021-12-07 00:48:58 +00:00
Rudolf Cornelissen
9ef22aa9d7 intel_extreme:DP links on sky- upto/incl coffeelake are now done (refclk detection added) 2021-12-07 00:42:42 +00:00
Lt-Henry
6c88202d33 hid_shared: factorize more code between USB and HID
* Removed i2c keyboard handler, as it was just a hid shared handler duplicate with kdl stuff removed
* I've created a new macro def for the kdl code, splitting generic kdl code from specific usb one
* I2C custom KDL code can be added in the future (I don't know if it is already possible)

I am not very happy with this solution, but imho it is better than having two keyboard handlers. In fact, they were already out of sync from last patch series

Change-Id: I36513e57a2ce4f004fc7e05ccff5a6b2517fc139
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4758
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-06 19:49:02 +00:00
Augustin Cavalier
858210daf4 kernel/condition_variable: Acquire thread->scheduler_lock before unsetting fVariable.
This fixes a race condition as described in the inline comment.

Hopefully fixes #17444.
2021-12-06 13:11:28 -05:00
Jérôme Duval
949005a59b strace: handle parallel syscalls on different threads
If a thread executes a system call and meanwhile a different thread calls another one, then
the ongoing call is marked as unfinished. When the call returns it will be marked as resumed.

* remove PreSyscall, now unused.

Change-Id: Iea45b866be2c40568d766c2ed3cc73e34b9d1293
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4765
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-06 17:22:50 +00:00
David Karoly
f18aba2ca8 BootRules: use non-legacy ld
Change-Id: I0dc6a1c8731e710a9c43b6dfa5ea08c84fa5d3a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4759
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-06 03:08:27 +00:00
David Karoly
8032682c23 OverriddenJamRules: sort out build flags for .S files
Change-Id: I1ad67e1aab3911e7b66dc801923e8ba5cc1e087d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4755
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-06 03:08:27 +00:00
Jérôme Duval
39782e55fa strace: support trace for poll() and select()
in the case of poll(), the events should be printed before the actual syscall,
and the revents after, while taking in account the return value.
thus B_DEBUGGER_MESSAGE_PRE_SYSCALL needs to be enabled and handled.
the attribute "preSyscall" is added to identify such syscalls, and the parameters
are identified with the attribute "inOut".

Change-Id: I390643ea176c720738c5ec4fc75a3a4c7125a3cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4763
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-06 03:07:41 +00:00
Jérôme Duval
c53f760dfe strace: add some constants ioctl from sys/ioctl.h
Change-Id: I100f715f899435c6a9bce775d95da6f755ba55c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4762
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-12-06 03:07:41 +00:00
Rudolf Cornelissen
c80ea54975 intel_extreme: PLLs post skylake work differently again. Refclk update. 2021-12-05 16:56:15 +00:00
Rudolf Cornelissen
d60c7e010c intel_extreme: for gen9.5 added new portF to DDI scan. add ID dump in kerneldriver. 2021-12-05 12:47:05 +00:00
Rudolf Cornelissen
77b2dd17df intel_extreme: added DDI link colordepth detection, may fix ticket #17439 2021-12-04 23:24:50 +00:00
Rudolf Cornelissen
a33640cc6b intel_extreme: fix 3 and 4 lanes DP connections (ticket #17439) 2021-12-04 00:46:36 +00:00
Augustin Cavalier
3c2597393c kernel/int: Allow arch_int_assign_to_cpu to make its own decisions.
For now this is used on RISCV64 to indicate that interrupts will always
be on CPU 0. However, in the future, some architectures may want
or require interrupts to be "steered" in various ways, and this
also paves the way for that.

Change-Id: Iec79870cf5c4898d102d0e624de19602271ae772
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-12-03 22:36:47 +00:00
Rudolf Cornelissen
3316cfc9af :intel_extreme: only offer backlight control in screenpres on laptops. 2021-12-04 00:25:49 +00:00