Commit Graph

64024 Commits

Author SHA1 Message Date
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
Jérôme Duval
e49b671dcf kernel/vfs: lstat a symlinked dir with a trailing slash should traverse
golang's TestSymlinkWithTrailingSlash exhibits the bug.

Change-Id: I7e16bad9857e9be042fc215a587c861bc4eef716
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5395
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-24 08:31:44 +00:00
Augustin Cavalier
c95c5ed821 idualwifi7260: Merge patch from OpenBSD for some 9xxx devices. 2022-06-22 14:34:17 -04:00
Augustin Cavalier
a928b16e36 freebsd_network: Unlock the taskqueue before waiting for threads.
Also set tq_threads to NULL to prevent double-frees.
2022-06-22 00:34:37 -04:00
Augustin Cavalier
7e1c1d3020 openbsd_network: Adjust reference-taking in bus_dmamap_load_mbuf.
dm_segs is a flexible-length array at the end of a structure.
Taking its address with & gives the same address as using it without,
however, the types are not identical in the different cases.

This should fix some warnings about incompatibile pointer types
while not changing behavior.
2022-06-21 23:23:02 -04:00
Augustin Cavalier
4b6af34c06 kernel: Move aligned_alloc to heap.cpp alongside calloc.
It is independent of whatever heap implementation is actually in use,
so it belongs in here (even if this file is probably not the right
place for such functions in the first place.)

This allows the kernel to be built once again with things other than
the default slab heap.
2022-06-21 22:59:57 -04:00
Augustin Cavalier
8e059bfa63 ralinkwifi (ral): Upgrade to FreeBSD 13.1
One new device ID.
2022-06-21 17:34:52 -04:00
Augustin Cavalier
b071913066 freebsd_network & drivers: Remove need to specify FBSD_TASKQUEUES.
Instead make FBSD_TASKQUEUES a combination flag of all taskqueues,
so that if even one is needed, the init_taskqueues function will
be invoked appropriately.
2022-06-21 17:22:37 -04:00
Augustin Cavalier
b4bf3ed0d5 drivers/network: Adjust all HAIKU_DRIVER_REQUIREMENTS for taskqueues.
Many of these did not need taskqueues at all. Others can hang off
the WLAN feature's implicit usage of taskqueues.
2022-06-21 17:12:29 -04:00
Augustin Cavalier
0163191229 freebsd_network: Rework taskqueues implementation.
* Use FreeBSD's queue management directly, only retaining thread
   creation and synchronization functions from Haiku.

 * Use FreeBSD's task structure declarations.

 * Use a standard non-FAST taskqueue for taskqueue_thread.

 * Rewrite header and adjust consumers as appropriate.
2022-06-21 16:17:50 -04:00
Augustin Cavalier
ed20f6660f glue: Add comment that argv_save and __main_thread_id need not be set here.
But they still are so the glue code is compatible with older Haiku versions.
2022-06-21 13:16:07 -04:00
Jérôme Duval
032b1422c2 kernel/device_manager: don't insert device node before nodes of the same priority
fix #16512

Change-Id: I76ce4cfc9346492008c11ca53302ca4df6a6b514
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5393
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-21 16:55:01 +00:00
Augustin Cavalier
c27c987075 freebsd_network: Fix address restriction computation in bus_dma.
The min/max usage was reversd from what it should be. This
would have led to the least restrictive restrictions being the
ones that were checked, instead of the most restrictive.
2022-06-21 12:24:04 -04:00
Augustin Cavalier
2c81f88085 freebsd_network: Clean up bus_dma restrictions implementation.
* Remove support for filters (again): they are deprecated in FreeBSD
   and no driver we have uses them. This allows the loop in the
   _validate_address function to be dropped entirely.

 * Clean up parent tag handling logic.
2022-06-21 12:24:04 -04:00
PulkoMandy
e866d6e941 ps2: disable keyboard during multiplexing probing
My machine does not have an AUX/Mouse port at all. As a result, the
commands all get sent to the keyboard, which confuses the keyboard and
it eventually resets. This is generally harmless, but it ends up
resetting the keyboard, which cancels the effect of the commands to set
the repeat rate and delay during boot.

By disabling the keyboard during this step, we can avoid interference
with it.

Change-Id: Ic0513972a31e030a15577477c3d3fe32d4ce9bd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5387
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-21 15:52:53 +00:00
X512
b2059b9f15 libroot: set __main_thread_id in libroot initialize_before instead of entry point
DT_INIT, DT_INIT_ARRAY, initialize_before, initialize_after are called before
executable entry point so __main_thread_id may be uninitalized there. It cause
getpid() to return zero if called in one of image initalizers before main().

Fixes #11797.

Change-Id: Ia745db9ffeaeb6de4dd46b868b1575d0780b54d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5254
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-21 11:49:50 +00:00
Augustin Cavalier
b3dab377a9 idualwifi7260 & iaxwifi200: Enable PCI busmastering.
The FreeBSD KPIs that we emulate expect this to be done manually,
so we have to do it before we begin doing PCI access.

Fixes firmware load failures and device initialization problems
since the introduction of the OpenBSD driver replacing the FreeBSD one.
2022-06-20 17:17:20 -04:00
Augustin Cavalier
561bb7bac5 idualwifi7260 & iaxwifi200: Do not return but go to the appropriate fail.
This way, we will actually tear down what state got initialized.
2022-06-20 17:15:45 -04:00
Augustin Cavalier
22bdb7ba70 iaxwifi200: Add missing if_free_inplace on deinit.
It may make sense to place this later so that we don't need to add
another goto label, but that can be experimented with later.
2022-06-20 17:14:53 -04:00
Augustin Cavalier
891bd14810 packages/Haiku: Clean up WiFi firmware rules.
* Nothing uses the plural forms anymore, so drop them.
 * Nothing uses the "PACKAGE" field, so drop it.

