Commit Graph

60248 Commits

Author SHA1 Message Date
Murai Takashi
749c57a325 drivers/input/wacom: Fix -Wformat=
Change-Id: I164aa8e0ad7e0c19f7e59d7b6e36877fde9f2877
Reviewed-on: https://review.haiku-os.org/c/1547
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:17:08 +00:00
Murai Takashi
20c352526a drivers/audio/emuxki: Fix -Wformat=
Change-Id: I2ab8be10ed9f020b139f81d8826dc20d83fa1e4e
Reviewed-on: https://review.haiku-os.org/c/1542
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:16:53 +00:00
Murai Takashi
4c031f6847 drivers/graphics/radeon_hd: Fix -Wformat=
Change-Id: I383a3685247c8b6b00062ac135cb1f9144ec8039
Reviewed-on: https://review.haiku-os.org/c/1546
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:16:35 +00:00
Augustin Cavalier
63895cb5f2 XHCI: Set the TRB_3_ENT_BIT on the final Link TRB, also.
This should not be necessary due to a note in the specification,
but it seems some controllers may not obey that; see inline comment.

Possibly fixes the "mouse slowness" of #15115 that began following
the Event Data changes.
2019-06-29 15:46:52 -04:00
Augustin Cavalier
8bb337b5fe libnvme: make configure_aer failing a warning.
The spec generally requires this feature, but some emulated hardware
(e.g. QEMU) does not support it. SPDK seems to just ignore the
error and continue on with a warning, so let's do the same here.
2019-06-29 15:25:21 -04:00
Augustin Cavalier
9d75a81958 libnvme: Actually implement nvme_static_assert. 2019-06-29 13:40:30 -04:00
Augustin Cavalier
e2aa2b55a7 nvme_disk: Trace I/O errors to syslog.
This really should never occur, but in case it does, whoever called
us may not print such an error, so we should.
2019-06-29 13:22:26 -04:00
Murai Takashi
b2de0c59cb drivers/graphics/intel_810: fix -Wformat
Change-Id: Ia52bbcdc98847910c36bb1495418dbb3f0bc3cb0
Reviewed-on: https://review.haiku-os.org/c/1543
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:44:39 +00:00
Murai Takashi
66fa08aa81 bin/mail_utils/mail2mbox: Fix -Wformat=
Change-Id: I38ebad839c96d4c5ff2c38f678cfa03c58931335
Reviewed-on: https://review.haiku-os.org/c/1545
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:44:04 +00:00
Murai Takashi
44c006d567 file_systems/reiserfs: Fix -Wformat=
Change-Id: Ic011a5407ff5ecb832606541d258005217dcd6be
Reviewed-on: https://review.haiku-os.org/c/1529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:38:12 +00:00
Alexander von Gluck IV
bc71f97ed7 efi: Don't assume x86 and x86_64 build flags
Change-Id: If11a892665d08f61c46b5a6a5b4bf0453225c3ee
Reviewed-on: https://review.haiku-os.org/c/1533
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-06-28 18:12:29 +00:00
John Scipione
2a1cc90e3e configure: use stat -f on bsds, -c otherwise
Move host platform detection up, fix indentation.

If the host platform is a BSD (darwin|freebsd|openbsd) use stat -f,
otherwise use stat -c to check for a restrictive umask.

Change-Id: Ifb57eb69153221a23a84700445ff08a96517844a
Reviewed-on: https://review.haiku-os.org/c/1535
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-28 03:31:06 +00:00
John Scipione
fdc59e4e7e fs_darwin fix warning: '&&' within '||'
place parentheses around the '&&' expression to silence this warning

