Commit Graph

63753 Commits

Author SHA1 Message Date
Fredrik Holmqvist
d028516b19 Remove use of config_manager
bus_type has been added to MediaRoster.h and the serial driver.
It is not used enough to be in any shared header.
media_roster only uses it for buffer size estimation.

Change-Id: If4f372d44e871230da4744d99ec7cde0c79c8344
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5209
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-20 15:57:04 +00:00
Fredrik Holmqvist
a9bd2efd90 Delete config_manager
Change-Id: Ie909c9a22750c33fcb1dd7824e8b3e51c4d86572
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5208
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-20 15:57:04 +00:00
David Karoly
2b943e564a kernel/arm: hush memory type warnings
arch_vm_set_memory_type() seems to be x86-specific (cf. MTRR) and
on other architectures it's enough to respect memoryType argument
passed to Map() and Protect()

Change-Id: Ic898b0659c73552d705593dbc3f315dbf504013d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5217
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-20 15:52:59 +00:00
David Karoly
ab78f824da boot/efi/arm: handle unaligned ranges in map_range_to_new_area()
Change-Id: Ia6c707bf8381b77aa8b256a007fb51f1c32e9e17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5183
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-20 13:38:23 +00:00
Zone.N
75438cceda build/libgnuregex: fix build error on MacOS 11.6 x86_64
Change-Id: Ib7646acb866097b3d0e0fddbd0cf44999191c761
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5193
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-20 04:25:36 +00:00
Jérôme Duval
b47557049c intel_extreme: check EDID for DDI interface E, not only the VBT
fix #17706

Change-Id: I23f260b179cdfabee391d9426a30ec636cafff8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5212
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-19 08:29:48 +00:00
X512
24eb3d5aba kernel: do not use assembly code for commpage signal handler
Unify with x86 and riscv64 implementation.

Change-Id: I2f44575768628eb3a2d4eaaa86f020de582ecd0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5203
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-18 17:02:48 +00:00
David Karoly
6886114066 boot/efi/arm: flush caches before jump to trampoline
Change-Id: Ia7af285f1c3b988828482ff0cd78a416cf51c2c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5196
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-18 15:27:10 +00:00
X512
16e80b04a7 kernel: add missing support of simple signal handler for riscv64
Change-Id: Iab9d09344a99013b381b64d5438ded0a083b3a52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5202
Reviewed-by: Rene Gollent <rene@gollent.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-18 14:52:21 +00:00
Jérôme Duval
0c729c2291 nfs: fix SMAP violation on write
also rewrite the fix on read for consistency.
should fix #17708

Change-Id: Ia75ed90ba427db7a7d96aff3457fbce61e857533
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5211
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-18 14:48:35 +00:00
David Karoly
9501bd1241 arm64: update linker script for kernel
Change-Id: Icf53d6ce1940dedebf218a6b68531aebf4c896b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5207
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: <oliver.ruiz.dorantes@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-17 08:26:41 +00:00
Jessica Hamilton
c285a1585e Terminal: parse foreground+background in a single SGR escape.
* Whilst testing `starship`, it was apparent that setting both the
  foreground & background colours in a single SGR escape is deemed
  a valid escape sequence.
* E.g. `ESC[48;2;58;149;199;38;2;47;121;161m` would set the
  background to RGB(58,149,199) and foreground to RGB(47,121,161).

Change-Id: I3c14afe2ddf673c85d1678a01e7258587b17f21b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5210
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-16 08:48:53 +00:00
Autocomitter
945a908417 Update translations from Pootle 2022-04-16 08:13:02 +00:00
David Karoly
3be705841c arm: remove config_manager_arch.c
config_manager_scan_hardcoded() is never invoked
and there's nothing else in config_manager_arch.c

Change-Id: Iddd0648efa15ffe4a1621b74dbdd1db16039bfe8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5206
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-13 20:30:22 +00:00
David Karoly
c4b8af3b6f kernel/arm64: enable 8250 UART driver
Change-Id: If8195e5e1032a172b3365f8771c4d87a2f0657ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5191
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: <oliver.ruiz.dorantes@gmail.com>
2022-04-13 20:00:11 +00:00
David Karoly
21ac6f6b75 arm64: remove config_manager_arch.c
config_manager_scan_hardcoded() is never invoked
and there's nothing else in config_manager_arch.c

