Commit Graph

64111 Commits

Author SHA1 Message Date
Augustin Cavalier
50d29435e9 app_server: Mild cleanup to ScreenManager.
The #ifdefs for test mode are now more appropriately located.
2022-07-06 19:53:30 -04:00
Augustin Cavalier
5c3aa92735 app_server: Refactor and improve graphics device iteration.
* Do not open() devices while looping but only open() the one
   we were actually asked to open.

 * Try the VESA or Framebuffer driver even if deviceNumber is something
   other than 1.

 * Start iterating at 0 instead of 1 following loop iteration changes.

Ideally this iteration should occur a completely different way, in order
to properly support multiple graphics cards, but that's a problem for
another day.

Fixes #4303.
2022-07-06 19:52:23 -04:00
Augustin Cavalier
ab8109c152 app_server: Fix build of test_app_server. 2022-07-06 18:10:14 -04:00
Augustin Cavalier
a68b6c2579 app_server: Move DWindowHWInterface and ViewHWInterface to a subdirectory.
AccelerantHWInterface and the Remote engines already did this.
These are not used at all outside of test_app_server, so we do not
need to even compile them in to the regular one.
2022-07-06 17:56:12 -04:00
Augustin Cavalier
40d99076df openbsd_network: Move mbuf_list and mbuf_queue into mbuf-obsd.h. 2022-07-06 17:23:40 -04:00
Augustin Cavalier
0297582112 openbsd_network: Implement two mbuf macros in terms of FreeBSD ones. 2022-07-06 17:07:49 -04:00
Augustin Cavalier
41d93c5ed1 freebsd_network: Do not deinitialize USB if we never initialized it.
Fixes some "mutex not owned" KDLs seen on deinitialization.
2022-07-06 16:03:46 -04:00
Augustin Cavalier
19453ce798 freebsd_network: Unlock taskqueues before final destruction.
This is needed for MTX_SPIN taskqueues.
2022-07-06 16:03:46 -04:00
Máximo Castañeda
ab52604b90 arm syscalls: add explicit dependency
Some syscall headers are generated during the build process, and jam is
not smart enough to add an automatic dependency.

Change-Id: I7c19da7aca9da4a52c4537a5f5c279fdbe24a48a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5435
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 18:03:45 +00:00
Augustin Cavalier
f5eecfe4ea openbsd_network: Remove shadowing variable. 2022-07-06 13:42:43 -04:00
Augustin Cavalier
138d4bbd68 nvme_disk: Refactor 64-bit BAR handling into nvme_pcicfg_get_bar_addr_len.
Then invoke this function in nvme_pcicfg_map_bar instead of duplicating
the logic.
2022-07-06 13:42:43 -04:00
Jim906
5e0c100f78 BFilePanel: use position from FilePanelSettings
* Set a flag if TFilePanel::RestoreState successfully reads the
  FilePanelSettings file.
* Check for this flag in BFilePanel::Show.
* Part of #17374.

Change-Id: I4431c01f9282fe411fa7b30667215bba9249bd96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5433
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-06 16:03:10 +00:00
Augustin Cavalier
d6fedd7fcf Userguide CSS: Fix banner color. 2022-07-06 12:01:20 -04:00
Pascal Abresch
05844f660c Userguide CSS: add dark mode
Change-Id: I94c308ea22a304f061544a28e1490b9c004191d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5329
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 15:49:23 +00:00
Augustin Cavalier
06b68f46f9 kernel/fifo: Add missing check for B_SELECT_READ in Deselect().
This should have been part of 27fda3e46f.
Fixes #17826.
2022-07-06 11:13:00 -04:00
Augustin Cavalier
6fd4a3eea9 XHCI: Set the DIR_IN bit on Status Stages even if there is no data.
The referenced section of the specification gives no indication that
the bit should not be set if there was no data; indeed it indicates
it should always be set.

This brings our behavior here in line with other OSes seem to do.

Change-Id: I86b2eb2a6a5fa3af84fd0941e0a3ec601c7037bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5421
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-04 17:14:45 +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
David Karoly
1b95b1e857 kernel/arm/int: convert TRACE to new syntax and hush
Change-Id: I8945ad621aee2bc1c8d8852bb1c220936e567d86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5430
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-04 07:00:03 +00:00
Augustin Cavalier
e0a405d765 openbsd_network: Use the new bus_dmamap_sync_etc.
This preserves the semantics of partial syncs. Unfortunately in my
testing it does not seem to improve the packet loss I was seeing...
2022-07-01 23:16:28 -04:00
Augustin Cavalier
b12b802c4d freebsd_network: Add an extended bus_dmamap_sync API for partial syncs.
To preserve proper semantics with the OpenBSD layer, this is needed.
2022-07-01 23:15:07 -04:00
Augustin Cavalier
7ff2f10462 OpenBSD wlan drivers: We cannot back out of initialization at preinit.
Otherwise we get KDLs. Fixes #17811.
2022-07-01 22:09:06 -04:00
Augustin Cavalier
27fda3e46f kernel/fifo: Properly support opening FIFOs in O_RDWR mode.
While pipe() only supports a read end and a write end, named FIFOs
are supposed to allow opening in read/write mode (which, indeed,
is something the Fish shell seems to require.)