Change-Id: Ie6152d2371ed65f57e6e75c9541263a5e1511513
Reviewed-on: https://review.haiku-os.org/c/1532
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-25 06:47:10 +00:00
Murai Takashi
37c1db12f3 add-ons/kernel/file_systems/fat: Fix -Wformat=
Change-Id: Ife9278565adedc95d8574b1a539c3d6c5642a565
Reviewed-on: https://review.haiku-os.org/c/1520
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-24 21:58:21 +00:00
Murai Takashi
5caa9c867e drivers/audio/hda: Fix -Wformat=
Change-Id: Ifbc08eefc53cac2e23fc3ac4b003bf4d897265d7
Reviewed-on: https://review.haiku-os.org/c/1522
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-24 21:58:10 +00:00
Murai Takashi
fe5e83a681 drivers/audio/ac97: Fix -Wformat=
Change-Id: I454ca76cfd5f8ebddb74c6b68a940d0444a82bb1
Reviewed-on: https://review.haiku-os.org/c/1530
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-24 21:57:53 +00:00
Alexander von Gluck IV
650c8b81a2 nvme: Use kernel private memory barriers
Change-Id: I1747de7afb2a5b2ec845c1c14f013dbcb9bd72f8
Reviewed-on: https://review.haiku-os.org/c/1528
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-06-20 20:20:03 +00:00
Alexander von Gluck IV
b313d63eae arm/atomics: Move cpu-specific memory barriers to arch_cpu
* Now matches the rest of the architectures.

Change-Id: I6699e0c8f729923770f136f2c9599185a685336a
Reviewed-on: https://review.haiku-os.org/c/1527
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-06-20 20:20:03 +00:00
Alexander von Gluck IV
37761761a0 jam: Style fix in build/MMCImage
Change-Id: Idb169f59ed77c9038e48e0e26e4fa53e92103ffe
2019-06-19 19:28:52 -05:00
Alexander von Gluck IV
f2762b2d56 fdt/serial: Fix tracing, enhance
Change-Id: Ibc42267fa1208344dbf9062075dbad7086e4e3d4
2019-06-19 19:28:02 -05:00
Alexander von Gluck IV
75262df789 arm: Fix SD Image after haiku_loader changes
* haiku_loader.u-boot doesn't fit in fat32 like haiku_loader.ub
* Adjust when writing. Update u-boot scripts to expect new filename
* Shrink loader partition to 32M, add our filesystem to end

Change-Id: I62936526a7dea2c41e26a7c0f9e05a368622a6a3
2019-06-19 16:02:39 -05:00
Alexander von Gluck IV
23c507bd15 docker/bootstrap: Add alternative fedora bootstrap container
Change-Id: I2e77f04a6b74858abf74a266a360dbf1dba4bed7
2019-06-19 11:25:05 -05:00
Alexander von Gluck IV
4b0251ba5b docker/bootstrap: Improve local code injection
Change-Id: Ib1961d829ef1418a9b64307c73a01bab3520279a
2019-06-19 11:24:18 -05:00
Alexander von Gluck IV
cb343bfe59 nvme: Fix nvme driver build on non-x86
Change-Id: Ia7a1dc56bcec69678e1fc2d8a427c24a32215bb8
2019-06-19 08:58:06 -05:00
Alexander von Gluck IV
81afd20b21 arm/repositories: Add final missing requirements
Change-Id: I7fdc23160719774d8977ae6b5ac4af8a5d0ee358
2019-06-19 08:45:32 -05:00
Alexander von Gluck IV
70ebf78e12 arm/repositories: Add missing ncurses6 package
Change-Id: I6ca29abbcde80bd09db4c1a4808bd71346afd20e
2019-06-19 07:57:37 -05:00
Alexander von Gluck IV
836e51c326 arm/repositories: Update for latest build_packages
* For tracking, there are *mega* hacked together using
  llvm's linker and functionality isn't a sure thing.
* Thanks waddlesplash for the sketchy changes :-)
* Hopefully gets non-bootstrap arm builds working again
  and let us work on the toolchain without blocking arm
  development.

