Commit Graph

10002 Commits

Author SHA1 Message Date
Augustin Cavalier
5e9fd9f60d libroot_build & fs_shell: Provide _kern_ functions for readv/writev...
..instead of readv_pos/writev_pos. This way, we can be sure that we
are remapping them properly even under Haiku, as well as remove some
potential confusions.

bfs_shell seems to still work fine on a regular build.
2023-02-14 00:49:52 -05:00
Augustin Cavalier
478c8c847d Drivers.h: Rename device_{read|write}_pages back to device_{read|write}v_hook.
They are not about reading and writing pages, but just iovecs.
As the passed iovecs use void*s, it can't possibly be working with
physical pages on 32-bit systems with PAE.

It appears nothing uses or implements these functions anyway,
as there was nothing else in the tree I had to adjust after making
this change...
2023-02-13 23:05:16 -05:00
David Karoly
125b262675 libroot: introduce crypt_r
Change-Id: Ieacd1b383ac078a440227c7954f5531a36fbbd62
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5827
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-10 18:00:44 +00:00
Dale Cieslak
4f52a155e6 BFont: Minor code cleanup and autolocking for AppFontManager
* changed explicit locking to use Autolocker for gFontManager/fAppFontManager
in ServerApp, per comments in https://review.haiku-os.org/c/haiku/+/4790
* changed BFont::LoadFont (memory version) to use size_t for size and offset
* no functional changes

Change-Id: I438a4975d5bb1b2fa17bc54e9e171c31dadfeec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6003
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-06 09:21:12 +00:00
Augustin Cavalier
5d41cee816 WeakReferenceable: Clear fUseCount when it is 1.
Otherwise, if there are remaining weak references, they could
potentially try to acquire the object and trigger a use-after-free.
2023-01-31 22:36:59 -05:00
Augustin Cavalier
d891ca1119 headers/build: Drop Drivers.h and Select.h.
As far as I can tell, these are no longer needed after the previous commit;
fs_shell does not reference them, anyway.
2023-01-31 17:15:14 -05:00
Augustin Cavalier
1e860e07ee BPrivate::WeakReferenceable: Move implementation to a .cpp.
No functional change to the implementation, just getting it
out of a header.
2023-01-31 15:36:15 -05:00
PulkoMandy
49efa33dd0 ps2 synaptics: implement 'extended W' mode.
"Newer" synaptics touchpad support a new mode where they can report more
information to the host. In this mode, there is a different packet
format for tracking extra data from the touchpad, including a wheel
encoder (mousewheel) if available, and multitouch finger tracking.

This mode is documented in the Synaptics touchpad interfacing guide
(Synaptics document 511-000275-01 Rev. B), but was not yet implemented
in our driver.

It should help with detecting multiple fingers, or finger position on
clickpads to determine right or left click.

This change implements the following items from the Synaptics
interfacing guide:

- Cleanup and clarify the code for features detection to properly report
  clickpads
- Enable "extended W" mode if supported
- Process extended W values 0 (mouse wheels, reported in the
  touchpad_event structure and could be used by input_server for
  scrolling), 1 (secondary finger), and 2 (finger count)
- Fix handling of wValue, which is not always a finger width
- Add handling of vValuen which indicates the finger width when wValue
  doesn't

Overall, this should provide the movement_maker with a better picture of
what's happening.

Also improve tracing to show received packets and the corresponding
WValue since that's an important value in identifying which type of
packet it is.

Unfortunately I currently don't have a laptop with synaptics touchpad to
test this with.

Change-Id: If334392f4eb2a146955f6c8c897f0ab64d79b8d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4425
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele <nep@packageloss.eu>
2023-01-28 14:57:53 +00:00
Augustin Cavalier
35b40030a7 file_systems/fs_ops_support: Add open_mode_to_access.
This is duplicated across multiple filesystems, and could probably be
used in more still.

Adjusted only BFS, EXT2, and NTFS in this commit, as they are the ones
which make use of fs_ops_support.h already and thus need to be modified
to avoid duplicate-definition errors.

Also tweak next_dirent to support being built under fs_shell.
(Possibly we should define ASSERT there, though?)
2023-01-27 23:53:53 -05:00
Augustin Cavalier
dc95ec5777 file_systems/fs_ops_support: Add comment for next_dirent and mark "inline."
This way, anything which includes the file will not trigger a warning
if it does not use the function.
2023-01-27 23:48:00 -05:00
Pascal Abresch
322be3bee0 StatusView: compute font size based on scrollbar size
Compute a font size that just fits the available space, instead of using
an arbitrary scaling. This makes the code adjust to any font and any UI
size.

Select the appropriate font using a binary search, which will need only
a few attempts (I think 6 font sizes will be tried at the default
config)

Change-Id: Ie3b8678678c0d940981f1785418aa8ab354d01c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3893
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-15 08:45:06 +00:00
Jérôme Duval
37223744b7 kernel/x86: add a hybrid type per cpu, to be dumped when the feature exists.
for AlderLake CPUs

Change-Id: I4beba04e3ac95d7564684ee86de99c894b57a15c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-10 20:40:11 +00:00
X512
f6c51a5dc4 BBitmap: add ability to specify client-defined area
Change-Id: Iae1550b3088b0f6c26b0b91d9acb7f7cbcc721d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4369
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-01-02 18:07:53 +00:00
Oscar Lesta
59b54f3810 poke: use phys_addr_t for mem_map_args's physical_address field
This is needed to fix usage of POKE_GET_PHYSICAL_ADDRESS on
x86 32 bits (with PAE).

Change-Id: Ic00185ec7fcf9b6666ad6169a752d8b8edd2b61b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5975
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-01-02 15:02:32 +00:00
Semion Dimov
d53856a1b6 Added missing posixoptions and sysconf constants according POSIX.1-2017 standard
Change-Id: I2721ea4f2c3dbe0ef6a11c3a61da6034b4a7fd48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4371
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-23 01:57:05 +00:00
Jérôme Duval
2c08dd5bc5 bus/USB.h: header for usb device items
Change-Id: Ic36733af169948f54d7d938dfab1cb5aeb34ab9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5956
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-12-22 17:43:32 +00:00
Jessica Hamilton
a764093ca8 shared: add ColorItem from Gravity screensaver.
* A useful utility class that will also be used by Terminal later

Change-Id: I23020a401fbab7d4116df31f965ae61ecaf2a6cd
2022-12-22 11:07:28 +13:00
Dale Cieslak
85b82f8524 BFont: allow loading of user fonts from disk or memory
This patch adds an API call to BFont, called LoadFont, that
takes a string path to a font file. The user fonts are managed
via a new class called AppFontManager that inherits from the base
class FontManagerBase but adds the methods to add and remove user
fonts from disk or memory. There is also a new method called UnloadFont
to remove a user font, but on exit of an app all user fonts should be
automatically cleaned up.

