Commit Graph

65653 Commits

Author SHA1 Message Date
Jérôme Duval
8b5675204c virtio_block: serialize requests, copy using user_memcpy
fix #18621 #18286

Change-Id: Ia1ecb1b3623b10b42bf6153bdbabb7053179ee3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7048
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-16 20:05:08 +00:00
Jérôme Duval
0decdc641e virtio_pci: fix support for MSI-X shared
remove support for MSI

Change-Id: I8049030b2febd3558a7710cfd89db03a17cb5f7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7036
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-15 13:02:41 +00:00
Jérôme Duval
6d42b430d1 virtio: support modern devices
fixes #17239 #17238

Change-Id: Ia5b6347110a60fab18852079b30dca6301010474
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-10-15 13:02:41 +00:00
Alexander von Gluck IV
518e9cb9f2 radeon_hd: Add missing USB C connector type
* Solves a few "Unknown connector" errors on newer cards.
* It's just another physical name for DisplayPort

Change-Id: I37a6f1bb1db66279b305bdbce3c200612eac1130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7042
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>
2023-10-14 17:19:12 +00:00
Autocomitter
9ded6e6a33 Update translations from Pootle 2023-10-14 08:21:54 +00:00
Augustin Cavalier
8764a29843 build/jam: Only add C++ header directories to include path for C++ code.
There are now some system headers (e.g. <stdatomic.h>) that have outright
different versions for C and C++ which are not compatible with each other.

Change-Id: Ibf797e0817f0fe4d5241424d7d06023b19888c02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6991
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-13 16:18:47 +00:00
David Karoly
d5be5b61c5 Debugger: handle call_site similarly to GNU_call_site
Change-Id: I37c6a2903bd5001c03b86aa09f1d2d04ab87365e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7040
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-13 10:51:23 +00:00
David Karoly
7dec7afe4b Debugger: add DWARF5 attribute and form definitions
Introduce new attribute classes:
* addrptr represents an offset into the .debug_addr_section
* loclist represents an offset or an index to a location list
* rangelist represents an offset or an index to a range list
* stroffsetsptr represents an index to the indirect string table

The semantics of some existing attribute classes changed:
* loclistptr represents an offset into the
  .debug_loc / .debug_loclist section
  It will be used only when setting loclists_base attribute.
  In all other places we should use loclist attribute class.
* rangelistptr represents an offset into the
  .debug_ranges / .debug_rnglist section
  It will be used only when setting rnglists_base attribute.
  In all other places we should use rangelist attribute class.

Define lookup table for new DW_AT_* attribute types
* change the existing references to AC_LOCLISTPTR to AC_LOCLIST
  as in those places now either an index or an offset can be accepted
  (previously there were no indexes, only offsets everywhere)
* only DW_AT_loclists_base uses AC_LOCLISTPTR
* similarly for AC_RANGELISTPTR and AC_RANGELIST as ranges
  can be specified using either an index or an offset
* only DW_AT_rnglists_base uses AC_RANGELISTPTR

Define lookup table for new DW_FORM_* attribute forms
* similar reshuffle for location lists and range lists

Change-Id: I78d307889cd6082a19870afdc571dc0c83d19644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6982
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-13 10:50:55 +00:00
David Karoly
0ec674cdcc Debugger: fix lookup for DWARF5 tag names
Change-Id: Ibbc47d031deee387d93bcfec5cc629230f891b0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7039
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Rene Gollent <rene@gollent.com>
2023-10-11 20:01:57 +00:00
Alexander von Gluck IV
5f351a4650 build-packages: Bump riscv64 for gcc13. Thanks X512!
Change-Id: Ic95763b88b0e6880f6466047e85b523fe12dc554
2023-10-10 11:18:55 -05:00
David Karoly
16236e175d Debugger: add DWARF5 tag names
Change-Id: I2ad594f0b1b8f7306d62d8f395379f8d1125c9e9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6993
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-10 13:47:33 +00:00
Augustin Cavalier
5c32c5ef2f condition_variable: Reorder members for optimal sizing.
Class size now 48 instead of 56 bytes (on x86_64.) No functional change.
2023-10-09 21:08:53 -04:00
Augustin Cavalier
788b1b12b6 Get rid of kernel_c++_structs mechanism.
This undoes fc7864091e.

It was only ever used by the FreeBSD compatibility layer,
only supported one structure, and created problems with
concurrent builds.
2023-10-09 20:26:21 -04:00
Augustin Cavalier
7a701128f1 drivers/network: Remove now-unneeded manual dependency declarations. 2023-10-09 20:21:23 -04:00
Augustin Cavalier
869de36dcd freebsd_network: Remove the need for <kernel_c++_structs.h>.
Use sizeof()+roundup() to build a char[] of the correct size,
and add a static_assert to ensure it stays so.

