Commit Graph

61172 Commits

Author SHA1 Message Date
Jérôme Duval
cffa2c68a8 PCI: update subclasses and capabilities, add usb4 programming interface
from https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_12__v9_Jan_2020.pdf

Change-Id: I0a9ec565c742f4ee230759be0834aff5b7ffcb97
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2307
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-03 19:12:39 +00:00
John Scipione
2e08685b99 BMenu: Rename FrameMoved and FrameResized variable names
No functional change. lowercase_with_underscore file names are not
in-line with Haiku's style guidelines.

Change-Id: I254c975ee60168963ca4039a61dc428c05e0e6ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2306
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-03 10:56:05 +00:00
Niels Sascha Reedijk
02e45e32ae HaikuBook: Initial documentation for BNotification
The implementation file contained some documentation. This has been moved
to the Haiku Book (and is rewritten in most cases). The documentation gives
some insight on how the notification_server works.

Change-Id: I82bafcf57101d4882bdf07e7f731df9cd8adc861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2299
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-02 22:10:04 +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 <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
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 <waddlesplash@gmail.com>
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 <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
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 <pulkomandy@gmail.com>
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 <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-01 18:20:56 +00:00
Adrien Destugues
f029289cbd hvif2png: allow larger sizes.
What if I need some high resolution rendering of icons?

Also fix the error message for out of range/unparsable sizes that would
show "-s" as the problematic size.
2020-03-01 17:25:01 +01:00
Niels Sascha Reedijk
22beb3fd42 Haikubook: update doxygen configuration with doxygen 1.18.17 2020-03-01 09:52:40 +00:00
Niels Sascha Reedijk
ff1ee776fe HaikuBook: fix part of the warnings marked by Doxygen
I spotted some warnings when I upgraded from Doxygen 1.18.13 to 1.18.17.
The new warnings are useful, they point out imbalances in grouping, as
well as unclosed comment blocks. Coincidentally, this fixes #13338
2020-03-01 09:50:49 +00:00
Pascal Abresch
7a8d5a2db3 app_server: fix fallback for fonts where the variants match.
This does not produce a satisfactory fallback if i.e "extrabold"
is selected since the CJK font does not have that, probably need to
figure out a way to change the font style so that it renders correctly
(render cjk as bold when display is at extrabold or so).

Fixes #15751.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2020-02-29 18:30:40 -05:00
Niels Sascha Reedijk
e9f38cca49 HaikuBook: fix accidental UTF16 encoding of AbstractLayoutItem.dox 2020-02-29 16:43:58 +00:00
Andrew Lindesay
b21c94474e HaikuDepot: Instructions on Logs
Some error messages make mention of application logs
and users don't know how to view the logs.  This
change adds some instructions about that to the user
guide and also directs the user to the user guide in
any error messages that mention the logs.

Change-Id: Ib98737abe853586c58a1c1df7befb86aa1c04491
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2285
Reviewed-by: humdinger <humdingerb@gmail.com>
2020-02-29 10:50:04 +00:00
Autocomitter
adcf5b05a8 Update translations from Pootle 2020-02-29 08:54:40 +00:00
Kyle Ambroff-Kao
2ac34dee51 tests/net: HTTP proxy client test
With this patch, ProxyTest is implemented and all of the tests in
HttpTest are enabled.

Adding a transparent proxy server implementation proxy.py. Like
testserver.py, this can be provided a socket file descriptor and port
via command-line arguments.

TestServer was refactored to extract ChildProcess and
RandomTCPServerPort, which are now also used by TestProxyServer.

ProxyTest starts TestProxyServer and validates that the request is
sent to the proxy and is routed to the appropriate endpoint of the
downstream server.

The template which adds common tests between HttpTest and HttpsTest
was changed slightly to just take a BThreadedTestCaller<T>&, which
made it simpler to add additional test cases to one suite which are
not appropriate to the other. There wasn't much point in keeping that
template as a member function so I moved it into HttpTest.cpp as a
free function template.

