Commit Graph
64 Commits
Author SHA1 Message Date
Adrien Destugues a5061ecec5 Generate developer docs with Sphinx
An effort was started some time ago to consolidate all internal
documentation in the git tree. However, this was just an accumulation of
files in various formats without any strucutre or way to browse it,
which results in no one even knowing that we have docs here.

This converts most of the files to restructuredtext and uses Sphinx to
generate an HTML browsable user manual (with a table of content and a
first attempt to put things in a global hierarchy).

There are almost no changes to the documentation content in this commit
(some obviously obsolete things were removed). The plan is to get the
toolchain up and running to make these docs easily available, and only
then see about improving the content. We can migrate some things off the
wiki and website, and rework the table of contents to have some more
hierarchy levels because currently it's a bit messy.

Change-Id: I924ac9dc6e753887ab56f18a09bdb0a1e1793bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4370
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2021-08-27 11:41:17 +00:00
Adrien Destugues 6a41334ced net_server: remove about box.
Fixes #16823.
2021-08-07 12:44:57 +02:00
Adrien Destugues 21be5dfa38 WebPositive: update version to 1.3.
I forgot to do this before beta3.
2021-08-01 14:26:48 +02:00
Adrien Destugues 899fdd042a XSI semaphores: Do not insert invalid sem_keys in key map.
Semaphore keys were added to the key map a bit early, before all error
checking had been done. As a result, we could have keys in the map that
would not point to a valid semaphore.

Fixes the root issue in #16741. A previous patch in hrev54878 had
already fixed the panic when trying to access such a key, but it was
still possible to generate one.

Change-Id: I7449e295fdbe2a48b554cbc0508683d042f6ca48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4240
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2021-07-27 06:22:31 +00:00
Adrien Destugues a94ee3f35a BUrlRequest: fix issues found while documenting
- Remove Pause/Resume functions. They are not possible to implement (the
  server would time out)
- Fix SetContext(NULL) to do the right thing.

Change-Id: I25ba09bb01ea0fe8a85d774611b33be7dc192028
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4245
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2021-07-26 06:28:08 +00:00
Adrien Destugues b5a859ad62 People: make default size larger
We have increased the number of default attributes, so the initial size
wasn't enough.

On small resolution displays, adjust the size to not end up with part
of the window outside the screen.

Fixes #15371

Change-Id: Ie59cb3a3f6609eff7d933d0bf0e11f66637d6d10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2222
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-07-25 14:40:57 +00:00
Adrien Destugues 40a12ac67e StyledEdit: add menu to underline text
Eases testing of B_UNDERSCORE_FACE

Change-Id: If3e1f247a984b81e9262136ca30139851cfa19a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4244
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-07-25 14:40:27 +00:00
Adrien Destugues 893d5930fe ShowImage: fix scrollbar size
Change-Id: I5c50bd9a842ce79d78b6e9c2227dc37e3c52c6e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3755
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-07-24 08:43:46 +00:00
Adrien Destugues a77684c96a MultiAudioNode: sanitize inputs
Change-Id: Ida5d74b88ec06daf738fd8b98c29737ed87c7cae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3491
Reviewed-by: Adrien Destugues <[email protected]>
2021-04-18 07:58:27 +00:00
Adrien Destugues f4abe40626 DriveSetup: fix creating partitions
The code paths for creating a new partition and editing an existing one
are more mixed together than I thought:

- CreateParametersPanel reuses a method from ChangeParametersPanel which
  I had modified.
- In the storage kit, the code to create the parameter editor is also
  shared between the two.

The problem is that when creating a partition, we have only the parent
BPartition. When modifying parameters, we have the child, and we need
to get some things from the child (the current parameters), and some
from the parent (the parameter editor).

Fixes #16859.

Change-Id: I5978386978c79a351e94c098c065fd43c422eb51
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3822
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-26 19:59:19 +00:00
Adrien Destugues 7534e5870d intel partition map: use more specific errors
It is hard to know what is wrong otherwise.

