Commit Graph

60961 Commits

Author SHA1 Message Date
Kyle Ambroff-Kao
e8a484b0f6 tests/kernel: Fix KPath tests
42e3c6f97 changed the default buffer size for KPath, but the tests
still assume the original default.

Change-Id: I2712d81bbdc678bbaae11e975b0a9a05f5a9151f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2175
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-01-31 15:22:55 +00:00
Murai Takashi
6a27de893b deskbar Fix PVS V595
Add NULL check for 'fBarView', since it might be NULL
at line 107.

Change-Id: I293e551dd4ab6ac33b7d4a6d1bf736bcd142cb80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2170
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-31 11:49:51 +00:00
Murai Takashi
f67a677986 soundrecorder: Fix PVS V595
Add NULL check for 'fBitmap', since it might be NULL
at line 71.

Change-Id: I70bf4d29e20bbe1c62d972f576dc52d4783933d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2169
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-31 11:46:42 +00:00
X512
958d3f4375 BeBuild: set default visibility for _EXPORT
This is required for building shared libraries with hidden by default symbol
visiblility such as mesa.

Change-Id: I7150629aaea61d7c9b6e641d32913c5cc7c96543
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2159
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-30 00:32:32 +00:00
Kyle Ambroff-Kao
aa7ac127f8 tests/kernel: Add tests for BOpenHashTable
Linking libkernelutilstest.so with libbe to for use of BObjectList in
the tests.

Change-Id: I1abb991e240dd522821a71ef54d22a1ca7957283
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2165
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-30 00:30:00 +00:00
Alexander von Gluck IV
e53e22439c efi/types: Only set ms_abi on x86
* Upstreamed to Fuchsia via:
  https://fuchsia-review.googlesource.com/c/fuchsia/+/358320

Change-Id: I3232cc1a5bf6194d5f2fa82f13668ca089faca92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2174
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-30 00:21:54 +00:00
Murai Takashi
5529e8d2df deskbar: Fix PVS V757
Use dynamic_cast to menuItem after NULL checking to it.

Change-Id: I3fdabf5a091922587f498cf5fa116f8824bbfc6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2160
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-29 09:34:22 +00:00
Alexander von Gluck IV
250b21a583 system/u-boot: Some 64-bit cleanups to our u-boot code
Change-Id: I70c50b36cd56263dcb37faeffc4037dea4af88c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2171
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 18:32:09 +00:00
JaniceTr
3b11f603cf Adding 96 and 128 size icon options for Launchox
In the desktop the icons can reach 96 and 128 pixel. With the increase of resolution those are good dimensions.
The max size of icons in LaunchBox was 64, so new sizes were added.
Fixes #13835

Change-Id: Id4db66f52b265aa4f94742c83f7d65ed136ba9c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2172
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2020-01-28 18:16:14 +00:00
Murai Takashi
2afe4c52c8 appserver: Fix PVS V595
Add NULL check for fAllocator, since it might return NULL.

Change-Id: Ifb72266b4d4c5f076f0c663066dc9b81e94fc201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2162
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-28 18:01:14 +00:00
Adrien Destugues
88d73c6cf8 intel_extreme: set the "image size" register on generation 4 and below
This is undocumented, but required for GMA 945 and probably earlier
devices as well. The register is reserved in later generation 4 devices,
and not mentionned at all in later versions.

Fixes #15655.
2020-01-28 18:56:59 +01:00
Alexander von Gluck IV
1d622b8d66 build/repositories: Add riscv64 HaikuPorts and fix Cross
Change-Id: I8963a66dd30e8d964c1a1cf0b9140615592f7e46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2167
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-28 13:45:49 +00:00
Adrien Destugues
d8572f79ba Fix x86_64 build.
__rdtsc is not directly a builtin, x86intrin.h needs to be included.
2020-01-28 13:04:39 +01:00
Alexander von Gluck IV
3a85d802ee libroot/riscv64: Fix build. Add MIT optimized bswap from rv8
Change-Id: I4d0e1ec34d1568594cac0f7378f87852c997ab81
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2166
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 11:48:42 +00:00
Alexander von Gluck IV
15fb7d88e9 riscv64: Add missing (slightly modified) fenv.h from FreeBSD
* A few tips for future folks follows.
* fenv.h gets wrapped in our buildtools
* If anything in the arch fenv.h "doesn't work" buildtools
  will silently fail early on (autotools HAVE_FENV_H)

Change-Id: Icae064fde42af3bbed5ea2eadfaa8c18c677e6a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2164
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 11:48:42 +00:00
Adrien Destugues
2d697067b2 Further cleanup/optimization of system_time
On gcc4, we can use the __rdtsc builtin. On gcc2, provide a similar
inline-able version of rdtsc, and remove the rdtsc function written in
assembly, saving a call/ret on every call.