The code that checks open_mode in the read/write routines was introduced
all the way back in 2003 (2469f26dfc).
At that time, the VFS did not do open_mode checks on FDs in the
I/O syscalls, so these doubled as permissions checks. Now, however,
the VFS does check that in common_user_io, so we can remove these
entirely and let things behave as they should.

Additionally, there is now also no reason to prevent select()ing
on both events for the same FD independent of open_mode, so
allow that too.

Change-Id: Ib3cba76d18e91b7c00d1695e8d29dd47cae06b79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5427
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-01 18:57:28 +00:00
David Karoly
fe3405c087 kernel/arm: ensure page dir is correctly aligned
Page directory physical address must be aligned on 16K and
it must be mapped to a contiguous physical region.

Change-Id: I6723023c9deaa1c4a1081cf5a984a1766241a532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-01 18:39:30 +00:00
Jérôme Duval
0db74b55dc btrfs: fix SMAP violation, reading inline uncompressed data
should fix for #17061

Change-Id: I5973be6c443e8cf4460c6a3aca7b5378e90d717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5426
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:47:08 +00:00
Jérôme Duval
374a3a07a1 libtracker: don't try to fix permissions on read-only volumes
* instead try to guess the type, find the app, and launch the app with the document refs.
* fix #5783

Change-Id: Icd25a81ff28038fec0494045390edc6271433b07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5425
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:47:08 +00:00
John Scipione
3571cd8a6b StyledEdit: Add comment explaining MakeFocus() loc
... to explain hrev562209 by Jim906 which fixes #17733
StyledEdit: give initial focus to the TextView

No functional change

Change-Id: Id428290d8d3530e5ef9213489625c1968984d323
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5422
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:38:41 +00:00
Alexander von Gluck IV
946bd9ab3c HaikuPorts: bump arm build-packages via davidkaroly
* Downgrades icu-67 to 57 given crashing issues
  (riscv64 saw similar issues, cause unknown still)

Change-Id: I7927c7892fa517e5c51f86082b4df5977af92eb2
2022-06-30 07:56:05 -05:00
Jérôme Duval
187f73dbf5 bfs: take in account the block_run allocation group when computing reserved blocks.
after hrev56221, the block bitmaps can span over multiple allocation groups.
Blocks would be allocated in the block bitmaps, especially root indexes (for instance 2.5TB, blocksize 2k).

Change-Id: I35d21d48e84945e5f949a272d530c466ae6506ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5420
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 08:25:12 +00:00
Augustin Cavalier
2884a00088 ralinkwifi: Import USB modules.
Not entirely sure if these are working as they were not really tested.
But they don't seem to cause KDLs at least, so the worst that happens
is that the WiFi devices fail to work.
2022-06-29 13:17:15 -04:00
Augustin Cavalier
e410069738 freebsd_network: Implement USB routines needed by Ralink USB modules.
Tested by nephele with a RT2573. The device starts and scans for networks,
but hits some USB errors probably related to buffer sizing which I'm
not quite sure what the cause of could be. More work (by someone who
owns these devices) may be required.
2022-06-29 13:16:13 -04:00
Augustin Cavalier
db4df8fcf5 freebsd_network: Use the real usb_endian.h.
Turns out some FreeBSD drivers use these macros on types other
than the ones declared in this header and expect them to behave
as array accessors, so we really do have to keep the originals.
2022-06-29 13:14:47 -04:00
Augustin Cavalier
00096a9d1f USB: Add default max packet size for SuperSpeed bulk endpoints.
We already had one for High-Speed endpoints, but SuperSpeed endpoints
also have a fixed size, similar to Control endpoints.

May help with some devices failing to configure.
2022-06-29 10:36:36 -04:00
Jim906
5b5da451b3 StyledEdit: give initial focus to the TextView
* Move the existing MakeFocus call to after the window layout is built.
* Also, add calls to Activate so that StyledEdit becomes the active
  window after its find or replace window is closed/hidden, even if
  another application is set to 'always on top.'
* Fixes #17733.

Change-Id: I8380e8ce2760ffa3f3467a618a0d843826e4ac99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5416
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-29 06:44:08 +00:00
David Karoly
84360889a2 ldscripts: remove linker script for Raspberry Pi
This linker script was introduced in commit 5426ff9 in 2012
predating both the EFI and the raw u-boot ARM loader,
at that time it seems that it was intended to be used
as part of a 'raspberrypi_arm' boot platform which does
not exist anymore. So this is not needed anymore.