Change-Id: I47658502221dfd7f320ae873cc92f683d7ae3548
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3821
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-26 19:59:19 +00:00
Adrien Destugues 645c3796d7 64bit build fix. 2021-03-16 20:35:36 +01:00
Adrien Destugues c05253c64e virtio RNG: fix SMAP violation
Change-Id: I82fadcef6d3f402b10273b6f378d5357f3c835c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3716
Reviewed-by: Jérôme Duval <[email protected]>
2021-02-16 11:36:51 +00:00
Adrien Destugues 5504fc757c intel_cstates: ignore negative time-delta values
I have no idea why this can happen or if there is a deeper problem.

Should fix #16546.

Change-Id: Ia160e293eabefae636ce4c861864c99b0aaa68db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3717
Reviewed-by: Jérôme Duval <[email protected]>
2021-01-30 21:50:41 +00:00
Adrien Destugues e03da2bd84 Locale Kit: Fix available language enumeration
Regression introduced in hrev54910.
The list of available languages in FirstBootPrompt would be empty.
2021-01-30 17:43:32 +01:00
Adrien Destugues 4dcdff4fe3 Update "boot process specs" documentation
Quite a lot has happened since this was initially written.

Change-Id: Iad68ea821733ab7489d2f9713857d2752b80356d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3674
Reviewed-by: Adrien Destugues <[email protected]>
2021-01-27 19:51:07 +00:00
Adrien Destugues e73999aa57 Build fix. 2021-01-26 21:29:12 +01:00
Adrien Destugues f1d4377609 Build fix. 2021-01-26 20:05:05 +01:00
Adrien Destugues 20719db962 sdhci_pci: ignore invalid PCI bars.
Should fix #16778

Change-Id: I8c8ffa1a7ca5bc4613801563c42d5c5d2b3eb539
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3682
Reviewed-by: waddlesplash <[email protected]>
2021-01-26 18:55:47 +00:00
Adrien Destugues d57b8f90e2 ProcessController: fix layout when running in a window. 2021-01-20 18:29:18 +01:00
Adrien Destugues c2e78713f8 ProcessController: reintroduce the static scaling mode.
There is a very good reason to have this: for low number of cores, the
default computation makes stupidly large bars.

I had tested my changes with various number of cores (1, 2, 3, 4, 8, 16)
in QEMU to make sure it looked correct in all cases. I don't understand
why kallisti5 reintroduced broken code.

This reverts commit b18298348a.
This reverts commit b1b6769b6f.
2021-01-13 13:06:01 +01:00
Adrien Destugues 0e061f0903 FindDirectory docs: clarify where the functions are located
Only the C++ interface is in libbe. The C functions as well as the new
find_path functions are all in libroot.

Fixes #16749
2021-01-13 12:57:00 +01:00
Adrien Destugues b181ea960c xsi_semget: fix possible way to crash the kernel
I don't know if the behavior makes sense, but anything is better than a
kernel crash. The ticket is an example calling the syscall directly,
so there is no user-oriented guarantee on how we behave here.

Fixes #16741.

Change-Id: I803596004d005c8c0e058c5422c4b0f7c78cfad8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3623
Reviewed-by: Rene Gollent <[email protected]>
2021-01-10 22:08:33 +00:00
Adrien Destugues b8d6e720ba DriveSetup: allow formatting a mounted partition
It is automatically unmounted, if possible.

