Commit Graph
100 Commits
Author SHA1 Message Date
Augustin Cavalier 648cc69f8e HaikuPorts: Synchronize build-packages set.
Notable changes:
 * jpeg replaced with libjpeg_turbo across the board.
 * man replaced with mandoc.
 * ilmbase merged into openexr.
 * gnutls no longer needed in this set.

A few other packages unused in the local scripts were
also removed. Build fixes are in following commits.
2020-04-19 17:56:23 -04:00
Augustin Cavalier dd419e59dc build_haiku_image: Distinguish between system (activated) and unactivated packages.
Previously, all packages on the image, both activated and unactivated,
were in $systemPackages, so if a package actually in /system/packages
had a dependency in the Installer optional package area, the dependency
checking would see no problem but the generated image would be broken.

Now, packages going into /system/packages are treated separately
from those going elsewhere, and error checks added so the above
condition will not occur.

(I ran into this while working on the build-package upgrade
in the following commits.)
2020-04-19 17:53:10 -04:00
Augustin Cavalier 5e15819d86 Jamfile: Remove most implicit dependencies from default installed packages.
No need to pull in e.g. "libpng16" explicitly when the appropriate
libpng version will automatically get selected by get_package_dependencies
at image build time.

I did however remove ctags altogether; nothing in the base install
uses it, so there's no reason to have it.
2020-04-19 17:50:43 -04:00
Augustin Cavalier a2dbd0457f hardlink_packages: Use distutils to compare versions. 2020-04-18 18:04:38 -04:00
waddlesplash 47e83a42b0 Revert "BTabView: use the back/forward buttons to switch tabs"
This reverts commit 7ba52abdd3.

Reason for revert: Broke the build due to undeclared symbols.

Change-Id: If726d1f71a336f98428037dad2acfdaf961f1a84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2497
Reviewed-by: waddlesplash <[email protected]>
2020-04-18 18:40:02 +00:00
waddlesplash 891edac940 kernel/vm: Revise overflow checking in user_strlcpy.
Change-Id: I6a066e7b2c51ff94d80381fcc940565f777209e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2376
Reviewed-by: waddlesplash <[email protected]>
2020-04-18 18:22:49 +00:00
Augustin Cavalier 8e3ce627f2 libroot: Remove rpmalloc.
It seems clear that the architectural designs of rpmalloc are
just not suited for us in the "corner-cases", and probably never
will be.

After R1/beta2, I'll investigate switching us to musl's mallocng,
which is explicitly designed as a system allocator and has much
lower overall memory usage than even glibc's default allocator.
2020-04-12 18:08:41 -04:00
Augustin Cavalier 4ba0a2f80c Deskbar: Enable "Tracker always first" by default.
This received 84% on the forums, so it seems pretty uncontroversial
to enable it by default.

No other option received 70% or more, so I'll leave Humdinger to
decide what the other changes to the defaults should be based
on whatever threshold is decided upon...
2020-04-12 18:06:11 -04:00
Augustin Cavalier ffee10ada1 StyledEdit: Fix build after previous changes. 2020-04-12 17:24:03 -04:00
Augustin Cavalier be4c5346eb Update usb.ids. 2020-04-11 22:17:49 -04:00
Augustin Cavalier 18d0902fd2 Update pci.ids. 2020-04-11 22:17:46 -04:00
Augustin Cavalier a73bad3ed2 nvme_disk: Add locking around request queue access.
Should help with #15123 further.
2020-03-28 16:27:37 -04:00
Augustin Cavalier ce363eca71 nvme_disk: Remove nvme_qpair_poll from nvme_internal.h.
This is now declared in the public header.
2020-03-28 16:27:37 -04:00
Augustin Cavalier a5ca573d27 ArchitectureRules: Add -fno-semantic-interposition to kernel rules.
Should constitute a minor performance gain, with no functional change
(the kernel ELF loader does not do any semantic interposition; or
any interposition for that matter.)
2020-03-28 14:52:17 -04:00
waddlesplash 8e12c92fee freebsd_network: Implement mtx_destroy for spinlocks.
Somehow, I missed this when implementing MTX_SPIN in the first place,
and it went largely unnoticed because MTX_SPIN is rarely used and
apparently even more rarely destroyed.