Change-Id: I530e922807fe6d80f74248f2dc7ed25cdc8bcb1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5419
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 17:10:40 +00:00
Trung Nguyen
908107a15f libs/bsd: implemented dl_iterate_phdr
dl_iterate_phdr now fills the first four fields of
struct dl_phdr_info. The last four fields remain
unimplemented, as it requires help from the
runtime_loader.

Change-Id: Id96a7c7ac05633a71b9fb62c98b3a40f7d4f255b
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2022-06-28 13:07:54 -04: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
Mikael Konradsson
c5702ad4e8 DiskProbe: Clean up old compiler pragmas for BeOS and Dano.
Change-Id: I0c8a4ce6c8d1c8994e2f89a4d35db3ac0ae03117
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 16:48:33 +00:00
Augustin Cavalier
63816858af boot/platform/u-boot: Drop ARM support.
Newer versions of u-boot support EFI natively, which is what we
have been making use of instead.

There may be some use for the "native" u-boot loader still on PowerPC,
but otherwise the EFI support is much more advanced and even in u-boot
supports as or more features than "native" loaders, so there is no
reason to keep this around.
2022-06-28 12:27:06 -04:00
Alexander G. M. Smith
7c09ef1255 FAT: Fix 32 bit gcc2 compile.
You can't initialize struct fields in the declaration in gcc2, but you
can set them up in a constructor.  So made one for struct diri,
and initialize nested sub-structures too.

Change-Id: Ic8b824bc157cca4cdb8c4e41afdca596776c0d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4995
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 15:40:41 +00:00
X512
4ac797a9cf kernel/arch/riscv64: implement breakpoint interrupt
Change-Id: I1e9f33e505a1de4be2e77535efe36bae96a982ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5293
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2022-06-28 15:38:55 +00:00
David Karoly
0d560e87ee kernel/lib: add missing musl include
This is needed to fix the build on arm as atomic_arch.h
relies on musl libc.h and features.h

Change-Id: I5bfa32b7b0fa1662cc9ee8cd8fa3037d8a5e2431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5418
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-28 13:35:42 +00:00
Jérôme Duval
b5417d2089 bfs: don't allocate more than the maximum in an AllocationGroup
* The reserved blocks could exhaust the first allocation group, so iterate as much as needed.
* fix #11753

Change-Id: Ib1d7f87946f7b96dfcade8f5778a14065d965f6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-28 06:02:19 +00:00
Jérôme Duval
1e68c512da runtime_loader: accept type STT_FUNC when STT_OBJECT is requested
trying to load a PIE executable produced by golang show the following (for pthread_create)
    12: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND pthread_create
 12655: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND pthread_create

It's the same for Linux or Solaris, so I suppose we're being too picky.

Change-Id: Ibe817c231365aba8b2eb88eb3f556d2bd1db384a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5392
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-06-28 06:02:01 +00:00
Mashijams
6c478b54f6 xfs: version 3 Inodes and shortform directory
- Implemented xfs v5 inodes (known as v3 inodes) and necessary metadata integrity checks

- Implemented correct data fork pointer which handles both xfs v4 and v5 directories

- We can now read inodes and shortform directories for both xfs versions completely fine

Change-Id: I8a75ec1dc663d567d3bf6db64be4a27b55d709b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5396
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-27 15:00:30 +00:00
Gerasim Troeglazov
e511f0c1cb usb_serial: add WinChipHead (CH340/CH341) support
Fixes #15872.

Change-Id: I3b43094574045464ca0d3e024f8b5aac32ce5210
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5401
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-27 09:15:58 +00:00
Jérôme Duval
caf0369a89 ext2: check volume state when mounting
we deny mounting read/write when not clean or with errors.

Change-Id: Ie0188319618d9d8e7199b308c007fbaeacaed87c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5400
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-06-25 20:16:06 +00:00
Jérôme Duval
732f5f0f87 ext2: accept block count until the disk size plus one
my understanding is that it's possible that the last block (for instance of size 4KB)
is too large for the last few partition sectors, if the partition size isn't a multiple
of the block size.

Change-Id: I88c709d6e449aa52358fd9343c9f68f7ac1c01fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5399
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-25 20:16:06 +00:00
Jérôme Duval
442298d494 kernel/devfs: improve devfs_compute_geometry_size
the old code could lead to an odd head count, thus a smaller partition size.
with power of two, this works at least accurately if the size is aligned.
we should probably introduce a new ioctl or extend the current one to avoid this problem.

Change-Id: Ia6c034262b1756e901d6ad76ab17b278b2314631
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5398
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-25 20:16:06 +00:00
Autocomitter
faefd309d9 Update translations from Pootle 2022-06-25 08:11:32 +00:00
Jérôme Duval
d2e5fc7fa4 usb_disk: add support for drives bigger than 2TB
* tested read/write with a NTFS partition at the end of a 5TB USB hard disk.
* fix #14670

Change-Id: Ic005dfb7ef94b50a2d6fc8099ef5c83ec6b4a730
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5397
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-25 07:05:26 +00:00