Commit Graph

63188 Commits

Author SHA1 Message Date
John Scipione
f6f9c751d6 Remove trailing whitespace from hid_shared
Introduced in https://review.haiku-os.org/c/haiku/+/4403

366e9a62e9 => hrev55413

This is a whitespace only change, no functional changes.
2021-10-22 11:12:24 -04:00
Augustin Cavalier
0d66d8d486 boot_loader: Add a video_text_console for potential use by bootloaders.
This uses the frame buffer console that KDL uses. It needs some work,
though, as the frame_buffer_console colors system is not quite compatible.
2021-10-22 10:43:27 -04:00
Augustin Cavalier
c80ba94c64 boot/arch: Remove kernel_stubs.cpp and frame_buffer_console.
They were never used anywhere.
2021-10-22 10:43:27 -04:00
PulkoMandy
2adb6e18db sparc: update haikuportscross to current state of repository
Most importantly include zstd, which is a new requirement for the
bootstrap build.

Change-Id: I981401e7d70fb7e1befaf7fc37f2fddc6d7e327d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4635
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 13:59:19 +00:00
PulkoMandy
60533c0e15 remove libicutu from icu build feature
This is an internal ICU library, used by their command line tools only.
libbe (or anything in Haiku sources) does not need to link to it.

Change-Id: Id322572c6833c225d5501a7e9520dd3dc82934f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4634
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 13:59:19 +00:00
David Karoly
375c212924 kernel/arch/arm/paging: fix a few typos
Change-Id: Ia6c51f1d24f5a365564f127199df898c5531f274
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4640
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-22 12:02:27 +00:00
David Karoly
09e797786e virtio-mmio: fix compile error when TRACE is enabled
Change-Id: I8ac0497f8aa26e9e2b843c34771b83ca9baaa6d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4641
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-22 12:01:43 +00:00
David Karoly
4d81ddab4f boot/efi: initialize mmu for arm
Change-Id: I918a459dfb4e5d0864ae4c8b806df059248d43b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4630
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-22 11:22:10 +00:00
David Karoly
d88e69ae11 boot/efi: generate page tables for arm
Change-Id: I975048d7721efc0557d60d27ddf5bd5296aa9e51
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4632
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-22 11:21:02 +00:00
David Karoly
e6520f9064 boot/efi: generate memory map for arm
Change-Id: I02a7f8c27187f6375dd4deeeaf3587dad1e3349c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4631
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 08:42:04 +00:00
John Scipione
02ad92185d Network: Sort network menu items w/o deleting
* Delete dropped out networks.
* Add in newly discovered networks.
* Add static (aka class) compare method to WirelessNetworkMenuItem
  that is used to sort items by signal strength descending.

Add == operator to wireless_network struct to determine if
existing items have a known network attached.

Remove the non-network items from the menu, save them, sort
network menu items, then add non-network items back into the
menu.

Update NetworkStatus preflet to use same compare method as Network
preflet. signal_strength_compare function had a bool return value
instead of int which worked to sort items the first time, but does
not work on successive compares.

By not deleting and recreating the menu items each Pulse(),
the Network preflet no longer crashes on update. The menu flashes
on update still but doesn't crash.

Fixes #12024

Change-Id: Ie5b22cea4e66350b9c5df8e3b8de266ede50ad6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4243
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-10-22 08:12:05 +00:00
John Scipione
0a53cbb3b9 BMenu: Add SortItems(), SwapItems() and MoveItem()
... methods which call the respective methods in BList.

These convinience methods allow you to sort a menu of menu items
via a compare function, swap two menu items, or move a menu item
to a new index. Update items layout if menu is open.

Previously there was no easy way to rearrange menu items in a menu.

