64899 Commits

Author SHA1 Message Date
JackBurton79
fca54d80f2 Screen preflet: fix extra spaces in certain vendor code
Also fix a copy/paste error in the command used to generate the list and renamed the temp file

Change-Id: I0a954c78b14ddc802d3c5864323e7a1d82a529b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5567
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56371
2022-08-25 17:13:19 +00:00
Jérôme Duval
46c2fb2ffe kernel/fd: use loop variable type size_t
when count type is size_t.

Change-Id: Id68582fbd2243d65394e0c2c4d43272823bf778e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5543
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56370
2022-08-25 17:12:19 +00:00
David Karoly
cd5f6f2502 kernel/arm: fix system_time for generic timer
Change-Id: Ief7b0638f40ba5deee27f3551e8870bfb6216a4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5569
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56369
2022-08-25 12:43:59 +00:00
David Karoly
55212b9501 kernel/arm: reserve interrupts for GICv2
This works similarly on the 32-bit and 64-bit ARM port.

Other architectures call reserve_io_interrupt_vectors() when
initializing the interrupt controller (e.g. PIC, APIC etc.)
so let's do the same on ARM.

Change-Id: If5a360cf23fd01d97d2f20702785bc5da0190052
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5566
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56368
2022-08-25 00:46:31 +00: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
Alexander von Gluck IV
028f04593a tests/qemu-boot-test: Update for riscv64
* Better testing of the riscv64 arch by providing
  more supported hardware
* Partially based on x512's research in the forums
* Example usage:
  ../src/tests/qemu-boot-test riscv64 \
    kernel:.../u-boot.bin haiku-mmc.image

Change-Id: I9fe9d3c63bd7683818fc28fad2de64545bcd4804
hrev56367
2022-08-24 14:37:44 -05:00
David Karoly
0f26acc83e arm: reuse generic PCI implementation
Change-Id: If69c7e3779dade16cfc8c0af2a0b963f1f646169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5561
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
hrev56366
2022-08-24 09:46:49 +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>
hrev56365
2022-08-24 09:41:35 +00:00
Augustin Cavalier
7b233926e2 libroot: Do not return LC_GLOBAL_LOCALE from __current_locale_t().
Not all things that accept locale_t can accept LC_GLOBAL_LOCALE,
specifically nl_langinfo_l does not (the specification indicates
that passing it is undefined behavior; indeed, no C library I glanced
at seems to support that.)

So, return a static locale_t pointing to the global values instead.

Fixes #17875 and #17876.
hrev56364
2022-08-23 00:07:59 -04:00
David Karoly
1ef08da5a0 arm64: discover PCI from FDT
see:
https://www.kernel.org/doc/Documentation/devicetree/bindings/pci/host-generic-pci.txt

Change-Id: I0c35de0c0e08ab04a00101cb3a60df283c685e7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5559
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
hrev56363
2022-08-21 17:31:04 +00:00
Jessica Hamilton
bf4748d695 libroot: fix build, as asctime[_r] not replaced in hrev56361.
Change-Id: I1d9a331c47269956dc70a88bcf524b91fe3b1933
hrev56362
2022-08-19 09:59:16 +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.)
hrev56361
2022-08-18 15:31:38 -04:00
Augustin Cavalier
8ba3797e85 kernel/fs: Check HAS_FS_CALL(..., open_dir) in open_dir_vnode.
All filesystems have open_dir calls in their vnode hooks,
but there are some vnode hooks that do not, like FIFOs.
Thus we need to check the hook actually exists.

Fixes #17870.
hrev56360
2022-08-18 13:58:14 -04:00
Augustin Cavalier
e4e1e6e4f5 tests: Add fifo_test.
Creates, opens, tries to open as directory, then unlinks.