Change-Id: I0617ed83cc757d098e6464222405f75eed91196e
2019-06-18 19:42:16 -05:00
Augustin Cavalier
8c8615a293 libroot/arm: Add generic_stack_trace.
Fixes the link of libroot_debug. Now Haiku ARM bootstrap builds
complete successfully!
2019-06-17 21:07:44 -04:00
Augustin Cavalier
99bcdc503c bootloade/arm: Change a physical address to phys_addr_t.
Fixes a compile error with recent GCC.
2019-06-17 21:07:16 -04:00
Augustin Cavalier
be8d35d2a4 HaikuPortsCross/arm: Fix version of gcc_bootstrap package. 2019-06-17 21:06:50 -04:00
Augustin Cavalier
f1e80d365b libroot: Flesh out glibc floating point support for ARM.
The last time someone touched this directory, there was no floating
point support configured in ARM. Now we are targeting ARMv7a+, which
always has a hard FPU, so we need this now.

With this, a haiku.hpkg can (finally) be built again (at least
under lld, anyway!)
2019-06-17 20:44:56 -04:00
Augustin Cavalier
57e40b4406 Debugger: Use the BVariant default constructor in Token().
The value-based constructor does the same. Fixes an "ambiguous
call" error on ARM builds.
2019-06-17 19:59:40 -04:00
Augustin Cavalier
750161f4c0 ArchitectureRules: Remove -Wcast-align from the default set.
It is incredibly noisy on GCC8, and not really that valuable
for us at present. Individual architectures (SPARC?) can turn
it on if desired.
2019-06-17 19:58:39 -04:00
Augustin Cavalier
c6b9a07f44 ArchitectureRules: Allow overriding HAIKU_LINK.
I am using this to use clang+lld for linking on ARM builds,
which seems to be more tolerant than binutils ld is, and
gets the build a bit farther for now.
2019-06-17 19:57:58 -04:00
Augustin Cavalier
b6b66df0c5 ArchitectureRules: Disable usage of -mapcs-frame on ARM.
It has been long since deprecated by GCC.
2019-06-17 19:57:22 -04:00
Augustin Cavalier
f861a8596a XHCI: Set the ENT bit on the Status stage TRB for Control transfers.
Otherwise, it may deschedule this pipe without evaluating the
Event Data TRB and generating the interrupt. Should fix the
"slowness" issue of #15115.
2019-06-17 19:16:11 -04:00
Augustin Cavalier
4f8124c5e3 USB: Add initialization checks to Pipe usages of Device.
Complements the ones added earlier to the module itself.
Should fix the panic portion of #15115.
2019-06-17 19:14:29 -04:00
Augustin Cavalier
ceec04eaf5 Deskbar: Add a declaration for a constructor to TStartableMenuBar.
Appeases GCC2.
2019-06-17 18:41:37 -04:00
Murai Takashi
a76e1eb3c7 bin/top: Fix -Wformat=
Change-Id: Ie408017684313531f2dc18d9401cd54bb00a7e12
Reviewed-on: https://review.haiku-os.org/c/1515
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-17 22:34:37 +00:00
Murai Takashi
f5fb43c94f bin/vmstat: Fix -Wformat=
Change-Id: Id0a03d868143880d50c685d830b23017293f3e38
Reviewed-on: https://review.haiku-os.org/c/1518
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-17 22:34:37 +00:00
Murai Takashi
fe6e591432 bin/mail_utils/spamdbm: Fix -Wformat=
Change-Id: I912a7eac48e6e0343a59821fb1026ef54e6b0d75
Reviewed-on: https://review.haiku-os.org/c/1521
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-17 22:34:37 +00:00
Murai Takashi
7d633b87d8 bin/mkdos: Fix -Wformat=
Change-Id: I10b44b2a660fb7db930b7d3ec139c9ada71e8109
Reviewed-on: https://review.haiku-os.org/c/1519
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-17 22:34:37 +00:00
Augustin Cavalier
74c38cab40 BMenuBar & Deskbar: Make the hack to call ShowMenuBar a lot less ugly.
The previous hack, which as the comment (and __MWERKS__) implies
dates all the way back to the Be era, finally broke: int32 is "int"
on non-x86, not "long", and so this generated an undefined symbol
error on ARM.

The best solution seems to be to make StartMenuBar merely protected,
and then make a subclass where it is fully public to call it.
This is a lot less fragile (and much less ugly.)