Change-Id: Ice3d6e5404e895196d8bd32d696dce7c55bd72d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4296
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-10-22 08:12:05 +00:00
Fredrik Holmqvist
51d591cdfe Add zstd for arm64 bootstrap
Currently doesn't buld due to problems with gcc neon headers though.
2021-10-22 08:25:09 +02:00
Augustin Cavalier
7916c1ca0f Rename ar81xx to atheros81xx.
The other Atheros drivers are "atheros813x" and "atheroswifi",
so renaming this one (which is the oldest of the set) to match
the other two makes sense.
2021-10-21 17:19:58 -04:00
Augustin Cavalier
eeda728f3d network/ether: Import igc from FreeBSD as "intel22x".
This is the driver for Intel's new line of desktop-class ethernet
controllers, from FreeBSD. Not yet included in the builds as it
is untested.

Part of #17212.
2021-10-21 17:10:26 -04:00
Augustin Cavalier
cbe0a0c436 drivers/network: Move ethernet drivers to an "ether" subdirectory.
Now that there is also a "tap" driver in here, and the WiFi drivers
are also in a subdirectory, moving the physical ethernet device drivers
to a subdirectory also makes sense.

(Briefly) discussed on the mailing lists.
2021-10-21 17:10:26 -04:00
Augustin Cavalier
7f2cd1318e radeon_hd: Trim down register headers to only have what is needed.
This cuts out almost 40,000 lines of these headers. (I did something similar
in the atheroswifi AR93xx/94xx driver when importing it from FreeBSD,
which had a lot more than 40,000 lines.)
2021-10-21 17:10:24 -04:00
Adrien Destugues
0f6f5adb50 generic/tty: restore lock sharing between master and slave TTYs
The code in this module was derived from the one in driver/tty. However,
the driver uses a shared lock between the master and slave side of a
TTY, and this was changed to use two separate locks. The approach with
two locks does not work. It seems the change was unfinished and the
second TTY was never locked. But attempting to lock it will result in
lock inversion problems, unless we do complicated things (try to find
which of the two TTY is the master side, and lock that first, for
example). It is simpler to restore the shared lock as used in the
driver.

To set up the shared lock, I modified the tty_create function to take a
pointer to the master TTY when creating the slave. Maybe it makes more
sense to create both sides in the same call, create_tty_pair?

However, this does not work as easily as I wanted, because there is some
recursion going on: at least in one case, the tty_control function is
calling the driver's tty_service function, which in turns attempts to
call back into tty_control for the "other side" TTY. To handle this
case, replace the mutex with a recursive_lock.

Fixes #17091, where the root problem was access to
other_tty->select_pool without locking. This was also made unconvenient
to debug because select_pool objects are self-deleting, when the last
item in the pool is removed. As a result, the code accessing it without
log would suddenly find out that the data it was accessing had been
freed and erased.

This also makes the TTY code in driver/tty and generic/tty a bit more
similar than it was before, and brings us one step closer to merging the
two together. There are still two main differences and I don't know
enough about TTY to decide if they are important, and which version
should be kept:
- The driver has extra code for "background" read and write. I don't
  know what this is used for.
- The driver has a single "settings" instance shared by a master and
  slave TTY, while the module has two separate instances, but seems to
  copy one to the other. I'm not sure which approach is correct.

Change-Id: Ie2daddd027859ce32ba395af76b4f109f8b984b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4604
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-21 14:49:15 +00:00
Adrien Destugues
c0ec37dcbc tty: fix construction/destruction
There is no need to construct and destruct nested objects. The new and
delete calls on the struct will take care of it. However, some fields
have C functions for construction/destruction and these should be
called.