The <kernel_c++_structs.h> header needs to have its dependency
manually declared, and not all consumers of this file properly
declared it as such. This then fixes a concurrent build problem.

Fixes #17965 as this was the only consumer of this header.
2023-10-09 20:21:06 -04:00
David Karoly
8b61424d3b Debugger: fix typo call_size vs call_site
Change-Id: I0dadac94be729531aedaa7c3fdbac12679fd4835
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6992
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-09 15:14:23 +00:00
PulkoMandy
c220175c65 Add Noto Cherokee to font fallback list
Someone asked about it in the forum.

Change-Id: Ib80b9a3bd76f6e882070cc60fcc239f5837d8231
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6983
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-10-09 08:07:19 +00:00
Autocomitter
ef3798d699 Update translations from Pootle 2023-10-07 08:24:20 +00:00
Puck Meerburg
163053a45c scheduler: Only unassign a thread's core if it is not pinned
If a pinned thread is being run while disabling a CPU core, the thread
is properly requeued to that core, but with fCore set to NULL, causing
the scheduler to panic the next time that thread is rescheduled.

Change-Id: I9cf18c5a470517124b2573347cf3eb6fd26ab7b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6917
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-07 01:56:40 +00:00
X512
81c282f4b5 bus_managers/pci: dynamically register host controllers
Fixes handling of multiple PCI host controllers.

Change-Id: Iba79f2aa51b88d37bb6f5ec02d5cd3f470284ddb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6958
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-07 01:30:05 +00:00
Yn0ga
cbb88108d5 Various PowerPC fixes
* Removed atomic operations placeholders for modern ones
* Fix chrpscript & hfsmaps location for CDBootImage (haiku-boot-cd target)
* add of_blocks & of_blocksize openfirmware call

Change-Id: Iaaddc2c566d108976ac5e5e08caea1fc59523e06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6987
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-06 20:38:24 +00:00
David Karoly
3f2abbc390 Debugger: implement DWARF5 compile unit header parsing
* introduce new field unitType. Currently we support only
  DW_UT_compile unit type.

* abbrevOffset and addressSize are shuffled around

Change-Id: I67db242240012b52e0ec59f87ffab7cb937eb212
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6981
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-10-06 13:20:07 +00:00
David Karoly
a5c358a6db Debugger: implement parsing DW_FORM_implicit_const
For attributes with form DW_FORM_implicit_const, the attribute
specification contains a third part which is a signed LEB128
number. This value shall be used as the value of the attribute
when parsing the debug_info section.

Change-Id: I3e9aa3ba70b3aa05e6d2f570a1464966c38e4b1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6980
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Rene Gollent <rene@gollent.com>
2023-10-04 21:23:40 +00:00
Zach Dykstra
26d22ee8dc shell: remove extraneous/conflicting function
The 'whence' function defined in /etc/profile serves a limited purpose
with Bash as the default shell. Bash already provides
which/type/command as built-ins, which the function simply wraps.

Additionally, zsh has a built-in 'whence' command, which is masked by
the definition in /etc/profile. The function does not work under zsh,
breaking core zsh functionality as a result.

Fixes #18612

Change-Id: Ia34d95ffd58b2cb06d71145a217a9017657fa4a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6979
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-04 16:53:30 +00:00
David Karoly
006478bfce Debugger: implement DWARFv5 line-info handling
* add new field for .debug_line_str section
* implement reading string and int values tagged with DW_FORM_*
* skip new fields addressSize, segmentSelectorSize in line info header
* parse directories and file names according to new syntax
* enable line-info parsing up to version 5

Change-Id: I1dd7e0d834c73f6d72b7115c7ded9f868be84a3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6978
Reviewed-by: Rene Gollent <rene@gollent.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-03 15:40:26 +00:00
PulkoMandy
ae2049aa4f user docs: add note about use of BView::GetMouse() in BView::MouseUp()
Fixes #18606

Change-Id: I2f6d9cd67de6cd4223b6837bb1b8b0cd1de79800
2023-09-30 21:27:32 +02:00
Autocomitter
35478ccd4e Update translations from Pootle 2023-09-30 08:13:15 +00:00
Puck Meerburg
46b8479173 arch/x86: Fix sending ICIs to more than one cluster, send one at a time.
The structure of a logical APIC destination is made up of a 16-bit
bitfield of cluster-local IDs, as well as a 16-bit cluster ID. When
sending an ICI to multiple cores in different clusters, these cannot simply be ORed together.
Fixes #17233