Change-Id: I0519d0d9eeb1cc4523d0c6dd4fdfe8688ed1092c
Reviewed-on: https://review.haiku-os.org/c/1516
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-17 11:49:48 +00:00
Augustin Cavalier
581a586f95 XHCI: Change ADDR print to PHYSADDR to appease GCC. 2019-06-16 23:08:36 -04:00
Augustin Cavalier
d511533a48 build_cross_tools_gcc4: Keep static libstdc++, but rename it.
The gcc_bootstrap recipe still needs it, it seems.
2019-06-16 20:30:53 -04:00
Augustin Cavalier
6a2133b166 XHCI: Overhaul endpoint ring logic.
The changes in this commit are large but also subtle, so
an explanation of how they came to be seems to make sense:

Earlier today I tried booting Haiku on QEMU under USB3 ... and
discovered that it didn't work, with the "Operation timed out"
message from in usb_disk upon failing a data transfer. Indeed,
turning on tracing showed no event was being posted for the
transfer. So, I downloaded QEMU's source code, turned on XHCI
debugging, and began tracing what was going on.

Eventually I determined by adding more and more printfs into QEMU's
XHCI implementation that what was occuring was that it was evaluating
a Link TRB, hitting an empty TRB, and then deciding that the TD (aka.,
the "run" of TRBs) was not ready to be consumed, and bailing.

In fact, that very condition (a link TRB leading to an empty TRB)
is precisely what _LinkDescriptorForPipe did before this commit.
We allocate only a small (8 before this commit, 16 + 1 after this
commit) TRB ring for each *endpoint*, and larger ones on a per-*transfer*
basis; and just write Link TRBs onto the Endpoint ring pointing to
the transfer TD, and then one at the end of each transfer TD leading
back to the endpoint ring.

The reason this occured inside usb_disk, and not earlier (e.g.
during descriptor fetching), is that QEMU has special logic around
determining transfer lengths of control transfers which made it
not perform the "TRB valid?" check after evaluating the Link TRB.
So, being implementation-defined behavior, I am guessing that
this same problem was also the cause of boot failures on real
hardware.

This also means that the problem was essentially a race condition,
as if we posted another transfer to the ring before it evaluated
the TRB, it would always work.

The solution of course is to put some valid TRB at the end of
every transfer on the Endpoint ring. A "no-op" would have done
the job (well, maybe not, it appears QEMU does not implement "no-op"
TRBs for some reason), but there was another feature of XHCI
that we did not take advantage of: Event Data TRBs. These provide
the "total transferred length" as well as the status, instead of
the "remaining length" of the final TRB.

This of course required refactoring the use of the CHAIN bit
and the IOC bit (namely, more or less all TRBs save the Event Data
get the CHAIN bit set, and none save Event Data get the IOC bit.)

There was also an update to the XHCI spec since I've last committed here,
so the new comments are in reference to the "XHCI 1.2" spec. (I'll
eventually find time to update the old ones.)

Fixes booting from USB3 on QEMU, and most likely also on
bare metal, where it at least got to usb_disk (it does
not seem to fix the case where usb_disk does not even start.) Whew!
2019-06-16 19:46:16 -04:00
Augustin Cavalier
9be728dee0 XHCI: Set the DCS bit in SetTRDequeue.
It is needed here as in ConfigureEndpoint. See inline comment.
This matches FreeBSD's behavior.
2019-06-16 19:46:16 -04:00
Augustin Cavalier
4029b219e9 XHCI: Fix a -Werror=format. 2019-06-16 19:46:16 -04:00
Murai Takashi
e18440dc83 bin/shutdown: Fix -Wformat=
Change-Id: I03d89d576334fbf73134c79f3c6903860a0d447f
Reviewed-on: https://review.haiku-os.org/c/1513
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-16 22:09:54 +00:00
Murai Takashi
312640b12c bin/version: Fix -Wformat=
Change-Id: I71fd38b6d1bb1782170438b27f66c462dcec0f0b
Reviewed-on: https://review.haiku-os.org/c/1514
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-16 22:09:37 +00:00