Change-Id: I09d5930f499ef3fa4ff580d482c682172b00b6a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4603
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-21 14:49:15 +00:00
David Karoly
441e6e676d arch_uart_8250_omap: fix includes
Change-Id: Ib86d86b4497a46902c3f8d3dd77241f55504d702
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4620
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-21 09:10:38 +00:00
David Karoly
d5bac4fd07 kernel/arch/arm: fix build - comment out fdt stuff as it's completely broken now
Change-Id: I8c0c5da0a915969176afea9e0e2cc2f831a18d59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4619
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-10-21 09:09:24 +00:00
Augustin Cavalier
d37e23576c Tracker: Use strlcpy in FSMakeOriginalName.
Suggested by axeld on the mailing list a while back.
strlcpy/strlcat NULL-terminate within the passed buffer size,
so we have no need to subtract 1 here.
2021-10-20 21:04:44 -04:00
Alexander von Gluck IV
82df3fc639 radeon_hd: Add polaris HPD on transmitter config
Change-Id: I899e75c1556acc3462812ee6503dd1b782af2a96
2021-10-20 19:53:04 -05:00
Alexander von Gluck IV
cddcb186c9 radeon_hd: Add missing UNIPHY3 encoder on transmitter table 1.5
Change-Id: I3edbc5338ba2e4611939952999278575f3cc4220
2021-10-20 19:53:04 -05:00
Augustin Cavalier
c075437b4c network/Jamfile: Note which drivers have been upgraded to FreeBSD 13. 2021-10-20 20:38:40 -04:00
Augustin Cavalier
db2ce6f9ef ipro1000: Upgrade to FreeBSD 13.
Includes support for new generations of devices. Tested in QEMU
with e1000 and e1000e NICs.
2021-10-20 19:13:19 -04:00
Augustin Cavalier
82046b272c freebsd_network: Add pci_msix_table_bar().
Needed by the e1000 driver from FreeBSD 13. Tested in QEMU with e1000e.
2021-10-20 19:13:19 -04:00
Augustin Cavalier
047ebd5ac7 atheros813x, broadcom570x, rtl81xx: Upgrade to FreeBSD 13.
The changes for iflib reorganized some things that these drivers used,
so here we upgrade them as well.

One new chipset is supported in rtl81xx, the rest should all just be
API changes.
2021-10-20 19:13:19 -04:00
Augustin Cavalier
2155cf671f freebsd_network: Add new APIs used by FreeBSD 13 drivers. 2021-10-20 19:13:19 -04:00
Augustin Cavalier
b14f1ca97c freebsd_iflib: Upgrade to that of FreeBSD 13.
ipro1000 still works.
2021-10-20 19:13:19 -04:00
Augustin Cavalier
034d500610 freebsd compat: Updates and additions for a newer iflib. 2021-10-20 19:13:19 -04:00
Alexander von Gluck IV
a139e89af2 arm64: Add build-packages synced with server
Change-Id: I824b6f3c6920a13fb51a8f2feb71201014ffeb0a
2021-10-20 16:28:23 -05:00
Murai Takashi
c224d63cac SGITranslator: fix too few arguments to formatting function
Pointed out by LGTM

Change-Id: I0f83a3ba92d941c6e8acba02c77afce3cb40f56f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4627
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 18:03:50 +00:00
Murai Takashi
f4742397e0 bin/rc: fix wrong type of arguments to formatting function
Pointed out by LGTM

Change-Id: If0a6c3a5b951f360a4ff9e3d112d4d9799b12fb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 18:03:03 +00:00
Franck LeCodeur
245e831213 file_systems/googlefs: Fix warnings and enable Werror
Part of #9460

Change-Id: I1dc3271b72886ede8db3c78e39b12de873c3e8bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4572
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-20 18:01:15 +00:00
Franck LeCodeur
9a594d0a60 bus_managers/firewire: Fix warnings
Add parenthesis for macro processing, change variable type for signedness comparison warning

Change-Id: I67125ac1dfc97583ecb9e5706909a0a09cda7a2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4575
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-20 18:00:36 +00:00
Franck LeCodeur
718fce997a drivers/input: Fix warnings and enable Werror
Correct signedness for comparisons, remove unused code, remove unused variable, correct variable type for callbacks

Part of #9460

