Commit Graph
68697 Commits
Author SHA1 Message Date
X512 9e7b79a90e BPicture: fix BBitmap storage
BeOS save `BBitmap` data size `int32` field before bitmap data array.

Part of #1133.

Change-Id: I5706b87ca19f2e71e242b98eea6d69bc8ec14558
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10555
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-20 21:50:48 +00:00
Oscar Lesta 092beb6782 ActivityMonitor: B_GET_DEVICE_NAME can fail on some acpi_thermal devices.
On such case, the device may still report temperatures just fine, so
have separate "labels" for when we can't even open the device, or when
we just don't get its proper name.

Change-Id: Ia1924030e04de39c935b9f36a25858cbb1da467b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10556
Reviewed-by: waddlesplash <[email protected]>
2026-03-20 19:26:11 +00:00
Raghav Sharma ca7f0655b1 fs_shell: add null check for std_ops
Some file systems (like exfat) can have std_ops set to NULL in file_system_module_info header, so have a null check before initializing it.

Change-Id: Icdea910c5600daca985ac4b74cae197c40b6ba89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10542
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-20 14:52:20 +00:00
Raghav Sharma 528554ac4b xfs: Add new incompatible feature flags
Change-Id: I66cf435b043888bd4230b8447a00ac6bfe3e028e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10467
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-03-20 14:51:02 +00:00
Sunset Ash c1f29f4263 SecureSocket: Fire callback as part of cert verification
This was wrongly removed in hrev54730.
Should fix #17928.

Change-Id: I53986bfc32b04405cf3564a95d47b46132e50587
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10549
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-19 18:26:55 +00:00
Sam Roberts f833d107c6 arm64/uart_samsung: Don't do anything in InitPort
* It was actually disabling the UART
* I forgot this was C++ and not Rust and put a ! instead of
  a ~, so this wasn't doing what I intended anyway

Change-Id: I0b7c3d44f3e041cc70cb933ccba886346a6a6964
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10548
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-19 15:33:11 +00:00
Sam Roberts 593f25d6f1 arm64: Fixes for booting in EL2 w/ E2H
* E2H (EL2 Host) is enabled by default and usually can't be disabled
  on CPUs with FEAT_VHE. Since EL2 becomes a superset of EL1 with
  E2H, we can simply do nothing and everything that expects EL1
  will Just Work
* Changed some register bits numbers to avoid C integer promotion
  issues
* sEmptyTable needs to be filled in earler, before the kernel team
  is created. Otherwise, we put the uninitialized value of sEmptyTable
  in TTBR0, which immediately pends SError on Apple M1

Change-Id: I84ff7fd9134448f27315dadfd12bdd9df8c75b10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10547
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-19 15:33:11 +00:00
Sam Roberts 13abea7517 arm64: Map only physical memory in memory map
On Apple platforms, there are regions of memory not mentioned in
the memory map that are protected by the system. If the MMU
happens to encounter one of these regions while performing a table
walk, it will trigger a fault (even if you are not accessing
those regions).

So, we simply need to stick to what's in the memory map.

This also required fixing the memory mapping code, since it had a few
issues, including walking past the end of a page table and putting PTEs
in adjacent memory as well as mapping more memory than requested

Change-Id: I9166c909d510c82943cd15a9e62799b820ec53ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10546
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-19 15:33:11 +00:00
Andrew Lindesay e47c047de4 HaikuDepot: redirect corrections
Bug fix for an issue around handling the redirects
from the server. `B_HTTP_STATUS_NOT_MODIFIED` was
being determined to be a redirect when it really
means there is no change.

