Switch to the experimental services API as the copy in libbnetapi.so is
deprecated.
Change-Id: Ia0742038937d078c6a59ae13180a00a4c4eeb177
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3671
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The BGeolocation class uses the network interface in libnetservices.a, so it
is moved here for now.
This will break any out of tree projects that depend on it, but it is a source
incompatible change only.
Change-Id: I6f5b1332eb87ad37dd33fbe09fdb11b16f7f26e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3670
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Switch to the experimental services API as the copy in libbnetapi.so is
deprecated.
Change-Id: Ic5e2c23a1be598be3057ea913c420c5346f9007f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3669
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Switch to the experimental services API as the copy in libbnetapi.so is
deprecated.
Change-Id: I57d76b1d1be5c957221cc2d77d148fadbac2a642
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3668
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
In order to prevent classes between libnetapi.so with the legacy API and
applications using the libnetservices.a library, the latter will have the
classes in a distinct namespace.
In the implementation, both libbnetapi.so and libnetservices.a will use the
same header and source files. If LIBNETAPI_DEPRECATED is defined during build,
the headers and source will have binary compatible behavior. Otherwise, the
classes and other objects will be put in the HaikuExt namespace.
In order to build the libbnetapi.so and libnetservices.a with the proper
build configuration, there is a stub `src/kits/net/libnetapi_deprecated` folder
that applies the special configuration to the source files.
Currently HaikuDepot, Webpositive, libshared.a and the http_streamer add on
use the compatible API in libbnetapi.so.
Change-Id: Ic73e9f271ef75749adda46f6f72e9a0b2851b461
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3667
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
These will be added to the _devel packages so that other applications can link
to them.
Change-Id: If3fd231869823b42d6d896c6c9eb7a95c5fe715d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3666
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
These classes have been moved to the public API too soon, and they need some
more time to mature before they can be declared stable.
Change-Id: I9c52a8e6cc103922abde7a6b911fe0c3e6bf5700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3665
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
These classes have been moved to the public API too soon, and they need some
more time to mature before they can be declared stable.
In this first step the classes that are involved, are moved to a separate
folder. They will still be linked to libnetapi.so, so that binaries that
depend on them currently will not break.
Change-Id: I6c16f17573d819314a27936f065ebe675846f763
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3664
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Quite a lot has happened since this was initially written.
Change-Id: Iad68ea821733ab7489d2f9713857d2752b80356d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3674
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Pick the most advanced partial download to resume from if there are
multiple ones.
Fixes the remaining part of #16744.
Change-Id: I0ed7daf42e0346632918552e97d660b4946405cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3672
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* creative, not supported
* amd/ati/nvidia, supports 40/48bits, disabled for simplicity
* should help with #16491
Change-Id: I736d17b7dc5d4798688f9bd2741705362837b082
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3680
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This is convenient and used in most text editors.
Change-Id: Ia39b9e6f16cc381a62e10b248033729179a0996c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2110
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
* Media->IoAlign dictates a memory alignment for block device
read buffers. If this alignment fails, sanity checks within
EFI bioses can prevent us from properly parsing filesystems
via failed BlockIO ReadBlocks calls.
* Use a static alignment of a sane 2048 which should meet most
alignment requirements
* Resolves RISCV64 not finding boot partitions. (and likely
fixes a similar issue on ARM)
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change-Id: I718511e8630a109414d90d0bae1470cc861a614f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3676
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
The catalog loading has been done lazily since forever (this code was
imported from OpenTracker). It results in a race condition as explained
in #16670.
Moving the catalog loading earlier in the locale loading process avoids
this problem, since load_add_on is called before the locale roster lock
is used.
This should fix#16670.
Change-Id: If07054077f7dde41cb342a43af2abe8422239b05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3661
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fixes bfs part of #10336. Untested on SATA (don't have a testing drive
to sacrifice) but working fine on SD/MMC.
This requires moving the copy from kernel to userland into the devfs. As
a result the code in the disk drivers becomes a bit simpler.
Also add some documentation for the common ioctls to implement for a
disk device.
Change-Id: Ie84b6a1d293828d33902a64b3c9d4b19aa6eacb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3640
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Change-Id: I44d8ee7a4c0a6b0cd5ed0fbc2201a1d63fd8dde6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3662
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
* Enable TLS for riscv64. For now select a dummy
implementation.
* RISC-V has a register (tp) dedicated to TLS
* All the "desktop-like" RV64 chipsets implement GC
* Same ISA we currently build for... but calls it out
in-case defaults change.
Change-Id: I623b6e5c309b6a6e80ec378e456b2335c561269d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3632
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Store the bus cookie in the mmc_disk driver and pass it to the bus
manager when executing commands. This avoids calling into the device
manager at each read and write operation. The code to get the cookie
from mmc_disk isn't so nice since it needs to access the grandparent
device (the mmc bus root), it would be simpler if this cookie would be
available directly from mmc bus devices.
We can get card removal and card insertion interrupt at the same time
due to insufficient hardware debouncing (the SDHCI spec says we
shouldn't, but it happens on Ricoh controllers. Can't blame them, they
don't advertise themselves as compliant with the spec). So, check the
card status from the interrupt handler and ignore the incorrect
interrupts.
Fix unreliable card initialization: power must be turned on before
starting up the SD clock. Remove a now unneeded delay that was added in
an attempt to avoid initial instability.
Change-Id: Ibd8d051da1a1d859f3924ee535f4a05d9b6398d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3639
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
It works, but performance is still unexpectedly low (getting about
50kB/s write speed) with almost no CPU load.
Change-Id: I7da3ee70c8b379c4e6c2250d67f880c78635874f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3630
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Should allow us to at least play the same files we could play before.
Fixes#16738, though not its cause
Change-Id: I2d23011696b730a891c802e8c2bfc23afe0041cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3628
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
When BSocket::Read() returns 0, it was treated as
a finished transfer. This is OK when we don't know
the content length, but when we do, there is no reason
not to bubble up the error. Return B_IO_ERROR in this
case.
Change-Id: I68801dbbb85bcfd2e7aa68fd6a9ded6304e82b19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3621
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* otherwise the signal to be handled might be blocked. fixes#15193
* also remove automatic syscall restart on _kern_select, to match Linux and
BSDs behavior: this fixes parallel build with newer gnu make, which happens
to use pselect.
* also remove automatic syscall restart on _kern_poll.
from https://man7.org/linux/man-pages/man7/signal.7.html
"The following interfaces are never restarted after being
interrupted by a signal handler, regardless of the use of
SA_RESTART; they always fail with the error EINTR when
interrupted by a signal handler: ...
select(2), and pselect(2)."
from https://notes.shichao.io/unp/ch6/
"Berkeley-derived kernels never automatically restart select."
Change-Id: I3e9488f60c966b38d427f992f06e6e2217d4adc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3636
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Somehow B_CANCELED doesn't seem to convey the correct
meaning. Using B_IO_ERROR will also fit to the recent
changes in the Package Kit and will trigger a re-try of
package downloads.
Change-Id: I58c4d4faa705e6519e0ff9ec7c4654a6151e5486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3635
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* otherwise the signal to be handled might be blocked. fixes#15193
* also remove automatic syscall restart on _kern_select, to match Linux and
BSDs behavior: this fixes parallel build with newer gnu make, which happens
to use pselect.
* also remove automatic syscall restart on _kern_poll.
from https://man7.org/linux/man-pages/man7/signal.7.html
"The following interfaces are never restarted after being
interrupted by a signal handler, regardless of the use of
SA_RESTART; they always fail with the error EINTR when
interrupted by a signal handler: ...
select(2), and pselect(2)."
from https://notes.shichao.io/unp/ch6/
"Berkeley-derived kernels never automatically restart select."
Change-Id: I7f86d221eae1ad93d8a308a75581d2c30a369c9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3627
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- Fix VERSION macro in auich.h / auvia.h, used for log_create()
in debug.c.
- Add string.h to debug.c for strlen().
Change-Id: Iff4878763f49fe5b7e317c47e96ebd79f90725c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3629
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
There is a very good reason to have this: for low number of cores, the
default computation makes stupidly large bars.
I had tested my changes with various number of cores (1, 2, 3, 4, 8, 16)
in QEMU to make sure it looked correct in all cases. I don't understand
why kallisti5 reintroduced broken code.
This reverts commit b18298348a.
This reverts commit b1b6769b6f.
Switching to 4 bit mode requires some more coordination as the host
controller must also be switched, right after sending this command.
I will revisit this, but the previous commit was accidentally pushed to
master.
At least we get the 25MHz clock instead of 400kHz, that should already
be quite a performance improvement.
- Switch to 25MHz clock
- Switch to 4bit transfers mode (the default is 1bit)
Reading and writing SD cards do not seem to work anymore with these
changes. I get invalid data on read, and on write, an interrupt is never
called in some cases.