There has been some discussion about performance, but note that this is
only bootloader code, it is not used when the system is up and running,
therefore performance is not that critical.
2020-01-27 21:46:43 +01:00
Alexander von Gluck IV
97e67e3f63 repo/HaikuPorts: Bump gcc for sparc to resolve post-musl changes
Change-Id: I900712b13275f64c5f0955a7b9818b2e4d450a9f
2020-01-27 13:50:36 -06:00
Adrien Destugues
ec4e9ea8bc intel_extreme: remove unhandled generation defines
- 7xx (1st gen) has no driver in Haiku or is handled by the intel_810 driver
- PowerVR has no driver in Haiku

So there is no point in having those in the intel_extreme driver.

While I'm at it, fix the video timing/resolution constraints for
sanitize_video_mode.
2020-01-27 13:58:52 +01:00
Adrien Destugues
5cd8219db6 Remove annoying message at start of build. 2020-01-27 13:49:47 +01:00
X512
7512485b94 Optimize system_time function
The uint128 code does not optimize as well as expected. Since this
function can be called quite often, use a more optimal implementation
(quite similar to what we had for x86_64 before refactoring).

Unfortunately this is still not as good as the hand-optimized assembler
previously used for 32bit x86, unless compiled with clang, where it gets
pretty close.
2020-01-26 14:48:30 +01:00
Adrien Destugues
d6a742cafd DeskCalc: Use IsLocked() instead of Lock()
As suggested by korli.
2020-01-26 14:44:12 +01:00
Adrien Destugues
947faad871 Remove mercurial sources from release images
We don't ship the binaries, so I don't see why we would ship the
sources.
2020-01-26 12:40:01 +01:00
Adrien Destugues
edb3467aca BView::DrawBitmap: document "options" parameter 2020-01-26 11:24:04 +01:00
Adrien Destugues
f8969c78e5 DeskCalc: use an autolock to simplify clipboard handling. 2020-01-26 11:23:41 +01:00
Adrien Destugues
190d0372b3 Fix system_time implementation
When refactoring this and writing a common implementation for x86 and
x86_64 I missed a step in the calculation. We need to divide by 2^32 to
keep the value in the expected range.