Change-Id: Ie48e8498e0830ed8b175986aaf82b94a1d99b72f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4570
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-20 18:00:36 +00:00
Augustin Cavalier
d81238bf2f framebuffer.accelerant: Utilize AreaDeleter. 2021-10-20 13:53:12 -04:00
Augustin Cavalier
3c181db6bf vesa & radeon_hd: Remove unneeded and incorrect free().
In 47404f12f2, a MemoryDeleter was added
to manage this memory instead of doing it manually; most of the free()s
were removed in that commit, but these were somehow missed.
2021-10-20 13:53:12 -04:00
Alexander von Gluck IV
9b6c4b320f riscv64: Add zstd to build-packages
Change-Id: If2a58d9ab49c3c6901356274cff854b282fb9429
2021-10-20 12:22:42 -05:00
Adrien Destugues
56d38808a5 kernel: add memmem to available functions
It will be needed in the VESA driver to locate things in the VESA BIOS.

Change-Id: Iab42886beb99414fec4d1ad99a08299be679b4d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:17:18 +00:00
Adrien Destugues
60ffcc21fb radeon_hd: move some atombios headers to private/graphics
These will be needed to implement custom modes in the VESA driver.

Change-Id: I9b52de691baa14e1f1a3ccce500ced9bb040b113
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4622
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:17:18 +00:00
Adrien Destugues
ed7b6396e3 bios: make the BIOS writable
This will be used for live patching of the VESA BIOS.

Change-Id: I66c2dfd950262b5ba4d1e7b424eac46f0695297a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4621
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:17:18 +00:00
Augustin Cavalier
411ccfeb96 app_server: Treat the framebuffer driver as a special case like VESA.
This should resolve the problems where the framebuffer driver was
getting picked instead of the "real" graphics driver, when available,
which led to the framebuffer driver getting merged back into the VESA
driver.

Change-Id: I4ad00d2ac3b5dda34aa63f8691d4cbb85e4f6bb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4616
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:12:21 +00:00
Augustin Cavalier
66415cd209 Remove dumb-framebuffer handling logic from the VESA driver.
This reverts commit a0db7ef272.
This reverts commit 40cdf7d607.
This reverts commit 2ff22d6734.
This reverts commit b9eacd390d.
This partially reverts commit 5ae7ac5fd9.

This was all added in the run-up to the removal of the framebuffer driver,
or was added since then to enhance framebuffer-only support in that driver.

Change-Id: I32ab8199f22cf6846545ae19e943c98012b2a1d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4615
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:12:21 +00:00
Augustin Cavalier
f7bd3509e3 Bring back the framebuffer driver and accelerant.
This reverts commit 72fc5e6a71.

They were removed because app_server often picked them instead of
a better graphics driver, and fallbacks merged into VESA instead.
That seems to have created more problems than it solved, in the long run,
and so the intent now is to change app_server to understand the
framebuffer driver as a fallback one instead.

Change-Id: I6edd97fb29ed2b9c13c6c540569695c8426ecfd7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4614
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-20 17:12:21 +00:00
Jérôme Duval
b7a1261eef pci: support 64-bit BAR addressing for MSI-X memory mappings
Change-Id: I463de6aeb45d34e68e888a7648546acddb3fd57a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4613
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-10-20 14:03:08 +00:00
Augustin Cavalier
d029b0dd9f Control looks do not need to link against app_server. 2021-10-19 21:57:31 -04:00
Augustin Cavalier
7cee071659 FlatControlLook: Various clean-ups.
* Do not rely on symbols overriding other symbols, which is
   not a safe assumption and not good practice either. Instead,
   move all methods into FlatControlLook.

 * Reorganize class structures somewhat.

 * Remove unused variables.
2021-10-19 21:54:51 -04:00
Augustin Cavalier
c5325c6690 ArchitectureRules: Increase HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET on x86.
The bootloader is larger after adding zstd and needs more space now.
384 is the value used already on PPC and SPARC. Fixes generating
floppyboot archives for anyboot images following recent changes.
2021-10-19 20:59:26 -04:00