Commit Graph

61705 Commits

Author SHA1 Message Date
Michael Lotz
733e150b74 drivers: Fix 64 bit BAR checks and remove redundant masking.
Fix address type mask to use the right bits via PCI_address_type. The
previous 0xc value applies to the upper of the two address type and
the prefetchable bit instead of the two adddress type bits. This would
cause prefetchable 64 bit BARs to be misidentified as not being 64 bit.

Remove address masking as this is already done on the field in pci_info.

Use uint64 instead of phys_addr_t explicitly as on pure 32 bit platforms
this would otherwise result in a shift greater than type size.

Note that the sizes should theoretically be adjusted as well, but in all
of these cases a size needing the upper 32 bits doesn't make much sense.

Change-Id: Idd0d6e9a6cc18656b43cafcac720b132fc1f2ad3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3024
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Michael Lotz
74c9e88b75 pci: Cleanup, no functional change intended.
Make mandatory argument of _GetRomBarInfo a reference too and use NULL
instead of 0 for pointer argument default value.

Some line length cleanup.

Change-Id: I1bdb59eeae4496b75fd4a1b8c5b305283da266f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3023
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Michael Lotz
0615a177b7 pci: Rework 64 bit base address register handling.
This moves the entire 64 bit handling into _GetBarInfo() and applies it
to the PCI address and size too. Previously only the RAM address was
handled for the 64 bit case.

Also fixes the 64 bit check to be done after the type determination.
Previously it would theoretically be possible for an IO BAR with the
lowest address bit set for that type (bit 3) to be mistaken to be 64 bit
and then skipping/mishandling the next BAR. Due to alignment this would
have needed to be a 4 byte IO BAR though.

This also corrects the limit for 64 bit BARs of type 1 devices. As there
are only two slots, only slot 0 can be 64 bit.

Also removes a copy&paste error that would lead to the high address of
64 bit BARs of type 1 devices to get taken from the h0 instead of h1
struct, corrupting its value.

Make the mandatory arguments to _GetBarInfo() references to make the
distinction more obvious and replace 0 with NULL in the default values.

Change-Id: Iae59f2875c93f15411a4d9791e71e69ba7a42287
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3022
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-11 23:25:44 +00:00
Autocomitter
dabd6c739f Update translations from Pootle 2020-07-11 08:14:16 +00:00
Augustin Cavalier
7d1a9d7874 atheroswifi: Enable 802.11n and "AR5416 interrupt mitigation."
FreeBSD apparently enables these options by default.

This should enable support for 802.11n (i.e. HT mode) on Atheros
chips that support it, of which there are quite a few.
2020-07-08 21:30:20 -04:00
Alexander von Gluck IV
583db6f559 configure: Properly detect clang version > 9
Change-Id: Ide083442fddc6f3f103f1ff3811a92d5db5c75a1
2020-07-08 14:39:47 -05:00
CruxBox
9593c05ac5 xfs: An attempt to read block directories
Map entries can be read, most structures are in place. Next is to
actually work with the directory block.

Change-Id: I700ee2e003bdef97838b1f06a95e53a5e4293658
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2981
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-08 06:23:24 +00:00
CruxBox
a060fa968e xfs: Read Short Form Directories
We can now read short form directories.
Change-Id: I23eb6ef52e8bb07643213e603ed0185f536c649f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2952
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-08 06:23:24 +00:00
Augustin Cavalier
4639c4e898 headers: Add exp10 declarations to gnu/math.h.
These are GNU extensions so they need to be behind _GNU_SOURCE.

Fixes #16371.
2020-07-07 20:48:58 -04:00
Augustin Cavalier
21e213d3b0 CodyCam: Use "%s" instead of printf'ing a buffer directly.
Fixes #16375.
2020-07-07 20:44:08 -04:00
Adrien Destugues
f7362b6fd0 BFileGameSound docs: Fix typo 2020-07-07 19:20:48 +02:00
Adrien Destugues
e4734ba710 BFileGameSound: add documentation for BDataIO based constructor. 2020-07-07 18:12:35 +02:00
Augustin Cavalier
e6c710f4bb Tracker: Set a minimum size on the count view...
...when it is paired with a horizontal scrollbar. This has the
added benefit of restoring the previous horizontal scrollbar size,
it having been lost in the prior refactor due to the "container views"
removing 2 pixels for the borders (previously, there was a different
sizing system for the count view that provided it.)

Fixes #16368 item 1.
2020-07-06 23:40:55 -04:00
Augustin Cavalier
c0a15174a6 Tracker: Restore prior text-rect bounds in the count view.
The one-pixel offset greatly improved the text alignment under HiDPI,
but degraded it on non-HiDPI. I guess one pixel really does make
that much of a difference; so this will have to be revisted.
2020-07-06 22:34:13 -04:00
Augustin Cavalier
94cc40b15e Tracker: Add a minimum font size for the count view.
Based on the logic from the title view.
2020-07-06 22:23:36 -04:00
Augustin Cavalier
df2e6c7a52 Tracker: Force the horizontal scrollbar to always be the preferred size.
See inline comment. Should fix second part of #16368.
2020-07-06 22:18:28 -04:00
Augustin Cavalier
f82f94ef79 Tracker: Remove partial support for custom fonts in PoseView.
BFont is by default bitmap-spaced, so we do not need to make
a new font just to add bitmap spacing. The rest of the code
assumes in places that we have the same general characteristics
as be_plain_font anyway, so having these bits of code does
not make a lot of sense.

