Commit Graph

63010 Commits

Author SHA1 Message Date
Fredrik Holmqvist
5185ccdeb4 efi/arch_smp.h: use __aarch64__ for ARM64 defines 2021-08-23 21:28:15 +02:00
Fredrik Holmqvist
d691f1e181 WIP arm64 arch_cpu.cpp
Still needs work, opted to have arch files in tree to share
the burden of the port
2021-08-23 21:19:06 +02:00
Fredrik Holmqvist
01dad9378b Add ARM64 arch_cpu.h header 2021-08-23 21:10:34 +02:00
Lt-Henry
8df8655366 Updated HID code with Vector class instead of hand made growing arrays
Change-Id: Iec8cd3922d9c21a046d225181d326253ae88d395
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4324
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-08-23 18:31:50 +00:00
Panagiotis Vasilopoulos
4b12b16e8d Time: Add about window
The window is not easily accessible from the application itself, so this
change is practically not that useful, but it's still a good idea to continue
replacing old BAlert windows with BAboutWindow in order for the Haiku source
code to be exemplary as far as developing applications is concerned.

Change-Id: I05ea971ed0f8a996d5e168066b18eb7fe8bd5b3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4331
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-08-23 18:31:10 +00:00
X512
3517616b39 kernel/vm_page: add vm_page table dump debugger command
Change-Id: I493228736f90f5e248f1d4fa3e354beb186546cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4308
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-23 14:20:47 +00:00
X512
a267f17ca6 kernel/vm: fix several vm bugs in riscv64
team.cpp address_space change is needed in
arch_thread_init_kthread_stack to set initial thread page
translation map. It also allows to simplify some debugger code.

DEBUG_PAGE_ACCESS check is currently incorrectly implemented in
RISCV64VMTranslationMap and disabled to avoid panic.

gHtifRegs = 0 change is needed to avoid using HTIF when it is not
available. gHtifRegs != NULL check is used to detect that HTIF is
present. 0x40008000 is TinyEMU HTIF address. HTIF is emulator specific
device that provide serial IO and shutdown capability (and maybe
something else depending on virtual machine).

Change-Id: Ic4d567b28c49799ae0f55223dd983a752823bab4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4328
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-23 13:59:49 +00:00
Fredrik Holmqvist
ea208974b6 Branch instr on ARM64 is BR 2021-08-21 14:45:22 +02:00
Fredrik Holmqvist
5e567c1091 ARM64 Jamfiles, missed in previous commit
* Use generic c versions of memset and memcpy
   Wwrite fast asm for that later, therefore no need for arch_string.S
 * Disable FDT and DTB until ARM64 is ready
   (WIP: do it later)
 * use ELF64
2021-08-21 14:32:32 +02:00
Fredrik Holmqvist
763968b1a3 ARM64 Jamfiles:
* Use generic c versions of memset and memcpy
   Wwrite fast asm for that later, therefore no need for arch_string.S
 * Disable FDT and DTB until ARM64 is ready
   (WIP: do it later)
 * use ELF64
2021-08-21 14:06:51 +02:00
Fredrik Holmqvist
5ea726b93a Use PIC and shared flags on ARM64 2021-08-21 10:33:59 +02:00
Fredrik Holmqvist
91bf523f3a Update HaikuPortsCross for ARM64 2021-08-21 10:32:57 +02:00
X512
39ddb58870 build/jam: add virtio_mmio, virtio_input to images
* virtio_mmio for riscv64,arm,arm64
* enable new FDT bus for riscv64,arm,arm64

Change-Id: I5141de4e0bfcb44c5368dfafdf68ebf06ca5fb93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4063
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 18:53:31 +00:00
X512
cc818f35c4 input_server/virtio: add new virtio input device
Change-Id: I9e55349717231a5b13f0bce351f349a54c1f643e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3978
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 18:47:18 +00:00
Fredrik Holmqvist
e28f7b8f95 Fixup dtb.cpp: For ARM64 we use official __aarch64__ define
It is easier if we switch compiler and reduces confusion,
other than the confusing name itself.
2021-08-20 17:57:02 +02:00
Alexander von Gluck IV
a03687553b platform/efi: platform_cpu_info
* This models the CpuInfo into a cross-architecture
  platform_cpu_info
* Originally I was looking at merging this with "arch_cpu_info"
  however that is "overall cpu" while CpuInfo is "indivial core
  information" packed into an array.
* Since every dtb platform will report individual cores in fdt,
  having a common cpu core info struct with at minimum the core
  id makes sense.
* This could likely be refined further to some kind of core info
  packed inside of arch_cpu_info, but this will fix arm,arm64,etc
  for now until someone wants to dive into that.

Change-Id: Ia18a352403cd0da7130c1e637fc205d4311478ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4363
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-20 13:38:17 +00:00
Jérôme Duval
9e511d5342 atheros813x: import patch from stable FreeBSD13
alc(4): add support for Mikrotik 10/25G NIC