Should fix #15749.
2020-03-24 21:06:37 -04:00
waddlesplash 6f857fa9fb Revert "boot_loader: load intel microcode update data file"
This reverts commit a732059324.

It broke the build on most boot platforms (including EFI.)
2020-03-23 10:09:21 -04:00
Augustin Cavalier cc0823d82e nvme_disk: Undefine PTHREAD_MUTEX_INITIALIZER before defining it.
Some things seem to indirectly include <thread_types> which includes
<pthread.h>.

Fixes a warning.
2020-03-22 20:52:46 -04:00
Augustin Cavalier 9c878a9a89 nvme_disk: Use addr_t for pointer arithmetic.
No functional change (intended).
2020-03-22 20:52:01 -04:00
Augustin Cavalier 515ec47340 ArchitectureRules: Make HAIKU_KERNEL_PIC_CCFLAGS empty by default.
This makes it entirely up to the per-architecture setup as to
what to put into it.

No functional change.
2020-03-22 20:49:55 -04:00
Augustin Cavalier 625dc38a28 libnvme: Rework qpairs to lock themselves.
They were theoretically guarded by the controller lock, but it appears
nvme_ns bypassed that, meaning that if ns_read was executed at the
same time as qpair_poll, unpredictable races could occur. This solves
that by making the qpairs guarded by their own mutex, which also
has the advantage of poll() being executable on more than one qpair
at a time.

Seems to fix the KDLs in #15123 (and maybe other NVMe tickets),
though the I/O corruptions remain.
2020-03-22 17:36:31 -04:00
Augustin Cavalier cbb517abfd kernel/vfs: Replace the mount mutex with a rw_lock.
Since the entry_cache operations go through the mount lock,
this may considerably speed up parallel entry cache operations.

Change-Id: Ib2f841e288eb593ee3f795922103459c77764c22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2362
Reviewed-by: waddlesplash <[email protected]>
2020-03-18 21:54:38 +00:00
Augustin Cavalier 65920cacc0 kernel/vm: Validate user addresses do not cross the kernel/user boundary.
This protects against malicious programs trying to steal/overwrite
kernel memory by overflowing user buffers.

Note that this constitutes a behavioral change to user_strlcpy:
previously, address overflows on the "source" side would either
copy less data, or copy some data and fail anyway. Now, address
overflows on either side will always fail before any data is
copied at all.

Change-Id: I01d8b22672ab3758a9dd87b521af6fedd0487417
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2361
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-16 13:11:45 +00:00
Augustin Cavalier c31d8dad23 Revert "Move source and development packages out of /system/packages on release images"
This reverts commit 0ab9c3c538.

It broke booting.
2020-03-15 19:30:08 -04:00
Augustin Cavalier d3571a6f55 Cortex: Remove missed includes of debug_tools.h. 2020-03-15 18:00:25 -04:00
Augustin Cavalier 01a7f81291 Cortex: Remove debug_tools.
Not used by anything, so not needed.
2020-03-15 17:47:10 -04:00
Augustin Cavalier 6a84844ddf Icon-O-Matic: Disable printing statistics.
Not really needed, and for now triggers a lot of deprecation warnings.
2020-03-15 17:47:09 -04:00
Augustin Cavalier c207330527 registrar: Replace the deprecated std::hash_set with our HashSet. 2020-03-15 17:47:09 -04:00
Augustin Cavalier 5c31a5242c kernel_cpp: Dynamic exception specifications were deprecated in C++11. 2020-03-15 17:47:09 -04:00
Augustin Cavalier ed7329a890 file_systems/cdda: Use standard kernel mutexes instead of a custom lock.
No behavioral change (intended.)
2020-03-14 15:34:25 -04:00
Augustin Cavalier 74592da9a0 headers: Remove libroot_lock.h.
Not used (the one file that included it did not actually use it),
and no longer needed with the introduction of user_mutex.
2020-03-14 15:18:01 -04:00
Augustin Cavalier 8eaf4427f0 Tracker: Refactor IconCache to use BOpenHashTable.
This removes the last usage of the old OpenTracker OpenHashTable,
and so it can now be removed.

