Commit Graph

60263 Commits

Author SHA1 Message Date
Augustin Cavalier
05901d8963 kernel/cpu: Only root can enable or disable CPUs. 2019-07-04 17:00:28 -04:00
Augustin Cavalier
6f0aa00c6b kernel/user_debugger: Add missing permissions checks.
Part of #14961.
2019-07-04 16:54:50 -04:00
Augustin Cavalier
a90e9ba7b9 kernel/team: Create a team_get_team_struct() function and utilize it.
Cleans up some lock/get/unlock sequences, and makes it possible
for external consumers to get team structs (which will be necessary
for permissions checks.)
2019-07-04 16:54:33 -04:00
Augustin Cavalier
6f6cba7c16 kernel/system_profiler: Do not allow non-root users access.
The single-team profiler can still be used without root access.
Part of #14961.
2019-07-04 16:41:36 -04:00
Augustin Cavalier
ebb0db62d1 kits: Only export private dummy copy constructors for R5 ABI.
Fixes #546 (after all these years!)
2019-07-04 15:24:23 -04:00
Augustin Cavalier
45dcac89df usb_hid: Fix copy/paste error in HIDReport.
Spotted by Coverity.
2019-07-04 12:39:31 -04:00
waddlesplash
8b19fb0f55 Partially revert "XHCI: Set the TRB_3_ENT_BIT on the final Link TRB, also."
This reverts commit 63895cb5f2.

This does go against the specification, and on a very small set of
XHCI hardware, seems to break booting (#15137). So, let's revert it;
the buggy hardware it potentially helped will just have to deal with
it.
2019-07-03 20:51:05 -04:00
Adrien Destugues
b11f8cb28c tty driver: build fix. 2019-07-02 22:45:47 +02:00
Alexander von Gluck IV
5965cdf80b glibc/riscv64: Add native missing sqrt functions from BSD
Change-Id: I7dbbb5be0dd56b2a0b5148a4f7f81c66b76e9632
Reviewed-on: https://review.haiku-os.org/c/1554
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 13:34:46 +00:00
Alexander von Gluck IV
f1f452b3cf libroot/os: Fix missing time funcs on riscv64
Change-Id: I291ebc949d63860e20eb609e4d3d2f600309d4e9
Reviewed-on: https://review.haiku-os.org/c/1553
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 13:34:22 +00:00
John Scipione
a9d549c969 BFS: Set -std=c++11 in bfs_shell c++flags for gcc >= 3
Required for use of non-static data member

clang complains about this line in CheckVisitor.cpp:
memset(&Control().stats, 0, sizeof(check_control::stats));

some explination:
https://stackoverflow.com/questions/29359661/clang-error-invalid-use-of-non-static-data-member
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html

Referencing a non-static data member inside a struct was retroactively
made undefined in C++98 and only allowed on C++11 even though gcc
permits the code to compile.

No change to functionality intended.

Thanks Jérôme and waddlesplash

Change-Id: Ic6bc332cf2796c709584488c60a067cd341bf894
Reviewed-on: https://review.haiku-os.org/c/1503
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 10:52:02 +00:00
Alexander von Gluck IV
0dbb417d43 3rdparty/docker/bootstrap: Fix defaults to be more generic and engine selection
Change-Id: I8a1e3c6bd641ea08a5a06985389269d708d94655
2019-07-01 14:07:03 -05:00
Adrien Destugues
e399a8832d usb_serial: don't allow Service() on a closed device.
- In Service, check that the device is open.
- In Close, clear dangling pointers to more easily spot problems and
avoid risk of accessing freed memory.

Change-Id: I970c4b8b8ec14db448388f74fc275634801c359a
Reviewed-on: https://review.haiku-os.org/c/1551
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-07-01 03:01:07 +00:00
Adrien Destugues
865a165f1c legacy tty driver: share common files with the new implementation
Let's make it easier to keep them in sync for now.

Change-Id: Ic0f1488c7f7da7770db56c25d07fb3ead5e3649e
Reviewed-on: https://review.haiku-os.org/c/1550
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-01 03:01:07 +00:00
Fabio Tomat
46aa215360 Friulian keymap
Change-Id: Ib766f88b21d40c8a014d85d097bb557bca3c235d
Reviewed-on: https://review.haiku-os.org/c/1548
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-01 03:00:36 +00:00
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