* 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]>
Some devices such as graphics and PCI passthrough bridges require
MMIO space. Add this as a device node attribute if present.
Change-Id: Id374ff61c29c1ccad10e3a7f3f7053c14d02aa5e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10483
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
* macOS ships an ancient version of GNU Bison which wants
an '=' after %name-prefix
* macOS awk doesn't support strftime, so try to find a working
awk.
* _haiku_build_{open,openat,fcntl} are declared and defined with
different prototypes (variadic vs non-variadic). This is bad
on its own, but it "happens to" work on most platforms since
variadic parameters are usually passed in registers, same as other
arguments. On arm64 macOS, variadic parameters are always passed
on the stack, so you get weird and confusing bugs when using
these functions.
Change-Id: I8cee9ecac0ac9b039be6b7e35ceaf8ad7c0f4c44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10468
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
The SMP_MAX_CPUS * 4 fixed pool size apparently goes all the way
back to NewOS, which supported only 4 CPUs max. As ours is now
64, this means the fixed pool size was very large even on systems
with only a few cores. So, instead, allocate 4 messages per CPU
(though often more, due to rounding up to the page size; e.g.
on x86_64, 1 page fits 56 smp_msgs.)
Also, put them a dedicated area, to keep them a bit more segmented
from the kernel heap, in case of problems.
Since the kernel is built with -ffreestanding, and thus -fno-builtin,
the compiler ignores the function names and doesn't perform optimizations
(e.g. inlining for small values) that it otherwise could. So, here,
we add a string.h that supplements the default, and uses #define to
reinstate the builtins, and thus the optimizations.
Linux and FreeBSD at least apparently do the same. A quick compile
benchmark in a VM doesn't show much difference, maybe a slight
decrease in sys time.
responses are returned
According to the Bluetooth Core Specification, Vol. 4, Part E, 7.7.2, for HCI_Inquiry_Result a struct of arrays is returned, and not
an array of structs. The previous code parsed it as if it is an array of
structs, so fixed that. Refactored MessageReceived so that that its
easier to implement HCI_EVENT_EXTENDED_INQUIRY_RESULT and
HCI_EVENT_INQUIRY_RESULT_WITH_RSSI going forward.
Change-Id: I9c258d1e26a4b6aa33d7acf730bddaeccf5d754b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10408
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Currently the size of the bitmap cursor passed to the accelerant
is the upper bounds coordinate. This is incorrect and should be
the actual size of the cursor.
Change-Id: I7be05a78125d0c22843c2ace56a8ab5bda67a014
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10456
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Use entry->name instead of entry+1 for accessing directory
entry names. Fix Lookup() to iterate all entries with the same
hash and compare names to find the correct one, returning
B_ENTRY_NOT_FOUND if no match is found.
Change-Id: I86c3680d830491b3f78c52590047205894e2b5d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10449
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Check that sector_size and node_size are powers of 2,
that node_size >= sector_size, total_size is non-zero,
and num_devices is non-zero.
Addresses the TODO comment in IsValid().
Change-Id: Id2c084f6b649a0315de1454a072ab1dcf3d0a3dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10448
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
The checksum was being calculated over the wrong memory region.
&fSuperBlock+N advances by N*sizeof(btrfs_super_block) bytes,
not N bytes. The correct form is (uint8*)&fSuperBlock+N which
advances by exactly N bytes past the start of the superblock,
correctly skipping the checksum field.
Change-Id: I8dba6410f2cd2d2d66e3cf484d4ac1f599449021
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10447
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Fix missing spaces after comment markers on lines 172 and 469,
and fix spaces-instead-of-tabs indentation on line 871.
No functional changes.
Hashtags: gsoc2026
Change-Id: I722cbccba634348d63e60527fa96bd9ec9b639ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10446
Reviewed-by: Adrien Destugues <[email protected]>
I checked all invocations of GetBit; as far as I can tell,
only the two adjusted here in smp.cpp are done while the Set
may be concurrently modified, and even then I don't know
that they really need to be atomics, anyway.
This allows read spinlocks to be used in check_for_message
and return_free_message.
On a 4-core VM, there don't seem to often be concurrent readers
(a counter I setup got only about 400-500 hits for booting up
and starting a web browser, at most.) But on bare metal (i3,
2 cores x 2 hyperthreads) we get it a lot more: 30,000+ times
during boot alone.
Kernel map invalidation (with a hack to invalidate all every time)
across boot-to-desktop takes a cumulative ~68.0ms before this change,
and ~61.0ms after, on the bare metal system. (On the VM it's also lower
after this change.)
Presumably on systems with more CPUs it will get hit even more
often still. So this optimization seems worth it.
Like the other race, this becomes an issue once
PCID is supported. If a user thread initiates a
TLB flush and is interrupted, it may have a new
PCID next time, so arch_cpu_invalidate_tlb_list
returns without invalidating any TLB entries...
Change-Id: I91016c2e244f9f5c1c482596f2f62952830644de
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10450
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
* Fix cases where the total/selected item count value was not formatted
(e.g "1000/1,000 selected").
* Fix the item value format when type-ahead filtering.
Change-Id: Ia7f64443227ee1a03ce96ab441cb4ffc77d026df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10423
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit should fix: "TODO: Adding one char at a time is very inefficient!"
- Add data to string in bulk using memchr instead of char-by-char.
- Added some unit tests for FileReadWrite::Next in UnitTester
- Created Jamfile to make libmediaplayertest.so
Change-Id: I2916bd10c142609a8a64273f9b1eac9b98fcb260
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10397
Reviewed-by: Máximo Castañeda <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Prevent crash caused by canceling an empty trash operation while it is
calculating the total items and size. Fixes a double free caused in the
BObjectList destructor by ensuring the trash item is removed from the
list even if the user cancels.
Fixes#19725
Change-Id: I8355483f70399a8eb5f52f633ccfd5e219f17aad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10422
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Currently, a packet being read is split into header and data buffers.
Change to a single buffer to simplify logic in drivers, especially
for those that receive packets with variable sized headers.
This change also implements the pending send size functionality for
the receive buffer.
Change-Id: Ic4a3698fcfe813fbcf4fd9c1941102b5adaeb3b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10418
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
They call out to other library functions, which are better optimized
than the old naive implementations.
Add -fno-builtin to the musl strings Jamfile, otherwise GCC
generates infinite recursion in strcpy, apparently.