Commit Graph

63375 Commits

Author SHA1 Message Date
Adrien Destugues cb3199681e UDP: apply review comments from hrev51603
I found this at the bottom of my TODO list…

- UdpDomainSupport methods were referring to the object through a static
  variable when they could just use the "this" object instead.
- Use BAutoDeleter to simplify the code a little
- Style problem (missing != NULL in pointer check)
- Move referencing of domainSupport in _GetDomainSupport instead of
  OpenEndpoint. This way the two _GetDomainSupport methods both return
  an already referenced object

Thanks to Axel for the code review and sorry for the super late reply.

Change-Id: Ic50ebb1a63a203d5aa393d28f4631c345acacc79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3908
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-10 07:59:07 +00:00
Augustin Cavalier 049eb4cb89 libroot/os: Remove B_CLONEABLE_AREA protection check.
Due to how API versions work, it seems this flag is still applied
on a lot of applications, as some have some rather old API versions
(actually API versions themselves may not be working quite right, to boot.)

All relevant software should have had a chance to be recompiled on
or after beta2, so we reduce the flag's automatic application back
just to BeOS applications.
2021-11-09 19:27:39 -05:00
Augustin Cavalier 913373053f ntfs: Prevent moving directories into themselves (even indirectly.)
libntfs does not check for this.
2021-11-09 19:24:42 -05:00
Augustin Cavalier bef774d30c libntfs: Add assertion that the entry is not already in the cache.
There is a big scary warning about this, but no code actually checks for it.
This would have saved me some time in development...
2021-11-09 17:56:34 -05:00
Alexander von Gluck IV 4a025c8e74 libroot: revert __clz_tab change. Didn't mean to put that in yet
Change-Id: I6c4eea2de5778749e4894ea5d1d12e8403e538da
2021-11-09 16:41:21 -06:00
X512 ec8a8f1c02 libroot/riscv64: minor riscv64 fixes
Change-Id: I96b604aabe18307d7376473b8d9cd50eccb537d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4709
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-11-09 22:34:35 +00:00
Augustin Cavalier 5070f59750 ntfs: New driver glue, write support.
Change-Id: I7f7b1e1a85b2f966209437aa99b536d00623bc03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4696
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-09 22:22:13 +00:00
Augustin Cavalier 3fbe39e14d ntfs: New driver glue (read support only.)
* Add some things to config.h for C++ friendliness.

 * Import some more GPL code from libntfs into lowntfs.c,
   in order to avoid reimplementing it (or copying & pasting,
   which would probably make all the glue code GPL.)

 * Write an entirely new kernel_interface.cpp, modeled after exfat's
   and other newer filesystem drivers. Highlights:
   - significant use of C++ RAII objects
   - entry_cache support
   - file_cache support (thus also read_pages)
   - readdir of multiple dirents at once

Most NTFS tickets open at present are related to write support,
and this does not yet have that. It should however be considered
a part of #17165.

Change-Id: I6d5aa53d4d06846b0de5e6ce1431219bf70a6f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4679
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-09 22:22:13 +00:00
Augustin Cavalier 30461842be ntfs: Delete the old glue driver.
It originated on BeOS, and still retains a number of relics of that.
It did not support the file cache, it was rather slow on large disks,
and it had incorrect unlink behavior (delete immediately rather than
on vnode close.) It also is C, not C++.

libntfs-3g has also undergone significant changes in the time since
this driver was written, and it also has a "low level" FUSE module
that we can reuse a lot more code from, so a new driver will be
able to shed a lot of code and use more from upstream directly.
That is coming in the next commits.

Change-Id: Id6f8f8f85076dda92b289ef5a2f1ca6cd484f3e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4678
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-09 22:22:13 +00:00
Augustin Cavalier 9102cad62b ntfs: Update NTFS-3G to 2021.8.22.
Things seem to still work OK ... insofar as they ever did.