Global/system fonts are managed by the GlobalFontManager, which is
a new class that also inherits from the base class FontManagerBase,
replacing the old "FontManager" class.

A maximum of 128 user fonts may be loaded, and memory fonts
may not exceed 20MB.

There's also an overloaded version of LoadFont that accepts
an area_id and loads the font from memory. A size and offset may
optionally be provided to allow for an area that contains more
than just a font.

Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-17 12:32:09 +00:00
Jérôme Duval
76ddb69a3a usb_raw: abort transfers cleanly on kill, fix use-after-free
* aborted transfers will release the notify semaphore when the cancel is notified.
* the allocated buffer would be freed on return, while the usb stack eventually copied
data in the buffer in our back, leading to KDL crashes, because the freed buffer would
be right reallocated for some kernel team structures.
* regression introduced by hrev55806, the transfers didn't need to be cancelled before.

Change-Id: Ifb6e941f71d05c37c36f878059c33883bb72a67c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5905
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-12-14 04:53:09 +00:00
X512
215b685f7f kernel: Drop non-standard GNU inline assignment syntax
* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
  c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-13 20:49:53 +00:00
X512
fa557843f2 riscv: use atomic CSR bit set/clear operations, refactor
Fix race conditions that cause broken timer interrupts.

Change-Id: I78e13a18d394b1566977e894a1def16a66c9ca5f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5883
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-12-11 18:43:15 +00:00
Jérôme Duval
fb69e06195 kernel: load cpu amd microcode update if loaded by the bootloader
we detect basically the cpu info before loading the microcode,
to be able to detect the vendor, and avoid any update on hypervisor.

I couldn't test because my cpu doesn't have any update available.

Change-Id: I6aea830158423b3ee13b640be8a788fc9041e23c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5859
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-30 08:50:59 +00:00
Jérôme Duval
652d5f6347 ccp: driver for the RNG part of CCP on AMD
the entropy source is read every second and pushed to the PRNG.
the PCI device is tested, not the ACPI.

Change-Id: I9bb6b21c7189b28a1d8a624d83b33ff6682152dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5825
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-28 13:33:01 +00:00
Jérôme Duval
3a42882e0f intel_extreme: check another register when finding out hw_cdclk on Haswell/Broadwell
doesn't help with #18084

Change-Id: I6f3cc8b50fc5742fab3021f01b90dfebe484b336
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5830
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-26 12:56:08 +00:00
Jérôme Duval
739d4da07b amd_pstates: introduce a AMD P-states driver for Ryzen with the CPPC feature
tested on Zen2 (Ryzen 3 5300U)
This support was submitted in October for inclusion in Linux.
Haiku supports only two profiles. We could probably add some more, and let the driver says which it supports.

Change-Id: Id7754b445bc32a691d58a1e4af630351562abc22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5826
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-24 06:26:13 +00:00
Jérôme Duval
34e9243872 random: always use the PRNG, and use entropy sources to feed it
remove the yarrow module. the hardware modules can push entropy with queue_randomness().
virtio_rng will now push entropy every 300 seconds.
helps with #14937

Change-Id: If76c5deabf61dc616a0e051332f44b89deb6b8a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5824
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-21 18:28:41 +00:00
Máximo Castañeda
241f109ccb View: provide the transform between different coordinate spaces
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-13 04:04:30 +00:00
Rudolf Cornelissen
ea959da4df intel gfx: fixed SMAP faults, added 2 G98 IDs to kerneldriver. 2022-11-12 20:16:10 +01:00
PulkoMandy
32a71a00aa stdint.h: fix definition of UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C
C99 chapter 7.18.2, Limits of specified-width integer types:

"This expression shall have the same type as would an expression that is
an object of the corresponding type according to the integer promotions."

C99 chapter 6.3.1.1:

"If an int can represent all values of the original type, the value is
converted to an int; otherwise, it is converted to an unsigned int.
These are called the integer promotions."

Therefore, UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C should be signed.

This prevents building WebKit with -Werror.

Change-Id: Ib2a2c15acc2c761cccf8caa016c7ff163e3fdc0d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5806
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-08 16:11:40 +00:00
Jérôme Duval
cedd85556c kernel/x86: init the tsc frequency and clock speed from MSR when available
only for AMD newer CPUs. tested on R5300U

Change-Id: I44be2efca37b1738a759a15140e5fd8d3b5ac7b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5804
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-07 09:03:52 +00:00
Jérôme Duval
af136a21bd graphics/edid: add support for the CTA extension block
Change-Id: I2799496faf2f9383c703384a419d8d9fcffc75ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5803
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-07 09:02:42 +00:00
Augustin Cavalier
9fc6234686 Versioning: Add BETA_4 and PRE_BETA_5 version constants.
PRE_BETA_5 is now the default in master.
2022-11-03 20:30:10 -04:00
X512
ede527512e bfs_shell: fix gcc2 build
Fix regression that building Haiku on 32 bit Haiku become not possible.

Change-Id: I527a8c3bc3ad4744d5515a76888d5cac06293cbe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5750
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 16:21:43 +00:00
Jérôme Duval
c95c18768b POSIX: wchar.h and wctype.h don't need the locale.h but locale_t.h
* missed in hrev56270.
* mentioned on IRC: <dwa> please ask them if wchar.h isn't meant to include locale_t.h instead of locale.h

Change-Id: Ia9b7553480430c2fefb4a3659ad525322152582b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5797
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 14:09:08 +00:00
Niels Sascha Reedijk
1111dda699 NetServices: Add libnetservices2.a from dev/netservices into master
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].

The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.

The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.

The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.

The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.