The new Mikrotik 10/25G NIC is mostly compatible with AR8151 hardware,
with few exceptions:

* card supports only 32bit DMA operations
* card does not support write-one-to-clear semantics for interrupt status
  register
* MDIO operations can take longer to complete

This patch adds support for Mikrotik 10/25G NIC to the alc driver
while maintaining support for all earlier HW.

The patch was tested with FreeBSD main branch as of commit
f4b38c360e63a6e66245efedbd6c070f9c0aee55

This was tested on Intel i7-4790K system with Mikrotik 10/25G NIC.
This was tested on Intel i7-4790K system with RB44Ge (AR8151 based 4-port NIC)
to verify backwards compatibility.

PR:	256000
Submitted by:	 Gatis Peisenieks  <gatis@mikrotik.com>
MFC after:	1 week
Change-Id: I83cdeb24caccad15a9647a72159d979ecbd647f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4361
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 12:44:13 +00:00
X512
03fd479633 virtio_input: add new virtio input driver
Change-Id: I10af2b30c79d1e8ff890d45642988f362d3d0a1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4012
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-20 12:43:16 +00:00
Jérôme Duval
b8862188f4 jmicron2x0: import patch from FreeBSD13
Revert r316820.

Despite appearing correct, r316820 breaks packet rx/tx for jme(4)
interfaces.  With 12.1 approaching, let's just revert the commit for now.

PR:		233952
Tested by:	Armin Gruner <ag-freebsd@muc.de>
MFC after:	3 days
Change-Id: Id64b6a3c57ddae2d1915c914b1c4b1ad51410ed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4360
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 09:13:44 +00:00
Jérôme Duval
0a856fec02 iprowifi4965: import two patches from FreeBSD current
could help with #16238

1/ iwn: adjust EEPROM read timeout for Intel 4965AGN M2

Reading EEPROM from Intel 4965AGN M2 takes 60 us which was causing panic
on system startup.

2/ from 561d34d705
The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).

Change-Id: I730bd6106e0d76da89fff041672ccbc4ef607976
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4359
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 08:00:39 +00:00
Alexander von Gluck IV
d637e0bec1 system/kernel: Rework uart management
Change-Id: I6cb31760519c8ba4542d217d6e68439602eda558
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4356
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-20 03:03:25 +00:00
Alexander von Gluck IV
fbd2589b8c bus_manangers/fdt: Fix missing close curly
Change-Id: I2dd439ea7fc90bb149e7454b0d58a6fd383ab30b
2021-08-19 17:41:16 -05:00
Gerasim Troeglazov
270bb32f98 virtio: fix typo 2021-08-18 21:30:41 +10:00
X512
397c81a2b8 virtio_mmio: add new mmio interface
Change-Id: I2ca51d98e337d1e69a8e68d78ef0cfe33dc0d308
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3979
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-18 06:19:37 +00:00
Przemysław Buczkowski
5855a8e350 riscv: fix typo frequrency -> frequency
Change-Id: I7a2ed220ad96a9b18bff3ac5c115592c8ba87d89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4334
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-08-17 15:41:18 +00:00
Alexander von Gluck IV
950f68e3b2 kernel/uart: Fix PPC, drop needless abstraction
Change-Id: I4b8f69271ede117701725f9cce30de5bb8ba30bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4332
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2021-08-16 23:22:35 +00:00
Alexander von Gluck IV
1648ab5277 kernel/uart: Clean up uarts, make calling convention consistent
Change-Id: I36ef92ef13edb0b006344db74e9d1b3ae52e0127
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4327
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-16 23:22:35 +00:00
Semion Dimov
c39da9b7a0 Fix build on OSX host
FreeBSD's stat command doesn't support -c/--format option and use %z specifier for file size

Change-Id: I368b6eef0a692df0f16bc1c3d5b5399fcf91e051
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4326
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-16 11:17:29 +00:00
X512
dbd1ff0988 libroot: fix ffs for riscv64
Built-in function call ffs() causing infinite recursion.

Change-Id: I506c0301c3a19178ebca4478cbe2ea06a7aeb932
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4318
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 20:56:11 +00:00
Alexander von Gluck IV
ae5abb5826 3rdparty: A small script to setup an SD card for the Unmatched
Change-Id: I275f62b2b16017b1735f0b4319ebd1a596da0cdd
2021-08-15 10:11:27 -05:00
Adrien Destugues
c3abd58da6 BUrlRequest: reintroduce Pause/Resume API in the deprecated version
Fixes https://github.com/haikuports/haikuports/issues/6123
2021-08-15 11:47:17 +02:00
X512
756884ad48 radeon_hd: 64 bit PCI bus fixes
Change-Id: If14dc31bf4c9360b5e1d0b477ba375cec8f75ba7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4306
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:26:57 +00:00
X512
7508e28c4f virtio_net: set device name
Change-Id: I1606804ad45e34f6a745c39917ba113ba5e9ee7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4313
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:07:52 +00:00
X512
73445bc413 virtio_block: set device name
Change-Id: Id96e0dd2247625b7b898316511da7f1d8d0e3ba0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4314
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:05:34 +00:00
X512
f850bba8d0 bus_managers/fdt: rewrite to support device manager node tree
* Breaks previous fdt module clients.