Change-Id: Id3ec90f670de3517cfc9c1d6710c0fa688e5d48b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5205
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-13 19:57:20 +00:00
Jérôme Duval
e5d9d907ee intel_extreme: adjust brightness level for Gen4
preserve bits before Gen4

Change-Id: Icf80ec469c3682223f0db1744a5c923fb06bd7fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5190
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-12 11:29:27 +00:00
Jérôme Duval
d271377590 intel_extreme: brightness setting support for Kaby Lake
Change-Id: Ie78a034077f3be8faaaf83ab80a0ae6c1c001bc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5187
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-12 11:29:27 +00:00
scph
84d27c6508 mouse: get/set acceleration factor by mouse name
* Create and use *_mouse_acceleration_by_name functions to replace older *_mouse_acceleration functions. Now consistent with related functions (such as *_mouse_speed_by_name).
* Passing mouse_name to HandleGetSetMouseAcceleration in the BMessage fixes mouse acceleration changes not applying properly.

Change-Id: I668cdbbbb81e3cb9069a3fc2ce77e6ef75ba8476
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5189
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-12 11:24:12 +00:00
Jessica Hamilton
c0b591c58f Terminal: implement 24-bit colour.
* Changes `TERM` to `xterm`, as we're now a full colour capable terminal
* Removes now-obsolete GuessPaletteColor from an RGB triple
* Since it's using a struct instead of uint32 for attributes, add a bunch
  of helpers for a cleaner implementation
* Pass the TerminalBuffer's palette to the foreground/background get
  helpers, for when an indexed colour is returned

Change-Id: I33bd3bb1407b87a237a8bc355093fe549e05b43a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5195
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-12 09:31:56 +00:00
Autocomitter
d45a65c88d Update translations from Pootle 2022-04-11 05:17:01 +00:00
David Karoly
4b1d94b435 debug_uart fixup for arm64
Change-Id: I872e822c48d0b4675064991ba890ce6d74d15118
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5186
Reviewed-by: <oliver.ruiz.dorantes@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-09 14:52:35 +00:00
David Karoly
2b5b228442 boot/efi: implement ranges property for simple-bus
see Devicetree Specification, section 2.3.8

Change-Id: I788bbaa67c8e8f9b57f138418eb1c3131bbe2010
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5188
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-09 14:51:47 +00:00
David Karoly
ab3c8bea07 gensyscalls: alignment fixup for ARM
ARM ABI has different alignment requirements based on parameter size:
* parameters not larger than 4 bytes are aligned on 4 bytes
* parameters larger than 4 bytes are aligned on 8 bytes

see:
Procedure Call Standard for the Arm Architecture
sections 5.1, Fundamental Data Types
and 6.5, Parameter Passing

Therefore the following changes are introduced in gensyscalls tool:
* new optional define SYSCALL_LONG_PARAMETER_ALIGNMENT_TYPE is introduced
* it's defined only on ARM
* on other architectures it takes on the value of SYSCALL_PARAMETER_ALIGNMENT_TYPE as a default
* constants kLongParameterAlignmentType and kLongParameterAlignmentSize are introduced
* Syscall::AddParameter uses this value for aligning parameters larger than 4 bytes

Change-Id: I7e766e0ea9d07001643e813722b462b1f044921a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5112
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-08 15:30:06 +00:00
PulkoMandy
b24e59ccbb intel_extreme: fix backlight control on generations 9 and 10
I changed the way we decide which registers to use in a previous
patch review but I changed it in only one of two places. As a result
we were using the old code with the new registers, resulting in invalid
backlight settings.

Should fix #17692

Change-Id: I4e977d5700d3a002986beafff5ca511673c86540
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5185
Reviewed-by: Richard Zak <richard.j.zak@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-08 15:05:26 +00:00
Jim906
b59abca856 DiskUsage: Ensure window opens on screen
* Use BWindow::MoveOnScreen to center the window if it opens outside of the screen frame.
* Fixes #16980.

Change-Id: Icf777aea70ed0e91f57bcd425b3dddbdcb7600df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5180
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-08 06:00:58 +00:00
Jérôme Duval
b995f6a764 hda: detect two intel audio devices per device ID
from https://linux-hardware.org/?view=search&name=HD+Audio&vendorid=8086&classid=04-01#list