Change-Id: I7a7bceef1d3fc74c7fdfa7b079e53576452703dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2339
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-13 12:39:43 +00:00
Augustin Cavalier d4dbce2983 app_server: Drop custom HashTable and use HashMap instead.
Change-Id: I7d5aae6a7fd2b4f47704a931a23eee09a4eedcac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2323
Reviewed-by: John Scipione <[email protected]>
2020-03-08 08:26:27 +00:00
Augustin Cavalier 1ba9396139 Tracker: Replace the deprecated std::hash_set with our HashSet.
Change-Id: I7d29f0c905a3ab1a20f6eca252ff1f168218c23f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2322
Reviewed-by: John Scipione <[email protected]>
2020-03-08 08:26:27 +00:00
Augustin Cavalier 996c9bf0dd Tracker: Use ObjectDeleter instead of the deprecated std::auto_ptr.
Change-Id: I5d358076065fefa39df923e4554599b716d9883b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2321
Reviewed-by: John Scipione <[email protected]>
2020-03-08 08:26:27 +00:00
Augustin Cavalier 96d5cadcdb atomizer: Remove.
Not used by anything at all, and not included in the build.
Even the BeOS engineer who created it wrote in a Be Newsletter
that he was uncertain how useful it was, which is why BeOS
did not ship it as a kernel add-on...
2020-03-07 17:50:21 -05:00
Augustin Cavalier cbdbe1cf43 nvme_disk: Protect against simultaneous writes to "rounded" blocks.
May help with some of the stranger NVMe KDL tickets.
2020-03-07 17:41:35 -05:00
Augustin Cavalier f87a7ab0f7 nvme_disk: Add missing linebreaks in error messages. 2020-03-07 17:18:16 -05:00
Augustin Cavalier 0bf26bd17e nvme_disk: Poll before checking the "status" again.
Otherwise, we may have missed an interrupt and wind up in
a dead-wait.
2020-03-07 17:17:28 -05:00
Augustin Cavalier 475c3b42e2 nvme_disk: Remove do_nvme_segmented_io.
It appears that libnvme handles breaking up I/O operations already
and submit them in a more organized fashion, so this is not needed.
2020-03-07 17:16:34 -05:00
Augustin Cavalier d447d74781 nvme_disk: Use interrupts instead of polling.
Requires the preceding commit due to how it uses ConditionVariables.
Massively decreases CPU usage under heavy disk load.

Change-Id: I967e5ed000751d9f3971dd811563e23bcb13dd50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2302
Reviewed-by: waddlesplash <[email protected]>
2020-03-07 21:27:05 +00:00
Augustin Cavalier 1728b8c777 kernel: Rework ConditionVariableEntry destruction.
It is no longer an error to destroy a ConditionVariableEntry
that is still attached to a ConditionVariable; it will
now be implicitly detached in that case.

This makes ConditionVariableEntrys much eaiser to use
from an API standpoint.

Change-Id: I03c676d3a198aa885de733d3e1729b15f80de031
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2301
Reviewed-by: waddlesplash <[email protected]>
2020-03-07 21:27:05 +00:00
Augustin Cavalier 0da74916e2 nvme_disk: Initialize "status" in nvme_disk_write.
It is possible that no code path which assigns "status" is taken,
so we need to initialize this before it is checked against.

Spotted by Coverity.
2020-03-01 18:25:56 -05:00
Augustin Cavalier 58dcc29b6d runtime_loader: Fix memory leak in init_dependencies.
get_sorted_image_list allocates initList even if "count" winds up
being 0, so we need to free it in this case also.

Spotted by Coverity.
2020-03-01 18:18:47 -05:00
Augustin Cavalier 51d0d6e229 XHCI: Remove logically dead code.
This is inside a "endpointId > 0" block, and endpointNum=id+1,
so we will never call EvaluateContext here. (Endpoint "1" is
configured by AllocateDevice.)

Spotted by Coverity.
2020-03-01 16:19:03 -05:00
Augustin Cavalier dda8e77b8e headers: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelExport.h.
There is no good reason to put them in a private header.
No functional change (but drivers now have access
to these constants.)

Change-Id: I7ac00a120ab44fbc110bc858dfd87d69d0061135
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2294
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2020-03-01 21:12:49 +00:00
Augustin Cavalier 0d312fea71 app_server: Reduce usage of the RegionPool where unnecessary.
BRegions with only 1 rectangle will use inline data and perform
no allocations, so when we create a BRegion and only add
one rect to it, we can just use one inline and avoid using
the pool entirely at no cost (and some savings.)