Change-Id: Ifa84da51eccd85c1eff529749ffa00bc2159899e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6919
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-09-30 06:53:57 +00:00
David Karoly
908afdaae4 m68k: update linker script for kernel
adapted from the toolchain's m68kelf.xc linker script

Change-Id: Ia3276f32f8de5938dae13f54f3e0675b71c194a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6956
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-09-28 07:11:23 +00:00
Puck Meerburg
4f0173cdb0 kernel/x86_64: align the stack before calling the function
in arch_debug_call_with_fault_handler

Change-Id: Iddefb7e93d561f3a6ccf1ee06328e473b28fca2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6918
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-09-28 07:11:09 +00:00
David Karoly
91ef2c3c00 kernel/m68k: fix relocation for R_68K_JMP_SLOT
R_68K_JMP_SLOT should be handled similarly to R_68K_GLOB_DAT i.e.
the relocated value is symbol_value + addend. see e.g. in uclibc:
https://git.uclibc.org/uClibc/tree/ldso/ldso/m68k/elfinterp.c#n222

(also the G variable is never assigned any nonzero value?)

before this change we get jumps to 0x00000000, bus errors with
pc=0x00000030 etc.
after this change we are able to call functions!

Change-Id: Ibe135adb0dc6248a2baf5d6eca1543fdddf3a9e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6957
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-09-27 07:06:50 +00:00
Zardshard
c9afad2268 HaikuBook: Improve documentation of AddDynamicItem
Change-Id: Id682c64f13eb103074bdbee34d531d3e2a91de0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6955
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-26 16:40:04 +00:00
Humdinger
493d3c69f3 GLTeapot: Add setting to limit FPS
* Plus renaming "File" menu to "GLTeapot". No files involved.

Fixes #18599

Change-Id: Ifd47eea8eb11d7c94d8f6cc0d4db48eaa0b0bf59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6954
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-09-26 16:38:30 +00:00
David Karoly
9dc5767db6 boot/atari_m68k: fix stack after toscallLLWWWWW
Change-Id: I3c0712d2eee173eb1744b7eb8b5b35a3b4bdc71f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6946
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-09-26 08:49:47 +00:00
X512
84a57f9a2d riscv/mmu: fix some code typos in hrev57298 that lead to boot failure
Change-Id: If0b2fded13ac079e505038fb51d05f7cfcb3d161
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6953
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-25 21:20:56 +00:00
X512
98895d0417 riscv64/mmu: use struct bitfield for flags and std::atomic
Fixes some PTE concurrent access bugs.

Change-Id: I09ec56861fae389a8a3e228b17a3921b85202c8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6949
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-09-25 15:50:59 +00:00
X512
f83058d1ed elf: add PT_RISCV_ATTRIBUTES program header
Attribute is ignored for now.

It is supposed to check ABI compatiblity and reject loading incompatible images.
Haiku currently do not use multiple ABIs for RISC-V so it is safe to ignore attributes.

PT_RISCV_ATTRIBUTES program header is produced by default in GCC 13 and Clang 17.

Change-Id: I4659e9bacbf34a2a0bc16b34c2aaa37232d700fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6948
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-09-25 15:20:13 +00:00
Zardshard
abd18fecf0 Deskbar: Fix compilation error
This error only occurs when compiling a debug build. It was introduced
with commit fb885767b6

Change-Id: I80b470df3872b5bdd8690f65b3d14388158be8ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6951
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-25 15:19:38 +00:00
Andrew Lindesay
4b347fccb2 HaikuDepot: Token Based Authentication
This switches the application over from using basic
authentication to using token-based authentication in
preparation for later using Open-ID based
authentication flows. The application version is also
bumped in order that the server can detect this version
at some later date in the future when it no longer
supports basic authentication itself.

Change-Id: I7addde1d57503c58d6bcd54908f22f66830c0c59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6944
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-09-25 06:20:32 +00:00
Augustin Cavalier
d8bca3564a Tracker: Check whether the default button is disabled on double-click.
The comment above this block specified the correct behavior: the
button's status is already updated elsewhere, so just check IsEnabled().
But the code did not actually do that.

It appears this has been incorrect all the way back to the initial
OpenTracker import in 2001.