Once the Marvell driver is migrated to use a package instead of the
archive, we can drop even more of this related to HAIKU_WIFI_FIRMWARE_DO_EXTRACT.
2022-06-20 13:27:13 -04:00
Augustin Cavalier
33d311a64b HaikuBootstrap: WiFi firmware rules not needed.
The WiFi firmware rules are only needed for a few very old drivers.
Any devices we are going to bootstrap on will use one of the wifi_firmwares
packages instead.
2022-06-20 13:25:58 -04:00
Augustin Cavalier
2e1033fcf1 idualwifi7260 & iaxwifi200: preinit() can fail.
This will prevent the device from even appearing in Network preferences
if firmware loading does not work.
2022-06-20 13:04:00 -04:00
Augustin Cavalier
f578843da4 idualwifi7260 & iaxwifi200: Use the Haiku gDriverName instead of hardcoding.
This also will fix what name appears in the syslog.
2022-06-20 13:03:20 -04:00
Augustin Cavalier
7ac9dc6612 freebsd_network: Use a dedicated USB mutex instead of &Giant.
Fixes #17804.
2022-06-20 13:02:32 -04:00
Jérôme Duval
177a801206 kernel: fix trace build for fd.cpp and fifo.cpp
Change-Id: I12b2e85926ae63eaba5c077343cdaa2362cf8af1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5391
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-20 15:29:43 +00:00
PulkoMandy
a3d84aba73 ps2: improve tracing
Change-Id: I3991e1974ac4af2ba00d692284bfcf00e5b4cc84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5386
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-20 02:48:03 +00:00
PulkoMandy
d2837c97b7 Interface kit: allow get_key_repeat_{rate,delay} to fail
These functions should return an error if the input_server is not
running. They still give the default value in this case, but they now
return an error code.

Change-Id: I706cded7c780d913d4f36164596b2b7794db6f22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5385
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-20 02:48:03 +00:00
PulkoMandy
81f9c26a70 Input server: remove some dead code
This does nothing, keep the TODO but remove the useless code.

Change-Id: I14611289e1153e406ff7dec93729bceedef7d9af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5384
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-20 02:48:03 +00:00
PulkoMandy
3f18d506fa Input preferences: remove dead code
The old keyboard preferences used to save its window position in the
keyboard_settings file. The new Input preferences does not, but part of
the code had not been removed yet so it would still open the file (and
then do nothing with it)

Change-Id: Ic5e1d6bd6a8452bd779dc73872148d5c32ab12e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5383
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-20 02:48:03 +00:00
Alexander von Gluck IV
774c33c2a7 radeon_hd: Drop unused overlay, cursor registers
* Also drop unused vblank semaphore storage
* Spotted by X512. These are from intel_extreme
  which was used as a base *ages* ago.

Change-Id: I2a6baaa4849baeb8c8cf10e2046d0fbe10c3a356
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5389
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-06-20 02:46:55 +00:00
PulkoMandy
ea56f5e0be kernel: replace Spleen font with an enlarged version of the original KDL font
Recently we introduced Spleen as a larger font for KDL for high
resolution displays. However, it looks quite different from our original
font. I designed an enlarged version of our original font (designed by
Brian J. Swetland and also found in NewOS, LK and Fuchsia) to use
instead.

Change-Id: I10872e407d45b906f8b6c7ba44b2f993dcd19bff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5382
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-19 08:38:46 +00:00
Javier Steinaker
702ff4212d NetworkStatus: do not show non-present interfaces
Used explicit type declaration instead of auto and old style
map erase() function to (hopefully) make it compatible with gcc2 builds.

Change-Id: I8314665a3a3468f11bcac11367ee69d9a3ed2a05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5380
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-19 08:32:53 +00:00
Mashijams
9c4a46b318 xfs : version 5 superblock, checksum header file
- Implemented version 5 superblock fields and necessary macros.

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

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

Change-Id: I49b7c939bfd3ea1bffc85b3db42bc678dcce75cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5350
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-18 08:32:18 +00:00
Augustin Cavalier
ac2215ca09 ifconfig: Place generic options at the end of the media types list.
Otherwise we will get "Auto-select" even if something more specific
applies, e.g. in the case of IFM_IEEE80211 at least.

Fixes media type detection for OpenBSD drivers.
2022-06-15 21:07:50 -04:00
Augustin Cavalier
07b1a21775 EHCI: Do not ignore status of PrepareKernelAccess.
May help with #17799.
2022-06-14 15:26:27 -04:00
Augustin Cavalier
d621ee6564 freebsd_network: Move up Giant ownership during attach.
device_attach can be recursed for MIIbus drivers, so avoid the complexity
and lock Giant from init_drivers() instead.
2022-06-14 00:34:46 -04:00
Augustin Cavalier
c6c03b01c3 freebsd_network: Validate ranges but not alignment when coalescing in bus_dma. 2022-06-14 00:30:14 -04:00
Augustin Cavalier
e206b2f350 freebsd_network: Always hold the "Giant" lock during attaches.
Reduces patches to OpenBSD drivers slightly, and could potentially
help with some of the KDLs.
2022-06-13 23:57:37 -04:00