Change-Id: Icd1dda5654783bb6f0633613218f8637dc4271a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5179
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-07 05:54:28 +00:00
Jérôme Duval
8386ba2747 Terminal: fixes motion events
* fReportButtonMouseEvent 1002 means only drag events are to be reported.
* only one of the modes 1000/1002/1003 can be selected.
* makes sure to report a button when dragging.
* secondary and tertiary buttons were reversed.
* extended buffer is now filled with snprintf.
* fixes #17684

Change-Id: I59d80937ae193343dc1e7006c4371320fc2182d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5184
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-07 05:54:06 +00:00
Jérôme Duval
dbcbe07a1b runtime_loader: review after ebeab0cf70
* memset should happen after the NULL check
* useless casts

Change-Id: Id96e7861154b554dd927bf5dde2329c8acd2fdca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5181
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-04-06 13:10:52 +00:00
Jérôme Duval
f0a1b22183 intel_extreme: hook dp_aux channel to the i2c common ddc for DigitalDisplayInterface ports
This assumes a Gen9 or Gen11 configuration, and aux channel 0. As a result, the same EDID will
be found for every DDI port. The mapping should be found in the VBT.

Tested on KabyLake and JasperLake

Change-Id: I27f5ac8ec8e6ba519fbe9aaf745e78a7361175b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5175
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-05 14:47:59 +00:00
Jérôme Duval
3c263adf2c intel_extreme: rework interrupt handler for gen8 til gen11
minimize register reads/writes.
makes more interrupt handling easier to add, for instance iir interrupts.

Change-Id: I97a7e9fcc9273ada6c0f12d5343bf7804f8bdd20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5174
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-05 14:47:59 +00:00
Jérôme Duval
f6e7d9dfbc radeon_hd: update DP definitions to match the spec
Change-Id: Ib653fcf3fef26e17e801ee016e94787c67a64e3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5173
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-04-05 14:47:59 +00:00
Jérôme Duval
f0a63f1888 radeon_hd: DP AUX address is actually 20-bit
Change-Id: Ie551c6977cb4fb8b45ad896aedd0d3c6b0b183d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5172
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-05 10:53:04 +00:00
Jérôme Duval
5f90c3726b intel_extreme: change i2c_send_receive to a hook
common: i2c/ddc uses a 7-bit address for EDID.

Change-Id: Ic1bba2a23174c671bd7374104596c22433bd343a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5171
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-05 10:53:04 +00:00
David Karoly
5e6e52cfd4 boot/efi/arm: enable caches before jump to kernel
Set bits 12 and 2 in SCTLR to enable i-cache and d-cache.
Set cacheability flags in TTBR0 to enable coherent page table walks.

Change-Id: I7f62255b9e49035524ecf87bed12a60dd405f3c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5178
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-05 10:49:46 +00:00
David Karoly
fdaa57a70d boot/efi: handle /chosen/stdout-path
Change-Id: I08ebadf274448e1319cc8b0666beaf709382c00f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5143
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-05 10:49:19 +00:00
urnenfeld
476346ac62 arm64: Enable DTB handling, Introduce LINFlex UART driver
Change-Id: Ib643545271700e6ff4a4037d0e797355194927e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5149
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-04 19:57:10 +00:00
urnenfeld
955acf7e19 arm64: Disable Cache & MMU before reconfiguring MMU while being in EL1
* Final clean up of Exception Level Handling
* Enable legacy console

Change-Id: If19134a237fd0373c427b82a69f1ce61abe82f4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5176
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-04 19:48:06 +00:00
Alexander von Gluck IV
0ff09cb7ef system/boot/efi: riscv64, reallocate kernelArgs in bootloader
Change-Id: Id57de8c460f123fc937e82082bf039d604401083
2022-04-04 09:29:18 -05:00
PulkoMandy
890aa41134 intel_extreme: improve brightness setting support
- Newer devices use a different layout for the backlight PWM registers
- Get the min brightness level from the BDB

Change-Id: I99745a022dd38733a4c2386f91c4c57016dd2acd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5162
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-03 08:39:47 +00:00
Adrien Destugues
83cb10bcbc stack&tile: don't allow stacking a window onto itself
Change-Id: Iefd4a49b5b4caf2c3cd478a77fe4673dcac40427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5056
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-01 09:39:23 +00:00
Jim906
a12cf089ee FileTypes: save ApplicationTypeWindow position
* Move the default size and position settings for ApplicationTypeWindow from its constructor to FileTypesWindow::fSettings, and update these settings when the window is closed.
* Add _Frame() for extracting a BRect from fSettings.
* Keep a BPoint parameter in the constructor, which allows each new instance of the window to be slightly offset from the last one.
* Submitted in response to a comment by humdinger on https://review.haiku-os.org/c/haiku/+/4926