The attempt to open as a directory triggers an assertion
in the kernel at present (this is #17870.) The next commit
will fix that.
2022-08-18 13:57:08 -04:00
Augustin Cavalier
0b19ba0ad9 packagefs: Handle NULL in String::SetTo properly.
Fixes #17773.
hrev56359
2022-08-18 13:28:07 -04:00
David Karoly
c633f83a45 kits/app: fix DBG in Looper
* adjust format string for thread id
* fix variable name loop vs looper

Change-Id: I3d1924d6ab98981b4b2a3f56689872e35e5bea77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5562
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56358
2022-08-18 16:38:07 +00:00
Augustin Cavalier
93dfc938f1 kernel/fs: Print the vnode or mount in question in FS_CALL panics.
May help to diagnose #17870.
hrev56357
2022-08-18 00:12: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 00f1e7c5e40b41f892625b720c6a032b20f0c405

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>
hrev56356
2022-08-17 19:44:30 +00:00
David Karoly
c6e6743261 PCI: refactor root node detection
Change-Id: Icc4ab0c3f7258914d798267e08c47977c0987c97
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5547
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
hrev56355
2022-08-17 19:23:51 +00:00
milek7
22cfe80c83 arm64: Use ACPI for PCI interrupt routing.
Change-Id: I4bf578aacda1be44cf5b8f95681a57ab5eabda23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5278
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
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
6c4a9fd69b NetServices: add query part of the URL to the request
Change-Id: Ie169041925544f082a8be728d77cbc69edf2caa2
2022-08-15 22:08:03 +01: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
Niels Sascha Reedijk
aa8ca18a34 NetServices: Implement a logger for requests.
This logger can print to console or log to file.

Change-Id: I7eef847d42b360af1cb7cec0c897131b975a1f2f
2022-08-14 09:46:16 +01:00
Oscar Lesta
2226d2eef7 tty: Fix TCFLSH and TCSBRK ioctls.
These two recieve integer values from userland (termios).
Cast them accordingly.

Should fix #17861. Tested on 32 and 64 bits.

Change-Id: Ic5eb53d2732354f86a82f59aab4917ad1851cfc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5545
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56354
2022-08-13 10:55:48 +00: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>
hrev56353
2022-08-13 09:43:41 +00:00
Autocomitter
0f1217b8fb Update translations from Pootle hrev56352 2022-08-13 08:15:47 +00:00
Oscar Lesta
c4af8d0676 pc_serial: fix divisor values for baudrates 1200 and 1800
Change-Id: I57981b4c6f1b1ed22bea98d1199e86919f5ff30d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5544
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev56351
2022-08-12 11:35:28 +00:00
X512
e89109f5df libroot/arch/arm: use TLS for getting current thread ID
Change-Id: I424f4029f29a362af9b1ea814b518d59aeae271d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5541
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
hrev56350
2022-08-11 18:47:01 +00:00
X512
b0f1a82469 kernel/arch/arm: fix stack trace
Change-Id: I51d789b4de312c604184d697e9a0a695534d42d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5540
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-08-11 18:47:01 +00:00
JackBurton79
9990382d9c Screen preflet: add and use a 'database' for screen vendors.
Change-Id: Ibf6435b29b3ac509c1e4c5a2331840600838301b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5535
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev56349
2022-08-11 17:46:04 +00:00
PulkoMandy
9fec431f60 vesa: disable the livepatching code by default
It can be enabled by putting "bios_patching true" in the VESA settings
file.

This patching does not work yet on modern hardware, but the detection
code to decide if we should try patching still says it found the
modetables. In this situation we can crash the BIOS or other weird
things can happen.

To avoid these problems, and because VESA is supposed to be the failsafe
option, disable this code by default, and let people who want to
experiment with it first enable it in the settings file.

Should fix #17633.

Change-Id: I4d89ff6dfeb7d02e39cd3da7b22ddd5411b10822
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5499
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56348
2022-08-11 15:00:41 +00:00
John Scipione
216bcf7a3d Deskbar: add in-source Deskbar regions diagram
Change-Id: Iec7649f545cf818ecd87e8434774266697524c5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5521
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56347
2022-08-10 08:01:47 +00:00
Mashijams
4d5b9e6726 xfs: disable Werror
compiler generates a warning regarding using offsetof() function on a non - POD type class

disabling Werror will not break build due to this warning

Change-Id: Ic72210f92a257e80ad8de9327892cfca7454076e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5538
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev56346
2022-08-10 08:01:06 +00:00
Murai Takashi
287f6265d5 add-ons/print/transports/ipp: fix overrunning write
sscanf() requires 1024 bytes for url[] at line 96 and 97,
but url[] size is 256 bytes.

Pointed out by LGTM.

Change-Id: Ia94661b8d7f08874395f8912b48774dba3b9ece2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5534
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev56345
2022-08-10 01:40:31 +00:00
Jérôme Duval
e963cd2723 putenv: handles a string starting with = as error
Change-Id: I1ff288080ac468b5f8a75f2064e68e8086dc7a69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5539
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56344
2022-08-09 20:07:20 +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>
hrev56343
2022-08-09 18:15:55 +00:00
David Karoly
0404f954c1 boot/efi/dtb: dump PCI interrupt map
see:
https://www.kernel.org/doc/Documentation/devicetree/bindings/pci/host-generic-pci.txt
https://www.devicetree.org/open-firmware/practice/imap/imap0_9d.pdf

Change-Id: Iba53457384d6330f99ac0b3b6b2894da83471c48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5537
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56342
2022-08-09 13:35:42 +00:00
David Karoly
f5aba47edd boot/efi/dtb: code cleanup for FDT dump
* conditional compile for dump_fdt() with #ifdef
* rename functions according to coding standard
* use dprintf() for printing

Change-Id: Ie486739d87f1cb9a005188a46a43f470b6000319
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5536
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
hrev56341
2022-08-09 13:32:26 +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>
hrev56340
2022-08-08 15:32:47 +00:00
Mashijams
a3d8402537 Docs: xfs
Change-Id: I2da4c778801e4c34ffe75d19c0c5c9323979f5f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5533
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56339
2022-08-08 15:25:26 +00:00
Jérôme Duval
ed867da973 network/dns_resolver: fix memory leak when read_port() fails
and dns_resolver_repair() succeeds.
reply allocated at line 178, not freed on continue.

Change-Id: I8fc9d02512ab741d34b0f6bd4710bb1bd29ddaae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5532
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56338
2022-08-08 15:25:10 +00:00
Jérôme Duval
fc473ac261 kernel/vm: _user_set_memory_protection() should only check the user protection
as it extends the provided protection with the kernel protection.
fix hrev55016

Change-Id: I9fa9349c15b4ef896a9dadd1b1b7a4165cc03b39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5531
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev56337
2022-08-08 15:17:57 +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
Murai Takashi
ee96bcfe51 network/dns_resolver: fix memory leak
'reply' is allocated in Serialize() at line 120, but is not freed.
Pointed out by Clang Static Analyzer.

Change-Id: I9f7e0c5c2dcb976f11230ad8a5ba38d653b23d6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5530
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev56336
2022-08-07 16:33:24 +00: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
Autocomitter
8240805c04 Update translations from Pootle hrev56335 2022-08-06 08:19:02 +00:00
Alexander von Gluck IV
9ca7f96ccf radeon_hd: refactor fb calculation; fix 64-bit bar fallback sizes; #17664
Change-Id: I510dba971ca5f1ed8d2b96094cc2e6b367e95dc3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5523
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>
hrev56334
2022-08-05 12:58:26 +00:00