Commit Graph
6466 Commits
Author SHA1 Message Date
Augustin Cavalier 0463b9511c bootloader: Refactor semantics of platform_allocate_region() functions.
This cleans up a lot of subtle or hidden inconsistencies:

 * Drop the "exactAddress" parameter. It was added in hrev15708 (2005),
   but all callers in all bootloaders passed "false" to it until 2022,
   when one codepath in the ARM32 EFI loader started using it.

 * Adjust EFI's platform_allocate_lomem to platform_allocate_region_below,
   and add a platform_assign_kernel_address_for_region(). This allows the
   aforementioned ARM EFI codepath to continue to do what it wants,
   which is to get an identity-mapped trampoline page, without having
   functions with confusingly different semantics ("allocate_lomem"
   assigned the virtual addresses as identity-mapped unconditionally,
   but it didn't insert these into the virtual allocated ranges.)

   This also paves the way for other EFI loaders to use this method
   to allocate memory below whatever default the boot services
   would give us.

 * Drop fixed virtual address allocation for all arches on EFI, with the
   exception of fixed addresses inside KERNEL_LOAD_BASE, same as on
   other boot platforms. Anything which wants fixed virtual addresses
   outside that region can use the new "assign kernel address" method.

 * Validate kernel base and size against kMaxKernelSize, instead of
   assuming it fits. This matches behavior of other boot platforms.
   Ideally we would have some more generic routine for mapping the
   kernel, but this suffices for now.

Tested with x86_64 and ARM; both still boot (well, ARM boots as
far as it did before this commit, anyway.)

Change-Id: Ieb4fba752994101191a2335cb5395eb2b726fcbb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9024
Reviewed-by: waddlesplash <[email protected]>
2025-02-21 04:08:51 +00:00
Vladimir Serbinenko 801a0ee83d kernel: Change x86_*_msr to be an inline function on 32-bit platform
Change-Id: Ida5ff96cda06ca4463f15b636f1275977f3ec0ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9015
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-21 02:27:20 +00:00
Chris Roberts c10ecdf570 screensaver: allow using the system password to unlock
This replaces the non-functioning "Network password" option that was
never implemented.

Change-Id: I9b7362f4e05d7f1a4be321e1a9aade62559794d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9009
Reviewed-by: waddlesplash <[email protected]>
2025-02-19 04:21:38 +00:00
Augustin Cavalier 3d840c4289 kernel/x86: Determine the APIC frequency in the kernel instead of the bootloader.
We use the TSC to measure the APIC frequency, but the TSC frequency
is only fully initialized in the kernel (where it's read from CPUID
on recent hardware).

Furthermore, on some more recent systems, it seems there may only be
X2APIC and no MMIO APIC timer at all, and the bootloader does not
handle that case.

The method in the kernel uses spin() instead of a fixed instruction
count as well as system_time_nsecs() and a double for (hopefully)
more accurate calibration.

At least on VMware, this method seems more accurate: the APIC frequency
read from the hypervisor CPUID leaf is 66,000,000; the old method in
in the bootloader yielded values like "65,801,075" and "65,106,382",
while the new one yields values like "65,963,920" and "65,962,580"
(those pairs of values are from two consecutive boots.)

The difference was sometimes similar (but smaller as a percentage) in
QEMU with software emulation: e.g. "993,218,085" vs. "992,965,761". But
sometimes it wasn't: e.g "991,619,585" vs. "993,689,669". (QEMU in
software mode doesn't report a frequency via hypervisor CPUID leaf.)

Change-Id: I4fb8535d1d984f13867e2f84e7dfad1ceed42c13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8999
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-18 21:04:59 +00:00
Augustin Cavalier 69cb8e25ff libroot/posix: Add glue code, global caching logic, and integrate OpenBSD malloc.
* PagesAllocator: A process-global caching strategy for the allocator.
   It deals with allocating virtual addresses and memory, and gives us
   back some of the performance that's lost by having an actual
   decommitment strategy (which the hoard2 glue code doesn't.)

   It uses two SplayTrees to manage free lists, and resizes areas
   on allocate if they aren't next to a free chunk (which saves a lot of
   time for large reallocations.)

   There's still room for improvement here, see inline TODOs. But overall
   we get pretty good performance with it.

 * Add a TLS slot for the allocator glue to use. Right now it just puts
   integers in there (since thread IDs are not evenly distributed),
   but we could put a data structure pointer in there as well, potentially.

Change-Id: I56ddb0b022a468dc04275075ed7e174b339c8ca4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8335
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-13 22:43:57 +00:00
Augustin Cavalier 72a67f8d8a ACPI: Always use the loader-reported root pointer.
We always did under EFI but not under BIOS. Now, the BIOS loader
reports the root pointer as well, so we don't need to find it again.

Change-Id: Ie83adb53f098d44f2688a1a327c084f94afa2673
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8941
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-02-10 20:18:51 +00:00
Augustin Cavalier cbfbbf6d4d Change BObjectList to take "owning" as a template parameter and adjust all consumers.
Since BObjectList is a template class, this only breaks ABI where
BObjectList was exposed in public methods, and even then it's only
a name mangling break and we should be able to add compatibility
methods if necessary.

(The old "bool owning" member variable is left intact for ABI
compatibility, for the moment, though it's otherwise unused now.)

Tracker's PoseList is the only remaining type that has a "bool owning"
switch in the constructor rather than template parameters.

This should significantly improve the output of static code analysis
tools that previously detected list operations as causing use-after-frees
and double-frees, as well as make code maintenance easier by making it
easier to determine what list owns (or does not own) an object.
It should also be a minor performance optimization, since the branches
for calls to delete/free should now be optimized out altogether.

Still boots to desktop and Tracker, Deskbar, Debugger all tested
and verified as working.

Change-Id: If2a24a6f0d22e7a506ef554fcfdd328907279ed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8915
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 00:06:32 +00:00
Augustin Cavalier 007126ed6f Keymap: Change GetModifiedCharacters API to return BStringList.
Simplifies the API and makes ownership semantics clearer.

Change-Id: I59d2e3ef8055253e85943500fb65356762055c54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8914
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 00:06:32 +00:00
Augustin Cavalier 3e245f7b20 Tracker & Deskbar: Use BStringList instead of BObjectList<BString>.
It's more efficient, and conveys ownership semantics more clearly.

Change-Id: Ia42b018faaa7c8c7347020afbf1be9dfafe0fed8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8913
Reviewed-by: waddlesplash <[email protected]>
2025-02-06 00:06:32 +00:00
John Scipione 49d3b2a142 Tracker: Fixup hardcoded values for ModelMenuItem padding
This is to make BMenuBar and BMenu margins the same.

The hardcoded menu item margin numbers come from this math on what the
BMenu and BMenuBar item margins respectively used to be a long time ago:
14 - 8 = 6 // for left margin
(14 + 20) - (8 + 8) = 18 // for left + right margin

We have since updated these margins so they need to be recalculated.
Use BPrivate::MenuPrivate to get the new margin deltas.

IconMenuItem and ModelMenuItem classes are used by Tracker add-ons and
those can be in the menu bar as well.

Change-Id: Ie4147c31e6b19764cb36b9c414f7e91c47b7d9bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8905
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-02-05 16:38:08 +00:00
Jérôme Duval 6c380f3c8e kernel/x86: add definitions for cpuid leaves
remove feature_5_ecx

Change-Id: I247a37c875e5dd04f2239fdceeef67e402b1245d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8880
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-02-04 17:22:34 +00:00
Augustin Cavalier 97d45387df headers/find_directory_private: Don't rely on <sys/cdefs.h>.
This header is included by the build headers, and musl doesn't
provide sys/cdefs.h.

Fixes the build of the standard host tools under musl.
2025-02-04 01:13:06 -05:00
Niklas Poslovski 6670202514 ControlLook: Use B_PANEL_TEXT_COLOR for scrollbar arrows
Change-Id: I7a291842eeaaba00176cb4473a075fad1d3d6293
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8895
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-02-03 17:18:51 +00:00
Jim906 1c0da902ab userlandfs: Ensure room for requests in port
* Add a parameter to RequestAllocator::AllocateAddress and ::AllocateData
  that allows the client to specify a minimum amount of free space that
  must remain in the port buffer.
* Make use of the new parameter in some operations that can fail
  without it.

The Port buffer can be used to store data associated with a Request.
For some file system operations, further requests must be sent through
the port (by calling AllocateRequest) after reserving port buffer
space for data. Unlike AllocateAddress and AllocateData, which can
use an area if the data is larger than the port buffer capacity,
AllocateRequest can only allocate space in the port buffer. If data
previously allocated in the port buffer happens to be large enough to
fill it, then these further AllocateRequest calls will fail.

Change-Id: If03e0afdfbd9fbc36f0e1a04b5d0a20031932b91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8866
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-01-29 17:17:16 +00:00
Augustin Cavalier 72162cc730 kernel/vm: Put name argument first in VMCache::Init.
This seems to make more logical sense.
2025-01-28 17:55:27 -05:00
Augustin Cavalier fb3a70af79 kernel/vm: Give VMCaches better names.
This helps with debugging and reading scheduling reports.
2025-01-28 16:40:27 -05:00
Augustin Cavalier 17c3890ce1 kernel/vm: Track fault and copy counts in VMCache.
This solves a TODO for reporting CoW counts in area_info, and paves
the way for adaptive handling of pre-faulting based on how many
faults a cache has handled.

Change-Id: I4ecd7cf46b794c51acac87184fef49ea5ce76743
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8873
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-28 21:23:38 +00:00
Augustin Cavalier 1be0d390db kernel/slab: Simplify arguments of create_object_cache().
* alignment, cookie, constructor, destructor are rarely used
   (in fact constructors/destructors are never used at present.)

 * Add flags argument, this is more commonly used.

This allows a lot of the invocations of create_object_cache_etc
to be changed to invocations of just create_object_cache, simplifying
the code significantly.
2025-01-27 12:51:12 -05:00
PawanYr c1b2086dfd Input: add touchpad speed, accel, and scroll settings
See #17265; adds speed and acceleration sliders, as well as a reverse
scroll option. Tested on a Dell XPS 15. Only affects touchpad prefs,
not mouse prefs

Also, fix issues where revert button wasn't being enabled sometimes
when it should have been.

Also, switch to using a BMessage to store touchpad settings in their
file.

(a previous version of this patch added only the scroll setting)

Change-Id: I4d5ed3fadfd5bae1f7b686c904959f6e168b84a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8756
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-01-26 22:47:31 +00:00
Augustin Cavalier 414774d79f kernel/vm: Rename VMCache::HasPage to StoreHasPage.
It checks whether the page or page's data is present in an underlying
"backing store", not whether the page is present in the cache itself.

No functional change intended.
2025-01-22 16:19:33 -05:00
John Scipione 622853ff8e Appearance and Terminal: Move ColorPreview to shared
Move ColorListView and ColorItem to shared in BPrivate namespace.

ColorItem typedef to BPrivate::BColorItem for apps that are already
using this class.

Gravity screensaver:
* ColorItem => BColorItem.
* Use make_color() to set colors.

Make color drop message name agnostic, check for B_RGB_COLOR_TYPE.
Add be:sender and source to drag message.

Add _SetTermColors() convenience method to set colors on all tabs.

Change-Id: I5a9f55d3ab423ccaa341997cf444603373024553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8846
Reviewed-by: John Scipione <[email protected]>
2025-01-22 19:28:58 +00:00
Dru Satori 0db74e1ae1 intel_extreme: add support for Alder Lake chipsets.
Added AlderLake-P and AlderLake-N variants to agp_gart bus
and intel_extreme driver. Tested and confirmed working.

Change-Id: I1ac1e04fbba222a2f9eef483d68575665561e837
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8840
Reviewed-by: waddlesplash <[email protected]>
2025-01-20 17:17:43 +00:00
Augustin Cavalier f3f347f90d kernel & libroot: Drop wait_for_thread syscall in favor of wait_for_thread_etc.
We don't have many etc and non-etc syscall pairs in this file
(the semaphores seem to be a notable exception), so drop
wait_for_thread and just call wait_for_thread_etc instead.

This breaks syscall ABI, but we've already broken it since beta5
anyway.
2025-01-15 14:52:15 -05:00
Augustin Cavalier 7331a67227 kernel/util: Require passing a list_link to list_remove_link.
If something other than a list_link is passed, an explicit cast
will now be needed.

No functional change intended.
2025-01-14 17:30:36 -05:00
Augustin Cavalier 7d232f0cf8 kernel/image: Switch to using DoublyLinkedList<> for struct image.
No functional change intended.
2025-01-14 17:30:36 -05:00
Augustin Cavalier 9792c51694 kernel/elf: Use extended_image_info instead of reading runtime_loader structures.
This solves some TODOs and allows image_debug_lookup_user_symbol_address
to be dropped entirely. It should also fix reading symbols from binaries
that have multiple TEXT regions, and most functions are not in the first.
2025-01-14 17:30:36 -05:00
Augustin Cavalier 2c9560581b Debug Kit: Restore support for symbol lookup by remote memory access.
It's been broken since clone_area was changed to block cloning of
areas without B_CLONEABLE_AREA set on them. We here introduce a
B_DEBUG_MESSAGE_CLONE_AREA debug nub message, which clones the areas
of the debugged team for the debugger.

Also fix some bugs in SymbolLookup::_FindLoadedImageAt methods:
they didn't work properly when *next was NULL, so they would
always fail when iterating over the full list.

Note that this technically breaks libdebug.so and the debugger
protocol ABI. However, nothing out-of-tree that I know of uses
the private libdebug.so, and while GDB does use the debugger
protocol, it doesn't actually use any of the messages past
the first block, so it should still work after this.

Fixes #15251.

Change-Id: I71ccbee4afd17dae30d5dacbc7590d1e2175a90e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8821
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-01-13 18:03:52 +00:00
Augustin Cavalier babcaa3c29 runtime_loader: Resize heap areas instead of creating new ones.
This is more efficient and works most of the time. Additionally,
we can potentially join with a previous free chunk in the allocator,
avoiding extra fragmentation on the heap.

app_server (on x86_64) only has 1 "rld heap" area after this change
with a size of 0x50000 (320KB), whereas previously it had around 7
with a total size of 0x80000 (512KB).
2025-01-07 17:30:29 -05:00
Augustin Cavalier 7137fc03b2 bootloader heap: Actually implement DEBUG_ALLOCATIONS.
The old define was really "check heap integrity", so it's split off.
In the userland test harness, this takes the total time spent in
the allocator from around 1ms to 14ms for all the allocations used
during a boot with "nightly" profile, so it seems acceptable to
enable it under KDEBUG.

Tested with both BIOS and EFI bootloaders, still works.
2025-01-07 17:30:28 -05:00
Augustin Cavalier 9bf3184b3c kernel/util: Merge the bootloader and runtime_loader heap implementations.
They were mostly copies of one another, save for the glue code
and a few other things. Now they're mostly unified, and this allows
the test to be greatly simplified, too, since it can avoid including
any bootloader code at all.

The heap implementation itself should have no behavioral changes
from before. Those will come in future commits.
2025-01-07 17:30:24 -05:00
Augustin Cavalier 6a75e767e6 kernel/team: Convert Team linked-lists into DoublyLinkedLists.
They were hand-rolled singly-linked lists before. This adds 24 bytes
of size to the Team structure, but turns all the removal operations
in parent and process group into O(1) operations instead of O(N) ones.
Realistically, the Thread linked-lists should be converted as well,
but this is trickier due to interdependence on the Team structure.
2025-01-06 23:39:40 -05:00
Augustin Cavalier 2b7da773ed app_server & libbe: Use server_read_only_memory for the colormap.
At present there's only ever one global one, so we don't bother using
an array for multiple screens (and we don't support multiple screens
yet anyway.)

This fixes a very old TODO, and avoids sending a ~32 KB port message
on every application startup.

Note that this breaks the app_server protocol ABI.
2025-01-06 23:39:39 -05:00
Augustin Cavalier 66f51cb3b9 kernel/team: Do not inherit anything from the kernel's IO context.
We already didn't inherit FDs, which meant that the only thing we
did meaningfully inherit was the table size. That meant that basically
no applications actually had a table size of the default 256, but all
were at the kernel's 4096 (except Tracker and anything started by it,
as Tracker resets it to 512), and also that basically all applications
had FD tables allocated with the raw allocator instead of the block
allocator, which isn't very efficient.

Since this reduces the default FD table size, some applications
might encounter problems. However, build systems and other such
tools should already increase this by default as needed, and it's
easy enough to patch in calls to setrlimit() if it turns out
some applications needed a higher default after all.

Also remove a redundant call to vfs_exec_io_context. Calling
vfs_new_io_context with the second argument set to "true"
already skips cloning CLOEXEC FDs.
2025-01-03 12:26:13 -05:00
Augustin Cavalier d4a1fc648b kernel/vm: Drop VMCacheRef::ref_count.
Nothing touches it at all.
2025-01-02 21:32:44 -05:00
Augustin Cavalier f44cb411cc Package Kit & packagefs: Allocate scratch buffers for decompression further up.
Zstd wants a ~90 KB scratch buffer to decompress our 64 KB chunks.
Rather than let it allocate that itself every time, pass in a 2*64KB
"scratch" buffer and statically allocate the working memory from it.
Pass it down using iovecs, and pass down the other buffers in the same
way, to reduce parameters.

Further, rework the object_cache used for heap decompression buffers
to contain objects sized as 4x64KB, so we only need to do one allocation
and deallocation for the compression/decompression and scratch buffers.
Set the minimum reserve to 1 so that the low-memory manager doesn't
reclaim this, as we'll need it when reading back data.

Improves packagefs I/O performance (and thus boot speeds at least a bit,
it appears.)

Change-Id: Id51f6f598b33b9d757a283184c533bb97049529f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8717
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-12-30 19:04:10 +00:00
Augustin Cavalier 7651b97c0a kernel/vm: Consolidate implementations of VMTranslationMap::UnmapArea.
This adds some new parameters to UnmapPage and UnmapPages. The important
one is a "_flags" pointer to UnmapPage, which if specified will be
filled with the page flags instead of PageUnmapped() being called
(and Flush() won't be invoked, either.)

This removes the remaining PAGE_STATE_* changes from VM architecture code.

Change-Id: Iacbc424dd8a75a79986edcd7f04d15a10f773c87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8728
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-12-30 18:50:10 +00:00
Augustin Cavalier fccefbf347 kernel/vm: Use allocate_early instead of passing a get_free_page method to early_map.
Simplifies things significantly.
No functional change intended.

Change-Id: Ia14c2ec72038ad6f8b56a14974dca78e1877063c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8725
Reviewed-by: waddlesplash <[email protected]>
2024-12-28 14:47:32 +00:00
Augustin Cavalier c5874ee428 kernel/vm: Make use of VMTranslationMap::PageUnmapped in UnmapPages.
An extra argument is added to allow the VMAreaMappings objects to
be added to a queue instead of freed directly (and the lock unlocked,
and so on.)

All architectures adjusted.

This means there is now only one place in each TranslationMap that
the page state and other data is directly adjusted (in UnmapArea).

Change-Id: I3ed2d6d969d1b1e235144a1035c90c750779af27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8716
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: X512 X512 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-12-27 22:07:34 +00:00
Augustin Cavalier c9fe6a1441 kernel/user_debugger: Remove declaration for _user_get_stack_trace.
The method itself was removed in 8f9d4cad45.
2024-12-26 20:34:27 -05:00
Augustin Cavalier 8bb382decf kernel/vm: Drop vm_page_num_available_pages.
Nothing uses it, and it isn't correct anyway: vm_page_num_free_pages()
now includes cached pages, too, while vm_available_memory() includes
not just available memory pages but also swap.
2024-12-26 20:34:27 -05:00
Augustin Cavalier 01e97ff280 KPartition: Drop SetParent().
A comment indicated it "must" only be called in Add/RemoveChild only.
So the field is just modified there now.
2024-12-19 17:21:04 -05:00
Augustin Cavalier 74ae79fed9 kernel/fs: Don't store the mount cookie in the KPartition.
Nothing uses it. If needed, it can be retrieved through the volume
(mount) ID.
2024-12-19 17:17:18 -05:00
Augustin Cavalier 04c8e27efa BDiskSystemAddOn: Remove the Flags field.
Nothing used it. Instead the kernel addons' flags are used instead,
except in the case of PartitionDelegate, which calls SupportedOperations().
2024-12-19 16:34:16 -05:00
Augustin Cavalier 87eae1e3c8 bootloader: Properly enable __PRINTFLIKE for the boot stdio.
No new warnings or errors, it appears.
2024-12-17 19:49:23 -05:00
Augustin Cavalier f836917f47 kernel/vm: Rework ordering of _RemoveConsumer and drop "unmergeable" flag.
This reverts a8877df135.

Previously, the "unmergeable" flag was necessary for the RAMFS,
because if the last vnode reference was released while there
was still a consumer (as the old ordering of _RemoveConsumer
had), then the release of the cache reference when the vnode
was removed would result in the cache trying to merge with
its now-only consumer and sole referrer.

Now, instead, we remove the consumer before releasing the store
reference, so that there's no chance the cache will be merged
inside this method.

mmap_cut_tests still pass, web browsers using ramfs shared_memory
still seem to work.
2024-12-17 19:12:40 -05:00
X512 8ea4167e8b kernel/vm: use DoublyLinkedList for VMCache areas list
Change-Id: I0c6a231f245fa542f5d90959755de1e6ba39eb8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8685
Reviewed-by: waddlesplash <[email protected]>
2024-12-17 17:53:47 +00:00
Jérôme Duval 04c90835ac POSIX: add pthread_getcpuclockid()
fix #15615

Change-Id: I6b34f97464fac97d0b339fa338cfc5df34536080
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8681
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-12-17 09:45:13 +00:00
Augustin Cavalier d4d55c1fbb kernel/vm: Rename _FreePageRange "discarded" argument to "freedPages".
Clarifies things. No functional change.
2024-12-16 22:06:06 -05:00
Augustin Cavalier e52dd571d9 bootloader: Make releasing the heap the platform loader's responsibility.
Otherwise, platform loaders couldn't make heap allocations inside
platform_start_kernel(), which some loaders (e.g. EFI) do.

Implement calling heap_release() for the BIOS loaders at least.
This gets us back the ~1.5MB of bootloader heap memory there.
2024-12-16 13:36:39 -05:00
Augustin Cavalier 038d9b44d1 kernel/listeners: Use an rw_spinlock for the gWaitObjectListenerLock.
When the system profiler is in use, this spinlock is used very often.
Internally there's another spinlock which isn't (yet) rw, though.
2024-12-13 17:17:43 -05:00