Change-Id: Ied32d6e10bb195d111cae7bbcf0e93168118088b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2291
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-29 00:27:36 +00:00
Jérôme Duval
a5544d0a21 hda: disable TCSEL on ATI/AMD for non-hmdi
also disable MSI with C-MEDIA 0x5011 (reference alsa)

Change-Id: I51e0b8f046df13a23a0b39998e4155a2ec40f5f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2290
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-28 09:49:58 +00:00
Jérôme Duval
276e89f756 hda: sync snoop quirk intel pci ids list based on alsa.
Change-Id: I08d8e8aa05d03ce49cbf3937eccdb109b00e83f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2288
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-28 08:28:30 +00:00
Jérôme Duval
8a1c964d4f hda: enable pci snooping on AMD non-hdmi.
disable snooping on ATI non-hdmi.

Change-Id: Ic62e8c7ae376a1e26646f88f308242eef3aa119e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2287
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-28 08:28:30 +00:00
Alexander von Gluck IV
48064fbc41 system/boot: Unify spin design, add missing symbols to asm/ld
Change-Id: I1dd98a2243d498ec1c827f7a60385237d12a0d39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2283
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-27 16:04:23 +00:00
X512
fa60e7a684 BMenu: remove delay when opening submenu with mouse
Fixes #11703.

Change-Id: Iae01eeffee27ecde5bb333c85b8c3cb411f1bd00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2274
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-27 00:51:48 +00:00
Alexander von Gluck IV
1d08d3993e efi: Don't skip TargetBootLibgcc, we need it for 32-bit fp math
Change-Id: I23db3cbb57fea1f9346db9477f72bcc164794926
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2282
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-26 18:01:42 +00:00
Adrien Destugues
0e7d1f13e0 AppInfoList: make sure to dereference symlink before comparing
May fix #15633 (untested)

Change-Id: Id0c8f0617553d988e767bae46fe0ac8fd3e698e9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2118
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-25 12:23:23 +00:00
Murai Takashi
3548a2eb71 tracker: Fix PVS V595
Fix 'fFile' pointer was utilized at line 327
before it was verified against NULL.

Change-Id: I8214bce9a99d783b3c53a7b8c5696b0b0dfc3490
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1440
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 05:06:14 +00:00
X512
48de299d54 FontDemo: remove flickering workarounds
Part of #15623.

Change-Id: Iddd1bff519fac8f5387ba1eeec22cc2314112271
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2276
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:49:58 +00:00
X512
371b3b2b42 Keymap: remove flickering workarounds, small fixes
Part of #15623.

Change-Id: I44d62a39efeaa25ecdc3b8a9aa27ca9fef33e5b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2279
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:44:29 +00:00
Jérôme Duval
84195a491f kernel/x86: add a compiler level memory barrier to wbinvd
Change-Id: Id96e37b83110f413a2b30f2967921ce90f31dd94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2272
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-25 04:43:41 +00:00
X512
f9b0390d8f PowerStatus: use transparent view
Change-Id: I04d988a54d0199e8c7dac37f5b78c6f1e2e0cadc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2278
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:42:23 +00:00
X512
485a9ea0e6 NetworkStatus: use transparent view
Change-Id: I707f043e08b7f54de1304c7697e19621ff279c7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2277
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:42:23 +00:00
X512
17a91a9886 BMenu: fix menu navigation area
Change-Id: If9326ebc99978627d9dfb1eaff67912f0114f292
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:41:22 +00:00
X512
e18a08119d GLTeapot: normalize quaternion
Quaternions representing rotation should have unit length. Multiplying
quaternions cause error accumulation and length change. Normalizing
quaternion after rotation will avoid that.

Fixes #7160.