Fixes #15658.
2020-01-26 10:44:05 +01:00
Adrien Destugues
3cba7254a8 DeskCalc: fix gcc8 build. 2020-01-25 22:52:50 +01:00
Adrien Destugues
cddaf7625c btrfs: fix build. 2020-01-25 22:09:42 +01:00
Adrien Destugues
670af4fc7b More build fixes. 2020-01-25 21:35:34 +01:00
Adrien Destugues
1bd3bfd038 DeskCalc: fix build.
Apparently, this code was submitted to Gerrit without checking if it
built.
2020-01-25 19:54:31 +01:00
Adrien Destugues
fadca4b173 intel_extreme: disable pipe configuration
This code just sets nonsensical things in the pipe control register, so
disable it and add FIXMEs if someone wants to get it to work someday
(but it's not needed for modesetting an already up and running display).

Also remove some other places where we write to non-existing registers.

Fixes #15628 (for real, this time).
2020-01-25 19:48:48 +01:00
Adrien Destugues
1fa0a12d75 intel_extreme: add a command to dump pipe config
I look at this all the time and entering register offsets and converting
from hex was getting annoying.
2020-01-25 19:48:47 +01:00
Adrien Destugues
03ee42a8eb intel_extreme: Keep LVDS on its assigned pipe also for SandyBridge
We don't manage to change the transcoder there, either, so just keep
using the selected one (A if no other display is connected, and B if
there is one, it seems).

We were configuring pipe B but the LVDS panel would still display pipe
A. And, we were not configuring pipe B properly, even. The whole
modesetting only worked by occasionally setting some registers for pipe
A ("just in case", said comments).

Now we actually configure the pipe we are using, which makes more sense
and brings us a step closer to multi monitor support.
2020-01-25 19:46:40 +01:00
Murai Takashi
b35395fef1 icon-o-matic: Fix resource leak
When exception was thrown, resources allocated to 'fd' and 'p'
weren't released.
Fix PVS V773

Change-Id: I8a546cbbec4e5060b385cc11f0f33b63f61a0924
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2156
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 14:18:39 +00:00
Adrien Destugues
696d127d12 Live update of Input preferences device list
- Implement watch_input_devices in input_server, as it was TODO. For
  now, only one watcher is allowed at a time.
- Use it in Input preferences to get notified about added and removed
  devices and update the device list accordingly.

Change-Id: I52018af53738e68271d6d63b5bea31fd7cab1b3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2041
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:58:48 +00:00
Adrien Destugues
c5e9dd9b68 Fix btrfs_shell build
The hacks to still use actual system headers for zlib didn't quite work.

- Define Z_SOLO, which makes zlib build without any system include
- Remove use of std::max and #include <algorithm> from AVLTree
- Do not include DebugSupport.h because it uses system headers
- Do not include uuid.h and define just what we need

Now it's possible to compile the btrfs_shell on Linux.

Change-Id: I74a14b5f6804db45ab5a9f582ab493d696376fd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2098
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:58:15 +00:00
Andrej Antunovikj
7b4d924f98 cpu: Extract shared x86 code from efi & bios_ia32
This issue was initially detected by PVS Studio (issue number V547) and fixed
as part of Google Code-in 2019.

The initial problem was the calculate_cpu_conversion_factor function
which had been copied in the BIOS and EFI versions of the boot code.
Further investigation led to more duplicated or very similar functions
being identified.

Introduce an arch_cpu.h for the x86 boot platform to group these things
in a single place, and adjust the BIOS and EFI code to call into that.
Note that the BIOS and EFI code is still a little platform specific,
ideally there should be a boot_arch_cpu_init() function for each
architecture as already done for openfirmware and u-boot.

Also remove some irrelevant comments from copypasted files for other
architectures, as that was filling my git grep with useless noise.

Change-Id: I16d815f0bf015cec0b4e03cc14f3cc447c7164c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1985
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:56:46 +00:00
Zotyamester
edad811b96 Game Kit: rewrite GameSound and GameSoundDefs headers
Change-Id: I5efee795a73a9637f34ed8ffa4fbeeda09eb7a88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2104
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:43:02 +00:00
Ra-V2
e9d6c3150e Game Kit: rewrite StreamingGameSound.h
Change-Id: Ibd5d77236dc14ca605b0925c1177e64ca9e5a5d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2113
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:42:41 +00:00
Zotyamester
d623ab8459 DeskCalc: Remove audio feedback and add error handling
Change-Id: If470e91581d7569ed2589f67721e813cccd83fe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2095
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:42:20 +00:00
Jaroslaw Pelczar
1e7069152e arm64: Add initial stubs for stackframe and time
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie17279a9c17ab8bb7a812fe83d1b668853f96d5c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1858
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-25 08:52:10 +00:00
Jaroslaw Pelczar
384d4e935c arm64: Add stubs so kernel can at least link
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I2476a6346c912c4aa0c26e4f3720ea2c2690b669
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1857
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-25 08:51:39 +00:00
Jaroslaw Pelczar
cbdb30f467 arm64: Add more random scripts to get stuff to compile
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie043af5b7471f626a1ffe100848151c832dcc439
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1853
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-25 08:50:51 +00:00
CruxBox
80f7396496 Making of xfs file system
xfs_shell is modeled over bfs_shell.
It fails to mount the filesystem as expected
(the filesystem code isn't implemented).

Change-Id: Iaf88c1f4aef338f249fdc58bc27a3ad76ebd5d95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2096
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 08:49:09 +00:00
Autocomitter
89ae33c9f6 Update translations from Pootle 2020-01-25 08:47:08 +00:00
Alexander von Gluck IV
79310ea4e1 docs/develop: Add doc on debugging bootloaders with gef
Change-Id: Ib2d161adf75904f592286451279c77fb61ea52c2
2020-01-24 15:13:29 -06:00
X512
7740e52c16 TextSearch: fix passing search string to grep
Fix proposed by phoudoin.

Fixes #15650.

Change-Id: Ie7177aaa39ff593445506983cb0725b75ca7bc7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2149
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-24 15:23:01 +00:00
bitigchi
a309c6eeb2 Use UTF-8 HEX values instead of UTF-32 values
The previous commits resulted in TOFU (black diagonal shape with
question mark in it). As per humdinger's suggestion and copying from how
€ sign was encoded, this is another try at fixing non-break space and
Turkish Lira Sign.

Previous PR: /c/haiku/+/2004/1

Change-Id: I3775c178b1921e7dff7ceb660c8fda1152050c94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2148
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-01-24 15:22:11 +00:00
Murai Takashi
da3fe7140a mail_daemon: Add missing throw
Fix PVS V596
 Pointed out in PVS-Studio blog
 https://www.viva64.com/en/b/0644/

Change-Id: Icf1f2d651dab84730fd348759ee7d19264ccbf75
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2141
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-23 17:03:04 +00:00
Adrien Destugues
eacbae702d agg: fix build. 2020-01-22 19:25:16 +01:00
Panagiotis Vasilopoulos
f0b6c6a24b Game Kit: rewrite DirectWindow, FileGameSound and SimpleGameSound headers
Change-Id: I45687f8164dbc915a0cb6ca1bf4c0211761cb098
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2108
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-22 00:33:44 +00:00