[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2

Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
2022-11-02 01:37:17 +00:00
Augustin Cavalier
8672fc2739 InterfaceDefs: Adjust and introduce new spacing/insets constants.
* Nothing in the tree and few things outside it used BIG_{SPACING|INSETS};
   it seems a value of 15px (at default font size) is not that useful.
   There are, however, a lot of things around the tree that use multiples
   of 20px. So, make BIG be that, with the intent to replace those
   with BIG directly.

 * Introduce CORNER_{SPACING|INSETS}. There are a lot of applications
   (e.g. Tracker, Terminal, Debugger etc.) which use scroll bar width/height
   to metrically align controls with the window frame or with some other
   control which contains scroll bars. Rather than have to invoke
   BScrollBar or BControlLook directly to get the value, we should just
   derive the size of scrollbars from a spacing constant instead
   and get rid of the custom function. (For now it is just replaced.)
   This reuses the old values for BIG, as it is equal to 14px at default.

 * Introduce BORDER_{SPACING|INSETS}. This is equal to the typical border
   size of 1px at default font size (or lower) and uses floor() instead of
   ciel() to compute what the size should be (i.e. it will remain 1px
   at 150%/18pt and only go up at 200%/24pt.) This will allow a lot of
   the hardcoded border sizes around the tree and elsewhere to use
   ComposeSpacing() instead.

Change-Id: Iaea3fa30364859888e816a9d61ac156268d70758
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 02:23:32 +00:00
X512
b71020b095 util/DoublyLinkedList: make GetPrevious/GetNext methods static
This methods do not need DoublyLinkedList class state.

sGetLink field that actually implement GetPrevious/GetNext methods is already static.

Change-Id: Ie0b40f7f1b72d640d75403905b8944666874dc87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:41 +00:00
Niels Sascha Reedijk
2710b4f5d4 Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I48c8cf4f03e281a5caeb9f27bf052285961529ff
2022-10-29 22:58:24 +01:00
Niels Sascha Reedijk
71e29bbeea NetServices: format code using haiku-format
This commit formats all the netservices2 code with the `haiku-format` tool from
https://github.com/owenca/haiku-format (commit aa7408e), with the following
customizations:
 * SpaceBeforeRangeBasedForLoopColon is set to false
 * Braces before a catch block are not wrapped
 * Most headers, except for ExclusiveBorrow.h, have been manually reformatted
   to adhere to Haiku's header format (issue #19 in the repository)

Change-Id: I693c4515cf26402e48f35d1213ab6d5fcf14bd1e
2022-10-29 22:53:57 +01:00
Augustin Cavalier
b2c77ad27a Network: Add a BNetworkDevice::GetNetworks() method and use it in the GUI.
The GetNextNetwork() method is really inefficient: it fetches all the
networks at once from the kernel every single time and then winds
up returning only one of them. In parts of the GUI that iterate over
all networks more than once per refresh (sometimes within a loop, even!)
this was often a noticeable lag on the GUI, especially with OpenBSD
drivers which have extra overhead to do struct translation in the
ioctl handler.

Now, we have a way to fetch all scan results at once and just iterate
over them as many times as we need, and this is what NetworkStatus
and Network preferences now do, saving lots of time and effort.
2022-10-25 23:34:42 -04:00
Augustin Cavalier
65c155bede BNetworkAddress: Make the first SetToLinkLevel() take a const pointer.
Technically breaks ABI. However to the best of my knowledge,
nothing uses this method outside of the tree.
2022-10-25 23:34:42 -04:00
Alexander von Gluck IV
967cfb4d56 radeon_hd/atombios: Sync up to latest published atombios
Change-Id: Ic0b80da7fb88fabcc1a7e87fb055351a06aa4e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5528
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-25 22:45:46 +00:00
Han Pengfei
44cceee67e pthread: add pthread_{getname_np,setname_npp}
- These two functions imported for Linux/BSD compability.

Signed-off-by: Han Pengfei <pengphei@qq.com>
Change-Id: I3e9cada26f1ed043bfaed83e8185dcfff3bd71e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5746
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-18 16:30:54 +00:00
Jérôme Duval
8e17b43da6 kernel/device_manager: Implement B_GET_DRIVER_FOR_DEVICE
for legacy and new drivers.

This is an opcode for ioctl that can be used on almost any device entry found in /dev.
When used, ioctl will fill a buffer with the absolute path to the driver file that is
being used by the device.

This opcode was available in BeOS R5, though remained unimplemented in Haiku since
the introduction of the Device Manager almost two decades ago.

Original change by Jacob Secunda.

Change-Id: Ic49141b677b4158a63918459d4048450c825447c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5078
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-17 06:13:07 +00:00
Axel Dörfler
97739603d1 kernel: Added operator delete(ptr, nothrow_t)
* This seems to be required when building the DriveEncryption kernel
  driver with gcc 11.2 on x86-64, at least.

Change-Id: Ie1ae09435dd912021957e64d4b9a3e7b05913c33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5742
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-12 20:35:55 +00:00
Jérôme Duval
edeaa9c0c7 listusb: generate class code table from usb.ids, and use it
Change-Id: I43b79c5abc74306aba9a69991aeb5e110b2d790b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5737
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-10-10 21:28:37 +00:00
Jérôme Duval
e065d697fb Disk Device Manager: checks the raw content_name when editing a partition
also only provide a default name for partition containing a file system
fix #17958

Change-Id: Ib5a8928dc5272a400a99aa05b792201f3a6a2c7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5705
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-30 17:10:39 +00:00
Augustin Cavalier
78ee50a272 InterfaceDefs: Specify INSETS constants in terms of SPACING constants.
They already used the same numeric values. Also reorder for consistency.
No functional change.
2022-09-28 19:47:38 -04:00
Augustin Cavalier
e285b3071d Introduce a utility function for moving to the next dirent in read_dir.
This takes care of making sure the dirent buffer is properly aligned,
which it needs to be on some platforms (SPARC, ARM, etc.)

Change-Id: I9a6352b1e654c090a200770d51f96511ee024a99
2022-09-28 16:30:00 -04:00
Jérôme Duval
fbca1c4088 kernel/x86_64: configure LFENCE as a serializing instruction on AMD
Change-Id: I152bf41c3479f81fc458abdf8d89874ffa3a08d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5691
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-25 08:15:15 +00:00
Niels Sascha Reedijk
a0b75afc0f NetServices: add missing include 2022-09-24 09:49:51 +01:00
David Karoly
cec78ae332 kernel/arm64: introduce virtual_ranges_to_keep
Change-Id: I6de950cb18892ebf2dd2aefa34b65b90a17e3f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5682
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-23 13:57:43 +00:00
David Karoly
a0c8f15f33 kernel/arm64: implement iframe stack and unwinding
Change-Id: I1587c1f57bd73777a188bb8f1bc58263de82fcb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-23 13:56:16 +00:00
Jérôme Duval
688acf41a3 add physical_block_size field where applicable
only scsi_disk checks the actual value, other drivers take the logical block size.

This change reports the physical block size from the disk rather than the block
size used by IDE/SATA/SCSI commands. On typical modern SATA disks, the SATA
commands will use 512 byte blocks, but the disk will actually read and write
4K blocks internally. This is only of importance for partition alignment for DriveSetup,
and is independant of file systems or partitioning systems. This could also influence
the recommended block size for some file systems.

Change-Id: Id0f2e22659e89fcef64c1f8d04f81cd68995e01f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5667
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-23 06:56:01 +00:00
Jérôme Duval
146d687026 cpu_type.h: remove vendor string at any place
fix bug #17951

Change-Id: Icc0ac964ff9c6322612dadb459d28a97ac69e91a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5686
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 19:02:08 +00:00
PulkoMandy
e3d5904751 Disk Device Manager: generate a name for nameless volumes
This will give the same result as fs_stat_dev, so the filesystems will
have the same name everywhere.

Change-Id: Ic684142efaeb2c16b393f3f3e5c9c3010a054b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5636
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 16:14:32 +00:00
X512
74a5cb7bbc shared: move ScopeExit from riscv64 arch kernel code
this file is c++11 only.

Change-Id: Ibff7acec00337a9f56f9b8e29ea262c8d64c2446
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 16:09:33 +00:00
Jérôme Duval
799ab823bb libroot: Add support for C11 Threads missing parts (except gcc2).
The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/call_once.c
- lib/libstdthreads/cnd.c
- lib/libstdthreads/mtx.c
- lib/libstdthreads/threads.h
- lib/libstdthreads/tss.c

Missing is support for PTHREAD_DESTRUCTOR_ITERATIONS.

Change-Id: I7a6c79954f36195eadd1351d308c21a001192232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5675
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-19 19:45:45 +00:00
David Karoly
ef89435316 boot/x86: unify KERNEL_LOAD_ADDRESS for BIOS and EFI
Change-Id: Ia3157c7c0908698da94c1aa85cb6366fb00fb7f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5670
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-09-19 14:51:58 +00:00
David Karoly
303283fb7a kernel/arm64: implement stack trace
Change-Id: If5627fb4d37bdb7260d7e14c0c3e8cf7bcbee53d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5672
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-19 14:51:18 +00:00
Niels Sascha Reedijk
da8162be21 Merge branch 'master' into dev/netservices
Change-Id: Ic4c065b9a76fcabd6450dd1ab5882510f922a128
2022-09-18 16:16:37 +01:00
David Karoly
f9be2680d9 x86: use elif defined(__x86_64__) in arch_kernel.h
Change-Id: Ibad5f34d73d48c5d1af870131f20ae9b52d88eb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5664
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-15 04:33:47 +00:00
PulkoMandy
49a00a128a userlandfs: implement get_fs_info using ioctl
This avoids introducing an entirely custom hook in FUSE.
It uses the ioctl hook in an unconventional way (calling it with no
valid fuse_file_info) but this can be fixed if a filesystem requires it
(by opening a file handle on /, doing the ioctl, then closing again).

An updated version of fusesmb-haiku is available and confirmed working:
https://github.com/haikuarchives/fusesmb-haiku

Change-Id: If1268113874363fa035e5340be75e9f5198216d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5199
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-13 18:51:12 +00:00
PulkoMandy
d469ab6d6c libroot: Remove unused files
Not referenced in any Jamfile, does not compile, untouched since
2003 except for a few coding style and cppcheck fixes. The functionality
is implemented elsewhere in the disk device manager and userland
filesystem add-ons for DriveSetup.

Change-Id: I5ebe125931c8d4410c2d335f9d6c0e32008f038b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5637
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-13 18:43:55 +00:00
Michael Brumbelow
950809231f Removed 'register' storage class compiler warnings
Change-Id: Iba89a9d0845bf7e816983f903281d33e273f6e35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5558
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-12 14:03:28 +00:00
Augustin Cavalier
66af664352 Drop the unused TTY bus_manager.
Just stubs and not actually used.
We have a TTY module (and driver) which supplant it.
2022-09-09 17:14:12 -04:00
Alexander von Gluck IV
b6b61bd39f general/logs: Ensure all logs start with THING:
* 90% of our logs start with some context on what is
  generating a log message (thing:)
* Things following this logging model however do "thing [time"
  which is inconsistent
* Being consistent will allow us to start scanning logs in a
  smart way and try to analyze patterns of what is throwing
  errors, etc in an automatic way.
  aka /^(service/driver/etc)\:/

Change-Id: I1ef2df4f17f70f858a485554a4e8a3f87f1a69c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5568
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 17:59:21 +00:00
David Karoly
3bfbf2fb53 kernel/arm: check for PXN and alignment fault in page fault handler
Change-Id: I2a863b57b1252343c9c029d1bb5af8d328558576
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5620
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
17569c02ff kernel/arm: clean up arch-specific defines
* align fault syndrome and fault address register naming with
  ARM Architecture Reference Manual (i.e. IFSR, DFSR, IFAR, DFAR)
* move PSR bitfield defines to arch_cpu_defs.h

Change-Id: I813045eec335ffbdd75270ad5a1afb2f222f73c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5618
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 19:11:05 +00:00
David Karoly
67406e5145 kernel/arm: save FPU registers on context switch
Change-Id: Icb62688338d3a3083f8f6d1874cae3218ba042e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5614
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 17:33:49 +00:00
Niels Sascha Reedijk
97f11716bf Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I588c4a840523995f820161d63741c137bc5c719c
2022-09-04 07:30:59 +01:00
Niels Sascha Reedijk
27196c4068 NetServices: use BBorrow<BDataIO> for custom body targets
Change-Id: Ib2d4b0ca3689338d906f943295278c086c6f2c83
2022-09-04 07:27:08 +01:00
Niels Sascha Reedijk
1e22817dfb NetServices: add the BExclusiveBorrow<T> smart pointer
This smart pointer is designed to help with putting some explicitness and
safety around the case where someone will use their own object that implements
the BDataIO interface to store the body of a network request. By default,
BDataIO objects do not require or enforce thread safety. Since accessing these
unsynchronized objects between two threads is undefined behavior, it should be
explicitly discouraged.

The BExclusiveBorrow/BBorrow smart pointer helper helps solve that by enforcing
the limitations on using an unsynchronized object in two threads. When used
correctly, there is a runtime check on incorrect use by the developer. This
should help write better code.

The design is based on shared_ptr, including having an admin block akin the
control block, that manages the internal object. This type-erased admin block
has the advantage that it allows the owner to have a different type than the
borrower. It also handles cases where the lifetime of the borrower is longer
than the owner: the borrower can continue to use the object until they want to
return it, after which it will be cleaned up. This will make it possible to do
some fire and forget pattern in the network services kit, where someone may
just wants to create a file and borrow it to the network request, and care
about further processing the file in the future.

Change-Id: Ie9b7e7472c868b60f663b4db4fa449d421e447eb
2022-09-04 06:54:37 +01:00
David Karoly
3d79cd3332 kernel/arm: set PXN for user memory
* set PXN for all page tables below KERNEL_BASE
* also set PXN for physical page mapper

PXN, Privileged execute-never

When the PXN bit is 1, a Permission fault is generated if the processor
is executing at PL1 and attempts to execute an instruction fetched from
the corresponding memory region.

Change-Id: I3056cbed151004ac9edfbc81ebeada328aeb603c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5607
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:08 +00:00
David Karoly
c0a7601219 kernel/arm: store current thread pointer in TPIDRPRW register
Use the Privileged Only Thread ID Register aka TPIDRPRW to store
the current thread pointer.

The Privileged Only Thread ID Register is only accessible
in privileged modes, and is read/write.

see: ARMv7 Architecture Reference Manual,
section B3.12.46 CP15 c13 Software Thread ID registers

Change-Id: I5273bee8a80b78cdc547b2f6c96632d120eb3d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5608
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:23:53 +00:00
Augustin Cavalier
1f0c87711b shared/IconView: Add a variant of SetIcon which directly accepts a BBitmap. 2022-08-31 16:16:43 -04:00
Augustin Cavalier
90d62fd900 TLS.h: Drop inline assembly from the header.
This was a holdover from BeOS, which did this as inline assembly.
We do not on any platform other than 32-bit x86, and even there
we may have preferred to do things a little differently on non-BeOS
ABIs.

Most things ported from other systems, or even native apps, are going to
use _Thread_local variables anyway, which will bypass this system
altogether.
2022-08-30 00:00:04 -04:00
Augustin Cavalier
da9dee377d HaikuControlLook: Scale the width of the popup dropdown region.
Instead of hardcoding it.
TODO: Other ControlLooks in the tree should also be fixed for this.
2022-08-26 14:42:17 -04:00
Augustin Cavalier
3efde1bfba Tracker: Use BControlLook::ComposeIconSize.
One computation was functionally equivalent to the new method,
other places were not scaling icons at all.

Fixes #13177.
2022-08-25 16:48:56 -04:00
Augustin Cavalier
874a2a7287 BControlLook: Introduce ComposeIconSize().
This takes an int32 (e.g. B_MINI_ICON or another constant) and
then returns a BSize scaled appropriately, the same as ComposeSpacing()
does already for the *_SPACING constants.

This will be used to replace icon size computations throughout the tree.
2022-08-25 16:45:48 -04:00
David Karoly
c34046ba70 arm: increase number of io vectors to 1024
GICv2 can use interrupt numbers up to 1019:
* 0-15 are SGIs aka ICIs
* 16-31 are PPIs
* 32-1019 are SPIs

Change-Id: I1c19be77105683da3f6988a5607b14dc10a899db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5565
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-25 00:46:31 +00:00
David Karoly
226dd60a57 arm64: initialize PCI interrupts from FDT
see:
https://www.devicetree.org/open-firmware/practice/imap/imap0_9d.pdf

Change-Id: I4158b022fd4404e3126f92ee844743e39a9b6646
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5560
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-08-24 09:41:35 +00:00
Augustin Cavalier
a028a54e52 libroot: Replace strftime/strptime/wcsftime implementations with musl's.
Now that we have locale_t, we can use the musl versions of these functions.
This also fixes a licensing issue: the strptime implementation had an
advertising clause (although in upstream *BSD it was removed, so we
likely could have managed to remove it anyway.)
2022-08-18 15:31:38 -04:00
Jérôme Duval
013719cfc6 kernel: get_iovecs_from_user(): checks total iovec length against SSIZE_MAX
* the return type for recvmsg(), sendmsg(), readv(), writev() is ssize_t.
* check required by POSIX.
* fix memory leaks on failure introduced in 00f1e7c5e4

Change-Id: Ibf74ae2035b7e9c7a3db3613f60e06672ded4db0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5542
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-17 19:44:30 +00:00
milek7
6bef283b50 arm64: Discover PCI from ACPI.
Change-Id: I2e40c8a531f319cce25363ab83d4d0fe9f8702d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5274
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-08-17 19:23:51 +00:00
Niels Sascha Reedijk
8a16ecbce9 NetServices: Add debugging constants and messages
These allow for additional messages about the progress/status of the request.
For now, the messages are sent unconditionally, though it may be reasonable to
in the future switch to sending them only when enabled.

Change-Id: Ic45a0055037af02c689494fa5ce0acd03592ad7e
2022-08-14 14:53:48 +01:00
David Karoly
079db739a6 virtio-mmio: discover devices from ACPI
https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt
https://wiki.linaro.org/LEG/ServerArchitecture/ACPI/LinaroRegistry

Change-Id: I330a497173c0a82b789a43720e3d86e1513a661b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5506
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-08-13 09:43:41 +00:00
David Karoly
fe2b6d7706 arm: detect SoC timer from FDT for OMAP3 and PXA
Change-Id: Ib03a11f016cb937d748d2696a17158e17c86e317
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5522
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-08-09 18:15:55 +00:00
John Scipione
3ef6915cf3 IK: Propagate B_WORKSPACE_ACTIVATED to child views
... and B_WORKSPACES_CHANGED too.

hrev50148 propagated B_SCREEN_CHANGED messages to
children allowing them to respond to screen changes
fixing #8035 back in 2016.

This does the same thing for workspace messages only
I spelled propagate correctly this time.

Add private _PropagateMessageToChildViews() convinience
method to BWindow to do this work.

Call PostMessage() instead of calling MessageReceived()
directly which can work better in certain circumstances.

Change-Id: I5978c3fe674bbe75d9eafb7afb654a49ee3e0c11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5516
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-08 15:32:47 +00:00
Niels Sascha Reedijk
7b1d966cf2 NetServices: Rework parsing of content-length and move to HttpParser
This fixes a bug in the HttpAuthTest, and in general, moves responsibility of determining
the shape and size of the content to the right place.

Still to do is to fix the case where there really is a variable length content. This will
now probably error out as a connection closed error.

Change-Id: I13c20028e834cc9af8c7bc1d7d7613bf60838e64
2022-08-08 07:58:45 +01:00
Niels Sascha Reedijk
9cb56a4881 NetServices: Add custom error message to BNetworkRequestError
Change-Id: I03970762531a689e25cd78a1091aecf755ee87ce
2022-08-07 08:47:19 +01:00
Niels Sascha Reedijk
6d1bb0e7ad NetServices: Remove BHttpRequest::SerializeTo(BDataIO*)
The private version that serializes to a HttpBuffer is now used.

Change-Id: I034933a641e98b3a8f918470a024ba32ea7c8663
2022-08-07 07:17:38 +01:00
Niels Sascha Reedijk
c7f925c3ee NetServices: add the HttpSerializer helper to help serialize requests
Change-Id: Ide1e2d387884ce4cf2d406057960cd0732d61f38
2022-08-07 06:47:15 +01:00
Jérôme Duval
265899da3a radeon_hd: from Cedar, memory sizes as bytes only for PALM/SUMO/SUMO2
should help with #17664
register change from Tahiti for #17377

Change-Id: I52b9691cd6a04b58b70e905bc29e803f06936789
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5526
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-05 12:42:57 +00:00
Trung Nguyen
d02c0bade7 libs/posix: Fix NULL pointer in uselocale
uselocale now attempts to create a backend and a databrige.

If the attempt fails due to a missing libroot-addon-icu, uselocale
does nothing (to support applications calling uselocale during
startup to enforce the C locale).

Else, uselocale will fail with ENOMEM.

LocaleBackend::CreateBackend() has been modified to return a status_t
that indicates whether NULL is returned due to out of memory (B_NO_MEMORY)
or due to being unable to load the ICU addon (B_MISSING_LIBRARY).

Change-Id: I0f62ebde5890364c64e6694ec58d38de43ec6841
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5505
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-03 00:16:08 +00:00
Niels Sascha Reedijk
e68284565a NetServices: move HttpBuffer and HttpParser into their own header/source
Change-Id: I5bc0d9df6f94c2cf1c39baa6206bf6f1db284705
2022-08-01 08:11:56 +01:00
Niels Sascha Reedijk
9b33a931f1 NetServices: Implement controls on the number of concurrent requests.
This change allows the user to control how many concurrent request can be done
per session. This is going to be helpful to running the tests as well; they were
all fired up in parallel, which sometimes leads to our test server refusing a
connection.

Change-Id: I4f1f40b28b8e0199ea5589b36cd8d00ecd849a63
2022-07-27 09:02:09 +01:00
Pascal Abresch
46fdf97dea Interface Kit: add default dark appearence color constants
Change-Id: I8added6ada702eb09e95f5f2d6e34b748067c6bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4571
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 14:10:18 +00:00
milek7
81e0d2d4c2 arm64: Discover GICv2 from ACPI.
Change-Id: I89f2968a756d767f3a88c002292696a725a00918
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5275
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 07:56:07 +00:00
milek7
17f0f4b68f arm64: Discover UART device from ACPI.
Change-Id: I4e97b05dcfcaf6abddff81fbbf676c38fe337775
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5271
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 07:56:07 +00:00
Niels Sascha Reedijk
60355daec9 NetServices: Implement asynchronous status update messages.
The integration PostTest has a basic test that the expected messages are sent and
have the expected data fields. The gist is documented in book.dox.

To do are the messages around SSL. However, that functionality is also not
implemented yet, so there is nothing to send.

Change-Id: Ib8f36ed32f9854d643d8256338b71af7067059f0
2022-07-24 08:56:02 +01:00
David Karoly
91ee0332c3 move acpi headers from x86 to non-arch
Change-Id: Ida6186af7a40fb7d91b4da92c36d25db30dadb33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5484
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-20 08:28:53 +00:00
PulkoMandy
f0ee02b25e userlandfs_fuse_lowlevel: fix opening directories in Tracker
- It is possible to call open() on a directory, but FUSE lowlevel
  filesystems don't implement that and expect it to be re-routed to the
  opendir call. BRoster uses this to read the dir/file attributes to
  identify it, so it could not identify directories properly.
- In ReadDir, make sure to not return more entries than asked, as this
  confuses the userlandfs protocol communication (the kernel does not
  acknowledge the readdir reply, and then the server hits an assert when
  receiving the next request instead of the ack).

Change-Id: I9c4e9a3f0fc6e9879d4cfbc0d5402a4733d2218a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5482
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-19 16:06:29 +00:00
PulkoMandy
0604d554e8 userlandfs: compatibility with FUSE 2.9 and FUSE lowlevel API
- Import latest version of files from FUSE 2.9.9 (our last
  synchronization was with 2.7.4)
- Adjust fuse pkgconfig file to use the POSIX error mapper
  automatically, since that's required for all FUSE software
- Implement the lowlevel API in addition to the highlevel one. The
  lowlevel API uses inode numbers to identify files, rather than paths,
  making it a better fit to the userlandfs architecture.

The FUSE 2.x branch is not maintained anymore by FUSE developers,
however, pretty much no one migrated to FUSE 3.x. So it is more
interesting to implement, rather than 3.x.

Confirmed still working with sshfs and curlftpfs.

Example use:

I tested this with github.com/whoozle/android-file-transfer-linux

- Build the fuse library and copy it to ~/config/non-packaged/add-ons/userlandfs/
- Start the server: /system/servers/userlandfs_server aft-mtp-mount
- Connect your Android phone and put it in USB file transfer mode
- Mount the device: mount -t userlandfs -p 'aft-mtp-mount /boot/home/MyPhone -d -o use_ino' ~/MyPhone
- You can now access your phone data

Change-Id: Ic3efda7ffbc33737e6f4958428fb3ec9939ef105
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5198
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-19 16:06:29 +00:00
Niels Sascha Reedijk
2b4cd81ff3 NetServices: add support for receiving incoming chunked messages
Change-Id: I1bfe22a7959c7a5fc7dc644e4e3941965edafb65
2022-07-19 06:29:36 +01:00
Augustin Cavalier
5e596efecf Refactor touchpad movement generation by migrating MovementMaker to userland.
This considerably overhauls touchpad event generation, simplifying and
cleaning it up considerably:

 * Return the touchpad specifications through the MS_IS_TOUCHPAD ioctl.

 * There is now a dedicated MS_READ_TOUCHPAD ioctl, as touchpads
   can either return touchpad_movement structures or mouse_movement
   ones depending on what mode they are operating in.

 * Event repeating on timeouts is now handled in MovementMaker and
   the input_server control thread, so MS_READ_TOUCHPAD takes
   a timeout value. This means we can drop all the EventProducers.

 * Use the real floating-point math functions in MovementMaker now
   that we are running in userland.

 * Drop unused structures, constants, headers, and other things
   related to touchpad support.

Change-Id: I28cdb28e4100393a9338a8ebb865573cec13fc1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5455
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-18 16:00:29 +00:00
Niels Sascha Reedijk
826afd9616 NetServices: Refactor the parsing code into a HttpParser helper class
Change-Id: Ib03aacc36d46318c8870554f794ff66db4cce063
2022-07-17 15:54:54 +01:00
Trung Nguyen
d338200e2b libs/posix: Implemented new locale functions
Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-11 16:30:16 +00:00
Leorize
86fa1c21e1 Shared Kit: Introduce BMemoryRingIO, a thread-safe ring buffer
This commit introduces a simple thread-safe ring buffer implementation
based on top of BDataIO. The main use case for this class will be to
implement shared buffers between threads for the upcoming refactoring
of Services Kit.

Change-Id: I526bc044b28c91496ad996fabebe538e75647f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2966
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-11 16:29:53 +00:00
David Karoly
2e0a9b9554 kernel/arm: use generic/user_memory.h
Change-Id: I890bdd7d6f64162416a1a80c7d8280618aaa8fb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5429
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-04 16:43:39 +00:00
Niels Sascha Reedijk
a1e7583626 NetServices: add HttpBuffer to encapsulate buffered reading
Change-Id: I7ec3189c3cf459fccae4ffac44702fd6b8c12ac9
2022-07-03 12:17:10 +01:00
Augustin Cavalier
045f7a5f3a headers/bsd: Rewrite link_elf.h.
Include only the APIs we are (shortly) going to actually support.

The other structures and functions declared in this file were
never supported nor used anywhere in Haiku's tree.
2022-06-28 13:07:53 -04:00
Niels Sascha Reedijk
92357c131e NetServices: Add support for an input body in a request and handle this with redirects.
Change-Id: Id2399d49aa673469c8c04ebd13884cdbcb24112d
2022-06-23 21:13:35 +01:00
Alexander von Gluck IV
774c33c2a7 radeon_hd: Drop unused overlay, cursor registers
* Also drop unused vblank semaphore storage
* Spotted by X512. These are from intel_extreme
  which was used as a base *ages* ago.

Change-Id: I2a6baaa4849baeb8c8cf10e2046d0fbe10c3a356
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5389
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>
2022-06-20 02:46:55 +00:00
Mashijams
9c4a46b318 xfs : version 5 superblock, checksum header file
- Implemented version 5 superblock fields and necessary macros.

- Checksum functions are implemented which will be used for crc verification and crc updates.

- fssh_kernal_priv.h ROUNDDOWN macro definition is consistent with kernal.h definition.

Change-Id: I49b7c939bfd3ea1bffc85b3db42bc678dcce75cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5350
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-18 08:32:18 +00:00
Augustin Cavalier
44fa45df3a net/if: Drop ifmediareq and just use the regular ifreq for SIOCGIFMEDIA.
This was introduced into the main API in 2010 (d72ede75fb),
but was actually only fully used for the past month (c2a9a890f3)
when SIOCGIFMEDIA was supported for all *BSD drivers and not just WiFi.
Most userland consumers of this structure did not use it correctly,
as was the case in #17770, and only worked because in the fallback case
the network stack just treated it as if it were an ifreq.

Nothing actually used the ifm_count/ifm_ulist (though tentative APIs
were exposed for it) as noted by previous commits; and the fact that
Haiku's IFM_* declarations are so spartan makes most of the returned
values unintelligible to userland without using FreeBSD compat headers.

If, in the future, we decide to implement ifmedia listing and selection
properly, that should likely be done with separate ioctls instead of
having multi-function ones like this.

This is technically an ABI break, but in practice it should not matter:
ifmediareq::ifm_current aligns with ifreq::ifr_media, so the things
that used this structure like our in-tree code did will continue to work.
Until this past May, the only other field that was usually set was
ifm_active, but in the absence of setting ifm_status all non-Haiku
consumers should ignore it completely.

The only consumer of this ioctl that I know of out of the tree,
wpa_supplicant, still works after these changes.
2022-06-13 22:31:33 -04:00
Augustin Cavalier
3b4737b9e5 headers: Remove bsd_mem.h.
This is a holdover from BeOS. All the functions in here we declare
in other headers, so this is not needed.
2022-06-09 18:31:08 -04:00
Augustin Cavalier
0afb8a1b49 Move fts.h and functions from libroot to libbsd.
These are BSD extensions, not POSIX functions. They were needed
in libroot by the previous versions of the ftw/nftw implementations,
but the musl versions do not need them, and so we can move them to
libbsd.

This is a minor ABI break, but hopefully whatever was using them
in libroot also links to libbsd. If not, that's an easy enough fix.
(These were only added to libroot in 2013.)
2022-06-09 16:30:40 -04:00
Augustin Cavalier
9b2434d26f libroot: Replace ftw/nftw implemenations with their musl counterparts.
Rewrite ftw.h to be a Haiku header instead of a BSD one while at it.
2022-06-09 16:24:11 -04:00
Augustin Cavalier
7cb5a6d24f NetworkDevice.h: Make it possible to include from _KERNEL_MODE and/or non-C++.
This file contains a set of constants and flags which are already passed
between applications, net_server, and wpa_supplicant to indicate network
security, connection modes, and a variety of other things.

As the OpenBSD net80211 stack does not need wpa_supplicant for WPA2/PSK,
it only makes sense that we would pass the same information we pass
to wpa_supplicant into the stack instead. Rather than expose yet another
set of constants and flags to userland besides the FreeBSD and these
Haiku native ones, just make it so this file can be included in the kernel,
and the constants thus used directly.
2022-06-09 01:28:56 -04:00
Jérôme Duval
85344c112c intel_extreme: also set hw_cdclk on Broadwell
this needed for dp aux before skylake, only for DP A (eDP).
should help with #17771

Change-Id: I4bdcca1fdc05294fb5b56c5c96164b6936a5881e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5355
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-06-05 14:29:17 +00:00
Jessica Hamilton
f892047183 kernel.h: don't include user address tests in boot loader 2022-06-04 10:31:05 +12:00
Augustin Cavalier
eb26002b47 kernel/util: Remove kqueue.h.
It is not used anymore, and we have more advanced queuing facilities now.
2022-06-03 17:18:32 -04:00
Augustin Cavalier
00f1e7c5e4 kernel: Rework iovec copying from userland.
Create a utility function which performs all necessary checks,
allocates memory, and copies the structures, and then make use of it
in the three places in the kernel which did all this manually.

None of them were previously complete: the fd and socket code only
checked iov_base and not iov_len, while the port code did not check
anything at all.

Part of #14961.
2022-06-03 16:32:11 -04:00
Augustin Cavalier
77694f9225 kernel: Move validate_user_memory_range to kernel.h and rename it.
It has more general use than just in the VM code; basically anything
which receives buffers from userland should be invoking this if it
does anything besides user_memcpy (which alreay does it.)
2022-06-03 15:35:17 -04:00
Niels Sascha Reedijk
6cbbd9bf4e NetServices: Implement BHttpSession::Cancel()
Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
2022-06-03 13:38:28 +01:00
Niels Sascha Reedijk
2f3b9b18ac NetServices: Add/rework the MaxRedirections, Timeout and StopOnError options
Change-Id: I4e59b51c16c6777941dc92ce02505386257dad03
2022-06-03 09:40:42 +01:00
milek7
d5f2742d1f arm64: Preserve FPU registers in setjmp/longjmp and arch_context_swap.
Change-Id: If0ca2ecbfa45b663dab39d1e9cb2562f071c3b27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5268
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-29 18:51:32 +00:00
milek7
e9d04b25e6 arm64: Add thread exit syscall in commpage.
Change-Id: Ia8e7e4626add623735fefefa1af151b7338adc35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5265
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
milek7
d1c3213a6d arm64: Add exception handling, handle pagetables access and dirty flags.
Change-Id: I751d78eb458da16098d236f3829d0c26540fbc17
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5264
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
milek7
78ea9ffc9b arm64: Implement kernel thread switching.
Change-Id: I87cca66ad89cfa85ba98a9ec828c5e357d7406b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5263
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-29 18:51:32 +00:00
Niels Sascha Reedijk
f9d9d20245 NetServices: Add support for Basic authentication
Change-Id: I304104f7096fd935212e1bfa3e988e7945cb5cec
2022-05-29 15:13:54 +01:00
Augustin Cavalier
41faeb1df9 net_interface & datalink: Fix MTU handling.
The device is what actually controls the MTU, and it has its own
field for this, so having a second one just meant the MTU never
got updated after startup.

Remove the "mtu" field from the interface, use the "device->mtu" directly,
and then actually invoke device->module->set_mtu when updating.
2022-05-27 16:36:12 -04:00
Jérôme Duval
9e991b61fe intel_extreme: switch FDI to i915 register naming
Change-Id: Ib7382240a2bc07dbbd2aed7647b06f14a6c5cb4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5335
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-24 15:52:46 +00:00
Jérôme Duval
59ce1ffe61 intel_extreme: check internal crt feature in VBT for analog probe on DDI
* also uses the BAR size when dumping regs (as done by the intel_reg tool).

Change-Id: Ie29768afc8f9c42bb9a03b2866db34c4b0e43b7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5334
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-24 15:52:46 +00:00
Jaidyn Ann
cc9bc8c6fb Move DateTimeEdit into libshared
BInvoker methods are now used, and input-handling is also tweaked.

Change-Id: I120cca8df9f11c11aac80911108d62fb49488f8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4927
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-20 05:19:05 +00:00
milek7
088321c119 arm64: Fix typos in arm_registers, add define for nGnRE.
Change-Id: I43aa971f2ead3a171af3c707539cbe08ff60cae5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5262
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-19 09:42:42 +00:00
Jérôme Duval
514c42d740 intel_extreme: improve DpAux support on HSW/SNB/IVB
hraw_clock is possibly dynamic, but for the usecase this seems good enough.
Tested on SandyBridge and Haswell laptops.

Change-Id: I045b3c03f6b37bbffb3d8688658ffaa2a97311ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5319
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-18 22:02:01 +00:00
Niels Sascha Reedijk
f751534257 NetServices: add optional fields to BHttpRequest
Change-Id: I6228419a55c81203ce2c26827d17ff6a402d86c5
2022-05-15 16:43:07 +01:00
Alexander von Gluck IV
21aaa37347 headers/NetworkKit: Drop now-private service calls from NetworkKit.h
Change-Id: I9efdeb7334606e8cd1cf6b394a19e870ff73bd70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5309
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-13 16:01:15 +00:00
Niels Sascha Reedijk
46b7da1f4f Merge branch 'master' into dev/netservices
Change-Id: I1eb6c2ea2fd0d794ad6378eab8bbb80ce46dfbb8
2022-05-08 09:00:42 +01:00
Niels Sascha Reedijk
cf54474e38 NetServices: Implement BHttpTime, parse_http_time() and format_http_time().
These utilities convert timestamp strings that are formatted according to
the HTTP RFC into BDateTime objects, and vice versa.

Change-Id: Ia2498944fb63d09233839f19d08f15d82a0a9685
2022-05-08 06:59:51 +01:00
Jérôme Duval
1c23e6bcf1 intel_extreme: leverage VBT device type for internal panel
* also handle dp aux on PCH.
* tested on Gen7, should work from Gen6.

Change-Id: I8d99bcdc10c817e66441a6a644df490dd988a74d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5290
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-05 16:26:03 +00:00
milek7
7c69ebda17 arm64: Add mapping of all memory in kernel virtual space at KERNEL_PMAP_BASE.
Change-Id: I828b1ba8c0add614e9df6bba1e14c5e514ec1bad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5258
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-03 20:27:18 +00:00
Lt-Henry
2684c64083 usb_hid: Update HID Consumer usage page constants to 1.3 spec
Change-Id: I5ffbcda41547b1a31049b5d7ba73f7327bb8cf04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5288
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 19:04:30 +00:00
Jérôme Duval
459f1bcd8d intel_extreme: irq hotplug support for IceLake and newer PCH.
we enable every port interrupt instead of relying on the ports found in the VBT.
ATM only log the plug state when it changes.

Change-Id: I5175fb137d11f0114beb2915a4f363341cfe8e36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5287
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 18:15:48 +00:00
Jérôme Duval
46bbf334f6 intel_extreme: parse VBT device configs, use this to skip unused ports
* BDB version from 111
* for DDI from Gen9
* for HDMI and DisplayPort from Gen6
* use the first port to create the mode list
* also probe DDI Port A
* the aux channel helps to select the correct dp aux registers.

Change-Id: I80549a6ec0477bed768cc5f388959b606d50c1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5286
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-05-03 08:48:34 +00:00
David Karoly
83f755b5d8 kernel/arm: add memory barriers for page table ops
Introduce memory barriers according to ARMARM,
section G.5.3 TLB maintenance operations and barriers

Sequence for mapping memory in (both L1 and L2):
* DSB
* Invalidate i-cache (TODO)
* Insert new entry in page directory / page table
* DSB
* ISB

Sequence for mapping memory out:
* Remove page table entry
* DSB
* Invalidate TLB entry
* DSB
* ISB

Sequence for updating a page table entry:
* Update page table entry
* DSB
* Invalidate TLB entry
* Invalidate branch predictor (TODO)
* DSB
* ISB

Note: i-cache invalidation and branch predictor invalidation is
not implemented yet as this commit focuses on implementing memory
barriers.

Change-Id: I192fa80f6b43117236a4be6fa8c988afca90e015
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5241
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-28 19:57:49 +00:00
Augustin Cavalier
68d1b97e4f Clean up mouse functions in InterfaceDefs.
* Fully remove unused and deprecated functions.
 * Comment as to which functions are deprecated.
 * Rename _by_name functions to be without the suffix, as this is C++
   and there's no reason not to use overloads here.

Change-Id: I4e2152f17806605eb965795417013cea800e661e
2022-04-26 19:59:01 -04:00
Augustin Cavalier
8af7b72d8d OS.h: Remove set_timezone function from header, place behind _BEOS_R5_COMPATIBLE_.
Long ago deprecated, not used in the tree.
2022-04-25 17:25:55 -04:00