Also correct the list element height computation to now just use
be_plain_font directly, which will work even when this is the first
PoseView created (i.e. before the font height has been read.)
2020-07-06 22:09:02 -04:00
Augustin Cavalier
76fcfb697e Tracker: Remove extra space between pose controls and buttons.
Now that the scrollbar is part of the pose area, we no longer
have to include its height in the spacing of the pose view
from the buttons and the bottom of the window.

Mentioned by X512 in #16368.
2020-07-06 21:52:47 -04:00
Augustin Cavalier
8539dfdac2 BScrollBar: Use the minimum as the preferred size in the alternate axis.
This was the behavior before the commit yesterday that unified the
two methods of computing the preferred size. It seems some applications
expect this to be callable without a window lock, so this works when
the other method does not.

Fixes #16372.
2020-07-06 21:40:51 -04:00
Niels Sascha Reedijk
840f23676c SoftwareUpdater: Use translated application name for notification group
Fixes #16129

Change-Id: I9e12d647bc0c8b6e54297e75642a5800613f26ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2994
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-06 14:09:27 +00:00
Alexander von Gluck IV
b0f530bada efi/devices: Improve tracing, no functional change
Change-Id: Iefb4da99d148f9328a3bbfdf1bbeaec8cf97648a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2993
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-06 13:55:16 +00:00
Alexander von Gluck IV
3853f36288 radeon_hd: Cram in a bunch of new PCIID's
Change-Id: Ifbd82ef7bfc2c39b2aeb5c25be177421cd22d246
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2920
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-06 06:39:11 +00:00
Augustin Cavalier
c70ec71d0c freebsd_network: Move ticks/seconds conversions to sys/time.h and
rename.

They now match the names they have in FreeBSD.
No functional change intended.
2020-07-05 21:16:32 -04:00
Augustin Cavalier
17af7f6298 idualwifi7260: Re-enable multiframe RX.
It no longer causes KDLs; probably the fix for the use-after-frees
on 9xxx devices also fixed whatever caused this problem.
2020-07-05 21:10:32 -04:00
Augustin Cavalier
549e16ed2e Tracker: Remove scroll bar width from the right margin in file panels.
No longer needed, the layout will take care of this now.
2020-07-05 21:07:30 -04:00
Augustin Cavalier
749fbae043 Tracker: Fix PoseView list item height computation.
This gets list item margins on HiDPI much closer to their standard-
DPI counterparts.

Fixes #16178.
2020-07-05 21:02:24 -04:00
Augustin Cavalier
ec25a0451d Tracker: Eliminate the fixed count-view size altogether.
This moves the scroll bars and the count view into the layout
inside FilePanels, so more shim views for compatibility are now made.

Fixes #13179.
2020-07-05 19:44:19 -04:00
Augustin Cavalier
58f263a2c5 Tracker: Remove usage of hard-coded count view size in ContainerWindow.
This makes the count view width, height, and font size properly
proportional in the container window. BFilePanel is not yet
fixed however.
2020-07-05 19:14:52 -04:00
Augustin Cavalier
bdfb3cd7cd BScrollBar: Report a more correct maximum size.
This way, BScrollBar will now be scaled appropriately when used
within layouts, as it is in e.g. Tracker.
2020-07-05 19:07:44 -04:00
Augustin Cavalier
b29bb4bec5 BScrollBar: Apply font scaling to preferred sizes.
As BScrollView has already been adjusted to use this, most applications
will now have properly scaled scrollbars on HiDPI systems.

All unadjusted controls and applications will still be able to use
the hard-coded constants as before, but these should eventually
be deprecated altogether and then removed.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
b022a5e224 BScrollView: Ask the BScrollBars what their preferred sizes are.
This replaces the use of the hard-coded scroll bar size constants
and instead asks the scrollbars for their preferred sizes directly.

Right now, this is a giant no-op since BScrollBar just returns
the same hard-coded size when asked. The next commit will, however,
change that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9481a1ec39 BScrollBar: Unify PreferredSize computations.
Reduces code duplication. This should not significantly affect
actually computed sizes.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9fe3529f3e BScrollBar: Remove DISABLE_ON_WINDOW_DEACTIVATION constant.
It was always enabled, and disabling it would break ABI.
If we want to make it disable-able, it needs to be a setting,
but I don't really see a reason for that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
e9815ed8b6 BScrollBar: Move SCROLL_BAR_{...}_KNOB_SIZE constants into the source.
They were not used anywhere else in the tree anyway. Resolves a TODO.
2020-07-05 18:37:48 -04:00
Leorize
a3f0ca5023 tests/system/kernel/vm/Jamfile: remove non-existent
This non-existent file causes unittests builds to fail.