No functional change (intended).

Change-Id: I10ac6bc7b5cf6b681641e88558a3f1ba770b6f77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2298
Reviewed-by: waddlesplash <[email protected]>
2020-03-01 21:09:41 +00:00
Augustin Cavalier ab319eb798 BRegion: Do not "cheaply convert" to the internal format.
_ConvertToInternal does the same thing, and should get inlined
under normal circumstances, so just use it.

No functional change (intended).

Change-Id: Ic4fc9daeb33ab33967d795065a077f282e844f6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2297
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2020-03-01 18:20:56 +00:00
Augustin Cavalier 171057c06a clipping.h: Rewrite copyright header to use the "new" style.
Also trim trailing spaces.

Change-Id: I598dfa2c69f584eaa004211339c73a26dd93af93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2296
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-01 18:20:56 +00:00
Augustin Cavalier f816ef57aa BRegion: Remove unneeded inline "documentation."
All this (and more) is in Region.dox already.

Change-Id: I94ff154cc78cda87d82941deb30f73cac39c3409
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2295
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2020-03-01 18:20:56 +00:00
Augustin Cavalier 35b4b2373a PS/2: Fix build.
Copy/paste error from refactoring, sorry about that.
2020-02-20 13:32:35 -05:00
Augustin Cavalier 544e086e8f PS/2: Actually mask off SysReq when it is released.
The previous code was missing a "~" make it possible for someone to
press PrntScrn, and then later Alt+D to trigger KDL, which is obviously
not the desired behavior. SYS_REQ_KEY only triggers when Alt+SysReq
is pressed, so this was not as much of an issue without PrntScrn.
2020-02-20 13:22:23 -05:00
Augustin Cavalier 2280633335 PS/2: Handle PrntScrn as well as SysReq for emergency keys.
Usually these are the same physical key, but some keyboards
(like my laptop) do not have a SysReq key, only a PrntScrn key.

Fixes entering KDL via the shortcut on my laptop.
2020-02-20 13:22:07 -05:00
Augustin Cavalier 46ab6b2917 kernel/debug: Zero-initialize droppedEvents.
There is a case where NextBuffer can return B_OK without initializing
droppedEvents, so make sure we do that here.
2020-02-20 12:11:09 -05:00
Augustin Cavalier 0d3250fdb5 XHCI: Round TD Size up instead of down.
This is what the specification dictates.
2020-02-19 12:26:35 -05:00
Augustin Cavalier 0c9e6791d8 Deskbar: Fix build after merge. 2020-02-19 12:22:39 -05:00
Augustin Cavalier cce89fa82f XHCI: Correct computation of TD Size field.
This was broken during the refactor in hrev53672. May help with #15657.
2020-02-18 12:27:05 -05:00
Augustin Cavalier 1e02632b94 USB: Detach pipes from the stack before tearing down their state.
This way, it is now actually impossible to submit a request to a
pipe that is in the process of being destroyed, solving several
race conditions.

Should fix the remaining KDL in #15710.
2020-02-17 19:11:57 -05:00
Augustin Cavalier b1970a8427 XHCI: Do not try to use hardware with unknown interface versions.
Should fix the crash in #15717.
2020-02-17 17:18:11 -05:00
Augustin Cavalier 5d08e3a5b9 runtime_loader: Combine and correct term function invocations.
In d49942867b (part of hrev52813),
I moved invocation of the TERM_BEFORE/TERM_AFTER functions to
runtime_loader. Unfortunately, I only updated one location where
they should be invoked, and runtime_loader had two.

After this commit, there is one function that they are called from,
which is itself invoked from the appropriate places.

Noted by ttcoder & mmlr in #14047.
2020-02-17 17:07:39 -05:00
Augustin Cavalier c119d85329 ReadMe: Update links.
* OpenGrok has moved.
 * cgit is just at "git...", and is now HTTPS-enabled.
