Commit Graph

63197 Commits

Author SHA1 Message Date
Augustin Cavalier
b6a6890f4c termcap: Remove.
It was removed from the build in the last commit.
2021-10-22 16:43:14 -04:00
Augustin Cavalier
87bdb69ccf Remove termcap from the build.
libtermcap was deprecated in favor of terminfo in 2013; the library was
removed then, and this file was only left because not all optional
packages had yet been rebuilt against ncurses. Well, that has now
long been completed, and indeed all applications continue to function
even after removing /etc/termcap.

In case any legacy applications that I have missed still do need it,
it should be provided by HaikuPorts and not Haiku itself.
2021-10-22 16:43:01 -04:00
PulkoMandy
d1ecc0955f sparc docs: write down some more useful things
These are better here than in my bash history...

Change-Id: Iab8940f4efed950e26a8bad29cb8954464270e8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4645
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 20:23:01 +00:00
PulkoMandy
6711cd9e9e bootloader: reduce stack usage
On Sparc Openboot, we get allocated a stack of only 8 kilobytes, and
each called function costs at least 176 bytes for the stack frame.

This means we need to be more careful than usual about stack usage. Move
some large-ish allocations off the stack by either making them static,
or allocated dynamically.

Add a compiler flag to error on functions which use too much stack. The
threshold is at 1023 bytes, because that's what allowed me to find the
two functions that were causing a stack overflow (open_from and
_ParseActivatedPackagesFile)

Change-Id: Ia0d13a9247e1a3fff4ce654bdffd6edb16e7cbc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2371
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 20:23:01 +00:00
PulkoMandy
a9fed72b4b sparc: add arch-specific libroot stubs
These are helper functions for long double math. On sparc there is no
hardware implementation of long double instructions, and the ABI defines
these methods which must be part of the C library. GCC calls the methods
directly in its generated code.

They were already added to libroot, but they also need to be in the
stub, which is used during bootstrapping to link mpfr (during the
target gcc build).

I put these in a separate file because I assume the generation of the
stubs file from the real libroot.so will usually not be run on sparc,
and will not include these symbols otherwise. This may become a problem
if libroot for different architectures starts to diverge further.

Change-Id: I6070394c685fee35b3dc12a507f5a6271571b993
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4636
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 20:23:01 +00:00
Augustin Cavalier
e8ab10abd6 Fix return type of video_text_console_init. 2021-10-22 15:10:53 -04:00
Augustin Cavalier
5f682fd08d EFI: Add (disabled, partially broken) support for video_text_console usage.
See inline comments.

Change-Id: I7eaa5888b63aecaa582fe00f796b2f3f3c8be203
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4644
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 19:02:06 +00:00
Augustin Cavalier
4c73f34840 bootloader video_text_console: Refactor into the new ConsoleNode model.
Change-Id: I3dc59cbdfd28f1ada49b02e42d50ec2b52c40227
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4643
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 19:02:06 +00:00
Augustin Cavalier
5e43707307 bootloader: Refactor console functions into the VFS ConsoleNode class.
This way it becomes much easier to write multiple console implementations
in one bootloader.

Tested for bios_ia32 and efi.

Change-Id: I67134f5c3de109b15d46898864ba7f51c6592afc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4642
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 19:02:06 +00:00
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