Change-Id: I0ea2164487279fefcbc9e5c930440db3f2e6ccb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2969
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 21:16:20 +00:00
Andrew Lindesay
9295c1f645 HaikuDepot: Url -> Identifier
This change will rename the confusing "url" within
HaikuDepot to be "identifier" in line with
corresponding changes in pkg kit and HDS.  Also at
the same time support is introduced for HDS
repos' meta-data to artificially match against
multiple repos; as requested for the future R1B3
release process.  Some tidy-ups and extensions have
been made to the JSON schema-to-model and the
schema-to-parser scripts.

Change-Id: I402e7d610986039f58d72028bda7de977e9115e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2986
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:41:54 +00:00
Andrew Lindesay
66a4cd11c2 HaikuDepot: Custom List Removal
Remove use of custom list class where it is not
really required.

Relates To #15534

Change-Id: I4bdc258a64055b6e36c7be93672c52d0499e512b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:13:38 +00:00
Augustin Cavalier
981f67b9c8 BAlert: Add cast to appease GCC2. 2020-07-04 19:35:20 -04:00
Augustin Cavalier
9a0cae9d28 BButton: Use BControlLook for label spacing instead of a constant.
This gets button proportions under HiDPI much closer to the ones
under a default font size. Still not quite there yet, though.
2020-07-04 18:43:30 -04:00
Augustin Cavalier
2d68cd06c7 HaikuControlLook: Scale frame insets.
This is a pretty simple change, but has a noticeable effect
on insets throughout the system under HiDPI.
2020-07-04 18:42:45 -04:00
Augustin Cavalier
cf7c2ea69d BMenu: Make margins/padding more HiDPI-aware.
This greatly improves the appearance of menus under font-scaled systems.
The computations are written such that the margins should be unchanged
under a 12pt font size.
2020-07-04 18:19:26 -04:00
Augustin Cavalier
99e4ca5fc7 BAlert: Use factional scaling for icons.
The behavior of not making the icons smaller than their default
pixel size is (for now) kept, but when making them larger,
fractional scaling is now used.

This makes alerts look much better on my system, which has a font
size of 18 (i.e. 150% normal, so 32px -> 48px.)
2020-07-04 17:57:06 -04:00
Alexander von Gluck IV
89fd39f42a efi: Refactor CPU code to be arch-specific
* Migrate some platform agnostic architecture code into
  boot/arch from efi/arch. This helps to avoid conflicts
  between kernel and boot sources as well.
* Conflicts between arch_cpu in efi and kernel code means
  bootcode really should *never* directly use kernel arch
  headers. (other platforms don't, which is why they don't
  have this same issue)
* We carefully thread any needed kernel headers (namely
  assembly helper macros) into the bootloader headers without
  mixing in the whole conflicting kernel/arch headers.
* ARM now properly get its cpu init code called, and we
  progress further into the EFI bootloader.

Change-Id: If67ec9758b5ce68563ebd9eb45d5196401911c67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2975
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 21:04:20 +00:00
JadedTuna
1f2666fd48 preferences/screen: Call _UpdateActiveMode after brightness is reset
* Make sure brightness is reset to properly disable the Revert button.

Fixes #16354

Change-Id: I4551e809db316db05f3fd9db361b8703d149a88b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2989
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:50:51 +00:00
X512
d9d96260e0 BMenu: speed up deleting items
Fixes #16336.

Change-Id: Ie941f45f363f6fe94062fc3acb8bd3bb876c1f1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2976
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:49:55 +00:00
Autocomitter
9802849814 Update translations from Pootle 2020-07-04 08:14:21 +00:00
Augustin Cavalier
8da1468de6 arpa/nameser.h: Fix build on GCC8.
ssize_t comes from sys/types.h.
2020-07-03 15:30:00 -04:00
Suhel Mehta
239a1c3561 ufs2: implementing open_dir and read_dir function
Root directory is read sucessfully.

Change-Id: I8bdc8c1a52edb679a6cb4b5f70e7f42eb2b2c8f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2907
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 19:21:06 +00:00
Augustin Cavalier
4a230cfc6c SPARC: Remove ancient BSD arch headers.
None of these were used; they were all imported with the original
root Haiku commit, and they are totally unrelated to PulkoMandy's
new SPARC work. Plus, they were also under a BSD Advertising Clause
license.
2020-07-03 15:13:24 -04:00
Augustin Cavalier
657f041aee fnmatch: Replace BSD implementation with musl one.
The BSD implementation was under the Advertising Clause,
so we might as well take the opportunity to replace the
implementation entirely with musl's.

Header also rewritten to be a Haiku one; the constants
are left unchanged of course.
2020-07-03 15:09:33 -04:00