Fixes #13721.
2023-09-23 17:05:19 -04:00
Augustin Cavalier
2d42fb1a9a Tracker: Adjust open button status when B_DIRECTORY_NODE is set.
In hrev51155, it was changed to be always enabled no matter what,
so that the current directory (without anything selected) could be opened.
But this means it would also be enabled for files, which is misleading.

Instead, remove the function, and adjust the logic detecting whether
to enable the button or not to take B_DIRECTORY_NODE into account.
2023-09-23 17:05:06 -04:00
Augustin Cavalier
d95a9b63f7 iaxwifi200: Synchronize to OpenBSD trunk.
CVS revision(s) are in first-line comments.

Requires a new firmware package (from HaikuPorts). There are some
changes in here which may fix some of the odder issues, like failures
to connect to access points. There is also support for one new PCI ID.

Tested by PulkoMandy who reports it's still working.
2023-09-23 15:10:10 -04:00
Augustin Cavalier
76681bd900 kernel: Rewrite B_DEBUG_SPINLOCK_CONTENTION.
* Replace count_low/count_high with bigtime_t fields plus an int32.
   sizeof(spinlock) is now 32 bytes with the debug option enabled.

 * Adjust and clean up all spinlock code to use the new fields.

 * Fold DEBUG_SPINLOCK_LATENCIES into the new code. Remove the bootloader
   option and other flags for it (these were not compiled in by default.)

The new code should be much easier to understand and also more powerful.
However, the information transmitted to userland isn't as useful now;
the KDL command output will have the interesting information.

(Things could be reworked to transmit more interesting information to
userland again if desired, but as this code clearly hadn't been compiled
for many years, as it referred to global spinlocks that have been gone
for a very long time.)

Change-Id: I2cb34078bfdc7604f288a297b6cd1aa7ff9cc512
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6943
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-09-23 18:41:04 +00:00
Augustin Cavalier
ef9e2f627b kernel/arch: Make arch_debug_get_caller() a macro implemented by a builtin.
Only the x86 and PPC implementations look like they would have worked,
while the builtin is available and will work across all architectures.
We already use it unconditionally in some parts of libroot.

Change-Id: I2dffb3b2c7cdd605092382b9d649151adb921bb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6942
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-23 18:41:04 +00:00
Augustin Cavalier
d0c34f9331 kernel/debug: Invoke cpu_pause in trap_cpu_in_kdl.
This is the loop that runs on all CPUs besides the one
actually running the kernel debugger. It's functionally
a spin-loop around a few different variables, and so it
should be safe to use cpu_pause() here, just as real
spinlocks do.

(cpu_pause() just runs a "pause" or equivalent instruction,
it doesn't use the CPU-idle modules, which indeed may be
unsafe to use in KDL.)

A glance at FreeBSD seems to indicate they also do this
when their kernel debugger is active.

Seriously improves power consumption while KDL is active:
even running in a VM with only a few cores, there would be
obvious fan spin-up when entering KDL. After this change,
there's barely any at all (while overall CPU usage % remains
basically identical.)
2023-09-23 14:07:17 -04:00
David Karoly
a72ea36f95 boot/atari_m68k: add revision number to bootloader binary
Change-Id: Id68078ada652d5815a4392e8d94c4bd4ef3efcdb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6947
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-23 17:20:27 +00:00
David Karoly
a944d6a02d boot/atari_m68k: fix crash on boot menu
Change-Id: I7d2afdd14ae9942fedd720b7d581a5acf2d6f40f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6945
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-23 17:20:22 +00:00
Autocomitter
8deedc28b3 Update translations from Pootle 2023-09-23 08:20:09 +00:00
Augustin Cavalier
f0a016dcb1 BBufferedDataIO: Fix Write().
I looked at this code as a reference when writing similar code in another
project, and realized then that this was broken to the point where I
don't think anyone could have actually used it:

1. Writes larger than the buffer should only return the amount written
by this Write() call, not the amount flushed beforehand.

2. fDirty was only set if there were bytes remaining after the first
write to the buffer. So, if you wrote small amounts of data, they
would be silently discarded most of the time!

3. When filling the buffer, we might as well flush simultaneously.
This allows the logic to be consolidated into a loop and remove the
duplicate memcpy. In case of failure, just return the bytes-written
as the write could be retried later.

4. Flush() should always return an error or 0, not bytes written.

While at it, add some basic tests for this class.

Change-Id: I2de01d0b31e3fe22863cef21dd7b0b62ed47121b
2023-09-22 19:56:04 -04:00
Augustin Cavalier
35bc8b401a ArchitectureRules: Disable autovectorization for the kernel (for now.)
See #18593.
2023-09-22 16:27:37 -04:00