Change-Id: I32ba3c71c27106558092fee636f135f477f1cf36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4677
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-09 22:22:13 +00:00
Augustin Cavalier ee4b6bdfa1 Storage: Initialize stat structure before using it.
Normally we are only reading or writing from one field in the stat,
and so we do not need to worry about initializing the others. However,
in the case of timestamps, we use only the "tv_sec" field, and so
the "tv_nsec" field was getting passed to filesystem drivers with
bogus data (on x86_64 at least, very large values.)

This went largely unnoticed, despite being used in every Tracker copy
operation, because BFS only uses the lower bits of tv_nsec.
But NTFS and others use the whole field, leading to timestamps
far in the future.

This may fix some of the issues on the bugtracker about timestamp
problems in filesystems other than BFS (and slight inaccuracies in
BFS timestamps on copies, too.)

Change-Id: I5fdbd264fb145af57b7bf2f7b491c6943024811e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-09 21:46:31 +00:00
Fredrik Holmqvist e6f4113978 [arm64] Set march to armv8.2-a+fp16, fix posix math
The march can be reduces later if needed.

Use arm64 optimized math, and set std=c11 so
__FLT_EVAL_METHOD__ is 0 and not 16:
https://gcc.gnu.org/bugzilla//show_bug.cgi?id=100854
2021-11-09 21:59:31 +01:00
Coldfirex 2ca1376080 Mass updating of OpenBeOS text to Haiku
No functional code altered.

https://dev.haiku-os.org/ticket/17197

Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-07 10:00:35 +00:00
Alexander von Gluck IV a80813fdd1 qemu/riscv64: Misc fixups for qemu
* Disable overly verbose PCI IO access
* Add ati to riscv64 minimum image for qemu
* Update qemu test script with "best" gpu settings
  for the moment

Change-Id: I5d16ace0f8589f8b17cc50c7a1db04266907269f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4699
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-07 09:58:15 +00:00
Alexander von Gluck IV 4b5c7fe7e1 system/boot: add optional alignment to kernel_args_malloc
* A few things need alignment, instead of forcing them all
  to align themselves, support alignment of the kernel_args
* Default of 1 is "no alignment"

Change-Id: Iff05dcec8adaa963c8444d701464ea11616062f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4698
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-07 09:58:15 +00:00
Alexander von Gluck IV c9d6d52b03 libfdt: Upgrade to 1.6.1 plus a few commits
* Catch errors and report them in bus parsing code
* Align the FDT kernel_arg to 8-bytes
* we still choose BSD-2-clause :-)

Change-Id: If2a88b7f131025ff1c1a2d903ed52f039e5bbcb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4694
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-11-07 09:58:15 +00:00
Jérôme Duval f78b75b15d Terminal: handle color queries
this allows apps like vim to select a color scheme based on a dark or light background.

Change-Id: Ia9f98d2373523a8b5fa379225a1c906ae075edf7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4693
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-06 17:34:48 +00:00
Jérôme Duval fe3e5f05a1 Terminal: accept more notations for colors
Change-Id: Iaf6008305de8ef0111f7006e36da507d40c8a47a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4688
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-11-06 17:34:48 +00:00
David Karoly 65aab788e6 kernel/arch/arm/int: add irq postlude
Change-Id: If3dcd2f7d3c0385ecc699b4de4359a14a189fff0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4673
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-11-06 09:56:00 +00:00
Alexander von Gluck IV c892801f83 platforms/u-boot,platforms/riscv: Fix boot_fdt after hrev55618
Change-Id: I49579b206ba4d6a83e0e3a557fc5d4bad6a1a886
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4695
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-05 20:28:49 +00:00
David Karoly acf8592e82 build: don't use regular TARGET_*_FLAGS for .S files in bootloader
This is one more change to prepare for the transition to soft-float for the ARM EFI bootloader.
We need this change to remove the kernel compiler flags from .S files for the bootloader. Otherwise there would be hard-float and soft-float flags at the same time, giving a compile error.