Change-Id: I8bfdca40a77c041ddef51488e1995e5d43edb340
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3977
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-14 23:57:35 +00:00
Alexander von Gluck IV
961c0ecef4 efi/mmu: Disable fixed vaddr allocation on riscv
Change-Id: I137306be6e5d16a715e7efe9eb2614f0dd9e17cb
2021-08-13 21:16:49 -05:00
X512
fa41d6fa7a kernel/arch/platform: implement for riscv64
Change-Id: Id1839ef39d927e6a2017c8b8ac3482d9eeb00fa1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4059
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-13 20:36:30 +00:00
X512
56ac584a91 libdebug: add riscv64 support
Change-Id: I9d9d1697bc67d2ab674f2fbe0dbf3a37ead58595
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4062
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-13 13:24:35 +00:00
X512
9d2cc33a64 kernel/arch_real_time_clock: implement for riscv64
Change-Id: I3a50b3343e00ef45ef9391d463939abba9e666a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4072
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-13 13:14:41 +00:00
X512
95d6ecf25d libroot/riscv64: define syscall function size, implement time
Change-Id: Ib08b0b700506e3e1eb41d1b30b025bdf688342d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4071
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-13 13:10:39 +00:00
X512
7b124be096 efi: add NVRAM variable GUID definition
Change-Id: Iab4e59bb4ac91ba5e9c34e1ade433b423a140b9b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4316
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-08-13 13:06:05 +00:00
X512
5ae7ac5fd9 drivers/vesa: fix for RISC-V
* Make ISA bus optional in vesa driver

Change-Id: I1f38f92d81fbfe47224893e1d9dbf6a74306e2f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3986
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-13 13:03:49 +00:00
X512
0877e4d7d1 nvme: add legacy interrupts support
Change-Id: I29b9676c6c2407e7795af4c7b1c56a7afb546f6e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4312
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-08-12 17:19:38 +00:00
Alexander von Gluck IV
06ffdddcc8 kernel/vm: riscv64 build fix checkpoint
* This gets the riscv64 build working again
* These changes are being consolidated into:
  https://review.haiku-os.org/c/haiku/+/4309

Change-Id: I3b732299fa49acbda6317e6a2a8d7ab382d7740b
2021-08-12 11:05:44 -05:00
X512
f1fa58bfbc haiku_loader.efi: update for riscv64
* Added MMU page table generation.
* Added optional FDT device detection and passing to kernel.
* Add platform address translation stubs to bios_ia32
  to drop EFI ifdefs

Change-Id: I89257c93c84404fd988f621b29f927ed0df3c3b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4304
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-12 08:33:36 +00:00
Coldfirex
925f912596 FTPD: Pull in various commits from upstream
Our version is from roughly 4-2007.

Brought in the following commits that appeared relevant to code improvements and fixes.:

f0b40b1c97 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
d56cc55917 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
763e8c9623 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
62f390ecd9 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
6e4fcca0f8 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
69097cd8da (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)
3c0c1e01c9 (diff-ccb7a49e05dd2061a0b3ac926212bc5aebe5afd09bbefc8658ba57d8b79827a1)

Change-Id: If44f58950513ebe1fecc2f482ea954fe49263677
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4321
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-10 12:49:49 +00:00
Andrew Lindesay
95c7b01864 HaikuDepot: Shutdown Handling
Improvements to the shutdown handling mechanics so that
if there is an install etc... happening when the
application is quit that it will wait until the process
is complete before actually terminating.

Change-Id: I8d3c4fbd9de0abc9382d55f0a6955b7f63a36637
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4322
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-08-08 08:09:05 +00:00
Adrien Destugues
6a41334ced net_server: remove about box.
Fixes #16823.
2021-08-07 12:44:57 +02:00
X512
a748b72e3c AutoDeleter: add VMAddressSpacePutter, DeviceNodePutter
Change-Id: I705de24f6a87287943814e748d5a02e43b029e60
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3987
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-06 21:11:04 +00:00
X512
058b29ac34 AutoDeleter: introduce MethodObjectDeleter
It allows to call destructor function stored in struct object such as
device_manager_info::put_node.

Change-Id: If9162f2f449d2b1c52c39509fa8732f21debf04a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3484
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-06 21:11:04 +00:00