Change-Id: I0fa8a9ca8f18cf4093363bff713f0f80f6c04cd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5164
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-01 09:38:32 +00:00
MRNIU
7c3cd8fc3f arch_cpu_defs: typo fix, no functional change
Change-Id: I58a21dc0c20b62be382cd2bdb00e31f01fea3b3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5169
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-03-31 14:44:45 +00:00
Jim906
f159a01a02 FileTypes: Allow expansion of Supported types box
* In the Application Type window, increase the weight of typeBox so the primary effect of resizing the window is to control height of the Supported types scrollView.
* Increase the height of scrollView so that it extends below the Remove button (presence of a button in a row seems to make row height static, preventing scrollView expansion).
* Modify ComplexLayouter in attempt to address root cause of the initial height of typeBox being too small to properly display the contents.
* Fixes #14936

Change-Id: I94ad8c5c8140814bfc2c399803f4d629ecd467bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4926
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-03-31 11:02:52 +00:00
Augustin Cavalier
ffb1567fda intel_extreme: Commit missing definition of INTEL_MODEL_BDWS. 2022-03-30 18:55:50 -04:00
Augustin Cavalier
ec3df54304 intel_extreme: Add and enable Broadwell device IDs.
After the previous commit's fix, it seems that modesetting is working fine,
at least on 0x1616 here. Backlight control however does not work.

Also remove two IDs that are dubious and were dropped from the Linux
driver as well.

Part of #17675.
2022-03-30 18:16:20 -04:00
Augustin Cavalier
25334001eb intel_extreme: Disable engine for SOC0 as it also locks up. 2022-03-30 18:11:41 -04:00
Augustin Cavalier
c25f6f53b5 kernel/vm: Completely replace mlock() implementation.
The old implementation used the real lock_memory(). This is problematic
and does not work for a large number of reasons:

1) Various parts of the kernel assume memory is locked only very
   temporarily, and will often wait on locked memory to become unlocked.
   The transient nature of locks is further demonstrated by the fact that
   lock_memory acquires references to structures, like the address space,
   which are only released by unlock_memory

2) The VM has a hard assumption that all lock_memory calls will be
   exactly balanced, and maintains internal "WiredRange" structures
   on areas, etc. corresponding to the original lock_memory calls.
   Maintaining separate data structures as this code did is a recipe
   for even more problems when the structures are manipulated separately,
   leading to confusing or incorrect behavior on unlocks.

3) Areas with locked memory cannot be deleted, nor can the pages which are
   locked be removed from the areas/caches. This of course is most notable
   when destroying teams which locked memory, but the problem also occurs
   when just using delete_area, resize_area, mmap/munmap, etc.

Because of (2) and especially (3), adding support for mlock()-like semantics
to the existing memory locking system is just not a good option. A further
reason is that our lock_memory is much stricter than mlock(), which only
demands the pages in question must remain resident in RAM and cannot be
swapped out (or, it seems, otherwise written back to disk.)

Thus, this commit completely removes the old implementation (which
was seriously broken and did not actually automatically unlock memory
on team exit or area destruction at all, etc.) and instead adds a new
feature to VMAnonymousCache to block certain pages from being written out.
The syscall then just invokes this to do its work.

Fixes #17674. Related to #13651.

Change-Id: Id2745c51796bcf9a74ba5325fe686a95623cd521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5147
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-03-30 20:17:50 +00:00
Augustin Cavalier
88275138ba kernel/util: Implement more features in the Bitmap class.
* Resize(): adds more space to the end of the bitmap.
 * Shift(): moves all bits in the map up or down.
 * Use size_t instead of int for indexes.

Also add unit tests for the new functions (they seem to be passing.)

Reference material for shift implementation:
2c56d43c1e/bitops.h (L977)

Change-Id: Ia85768aaeed7bd3ffef3a9f575f05331e048fe50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5146
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-03-30 20:17:50 +00:00
X512
9dacea2ee7 remove unused linker scripts
Change-Id: Ia65c23d44b5f7cbae87d9cfcab411aa02f6f1fd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5167
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-03-30 20:06:38 +00:00