Change-Id: I82f1f2b89c326a4d2c956c03296600e79ac267c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2270
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-24 15:15:12 +00:00
John Scipione
6f114b94f2 Deskbar: Set no horizontal window size limit in vertical mode
... better so that for scroller arrows will work again.
This regression occurred in hrev53890 trying to fix #15067.

Use B_SIZE_UNLIMITED not -1 for no window size limit.
2020-02-23 17:19:50 -05:00
John Scipione
d7aa468e43 Revert "Deskbar: Set no horizontal window size limit in vertical mode"
This reverts commit bc9e33a5fb.

This can cause other problems though, will need to provide a better fix.
2020-02-23 16:32:29 -05:00
John Scipione
bc9e33a5fb Deskbar: Set no horizontal window size limit in vertical mode
... so that for scroller arrows will work again. This regression
occurred in hrev53890 trying to fix #15067.
2020-02-23 15:46:40 -05:00
Alexander von Gluck IV
82a7c7395c efi/arm: Begin stubbing out the essentials, add fdt library
* We *might* no longer need FDT knowledge in the bootloader?
* For now though, arm sources reference gFDT, so we need it.
* Need to move away from lazy gFDT and store in arch_kernel_args.
  (which is next and will be a larger commit)

Change-Id: I77cce0fc645143b78a7fd9f50ac8b96c97b5c862
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2268
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 18:41:28 +00:00
Preetpal Kaur
2a64b13f81 Input preference: inconsistent dialog buttons location.
Fixes #15685

Change-Id: I38a48394ba45c7c53208e4333c797ec0b2310c96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2262
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 10:19:31 +00:00
Kyle Ambroff-Kao
762f26bac8 tests/net: Implement testserver.py TLS for HttpsTests
This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
  these tests. UploadTest was uploading a file from /boot, but I
  copied it into the test source directory to avoid having these tests
  break if someone makes an unrelated change. It doesn't really matter
  what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
  because it means that the different test cases can share the same
  HttpTest instance, which means there is only a single TestServer
  instance, and it takes around half a second to bootstrap the test
  server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 07:58:58 +00:00
X512
9176b546e3 Haiku3d: fix textures
Textures creation like other OpenGL calls must be inside LockGL/UnlockGL.

Fixes #15246.

Change-Id: Id1f3ae7c04548dba301e5c5ba75a89163c08d69d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2269
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-23 07:53:19 +00:00
Alexander von Gluck IV
71680f7b7d efi: Cleanup arch_mmu, drop extra arch_timer.h
Change-Id: I0d6d2f8db2bc86c08d5ba2648f1cf46d85b54a5e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2267
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-02-22 22:15:08 +00:00
Alexander von Gluck IV
d2986cb6d0 system/boot: More cleanup and shuffling
* arm efi additions
* cleanup some cpu headers which were oddly
  split between efi and bios_ia32
* Move calculate_cpu_conversion_factor over to
  arch_timer since it is timerish, and x86 only
* Drop some duplicated code from efi start. Move
  hpet init code into efi timer/hpet code

Change-Id: Ia4264a5690ba8c09417b06788febc4f572f111ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2259
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-22 14:37:45 +00:00
Autocomitter
cc89f2de18 Update translations from Pootle 2020-02-22 08:48:23 +00:00
Alexander von Gluck IV
957f468cc1 efi/mmu: ensure sNextVirtualAddress is valid on 32-bit platforms
Change-Id: I1c762410860ac7a27cfc78345de3226e36195aba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2258
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-21 17:03:27 +00:00
Alexander von Gluck IV
04f1baa771 EFI: Make our haiku_loader architecture agnostic
* This is the bulk of the work. Anything else should be
  minor cleanups and tweaking.
* riscv64 isn't a viable EFI platform yet.. just acting
  as a stand-in to test a non-x86 EFI haiku_loader

Change-Id: Ib03de81e2b562e693987b86d7b4318209fb1c792
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2256
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-21 14:29:22 +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