Part of #16304.
2021-01-10 21:32:30 +01:00
Adrien Destugues 7de9578142 ProcessController: fix huge bar for low CPU systems 2021-01-10 20:46:59 +01:00
Adrien Destugues 7b661b559e BSecureSocket: fix read error handling
The current documentation
(https://www.openssl.org/docs/man1.1.1/man3/SSL_read.html) says that
SSL_read returning 0 should be handled as an error. So, let's do that.

Change-Id: I6781826ea700b6e597fd2d444fd96a1a5270c6cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3620
Reviewed-by: Stephan Aßmus <[email protected]>
2021-01-10 17:34:44 +00:00
Adrien Destugues f377a91a31 ProcessController: gcc2 build fix 2021-01-10 16:20:06 +01:00
Adrien Destugues 98791e6d67 intel_cstates: provide more info in panic
This should help understanding the problem in #16546, which we don't
understand how it can happen.
2021-01-10 15:52:14 +01:00
Adrien Destugues d9848639c6 DriveSetup: clarify partition state
DriveSetup does not make it clear when there is empty space or when a
partition is not formatted. Reword things a bit to make this easier to
understand.

This was a common source of confusion in various video reviews of Haiku,
with people trying to install Haiku to a partition that had not been
formatted.

Part of #16304
2021-01-10 15:12:46 +01:00
Adrien Destugues 61282f9574 Tracker: fix invisible selection text in disabled windows
Regression introduced in hrev54742 which used DeskTextColor() on a
non-desktop view. The view color isn't set anywhere in that case and
does not match the background color, which led to drawing white text on
a white background.

Moreover, a second bug was stacked on that: the selection is drawn in
"reverse video" (using the document color for the text and document text
color for the background) only for active windows. For inactive ones, it
is drawn normally, and then a middle-grey rectangle is alpha blended on
top. Add a comment to clarify that and reintroduce the ckeck that had
been removed.

Also replace the hardcoded black for the selection background, so it
will be more easily visible for people using dark mode.

Fixes #16627.
2021-01-10 13:49:17 +01:00
Adrien Destugues e3927d6ad4 Haiku control look: bring back the tab seams
They were accidentally removed in hrev54634 in an attempt to clean up
the code.

Reintroduce the old logic with some cleanup and improvements:
- There was a mixup of "tab side" vs "border". The constant values for
  the two are the same, so it still worked as designed, but it made the
  code harder to follow since it deals with both borders and tab sides.
- Define an isVertical boolean to decide if the tab view is vertical,
  avoiding repeated tests for specific tabview sides.

Fixes #16640.
2021-01-10 13:01:05 +01:00
Adrien Destugues c37693ddac KeyboardLayoutView: remove B_FLAT button flag for drawing keys
We do not want flat buttons here. This was introduced to get the Be
control look to draw inverted color labels on the buttons, but there
must be another way to do this.

Fixes #16660.
2021-01-10 12:17:57 +01:00
Adrien Destugues d753645e3f MediaExtractor: fix cache size computation for audio
Untested. If audio is not decoding well, try increasing the constant.

Change-Id: I151764e6bb3e69088904d33bfeb683bf0569bd23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3605
Reviewed-by: Alex von Gluck IV <[email protected]>
2021-01-08 14:28:41 +00:00
Adrien Destugues 437df0a3fb x86_64: fix build
This code was accidentally removed but is still needed.
2021-01-08 13:38:29 +01:00
Adrien Destugues a736630c63 Fix ppc build
Remaining uses of PAGE_SIZE that I didn't notice.
2021-01-08 13:26:02 +01:00
Adrien Destugues b9e03b90a5 sd/mmc: Update the documentation to reflect the current state 2021-01-06 20:06:17 +01:00
Adrien Destugues 96fbe0f747 NetworkStatus: build fix. 2021-01-06 12:50:43 +01:00
Adrien Destugues cba63b6451 bfs: build fix.
I built only the bootloader for sparc when testing, so some code was
disabled because it's guarded by _BOOT_MODE.

Confirmed that the generated assembler is not larger than before (the
disassembly file is the same size, but for some reason functions were in
a different order, making it difficult to compare more closely)
2021-01-06 12:49:08 +01:00
Adrien Destugues e41c31cd83 sdhci: move quirk init to the right place
It needs to be done once per device and only after we have decided that
the device is supported and should be handled by the driver.

Change-Id: Ia00c1fbb151ab181abbfcfaed538cf58985aea07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3601
Reviewed-by: waddlesplash <[email protected]>
2021-01-05 21:37:03 +00:00
Adrien Destugues d1fee57dee mmc_disk: add SDHC support.
The main differences:
- The initialization sequence requires an additional command (this was
  already done)
- The layout of the CSD register and the way to compute the device
  geometry from it changes
- The read and write commands parameter is a sector number instead of a
  byte position

Change-Id: Ie729e333c9748f36b37acd70c970adfd425cf0b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3512
Reviewed-by: Alex von Gluck IV <[email protected]>
2021-01-05 02:06:44 +00:00
Adrien Destugues e21a1abec4 mmc: properly set DMA restrictions
- The restrictions are now set by the sdhci bus and retrieved from there
  by the DMAResources.
- Configure SDMA with the maximal available boundary check of 512K and
  publish the corresponding DMA restrictions.
- dma_resource cannot be initialized implicitly as a member of
  mmc_disk_driver_info because mmc_disk_driver_info is allocated with
  malloc/free, not new/delete. So we now explicitly allocate and delete
  it.

This allows reads and writes of more than a single block at a time.

Change-Id: Ibb97c91543312c7970c28a7a8c68a12708263e32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3505
Reviewed-by: Alex von Gluck IV <[email protected]>
2021-01-05 02:06:44 +00:00
Adrien Destugues 9a37366b51 mmc_disk: add write support
Change-Id: I77cf1612569c43e79917ac5a1493b7ab4a04cb47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3504
Reviewed-by: Alex von Gluck IV <[email protected]>
2021-01-05 02:06:44 +00:00
Adrien Destugues 7a160a8629 mmc_disk: read using "simple DMA"
The SDHCI spec also offers an "advanced DMA" mode where we can use
scatter-gather lists. It would allow to remove several of the DMA
restrictions, but hardware support for it is optional, so we need this
version anyway.

The geometry is retrieved on demand in the first read or write or in a
call to the get geometry or get device size ioctl. It is not possible to
retrieve it from the device initialization because that is called as
part of the mmc_bus scanning, which needs a specific sequence of
commands and keeps the bus locked to prevent drivers to insert their own
commands in the middle of that sequence.

TODO:
- Move the DMA restrictions definition to sdhci_pci and forward it up to
  mmc_disk (which is the one creating the IOScheduler)
- Decide if we want to keep non-DMA support (probably should, but it
  makes things more complex, because it uses virtual addresses)

Change-Id: Ib1dd14eacf62052d747bfb3ef7820bc5a34d3030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3471
Reviewed-by: Alex von Gluck IV <[email protected]>
2021-01-05 02:06:44 +00:00
Adrien Destugues f7a0ebd7a5 BMenuField: Fix private ABI leakage
Problem introduced in hrev46195. The MouseDownFilter class may be
declared deep in the middle of a cpp file, yet without precautions, it
will end up being part of the ABI.

WonderBrush has a class with the same name, and on 64bit Haiku, a mixup
of the two would happen, leading to a crash because they don't have the
same size.

Move the class into BPrivate to avoid this.

Change-Id: I60b608edf3188816281332c972c654e3c57740b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3536
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Rene Gollent <[email protected]>
2020-12-17 20:10:59 +00:00
Adrien Destugues f6d7f9f599 sdhci_pci: Remove DumpRegisters function
Reading registers can change the state of the device, so we can't do
this as a generic debug function. We'll have to more carefully decide
which registers to dump in which case.

Change-Id: I4a706b749a0dd2f4f0e29b602b90354fbf6d66f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3465
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-13 18:56:19 +00:00
Adrien Destugues eb92a83453 sd/mmc: fix warnings
Change-Id: I5d0c95240cd5594b0f8090f5ec7b3f6ee181dacc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3464
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-13 18:56:19 +00:00
Adrien Destugues f7c1481c00 sd/mmc: update documentation
- add info about qemu debugging features
- update qemu command line to current syntax
- add some extra options to make things easier
- remove list of files (directories are enough) and instead add a short description of each module.

Change-Id: Ie9980d8143c33655147f161b248c45689ba82476
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3463
Reviewed-by: Jérôme Duval <[email protected]>
2020-12-13 18:56:19 +00:00
Adrien Destugues 62eaf4c0e1 mmc_bus: add execute_command function
For now it just forwards the command to the SDHCI controller.
The bus will gain more features and functions as work advances (tracking
which card is active, arbitration of DMA transfers, etc).

Change-Id: I094eb84f27e7789387a3f8fb65fba1e5fcfa3e8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3094
Reviewed-by: waddlesplash <[email protected]>
2020-10-11 16:02:22 +00:00
Adrien Destugues d4a668083c sdhci: fix interrupt handling
The interrupt handler clears the interrupt register, so the main thread
cannot get the errors from there. Save the interrupt state in the
handler so that the thread can know if a command succeeded or not.

Change-Id: Ibee35c3caed6be8e2552b6c66c4e854a00f5465d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3090
Reviewed-by: waddlesplash <[email protected]>
2020-10-11 16:02:22 +00:00
Adrien Destugues cd78ed4d46 sdhci: fix response type definitions
These are apparently ignored by the Ricoh controller I did my previous
testing on, but QEMU is more strict about them

Change-Id: Ie70808a5c8b26e6f0f22bd8259a42452903781a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3089
Reviewed-by: waddlesplash <[email protected]>
2020-10-11 16:02:22 +00:00
Adrien Destugues 8b2b301059 app_server: save/restore screen brightness settings
The brightness is saved in the screen configurations of the first
workspace. For now, all screens get the same brightness (I can't get
screen IDs to work today). Since we only support setting the brightness
for laptop displays for now, this shouldn't matter. It can be fixed when
app_server gets actual multiple display support.

Fixes #14254

Change-Id: Ib33aa65a73407a65bd469d0efa8542210fec02d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/362
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-20 13:30:29 +00:00
Adrien Destugues 8f5c207181 Avoid Tracker crashes when input_server is broken
Missing error checks when calling input_server can lead to Tracker
crashes.
Add the missing error checks.

Thanks to mmlr for helping investigate the problem!

Change-Id: Ie7f3e00c1267b594eafc77a1613e186cf38e5277
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3068
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-10 17:15:09 +00:00
Adrien Destugues 058fca80b7 Input preferences: fix list minimum size
- Use the longest device name as a min size
- Refactor things a bit to simplify the code
- Also set weights in the top group view to ensure a nice ratio between
  the list and the other part of the window
2020-08-26 15:56:59 +02:00
Adrien Destugues 5b98fa06d5 input server and preferences: fix debug build 2020-07-25 15:18:04 +02:00
Adrien Destugues 12ef216972 build_haiku_image: no fs indices on CDs
The iso9660 filesystem does not support them
2020-07-22 17:48:32 +02:00
Adrien Destugues 20f2ebae4b Remove MouseDownThread and its usages
This code comes from an old Be Newsletter and since then the API
received the addition of SetMouseEventMask. In several places the
MouseDownThread was misused: it would spawn a new thread on every mouse
click and not clear the previous one. This could for example lead to
BSpinner skipping values if you clicked it at the right speed.

There are functional changes in BSpinner, before it updated for the
first time 100ms after mouse down, and then as you moved the mouse
around the button, now it activates immediately on first click and then
every 200ms (which may be a bit short). In other places, no functional
changes intended.

Change-Id: Ie600dc68cbb87d1e237633953e5189918bf36575
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2599
Reviewed-by: waddlesplash <[email protected]>
2020-05-07 22:08:23 +00:00
Adrien Destugues e6aa214527 libbe.so catalogs are not included in image
Media Kit catalog was incorrectly using "libbe.so" as a catalog name
and overwriting the catalogs for libbe.

Fixes #15904

Change-Id: Ib56045bbcf127c23ac5229981ce92d298ffd6fe5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2536
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2020-05-01 13:49:49 +00:00
Adrien Destugues 06aba24416 Do not always regenerate keymap name headers
Depends on all the keymap files instead. If one is added, the header is
then re-generated.

Change-Id: I0adf37065d7c708e94c933a2044ceb56b1fd48fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2525
Reviewed-by: waddlesplash <[email protected]>
2020-04-28 14:22:30 +00:00
Adrien Destugues c2895bebdf Build fix. 2020-04-19 17:00:02 +02:00
Adrien Destugues 217641f5fe intel_extreme: do not pretend to handle modern devices
The accelerant just doesn't know what to do with these.
2020-04-19 09:39:04 +02: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
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
Adrien Destugues baa739985b FileGameSound: remove superfluous parentheses.
Pointed out by Axel on haiku-commits.
2019-12-11 13:24:39 +01:00