2020-02-17 14:43:59 -05:00
Augustin Cavalier 357adccf9f XHCI: Rearrange RemoveEndpointForPipe to fix crashes and deadlocks.
* As we were clearing out the endpoint structures before detaching
   the xhci_endpoint from the Pipe, it was possible for SubmitRequest
   to be called while we were being destroyed and then use the half-
   torn-down endpoint, leading to crashes. Instead, we now call
   SetControllerCookie first, so that SubmitRequest will thus
   fail.

 * Lock the endpoint after calling StopEndpoint, for the same
   reasons that this is now the order of operations in CancelQueuedTransfers.

Probably fixes #15710, and maybe other issues.
2020-02-17 14:33:54 -05:00
Augustin Cavalier 41e5cf016e XHCI: Remove unnecessary xhci_device::state field.
It was only actually used to determine if a device was disabled
or not, which can be determined by checking the "slot" field
is "0" instead, as 0 is an invalid slot number.

No functional change (intended.)
2020-02-17 14:13:40 -05:00
waddlesplash 90bf90fac5 kernel: Move memset of KPath buffer to after NULL check. 2020-02-10 22:20:19 -05:00
Augustin Cavalier 299279610c kernel/vfs: Add some missing initializations and BStackOrHeapArray.
Part of #14961.
2020-02-09 18:22:57 -05:00
Augustin Cavalier d29d80ebe2 kernel: Initialize allocated KPath buffers to 0.
KPaths are most commonly used in the VFS syscall paths,
and so they are typically user_memcpy'd to/from userland.
In the "to" case this is not really necessary (but it should
be so small of a performance difference as to not matter),
but in the "from" case, we must always clear the buffer
we received from the allocator, so as not to leak information
to userland.

Part of #14961.
2020-02-09 18:17:01 -05:00
Augustin Cavalier 877c1b934f EHCI: Call InitKernelAccess at the top of SubmitTransfer functions.
I missed that this was not done before WriteDescriptor was called.
Fixes #14835 (again.)
2020-02-09 17:35:13 -05:00
Augustin Cavalier 2591d679e5 XHCI: Fix endpoint deadlock in CancelQueuedTransfers.
If a transfer completed before the StopEndpoint did,
HandleTransferComplete would try to lock the endpoint,
resulting in a deadlock, and so StopEndpoint would
always time out in this case.

May help with #15161, #15141, #15215, #15416, #15657.
2020-02-08 23:44:33 -05:00
Augustin Cavalier f62329b34d USB: Explore ports when something is connected without a status change.
It seems that many controllers do not report status changes following
the hand-off from the BIOS, so we were never probing those ports
and reporting the devices attached to them.

The BSDs do something similar (although it seems to only do this
on the first explore, not always.)

This fixes booting off of USB3 ports from most Intel controllers,
as well as a variety of others with similar behavior.

Fixes #15000.
2020-02-08 16:33:02 -05:00
Augustin Cavalier 3a63d1efff EFI: Restore the previous logic for BOOT_VOLUME_BOOTED_FROM_IMAGE.
Fixes booting from USB drives on my machine after previous changes.
2020-02-08 16:00:40 -05:00
Augustin Cavalier 5be6527a63 ImageRules: Use mformat's -f argument.
Should not be a functional change, but reading the docs, I'm not sure
our arguments were valid here, so this should be more correct.
2020-02-08 15:45:18 -05:00
Augustin Cavalier b8852a24a6 XHCI: Do not set "Interrupt Short Packet" on transfers.
Before the refactor to use Event Data TRBs, this was necessary
to detect short packet conditions. Now that we use Event Data
TRBs, the hardware will send us an Event Data event even on
Short Packet conditions, so this is redundant.

Fixes log spam of "TRB ... not found in the endpoint", as
this was causing duplicate event postings. Also potentially
fixes instability seen when those messages were present.
2020-02-08 13:36:51 -05:00
Augustin Cavalier 78b224583c configure: Building GCC2-only Haiku is not supported anymore.
Fixes #15682.
2020-02-08 13:25:23 -05:00
Augustin Cavalier 07ec2cf013 EHCI: Call PrepareKernelAccess before writing descriptor chains.
Fixes #15653.
2020-02-08 13:16:13 -05:00
Augustin Cavalier 7e8263e589 libroot/stdio: Use the proper macros for isnan/isinf. 2020-02-08 12:58:09 -05:00
Augustin Cavalier 2b19786285 Tracker: Remove unused variable.
Fixes the build (due to a -Werror).
2020-02-08 12:34:00 -05:00
Augustin Cavalier 9df77ea390 libroot: Make glibc use our math.h.
Only a few definitions (and some "hacks", to force glibc to
use __builtin_* where possible) that are not in our math.h
remain. This cuts out a lot more of the "bits" headers.