Change-Id: I0b66c3c16937228eb76351e359160187d3ab826b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4690
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-11-05 19:49:08 +00:00
Alexander von Gluck IV 93c8529475 boot/zstd: prevent weak symbols from sneaking in
* Prevents proper boot on riscv64, maybe others

Change-Id: I2f25b238d5e3c29dd57ef67a6d960de0fc80c205
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4692
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-05 19:45:39 +00:00
David Karoly 7f6f87d29d boot/efi: build boot_fdt.a with boot compiler flags
Change-Id: I698019697d1c3bcf1e913316cfd6c0dcab65d4e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4689
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-05 16:21:46 +00:00
David Karoly 24c1b1812c boot/arch/arm: use generic memcpy
Change-Id: I1816b4cf696cc19b94618f7e3b690895ccf4479c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4691
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-05 15:55:55 +00:00
David Karoly 2ab17547fa kernel/arch/arm/paging: set size and alignment for page directory
Change-Id: Ie3aa80c134c8b519005f7e52c51c7696f26bd49d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4672
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-11-05 15:38:10 +00:00
David Karoly 95424a7096 Update HaikuPortsCross package versions for ARM
Change-Id: I918829e69bc92f295720f884f724a19dc4fe3d46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4684
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-11-05 14:55:18 +00:00
Humdinger 1621d71af8 Fix typo in API docs (BBitmap)
Found by Scottmc.

Change-Id: Idd10040d798533a0aa731132f7282e7ce1423ed6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4687
Reviewed-by: humdinger <humdingerb@gmail.com>
2021-11-04 16:15:34 +00:00
Alexander von Gluck IV 87f2b35395 Revert "artwork/promotion: Add promotional CD/DVD designs"
* Ugh. Just realized we have a seperate artwork repo. Moving there.
* Sorry for spam.

This reverts commit 9714475c39.
2021-11-04 09:23:27 -05:00
Alexander von Gluck IV 9714475c39 artwork/promotion: Add promotional CD/DVD designs
* These are reproductions of the original 2012 R1/Beta4 design
* The light variant works better on my consumer cd printer.
* The dark variant looks better, but is better suited for
  professional cd pressing services.
* I'm releasing these as MIT to be clear

Change-Id: Ibd5248fc7248de6697dd65e8ccae1ba1ae623702
2021-11-04 09:18:28 -05:00
Jérôme Duval 91e93cb7c4 Terminal: handle cursor-color
Change-Id: I73071880c84c713ee3efec40f6ac824364157b83
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4685
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-11-04 06:46:01 +00:00
Alexander von Gluck IV 38eb9fb0eb boot/ppc: Cleanup paths, use hfs vs hfsplus
* Move assets to new boot directory
* -hfsplus not valid anymore on cdrtools 3.02
* Throw down some forth I saw in an *old* fedora 12
  chrp script.  If we ever target ppc64 it might be
  handy someday. The text output also lets you know
  the cd booted successfully.

Change-Id: I169d887fe8373de1719b98305d01b714f6f6bcbe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4681
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2021-11-03 13:58:48 +00:00
Alexander von Gluck IV af222f6e31 kernel/ppc: Fix missing symbols after hrev55605
* Stubs for now with todo's matching sparc port

