Jérôme Duval
1a497824d8
ext2: recalculate extent metadata checksum each time the metadata changes.
...
this fixes an assert when reading extents written in Haiku.
Change-Id: Iba2cc3b35ed6886db0749a0f50b24053def5aac3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7079
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-10-30 09:16:07 +00:00
Jérôme Duval
6dd8733058
ext2: ext2_rename(): if the target exists, it should be unlinked.
...
* the target inode would still exist, unreferenced.
* also remove from entry_cache.
* this fixes fsck complaining about unreferenced inodes.
Change-Id: I4d48d6bf89bdd37d366da0ae4795e42bcc0532d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7078
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-10-30 09:16:07 +00:00
Jérôme Duval
7b97f05bb9
ext2: DirectoryIterator: the dotdot entry size is the entry block minus what comes before.
...
* the problem appears after the directory has been splitted.
* this fixes fsck complaining about an invalid directory entry.
Change-Id: I1566a279fc6438cb735439be002c634882e5a83b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7077
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-10-30 09:16:07 +00:00
Jérôme Duval
3319ef3f8e
ext2: BitmapBlock::FindPreviousMarked(): index shouldn't go negative
...
fix #14404
Change-Id: I831c7d5cabbb804ab74d582caafb1d6cd281ca34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7076
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-10-30 09:16:07 +00:00
Jérôme Duval
8b5675204c
virtio_block: serialize requests, copy using user_memcpy
...
fix #18621 #18286
Change-Id: Ia1ecb1b3623b10b42bf6153bdbabb7053179ee3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7048
Reviewed-by: waddlesplash <[email protected] >
2023-10-16 20:05:08 +00:00
Jérôme Duval
0decdc641e
virtio_pci: fix support for MSI-X shared
...
remove support for MSI
Change-Id: I8049030b2febd3558a7710cfd89db03a17cb5f7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7036
Reviewed-by: waddlesplash <[email protected] >
2023-10-15 13:02:41 +00:00
Jérôme Duval
6d42b430d1
virtio: support modern devices
...
fixes #17239 #17238
Change-Id: Ia5b6347110a60fab18852079b30dca6301010474
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995
Reviewed-by: Jérôme Duval <[email protected] >
2023-10-15 13:02:41 +00:00
Jérôme Duval
efbeada748
gnu: add sched_getcpu()
...
on x86_64 implemented with rdtscp or rdpid, generically with a syscall.
Change-Id: I8f776848bf35575abec8a8c612c4a25d8550daea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6866
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-08-21 17:55:16 +00:00
Jérôme Duval
7713305bd2
pch_thermal: add Lewisburg and Wellsburg ids
...
Change-Id: I2acbec140d8d6155549b0c802f465f004a7a67ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6867
Reviewed-by: Adrien Destugues <[email protected] >
2023-08-21 12:32:11 +00:00
Jérôme Duval
ef611e96c4
kernel/x86: also write the cpu number when the rdpid instruction is available
...
Change-Id: I5b37fe8aff9b4cf12fbd4dd60a91eb09f11f4e2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6807
Reviewed-by: waddlesplash <[email protected] >
2023-08-10 16:35:03 +00:00
Jérôme Duval
67ee1d1a3e
kernel/x86: don't load microcode on intel when already up to date
...
on Pentium Silver, loading the microcode on the boot cpu also updates the other ones.
Change-Id: Ifbd767e7d73fdbc8ae2bf0740fcce523e500de1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6806
Reviewed-by: waddlesplash <[email protected] >
2023-08-10 16:35:03 +00:00
Jérôme Duval
b761f9250a
unix: respect MSG_DONTWAIT on recvmsg
...
fix #18548
Change-Id: I33f502c2a376be6dbdf913f9613aab9d4c5a3644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6802
Reviewed-by: waddlesplash <[email protected] >
2023-08-09 17:10:28 +00:00
Jérôme Duval
3487453788
unix: respect MSG_DONTWAIT on sendmsg()
...
fix bug #18539
Change-Id: Id21362028287d1cbdac469226e6b52f4547a276f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6796
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2023-08-07 13:24:45 +00:00
Jérôme Duval
18d6122240
Terminal: support for underline color and styles
...
the text is now printed above the underline.
Change-Id: I1a3a7713bf514830106532e1534793e0fe158bc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6706
Reviewed-by: waddlesplash <[email protected] >
2023-07-21 18:12:41 +00:00
Jérôme Duval
3801ec71a3
emuxki: use user_memcpy to read/write the user buffers.
...
* map registers kernel only.
* alloc buffer user only.
* may help with #18475 and #18467
Change-Id: I3f739b98e0ec2d07e83c15a614b8b1d1722025e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6657
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-06-26 10:05:47 +00:00
Jérôme Duval
9c4bd82612
ifconfig: check the family when different from AF_UNSPEC
...
fix #18443
Change-Id: I05df404311f7e2048b83d5c4ebfdf8e1b0fc64c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6597
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2023-06-12 14:07:07 +00:00
Jérôme Duval
47b66bb676
loopback_frame: when the interface address isn't set, use the destination
...
fix #18429
Change-Id: Ifd0a15e052bbde9eb3d8875249e03152e6292994
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6482
Reviewed-by: waddlesplash <[email protected] >
2023-05-30 16:15:49 +00:00
Jérôme Duval
7c18d58f2b
usb: explore on BusManager::Start()
...
registering new devices requires the device_manager lock. The explore thread would wait
that the initial device scan is over to register devices.
Change-Id: I46529ab0926f349023f06ada3411979c0950dfcf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6475
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-05-29 18:11:26 +00:00
Jérôme Duval
840faa402b
strace: add network definitions
...
move select/poll to network.cpp
Change-Id: Ie70b2f5ae890b69db633ea5f45d2e8f0a2441a13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6468
Reviewed-by: waddlesplash <[email protected] >
2023-05-23 18:41:51 +00:00
Jérôme Duval
ec97248c2a
tcp: handle linger with zero timeout
...
ReadData() should return the current error on closed state, not always not connected.
Change-Id: I286ac1dd9ded127e8658ceb61088783b9993eacf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6459
Reviewed-by: Rene Gollent <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
740f3ca4ae
net_socket: binding on the same socket should return an error
...
Change-Id: I7b948435f6e4009d9c11d2163172ad0ab6484e1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6458
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
e5f221f598
ipv4: bind() should return EADDRNOTAVAIL when the address isn't available
...
"EADDRNOTAVAIL: The specified address is not available from the local machine."
Change-Id: Ic306acc60459f5b518eb53f4123c5e3a255b178e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6457
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
b7d9790fc2
unix: accept() shouldn't return B_TIMEOUT but B_WOULD_BLOCK
...
it's already handled when breaking the loop.
Change-Id: I47aa8105ff32e97aa4e1c0b2e9292e4516ee155a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6456
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
fc13358aca
net_socket: getpeername: IsConnected() when parent is not set
...
this fixes a test in libuv
Change-Id: I3002f9c44794ff3f8215ebc000fefa0f90b80279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6455
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
9c1af36c30
tcp: report disconnected events for tcp
...
* FIONREAD shouldn't report errors, only EINVAL when listening
* read available data in closing and closing-wait states
* fix #18327
Change-Id: Idd53a043a72ef6c7b282ea669895ff2e947adbb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6420
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
30d2a5e189
kernel/fifo: just send a disconnect for readers without writers.
...
just send an error for writers without readers
Change-Id: I4808e5dec29c840b72423a1bb10cb8f0ebc23bb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6419
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
030814a8fc
kernel/wait_for_objects: make select() watch more events
...
read: read + disconnect + error
write: write + error
Change-Id: I68a0cfc47b155d56a69e459f0dda1736c3a2a215
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6418
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
702e7b011c
kernel/fifo: fix commands like "tail -f file | grep"
...
'tail' selects read events on its write-only file descriptors,
so let's use B_SELECT_READ only for read-write file descriptors.
Change-Id: I5bb3837f82a7b06ec367fe871c15d67beb2d412c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6417
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 18:55:04 +00:00
Jérôme Duval
fa82fcc532
ifconfig: check the family is available
...
* fixes #6489
* fixes 64-bit warnings
Change-Id: I6ddfee8ec418881fddc0561b8b464a7d739dec9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6454
Reviewed-by: Fredrik Holmqvist <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-05-19 15:35:00 +00:00
Jérôme Duval
4e9653027d
net_stack: for local delivery, also capture packets when enabled
...
the packet capture expects frames: prepend an ethernet header for the capture.
Change-Id: I3d09da2a5a6924a545cc4fbc9dd1577bd3248226
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6452
Reviewed-by: Fredrik Holmqvist <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 15:33:09 +00:00
Jérôme Duval
e2b57695fc
loopback_frame: apply an ethernet header for packet capture
...
* the packet capture expects frames, so loopback_frame should actually apply framing and deframing
for loopback packets.
* datalink: set the address for host routes
* device_interfaces: call the deframing if any in device_enqueue_buffer()
tested with ping 127.0.0.1 and ping6 ::1, while removing the local flag on both routes.
Change-Id: I2085735bdac3bb85908189a2e1acb2540818c7bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6451
Reviewed-by: Fredrik Holmqvist <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2023-05-19 15:33:09 +00:00
Jérôme Duval
9ef39f3c0c
icmp6,ipv6_datagram: disable tracing
...
Change-Id: Idb7593c3463c79dc4caff27b427e970c7fe94a8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6453
Reviewed-by: Fredrik Holmqvist <[email protected] >
2023-05-19 12:21:20 +00:00
Jérôme Duval
bd7bb43761
PCI_x86: remove
...
Change-Id: I54335b6390dc5e312225a3100fd88d4e49838d35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6331
Reviewed-by: Fredrik Holmqvist <[email protected] >
2023-04-25 15:54:32 +00:00
Jérôme Duval
2982f45075
freebsd_network: drop PCI_x86
...
Change-Id: Ie185f63b56bc564b794e5900609fe9f0465de602
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6330
Reviewed-by: Fredrik Holmqvist <[email protected] >
2023-04-25 15:54:32 +00:00
Jérôme Duval
7c58a5a3fb
tcp: avoid overflow of the advertised window with window scaling enabled
...
tcp_segment_header.advertised_window is 16 bits.
Previously, instead of using the maximum window, zero would be sent, thus
the partner wouldn't send anything.
fix #18337
Change-Id: Ibff98ee58b84bdf52527a7821648a5faf20c5589
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6359
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2023-04-16 18:53:41 +00:00
Jérôme Duval
fc5d11e9ab
busses: remove unneeded PCI_x86.h
...
Change-Id: Ia231eadc02856f68daa0184c12e7d54853ac9322
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6326
Reviewed-by: Jérôme Duval <[email protected] >
2023-04-11 15:01:20 +00:00
Jérôme Duval
6239b2a907
libroot/glibc: apply upstream fix for printf_fphex: Fix up long double fphex.
...
https://github.com/bminor/glibc/commit/a53b7a4e4b39d90f5964841c63492cf233aa17b8
fix #18353
2023-04-09 18:38:30 +02:00
Jérôme Duval
8aadf2e84a
setvolume: implement some common features
...
unmute when increasing volume, mute at the minimum volume, don't decrease volume when muted
Change-Id: Ifd671b2a8d7d8a4da2bc15adc18f9aa7c46e66d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6017
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-02-16 11:40:17 +00:00
Jérôme Duval
042c401bb0
intel_extreme: add PCI ids for Haswell ULT GT1 Mobile
...
for bug #18215
Change-Id: If49bc262d0c5eb7082fb749222ca6534d5c55aa3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5991
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2023-01-13 05:48:37 +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 <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2023-01-10 20:40:11 +00:00
Jérôme Duval
42aa87de9e
asus-wmi: always pass five arguments for WMI calls
...
Some laptops like G713QM-HX121 or FX705DY have an ACPI WMI DSL, which evaluates five arguments
for all method IDs similar to
https://github.com/torvalds/linux/commit/98e865a522983f2afde075648ec9d15ea4bb9194
but with 5 arguments:
Method (WMNB, 3, Serialized)
{
P8XH (Zero, 0x11)
CreateDWordField (Arg2, Zero, IIA0)
CreateDWordField (Arg2, 0x04, IIA1)
CreateDWordField (Arg2, 0x08, IIA2)
CreateDWordField (Arg2, 0x0C, IIA3)
CreateDWordField (Arg2, 0x10, IIA4)
Local0 = (Arg1 & 0xFFFFFFFF)
Patch to fix proposed by Reijo F from russian haiku os chat on #18189
Change-Id: I4536029600e6e9608aceafa45b36af8f0ffe35b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5977
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: Fredrik Holmqvist <[email protected] >
2023-01-02 15:00:19 +00:00
Jérôme Duval
c9e5ef8796
strace: shows values for create_pipe and socketpair.
...
Change-Id: I45ee381044b2e3d4ff0ed1daa61ac5bab949bcdb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5390
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-12-24 09:40:21 +00:00
Jérôme Duval
3b8430dfcf
strace: add an option to filter syscalls by name or by type
...
the type lists are hardcoded for now.
Change-Id: Iae89046ee52d3812354de619bfd9625217479c49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5597
Reviewed-by: Adrien Destugues <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-12-23 09:57:37 +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 <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-12-22 17:43:32 +00:00
Jérôme Duval
8b26b08a34
listdev: list USB devices too
...
Change-Id: I14c626b6a37c95196ce87ec6b1bbb76ff14cdb4f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5955
Reviewed-by: Adrien Destugues <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-12-22 17:43:32 +00:00
Jérôme Duval
d9f90ce7f3
Shortcuts: provide some default actions for mute, increment and decrement volume media keys
...
Works for HID-aware devices (USB & PS/2).
Change-Id: I45e9ededaab1699f30e55fb644ec0e3ceebeb191
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5937
Reviewed-by: Adrien Destugues <[email protected] >
2022-12-19 13:51:02 +00:00
Jérôme Duval
c44b267fb3
ps2: switch to HID keycodes for media/acpi keys
...
reference: http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
I tested volume keys successfully.
Change-Id: I2649eb7829bcc9bfdbef26ae4a36179505aec56a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5944
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-12-19 13:51:02 +00:00
Jérôme Duval
6e0950ff9f
Shortcuts: accept consumer keys for shortcuts
...
for now the hexadecimal code will be displayed.
Change-Id: Id5594f2d806cbd391ece8740332947e92814e238
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5915
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-12-19 13:51:02 +00:00
Jérôme Duval
6333726b2e
setvolume: add options to mute, increment, decrement the master volume
...
also set the background flag
Change-Id: Ie198476d666a0cd290520d15534afa3a73cf8a1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5936
Reviewed-by: Adrien Destugues <[email protected] >
2022-12-17 15:19:26 +00:00
Jérôme Duval
7fb137c2b2
efi/x86_64: skip reserved memory blocks when finding out the memory top
...
fix #16712
Change-Id: Ib2ae08bc47008098a6b0c231a759d5e91f88fd33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5912
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-12-15 04:11:35 +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 <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-12-14 04:53:09 +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 <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-11-30 08:50:59 +00:00
Jérôme Duval
616edea7fb
boot_loader: load amd microcode update data file
...
switched to non-packaged paths
Change-Id: I331d4d6ed1af1ce6fa68109c9c6baf4a92bdc7b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5858
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
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 <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-11-28 13:33:01 +00:00
Jérôme Duval
bce7dc883a
silicon_image_3112: use kernel read/write protection for map_physical_memory
...
Change-Id: I04655afb3f552e5919923ab96f96f32d0f8db6b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5834
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-11-27 17:06:27 +00:00
Jérôme Duval
685e124c99
tty: let processes open a slave tty again, ignoring O_NOCTTY.
...
they just won't control the tty.
fixes https://github.com/haikuports/haikuports/issues/7457
Change-Id: I8968b620a39c3050f6498faaa95c25aaed86e5c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5832
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-11-27 11:32:47 +00:00
Jérôme Duval
17ec9b7f4e
libroot/glibc: apply upstream fix for _itoa: "Make sure at least a zero is emitted."
...
https://github.com/bminor/glibc/commit/6cae39579b699d09b94a315483a9ac804b56fe34
fix #18098
Change-Id: I1b29f8cf723bf0731ed0be3a2ab3d2b152af449c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5833
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-11-27 11:31:16 +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 <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-11-26 12:56:08 +00:00
Jérôme Duval
e8deaebd62
kernel/x86: dump the CPPC feature
...
Change-Id: Ic4d286108520147defd6251a15943a14ab96e264
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5829
Reviewed-by: waddlesplash <[email protected] >
2022-11-25 17:24:47 +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 <[email protected] >
Tested-by: Commit checker robot <[email protected] >
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 <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-11-21 18:28:41 +00:00
Jérôme Duval
d2875e7b28
usb: fix references on the module B_PCI_X86_MODULE_NAME
...
the dependency is optional, only the device modules depend on it.
should fix #18075
Change-Id: Ifddb9814ff5ff59ee7d80d06b14ba9fded04cd56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5822
Reviewed-by: waddlesplash <[email protected] >
2022-11-17 21:17:20 +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 <[email protected] >
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 <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-11-07 09:02:42 +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 <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-11-02 14:09:08 +00:00
Jérôme Duval
4a55cc230c
script to parse supported ids for network drivers
...
format similar to lkddb
Change-Id: Ie46becca48d4d8b7b37106f28c68dd6f60fa3322
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5761
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-10-25 19:09:28 +00:00
Jérôme Duval
74622d8051
Devices: add vendor names for ACPI devices when available
...
files can be updated so:
curl --fail -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export '
curl --fail -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export '
Change-Id: Id0456f925729c635c5e2d43f80e9e016483b2611
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5753
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-10-25 07:09:10 +00:00
Jérôme Duval
876ddc1adb
mountvolume: return type of ContentName() is now BString
...
fixes #18011
Change-Id: Ie8dda950005c191c843535b12f7cf8f9819bdcfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5757
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-10-24 07:31:12 +00:00
Jérôme Duval
37f29a6f7a
usb_ecm: switch to the new driver API
...
Change-Id: I385d70b3245d6b18c3593cf2672445ccfb000f13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5754
Reviewed-by: X512 <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-10-24 06:31:55 +00:00
Jérôme Duval
41c1669de1
bin/acpi_call: command to call ACPI methods
...
adapted from the FreeBSD tool, uses ACPICA headers in userland mode.
Change-Id: Icba77b01e6e351df31538dda21520f0cc99b26bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5749
Reviewed-by: Jérôme Duval <[email protected] >
2022-10-19 12:57:04 +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 <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-10-17 06:13:07 +00:00
Jérôme Duval
caafd8470b
pch_i2c: add Meteor, Alder and Raptor Lake ids. add Lakefield ids.
...
Change-Id: I7acc2e0dd7b84ea3dc8f10bbe186ff0008aa7c2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5739
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-10-12 16:53:14 +00:00
Jérôme Duval
c3f23e8222
Devices: add a view for USB devices
...
Tried to match the USB classes to categories.
Change-Id: Id021730755060ab6a5149eea87f5e25370c67e1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5738
Reviewed-by: Fredrik Holmqvist <[email protected] >
2022-10-10 21:28:37 +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 <[email protected] >
2022-10-10 21:28:37 +00:00
Jérôme Duval
e6ce95c5ab
usb: register device nodes for hubs and devices
...
the device identifier is the USBID. no actual interface to be used by drivers.
Change-Id: I9fd1fdab0d02f1b82380c619b39bc3a12a9e2333
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5736
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Fredrik Holmqvist <[email protected] >
Reviewed-by: X512 <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-10-10 21:28:37 +00:00
Jérôme Duval
ee45779374
hda: add missing product entries for newer devices
...
should fix #17972
update some product entries for intel which requires the skylake quirk
remove product entries for intel which don't require snoop
Change-Id: I08f2bd640fe9bef4405abc9b2eaa83070b9adce9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5719
Reviewed-by: waddlesplash <[email protected] >
2022-10-06 16:33:56 +00:00
Jérôme Duval
6652606fa4
usb: remove debug leftover
...
Change-Id: Idba6eaecb2c5b5773cd61794ac62fac1f7e3c1f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5715
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-10-05 18:17:52 +00:00
Jérôme Duval
f193f67fbe
pci_utils: get_class_info() needs at least 70 chars, make it 128.
...
seen on https://dev.haiku-os.org/attachment/ticket/17970/syslog_timestamp_hrev56511.txt#L131
Change-Id: I7d15c951e9c0349614f22d5b1348b43e105ba596
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5713
Reviewed-by: waddlesplash <[email protected] >
2022-10-05 16:27:11 +00:00
Jérôme Duval
3f7abfc9b5
usb: trigger the explore thread when a bus is added
...
this helps to find the boot disk, otherwise it can happen that the usb disk driver
misses a bus to explore.
Change-Id: I6983b42cf66f946b4ba9763ec09b6e4a848f2e9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5712
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
547ddb9090
uhci: switch to the new driver API
...
Change-Id: Ifc95a32066d0089d3fd41e489604d58815c074af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5711
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
0ed2fb8d75
ohci: switch to the new driver API
...
Change-Id: I065743b5ced8b75f9576b62421525824698a2245
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5710
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
15ebede292
ehci: switch to the new driver API
...
Change-Id: I9102a27fe8e536003a0ab09c9cca5a87e88c8092
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5709
Reviewed-by: waddlesplash <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
3d0c08efaf
xhci: switch to the new driver API
...
keep the stack loaded when no bus is found
Change-Id: Ic2cf640ead7d94152651cea86a7977caa0920163
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5708
Reviewed-by: waddlesplash <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
1eebcfa03e
usb: add an interface for usb controllers using the new driver API
...
Change-Id: I25f481c8a7c3e4aafa3080640ce156b9232eaf73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5707
Reviewed-by: waddlesplash <[email protected] >
2022-10-03 23:58:53 +00:00
Jérôme Duval
96985b8860
kernel/device_manager: make sure we can reload the driver before unloading it
...
for instance usb drivers are unloaded when unused, but they will be
loaded again when a matching device appears. this can only work when
the boot device is already mounted.
Change-Id: Ia92c679cffb6a1fac143c9f8b3bb570fb4555719
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5706
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-10-01 08:08:30 +00:00
Jérôme Duval
a4f09ce9d0
ext2: align dirent struct pointers with next_dirent()
...
Change-Id: Iaf102916d77f077c48348e2d1e7deff8f37d1232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5634
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: David Karoly <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-09-30 17:13:14 +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 <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-09-30 17:10:39 +00:00
Jérôme Duval
2b9426c90a
hda: detect one more intel audio device per device ID
...
Change-Id: I91de99c0242a2546e0a3cac94a4f46719f048889
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5699
Reviewed-by: waddlesplash <[email protected] >
2022-09-26 17:32:17 +00: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 <[email protected] >
2022-09-25 08:15:15 +00:00
Jérôme Duval
a6e9176bc5
x86_64: prefix rdtsc with lfence, or use rdtscp if available
...
a strong monotonicity is a property of system_time(). Performance should be
a bit impacted (around 10%).
removed omit-frame-pointer hints as the compiler generates the same without.
Change-Id: I920145d616604f32b38d9e134ce83f3e0e848bc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5690
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-09-25 08:13:49 +00:00
Jérôme Duval
2e69f2b076
kernel/x86: init the tsc frequency and clock speed from CPUID when available
...
only for Intel newer CPUs.
Change-Id: Icd83f3b643796bfb3725b5c8877b9e7828bc71d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5688
Reviewed-by: Adrien Destugues <[email protected] >
Reviewed-by: Fredrik Holmqvist <[email protected] >
Reviewed-by: Alex von Gluck IV <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-09-24 00:35:02 +00:00
Jérôme Duval
ca6d474a73
virtio_block: add support for the topology feature
...
gets the physical block size
Change-Id: I7b4d80874d1463a5122c34171956af2b267b1c69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5669
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-09-23 06:56:01 +00:00
Jérôme Duval
143a5f8ce6
DriveSetup: add a column for the physical block size
...
Change-Id: Id43df9eb4a3619ba265ed25aeb7ec82d0a26358c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5668
Reviewed-by: Adrien Destugues <[email protected] >
Reviewed-by: Fredrik Holmqvist <[email protected] >
2022-09-23 06:56:01 +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 <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2022-09-23 06:56:01 +00:00
Jérôme Duval
285fe6257a
libroot: fix *_np functions signature
...
fix f33f4868fe
*_np functions are in a not included header.
add weak aliases for the future functions without _np.
Change-Id: Ie2bcc9173a2b93a6c4052c039cb37930c1c3aaa1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5685
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2022-09-22 04:32:15 +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 <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-09-21 19:02:08 +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 <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2022-09-19 19:45:45 +00:00
Jérôme Duval
a9ada46be8
ahci: propagate physical block size to scsi read capacity 16
...
Change-Id: I8dab117fe8da9fc6e0f18adaa178ff79bc7c6ae4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5666
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2022-09-16 09:16:19 +00:00
Jérôme Duval
750afaef94
bfs: disable some block sizes when the partition size is too small
...
these would otherwise trigger an assert when initializing.
fixes #6781
Change-Id: I4fa34455e7734f6a4039705527bf5ab09b46998d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5659
Reviewed-by: Adrien Destugues <[email protected] >
2022-09-13 18:48:25 +00:00
Jérôme Duval
eac10866e2
DriveSetup: select the actual partition type instead of defaulting to BeFS
...
Change-Id: Id73ad3398e802eb10b1928317bb9987ddee30eb6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5658
Reviewed-by: Adrien Destugues <[email protected] >
2022-09-13 18:48:25 +00:00