No "functional" change intended (but should help
fix the build on arches where we do not include
__fpclassify, etc. anymore.)
2020-01-18 23:44:37 -05:00
Augustin Cavalier 9e419c3092 libroot: Avoid glibc-internal math function usage in printf.
There's no reason for this, and we'd like to not export
these functions anymore (under non-x86/x86_64), so just use
the public macros.
2020-01-18 23:42:03 -05:00
Augustin Cavalier aee487519d libroot: Remove "string" directory.
The endian.hs can also go away and use our own.
No functional change intended.
2020-01-18 20:26:39 -05:00
Augustin Cavalier aa1e42a332 libroot: Replace swab() with the musl version.
This was the last function remaining in the glibc "string" directory,
so now we can remove that directory and a bunch of related files
that are no longer needed.
2020-01-18 20:26:05 -05:00
Augustin Cavalier f19586ee86 libroot: Drop a lot of glibc-internal headers that are not needed.
No functional change intended.
2020-01-18 19:17:43 -05:00
Augustin Cavalier bef1585217 Mail: Fix build following realloc() fix. 2020-01-18 18:50:23 -05:00
Augustin Cavalier f504f61099 libroot: Replace most of libm with musl's.
The glibc libm code was showing its age, and has recently been
the subject of a number of tickets about its inaccuracy.
Additionally, some developers have complained about
how convoluted the headers are, and thus how hard it is
to add support for new architectures (and how flaky
the support for the existing architectures is.)

So, with this commit, nearly the entire glibc libm has been
gutted and replaced with the one from musl 1.1.24.