Change-Id: Ie1c0ea523e26fd16066acb26dd83735b89800f31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4680
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-11-03 13:58:48 +00:00
Murai Takashi f5b37553ec lgtm.yml: update prerequisite software
Change-Id: I3f6e1446d7fcd2256c0bc8fa982605ea1501fa6a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4683
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-11-03 11:48:19 +00:00
Rudolf Cornelissen 661732341f intel_extreme: haswell and skylake DDI EDID support added, modesetting not finished yet. 2021-11-02 20:04:37 +00:00
Adrien Destugues 3457006a9a WebPositive: fix linking with static libraries
Some symbols were available because they were reexported by haikuwebkit
1.8.2, but they won't be exported anymore in the next releases. So we
need to link to libnetservices.a directly, and link to it before the .so
files to make sure the symbols from the static library are used.
2021-11-01 18:15:00 +01:00
David Karoly 264451d95a kernel: fix loading kernel add-ons on arm
Change-Id: I60cc1c1aa9d4298453aece0456ce7ee74fc95a34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4659
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>
2021-10-31 18:03:59 +00:00
PulkoMandy c00a982d2a kernel: do not allow undefined symbols
If there are undefined symbols, we can't load the kernel (the bootloader
complains about missing relocations). It makes sense to not allow that
at compile time.

Change-Id: I430bebada16544ffa8be293cd6c075338970d8ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4668
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-31 15:28:05 +00:00
PulkoMandy f240512a53 sparc: add more relocation types
Change-Id: I32be0b466bfcd1d3b481eea25e96d485658be0a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4676
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-31 15:28:05 +00:00
Rudolf Cornelissen e8e44117c8 intel_extreme: probe EDID again so DDI will fail restoring screen on some systems (workaround) 2021-10-31 12:21:28 +00:00
Rudolf Cornelissen 721918869c accelerants common: fix crash on x86 i2c tracing 2021-10-31 00:45:52 +00:00
Augustin Cavalier 7d41530f62 openfirmware: Refactor console implementation following bootloader changes.
Confirmed working on sparc

Change-Id: I60bf82978ccf967e7e10611f6360cadccf22d15d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4667
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-28 20:06:38 +00:00
David Karoly 9aba9395e7 boot/efi: fix alignment exception on arm
Change-Id: I8384433c4bed474c3cb82bc8451ecde9a47bcff8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4656
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-28 11:07:50 +00:00
David Karoly c8e72ef924 kernel/arch/arm/paging: ARMVMTranslationMap32Bit::QueryInterrupt shall return page start address
Change-Id: I8949518c563b367b8b84f3728ae1e923e49044ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4666
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-28 11:06:40 +00:00
Augustin Cavalier 52f94eb19e nvme_disk: Add missing checks in the case where there is only one iovec.
May fix the remaining KDL in #16973.
2021-10-27 14:54:02 -04:00
Augustin Cavalier 535b7dc9d3 nvme_disk: Include smp.h.
It is implicitly included on x86_64, but apparently not elsewhere.
Also fix a format warning.
2021-10-27 14:02:01 -04:00
Augustin Cavalier 9bc2885cd4 nvme_disk: Allocate and utilize qpairs based on how many CPUs we have.
This replaces the previous round-robin system. It should reduce
lock contention on multi-core systems, with potential other
benefits depending on drive behavior.

FreeBSD's NVMe driver does basically the same thing.
2021-10-27 13:38:28 -04:00
Augustin Cavalier 18851359d0 nvme_disk: Add the block size and count to the syslog output upon opening devices.
Since we do not entirely go through DMAResource, these numbers can
be relevant in diagnosing problems from tickets.
2021-10-27 12:59:00 -04:00
Augustin Cavalier 5250914df7 nvme_disk: Remove redundant check.
If the address % pagesize == 0, then clearly it is also aligned
on 32 bits, and we do not need to check & 0x3.
2021-10-27 12:41:26 -04:00
Augustin Cavalier dab646ac9a nvme_disk & virtio_block: Remove unneeded log2.
It was used, but then the result discarded. We have a log2()
in kernel/util/BitUtils.h anyway, so if it is really needed,
that should be used instead.
2021-10-27 12:40:31 -04:00
Augustin Cavalier 6bef34f853 launch/user: Put env in both target desktop and service app_server.
It seems launch_daemon does not actually support root "env"s,
and adding support for that does not appear to be trivial.
2021-10-27 12:33:51 -04:00