Change-Id: I0736d1a225b5c7ef3803ee44e103f1d152b3a6b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10543
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2026-03-18 18:36:55 +00:00
Augustin Cavalier a01f1a3da8 usb_asix: Delete.
Now provided by asix88xxx instead.
2026-03-18 13:54:26 -04:00
Augustin Cavalier 231ecae98b kernel/scheduler: Skip setting invoke_scheduler in scheduler_reschedule_ici.
It isn't needed now that it's set before sending the ICI. Saves
a lot (hundreds, in some basic testing of compile jobs) of
unnecessary scheduler invocations.
2026-03-17 20:25:53 -04:00
Augustin Cavalier 87e0daf0a1 kernel: Include <smp.h> in VMTranslationMap.
RISC-V at least doesn't implicitly include it.
2026-03-17 14:49:13 -04:00
Augustin Cavalier 1b6efe284a kernel/smp: Avoid calling cpu_pause() if test-and-set works on first try. 2026-03-17 14:48:53 -04:00
Augustin Cavalier 14b78e205c kernel/smp: call_all_cpus should run with interrupts disabled.
For consistency. And so should call_single_cpu.

Fixes #19983.
2026-03-17 14:23:58 -04:00
Augustin Cavalier 89c81c2ac1 kernel: Fix copy/paste error from previous commit. 2026-03-17 13:37:04 -04:00
Augustin Cavalier cf2179fa35 kernel: Add invalidation utility routines to VMTranslationMap.
These allow us to move a lot of the basic logic out of the
TranslationMaps. In the process, it extends the fix applied
to x86 in the previous commit to all the other maps.
2026-03-17 13:30:11 -04:00
Augustin Cavalier b4546a49f0 kernel/x86: Don't spuriously set the current CPU bit in Flush().
We may be called from the page daemon, which may be running on
a different CPU than the one this map is active on. So don't
bother flushing unnecessarily if we can avoid it.
2026-03-17 13:19:31 -04:00
Augustin Cavalier d4817afe36 kernel/smp: Use a single-CPU ICI if multicasting to only one CPU.
This avoids the broadcast mailbox (and the incrementing of
other CPU's counters) entirely in this case.

As this is used for TLB invalidation, processes that are only
running two threads at once will benefit immensely from this.
It also seems to be triggered by the kernel's "idle_scan_active_pages"
logic, which sometimes sends invalidations to CPUs besides its own.

On the VM setup, this path was hit around 200 times during boot,
around 600 times during a rebuild of HaikuDepot + mime_db, and
50,000+ times while running Iceweasel (Firefox). On bare metal,
it was hit around 300 times during boot, 300 times during a rebuild,
and 90,000+ times while running Iceweasel (over a different length
of time, though.)
2026-03-17 13:06:35 -04:00
Augustin Cavalier 9c08c836bf kernel/smp: Use read spinlocks when prepending broadcast messages.
Some brief testing shows that concurrency is unlikely here, but
we might as well.
2026-03-17 12:08:59 -04:00
Augustin Cavalier b6447046fc kernel/smp: De-indent smp_send_ici.
No functional change intended.
2026-03-17 11:54:27 -04:00
Augustin Cavalier 19bcb3be0a kernel/scheduler: Make invoke_scheduler atomic to skip unnecessary ICIs.
Following upon a KDL reported by atomozero, on wait-for-free-SMP-messages
on an unblock occurring with interrupts disabled.

In changing cpu_ent, move disabled to the beginning to avoid
enlarging the structure unncessarily.

On a 4-core VM, this skips around 200 sends during boot, and
over 3000 during a rebuild of HaikuDepot + mime_db (cold). On
bare metal (i3, 2x2), it skips around 150 during boot, and a bit
below 3000 during a rebuild of HaikuDepot + mime_db (over a much
longer time than in the VM, as the hardware is slower.)

Performance in the VM doesn't look much different. But this might
help in VirtualBox, or other situations where ICI latency is far
above what it should be.
2026-03-17 11:25:36 -04:00
Humdinger e53d371901 Mail app: Implement labeling emails
"Labels" (MAIL:label) will be used instead of the currently misused
"Status" (MAIL:status) to allow categorization of emails by the
user. These labels are only used on the locally download emails;
there's no syncing with a mail server.

(See also forum thread "Introducing a new indexed attribute META:tag" at
https://discuss.haiku-os.org/t/introducing-a-new-indexed-attribute-meta-tag.)

* Remove custom statuses from "Close and…" submenu and anything else
  concerning custom statuses.

* Add a "Set label" menu with a submenu to
  - Remove the current mail's label, if it has one
  - Add a new label
  - Choose from a list of labels (first 9 items with ALT+n shortcut)
  - Open the labels folder in Tracker to manage labels
    (delete/rename/etc.)

* Labels are saved as separate files in ~/config/settings/Mail/labels/

* Label files are queries for all files which have that particular
  label in their MAIL:label attribute. This is convenient when
  managing your label, e.g. see if there are any emails with a
  certain label before deleting it.

* Added "Same label" to the "Queries" menu.

* In MenusBeginning() the files in ~/config/settings/Mail/labels/ are
  read and shown with their file name as menu item.

* When an email is opened, its label file is created if it doesn't
  exist already.  That way the Mail app can provide labels that were
  not created with it, but  e.g. by manually filling the attribute in
  Tracker, or via a script etc.

* Related: When populating the labels menu, make sure each label query
  has the correct formula. A user may have created a label by hand or
  duplicated an existing formula, in which case the query formula would
  be missing or wrong.

Setting a label currently isn't supported when composing an email, as
we cannot set an attribute, because an email file isn't created until
it's sent.

Change-Id: I53fb4613ec1d2d96493169e0310c11c5ba0131c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10384
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>
2026-03-17 12:52:32 +00:00
John Davis 640b37b32d hyperv_ic: Add time sync support
Adds support for the time sync Hyper-V integration component.

Change-Id: If8617feab196e59b8e1d2447ffbcb344a0e66f38
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10503
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-03-17 06:25:53 +00:00
John Davis 4f6e4b41ba hyperv: Add reference counter support
Adds support for the Hyper-V partition reference counter.

Change-Id: Ie74b4d3af1b320b7b724776bdb6a22f643873f80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10500
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-03-17 06:25:53 +00:00
Augustin Cavalier d5a5f22579 pegasus: Replace with the upstream FreeBSD version.
Fixes #19745.

Change-Id: Ie540beecbf9f0a998f016f015357a38d1fa95bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9599
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-03-16 21:30:32 +00:00
Sam Roberts 83be3b3da0 arm64: Clear fp before entering kernel
Otherwise, when crashing, the kernel could continue its
stacktrace back into memory which is no longer mapped.

Change-Id: Ifda337a08c476a18c7dbdd530e4236541d49d3bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10531
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
2026-03-16 20:35:19 +00:00
Augustin Cavalier 924599c310 L2CAP: Change from SOCK_STREAM to SOCK_SEQPACKET.
This is the same as what FreeBSD does.
2026-03-16 13:21:46 -04:00
Augustin Cavalier 7512053757 kernel/smp: Refactor ICI broadcast/multicast to invoke the current CPU too.
Since the methods now don't just "send", the names are changed
also (which is fitting since they're now API-incompatible.)

The changes in the TranslationMaps to adopt this fixes a correctness
issue: previously TLB invalidations would be done either with or
without interrupts enabled depending on how they were invoked.
Now, they'll always be done with interrupts disabled. (This is
the same fix that was recently done to x86.)

The idea with processing the ICIs on the current CPU too is
that presumably the other CPUs will take just as much, if not
more, time processing the ICI than the sending CPU. So, we might
as well do the processing while we wait, rather than before or after.

Testing shows this to indeed be the case. On a bare metal i3, kernel
map invalidations (with global invalidations always forced) across
a boot-to-desktop go from around ~60.8ms cumulative before,
to ~51.8ms cumulative after this change.

Change-Id: Icd0343d462de7cf11043e6438f47b02f6b88bb8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10472
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-16 13:41:00 +00:00
Oscar Lesta 988ca40b01 cpp_rng: remove unused includes.
Change-Id: I5e2e1245f5b3e7d8bd104e9f0529b8dc1e4a5a85
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10530
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 13:36:37 +00:00
Augustin Cavalier 000c32a568 asix88xxx: Import drivers from FreeBSD to replace usb_asix.
The homegrown usb_asix was partially based on the upstream FreeBSD
driver anyway, and hasn't seen much maintenance in recent years.
We might as well replace it with the FreeBSD version. In the process,
also add the "axge" driver, supporting the Gigabit version of this
hardware.

Tested by smrobtzz with the AX88179A: "it seems to work perfectly".

Change-Id: I37fdfc2cef6100916d6034817f117286f7f443b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9600
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 13:17:57 +00:00
Augustin Cavalier 9936387223 freebsd_network: Add everything needed for USB ethernet drivers.
Change-Id: I152d3fcdb50b9473f06c2164b9abb38b7c9d7e40
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9598
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 13:17:57 +00:00
Sam Roberts c0374aed39 freebsd_network: Add missing check for endpoint direction.
Signed-off-by: Augustin Cavalier <[email protected]>
2026-03-16 08:54:00 -04:00
Augustin Cavalier d59105d001 freebsd_network: Synchronize some mbuf routines with upstream FreeBSD.
Also delete an OpenBSD compatibility section that isn't used.

This includes a fix to mbufq_full (made in 2019 in FreeBSD)
to allow for mbufqs of unlimited size, apparently needed by
some drivers, found by @smrobtzz while testing USB ethernet
drivers.
2026-03-16 08:50:43 -04:00
Augustin Cavalier 913f501fbd kernel: Use uint64 for seconds in datetime conversion routines. 2026-03-16 08:35:51 -04:00
Sam Roberts b249bfc563 usb_ecm: Use appropriate langid when fetching MAC address
The AX88179A has an English MAC address and will STALL if you
don't remind it of this fact.

Change-Id: Id4b1d9b8ff69327787d826ce42e6d78bc3cbcc30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10529
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 12:28:46 +00:00
Nathan Patrizi 74613b3c9a ramdisk: Remove IOSchedulerSimple and handle IORequests directly
* Handle IO requests directly in the ramdisk instead of using
  IOSchedulerSimple as the request ordering being done is not needed.
* Fixes potential data corruption issues on the ramdisk caused by
  reordering partial write requests in IOSchedulerSimple.

Fixes #16951

Change-Id: I2d6c20016b54e8cb5b1d257989edada10c1d2376
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10490
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-16 12:27:28 +00:00
mohammedrattia cc14954ea8 bluetooth: fixing L2capClient testing Jamfile
- L2capClient SimpleTest couldn't compile because "bluetooth" isn't available library its correct name is "libbluetooth.so"
- I testing this on Haiku and it compiled normallly with only this change
- before the edit it was giving me error "-lbluetooth is unknown"

Change-Id: I88e59b0c1867c202d3e9916e5fa3964da22cb9e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10524
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-16 12:25:36 +00:00
mohammedrattia 01d996da1a bluetooth: Refactoring LocateDelegateFromMessage() function
- This is just small refactoring edit. LocateDelegateFromMessage() and LocateLocalDeviceImpl() are doing exactly the same thing except for looking for hci_id in the first one, so I used the second in the first to enhance readability.
- I didn't test this specifically but bluetooth server compiles and do its functions normally.

Change-Id: Ic687f219e407a262155aaceed95176edb5c6ce70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10525
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 12:20:08 +00:00
vighnesh-sawant c122595a54 bluetooth: Make RemoteDevice::Authenticate actually pair after
connecting

Sends an auth request to the controller, if connection was initated by
us

Change-Id: I32af0a24b902d0223bb4e773258ea9e9749a899c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10527
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 12:19:26 +00:00
vighnesh-sawant aa864b9d41 bluetooth: Add support for SSP and refactor AcceptConnection and
CreateConnection

Move expecting commands from RemoteDevice::Authenticate to where they
are called.In SSP we expect for the events after ConnectionComplete.
For the state machine, LINK_KEY_NOTIFY tells us the end of the pairing
in both pairings, so we clear all expected events there for the ones we added in
ConnectionComplete, In SimplePairingComplete we clear the ones added
in IOCapabilityRequest. Tested with both bluetooth 2.1 and older pairing.

Change-Id: Ia208506c9f289d9f44dc3b8b0e4cd8a726a5d726
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10526
Reviewed-by: waddlesplash <[email protected]>
2026-03-16 12:19:26 +00:00
vighnesh-sawant dbf6744326 bluetooth: Prevent duplicates in RemoteDevicesView
Loops through and compares baddr,if its matching does not add it again
and frees it.

Change-Id: I2590852fb9c4a9f21facf5a600f45e11aeecb4d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10494
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-16 12:19:26 +00:00
vighnesh-sawant e7eb60f1a7 bluetooth: Implement EIR parsing for HCI_EVENT_EXTENDED_INQUIRY_EVENT
This parses only EIR_NAME_SHORT and EIR_NAME_COMPLETE, others are not
yet usefull, adds a way to fetch the cached friendly name and adds a
friendlyName field to RemoteDevice. Refactors DeviceListItem to work on
RemoteDevice as it's only being used for that.Also adds a check if the
cached name is complete or not. If not ask for the complete name.

Change-Id: I7e37fb9cf44cb5598ef348fdd4d781c5ae04e24e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10489
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-16 12:19:26 +00:00
Kacper Kasper ee10ca4b42 Preconfigure SSH server on test image
* This allows logging in to freshly built image using ssh.

Change-Id: I15baeee455827b73f12e1a222b166bd7975786dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10426
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Kacper Kasper <[email protected]>
Reviewed-by: Priyanshu Gupta <[email protected]>
2026-03-15 20:55:27 +00:00
Autocomitter 36367253cd Update translations from Pootle 2026-03-14 08:10:57 +00:00
John Davis 51805ac6d3 kernel/x86: Fix IO-APIC initialization on non-PCI systems
Currently the IO-APIC is fully initialized after PCI initialization
resulting in the IO-APIC not being initialized on systems without a
PCI bus (i.e. Hyper-V Gen2 VMs). This change moves IO-APIC
initialization to occur during early init, deferring PCI interrupt
enumeration and routing until after PCI initialization has been
completed.

Change-Id: I00be0be05d2e7668c3c6bc7af3afc4ff8d04a129
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10414
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: X512 X512 <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-13 18:08:44 +00:00
John Davis a0c9ad5269 hyperv: Implement heartbeat support
Adds support for the Hyper-V heartbeat integration component as part
of a new hyperv_ic driver.

Change-Id: I130ccc946d1f3ea30d87abf403d23c2cc34a1c57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10427
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-03-13 14:06:07 +00:00
Sam Roberts e438946e25 kernel/arm64: Add kernel support for Samsung UART
Tested on M1 MacBook Air.

Change-Id: Idda9b2a168642b55a9e30336be1c4f4936670035
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10487
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-13 08:34:54 +00:00
Sam Roberts 013f25498a arm64: Correct kernel base address
* KERNEL_BASE differed from the base the kernel was linked for
* arch_mmu_is_kernel_address was off-by-one

Change-Id: Ic5a4a509e330bba2503532cc75f1fdaa85ad4f07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10488
Reviewed-by: waddlesplash <[email protected]>
2026-03-12 19:16:54 +00:00
vighnesh-sawant c0336fd788 bluetooth: Add support for HCI_EVENT_EXTENDED_INQUIRY_RESULT
Follow up of a4e1f4d8ce,
this contains only response per event.

Change-Id: I6582f9530a273699048c04481fa0ef4a31a315ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10486
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-12 17:01:16 +00:00
vighnesh-sawant 230470d6d4 bluetooth: Add support for HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
Follow up of a4e1f4d8ce, details given
in that commit message on parsing of this event message

Change-Id: Icc0b54bdafe3cb167553d2fda3f62762d2d2595e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10485
Reviewed-by: waddlesplash <[email protected]>
2026-03-12 17:01:16 +00:00