The complex functions from glibc are retained (as they
are more mature than musl's), as are some glibc-internal
libm functions.

This also has the advantage that these functions are
actually using our <math.h>, whereas GCC used its own,
which was rather dangerous for obvious reasons.

Additionally, the new math functions are always compiled
with GCC 8 (even on x86_gcc2), as it seems GCC 2 does
not quite understand some of the union-aliasing they
use (a lot of which was added in C99, I suppose.)
FFmpeg on x86_gcc2 is already compiled with GCC 8
and that has so far worked out well, so there should
not be any problems caused by this.

I did verify that ARM and PPC at least still compile,
though other architectures may require a bit more work
(they are not bootstrapped so I could not do much.)

Should fix #14933 among other issues.

Change-Id: Ifeea0ddab23a8d0480fc26dece1b0192afc263bd
2020-01-18 18:10:31 -05:00
Augustin Cavalier dda1013cdb posix/math: Use the GCC built-ins when possible for isnan(), etc.
glibc does the same. Technically, some of these builtins did
not exist / did not work before GCC 4.4, but the source tree
cannot be compiled with a version that old anyway.

x86_64 and _x86 need to keep the old functions for now, of
course; but all other architectures can probably feel free
to drop the s_isnan, etc. functions from their glibc.

This will make upcoming patches easier...

Change-Id: Ifb76ea74076553228c9741a8ee3ecb0e1cf736a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2076
Reviewed-by: waddlesplash <[email protected]>
2020-01-06 07:44:30 +00:00
Augustin Cavalier a1e74397a1 build: Rework gcc2 test_app_server build logic a bit. 2020-01-05 17:17:41 -05:00
Augustin Cavalier d927a11fff Revert "x86_64: use a working implementation of atan2"
This reverts commit 230ade30261a44cd02ed689a34b953406d0cc677.i

This just causes applications that call atan2 to crash. So, clearly,
it is not working.
2020-01-04 15:51:02 -05:00
Augustin Cavalier d2f7af0edc Revert "deprecate gets and tmpnam"
This reverts commit 92e9211d7b.

It broke the build, and apparently cannot be fixed until GCC
has been patched.
2020-01-04 15:26:08 -05:00
Augustin Cavalier 726445b72e XHCI: Clean up TRACE() statements. 2019-12-31 20:42:15 -05:00
Augustin Cavalier 0981cb8686 XHCI: Rework TRB size handling.
There is a section of the spec that dictates how TRBs need to be
sized within a TD, and we were not following that. This should
bring us into compliance.

See inline comments for more details.
2019-12-31 17:52:02 -05:00
Augustin Cavalier 84fc83275d XHCI: Update all references from the specification 1.1 to 1.2.
Only comments changed, no functional.
2019-12-31 17:52:02 -05:00
Augustin Cavalier c9606abe0c boot_loader: Add an error message to the "Continue booting" item.
This way, when it is disabled, at least there will be an error
message giving some indication of what has gone wrong.
2019-12-30 19:07:21 -05:00
Augustin Cavalier 94d36145df mount_server: Remove the scary warning for BFS partitions.
Even if we are still not so sure about the veracity of other
filesystem drivers, the BFS driver has had no reported corruption
bugs for quite some time (almost 2 years I think). In fact the
only real corruption issues heard of recently are from KDLs,
which are also a vanishing issue.

So, disabling the warning entirely for BFS partitions probably makes
sense at this point.

Change-Id: I5470c956d57b90ea00b647bf15299ba606ba01c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1822
Reviewed-by: waddlesplash <[email protected]>
2019-12-27 23:04:54 +00:00
Augustin Cavalier 978182e00a sis19x: Add szharski to the copyright header.
He wrote the original version of haiku_sge_get_mac_addr_apc.
2019-12-25 19:01:50 -05:00
Augustin Cavalier ca869f7df6 sis19x: Add glue mechanism for get_mac_addr_apc.
The PCI enumeration functions are not implemented in the compat layer,
so we need a glue function that performs the Haiku equivalent here.
This code existed in the old Haiku-native driver, so it's just
copied from there.
2019-12-23 16:34:45 -05:00
Augustin Cavalier 21a5c628fb XHCI: Add buffer count to "unable to allocate" trace, fix freeing.
FreeDescriptor needs to know buffer_size and buffer_count,
so we have to initialize these for the fail-exit case to work.
2019-12-23 15:32:26 -05:00
Augustin Cavalier 93904285cf USB: Add overall timeout to the PhysicalMemoryAllocator.
The within-an-attempt timeout did not successfully break up
deadlocks that occur on a system with a lot of USB transfers
going, as we may never hit 2 seconds in between wake-ups,
but the size requested may be un-fulfillable regardless.

So, now we have a 2-second overall timeout. This fixes
the system freeze in #15569, but now attached USB disk
drives enter a Stall state, making the system unusable
anyway.
2019-12-23 15:31:34 -05:00
Augustin Cavalier a77769a549 USB: Rework the PhysicalMemoryAllocator to use MutexLocker.
No functional change, but will make some subsequent
changes easier and more fail-proof.
2019-12-23 15:29:43 -05:00
Augustin Cavalier 006add310a boot_loader: Fix initializing old package volume states.
In hrev53370, leavengood refactored this function out of
PackageVolumeInfo::SetTo(). Inside that function, there
is a "state" variable which is initialized to the first,
default state, which is always the head state.

Refactoring it out of there and changing this to NULL meant
that GetNext would always return a NULL state, so the
states would never be initialized, and booting from an
old state would thus not be possible.

Fixes #15380.
2019-12-23 14:25:02 -05:00
Augustin Cavalier 470db787dc BuildFeatures: Remove the gnuefi build feature.
Now unused since the switch to the Fuchsia EFI headers.
2019-12-23 12:38:47 -05:00
Augustin Cavalier 6302cfeda2 sis19x: Replace native driver with the one from FreeBSD 12.
As per #15550, it seems the native driver does not work and causes
the system to lock up. Hopefully the FreeBSD driver will fare better.
2019-12-16 18:43:10 -05:00
Augustin Cavalier caef66c2cd freebsd_network: Return to allocating the segments in dmamap_load.
It seems some drivers do not create dmamaps for all their bustags,
so we can't allocate the segments there. And of course, some also
do not go through dmamem_alloc, so the only option then is to revert
to where FreeBSD allocates them, inside dmamap_load.
2019-12-03 17:52:23 -05:00