Commit Graph

10727 Commits

Author SHA1 Message Date
Sebastian Sumpf
567b9dfa39 libdrm/iris: use VFS/GPU plugin
Synchronize GPU completion by calling 'read' of the vfs_gpu plugin. This
enables pthreads to wait for GPU completions instead of the main EP.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
b3e12dcece vfs_gpu: VFS plugin that handles GPU completions
When a <gpu> node is present in the VFS, the plugin opens a
Gpu::Connection for each open call to the 'gpu' node and installs a
completion signal handler. A read only to the fd returned only comes
back if a completion signal has been received between two read
transctions to the fd.

For now the Gpu::Connections can be retrieved by calling the
'vfs_gpu_connection(unsigned long id)' function. The id can be obtained
using 'stat' on the 'gpu' device and is located in the inode (st_ino)
field of the stat buffer.

issue #4380
2022-01-19 15:01:26 +01:00
Sebastian Sumpf
b7d25636e5 mesa_gpu-iris: iris is linked into mesa already
* remove from library dependency

issue #4380
2022-01-19 15:01:24 +01:00
Sebastian Sumpf
ce409a2438 libdrm/iris: map PPGTT buffers lazy + lseek
* let iris handle buffer management, this implies that BOs are mapped to
  the PPGTT during buffer execution and unmapped by iris later, for this
  to work buffers need to be unmapped when allocating cached BOs
  (vma_free) which requires a patch

* support lseek (drm_lseek for now) for determining object size

issue #4380
2022-01-19 15:01:22 +01:00
Sebastian Sumpf
96ab58691a gpu/intel: PPGTT allocation optimization
Use range allocator as cache for page mappings instead of allocating
from platform driver for each page table.

issue #4380
2022-01-19 15:01:19 +01:00
Josef Söntgen
94405e9280 libdrm/iris: remove tiling short-cut
Instead of ignoring the request, we store the tiling information and
apply them when the buffer is mapped via 'MMAP_GTT'.

issue #4380
2022-01-19 15:01:11 +01:00
Josef Söntgen
e77a54614d libdrm/iris: introduce session resource accounting
Track RAM and CAP resource usage locally and upgrade the session quota
on demand.

issue #4380
2022-01-19 15:01:05 +01:00
Josef Söntgen
83cc36ef0b gpu/intel: account session resources
Account RAM and CAP resources for GPU sessions and trigger client
upgrades before allocating resources at the multiplexer. This prevents
the multiplexer from running out of resources.

issue #4380
2022-01-19 15:00:47 +01:00
Alexander Boettcher
3a39cb86e9 nova: read out more accurate tsc frequency
on newer CPUs.

Fixes #4336
2022-01-19 14:16:53 +01:00
Martin Stein
94121e7cd7 uplink_client_base: no deref of invalid connection
Imagine receiving the signal for an available TX ack or an available RX packet
at the Uplink connection but a later received signal for a link-state change
(to link state "down") at the same connection is handled first and destructs
the Uplink connection before the handling of the former signals. In this case,
the methods 'Uplink_client_base::_conn_tx_handle_ack_avail' and
'Uplink_client_base::_conn_rx_handle_packet_avail' must be guarded against an
unconstructed '_conn' member, but they weren't so far.

Fixes #4384
2022-01-19 14:13:48 +01:00
Martin Stein
83626b18f0 uplink_client_base: remove unused code
So far, the generic Uplink connection code considered NIC drivers to transmit
connection RX packets in three different manners. Most of the drivers follow
the "normal" way of transmission with only one driver callback from generic
code. The monolithic USB NIC-driver, however, used to send in a "burst" mode
that required a dedicated path with multiple driver callbacks in the generic
code. And then there were drivers that had a fully custom function for doing
transmissions.

Also for handling connection TX acks, there was a "normal" and a
"custom handler" way.

Today, all NIC drivers in the Genode repos and the Genode-World repo follow the
"normal" way. Therefor, the unused code can be removed.

Ref #4384
2022-01-19 14:13:38 +01:00
Christian Helmuth
65284b29f8 depot: update recipe hashes 2022-01-19 12:38:13 +01:00
Christian Helmuth
36b46f30f5 Add board-specific allwinner repo to .gitignore 2022-01-19 12:38:13 +01:00
Norman Feske
388a29b299 Road map for 2022 2022-01-19 12:38:13 +01:00
Sebastian Sumpf
f16c1b5ea8 usb_host: handle full packet stream correctly
Thanks to Peter for the fix!

Fixes #4383
2022-01-19 12:38:13 +01:00
Christian Helmuth
a80b2ee6e2 Increase cap quota of drivers_nic-imx6/7 for sel4 2022-01-19 12:38:13 +01:00
Christian Helmuth
02eea3ecf0 More robust output parsing in ieee754 test
Only parse output of the test programs one-by-one and ignore log
messages from other components not starting with '[init -> test$number]'.

Fixes sporadic failures on KERNEL=sel4 due to the following warning from
core.

  Warning: flush page table entries - mapping cache full - PD: init -> test1
2022-01-19 12:38:13 +01:00
Christian Prochaska
d3adadf4cf virtualbox6: adapt watchdog timer interval dynamically
Issue #4381
2022-01-19 12:38:13 +01:00
Christian Prochaska
95d9c15607 libc vfs: open OSS 'info' file only once
Issue #4372
2022-01-19 12:38:13 +01:00
Christian Prochaska
8ced0f184e vfs: add 'with_xml_file_content()' and 'with_raw_file_content()'
Fixes #4372
2022-01-19 12:38:13 +01:00
Christian Prochaska
8fd2847a48 Audio_out::Stream: initialize members
Issue #4373
2022-01-19 12:38:12 +01:00
Christian Helmuth
b7cf316f24 mesa: exclude .git directory from src archive 2022-01-19 12:38:12 +01:00
Christian Prochaska
2143bea176 virtualbox6: add 'Audio_in' session requirement to pkg
To actually receive audio input in a particular VM, it also
needs to be enabled in the vbox file:

<AudioAdapter controller="HDA" driver="OSS" enabled="true"
              enabledOut="true" enabledIn="true"/>

Fixes #4377
2022-01-19 12:38:12 +01:00
Christian Prochaska
3f656bcf84 black_hole: provide 'Audio_in' and 'Capture' sessions
Fixes #4376
2022-01-19 12:38:12 +01:00
Christian Prochaska
33402e407f vfs_oss improvements
Fixes #4375
2022-01-19 12:38:12 +01:00
Christian Helmuth
a1cac9b837 Fix warnings in test/audio_in 2022-01-19 12:38:12 +01:00
Christian Prochaska
7f8a94bb70 Audio_in::Stream: add 'queued()' function
Fixes #4374
2022-01-19 12:38:12 +01:00
Christian Prochaska
7b40ccea85 audio_in: fix compile errors with strict warnings enabled
Fixes #4373
2022-01-19 12:38:12 +01:00
Norman Feske
3ba316b015 base-hw: declare build artifact for core 2022-01-19 12:38:12 +01:00
Stefan Kalkowski
bed7f13008 create_builddir: add rpi and allwinner repos 2022-01-19 12:38:12 +01:00
Josef Söntgen
713c841965 vfs/rump: enable update mtime
Although support was added some time ago (#1784) the commit missed
executing the code from the 'Vfs::File_system' interface.

Fixes #4371.
2022-01-19 12:38:12 +01:00
Stefan Kalkowski
426f52068b hw: avoid 'cps' instruction in ARM hyp mode
On some boards or emulators a CPU might be executing in hyp mode
when entering Genode's bootstrap code. In that mode the 'cps' instruction
is not defined. Therefore, we change the way the boot cpu is identified.

Ref #3415
2022-01-19 12:38:12 +01:00
Stefan Kalkowski
6bd7f167a4 hw: remove rpi1/3 board support
The code moved to https://github.com/skalk/genode-rpi

Ref #4363
2022-01-19 12:38:12 +01:00
Tomasz Gajewski
f79d5d640f hw: irq controller and timer improvements for Rpi
* renamed rpi pic to Bcm2835_pic
* renamed rpi3 pic to Bcm2837_pic
* added bcm2837 control for setting prescaler value (to fix timer_accuracy)
* changed handling of all interrupts for rpi3 by cascading to bcm2835 pic
* rpi3 irq controller base address made consistent with rpi
* added usb controller memory region for pic on rpi3 (for SOF interrupts)

Ref #3415
2022-01-19 12:38:12 +01:00
Stefan Kalkowski
7db602faec os: deprecate platform API for x86, rpi, imx53
* Move platform APIs to "legacy/" subdirectory
* Rename old pc, imx53, and rpi platform_drv
  to "legacy_*_platform_drv"

Fix #4359
2022-01-19 12:38:12 +01:00
Norman Feske
622ddb5b49 base-linux: declare build artifact for lib/ld
This enables the run tool's new [build_artifacts] function to return the
correct binary name for 'build lib/ld'.
2022-01-19 12:38:11 +01:00
Norman Feske
813731a1e0 base-linux: permit rt_sigreturn on 64-bit ARM 2022-01-19 12:38:11 +01:00
Norman Feske
ab9b75236d base-linux: remove residual use of 'which' command
This is a follow-up commit for "Remove dependency from 'which' utility".

Issue #4319
2022-01-19 12:38:11 +01:00
Sergey Platonov
ef130a027b libc: fix type handling on socket creation
The socket type (in the lower bits) maybe ORed with SOCK_CLOEXEC and
SOCK_NONBLOCK options (in the higher bits). Currently, supported values
are SOCK_STREAM (1) and SOCK_DGRAM (2), so just take the lower 2 bits.

This fixes treating `SOCK_STREAM` sockets as UDP if additional flags
were set.

Fixes #4370
2022-01-19 12:38:11 +01:00
Norman Feske
b723b11b30 Modularize Sculpt OS image creation
This patch equips Sculpt with the ability to customize the system image
in very flexible ways.

All customizable aspects of the image have been relocated from the
former sculpt.run script and the accompanied gems/run/sculpt/ directory
to a new location - the sculpt/ directory - which can exist in any
repository. The directory at repos/gems/sculpt/ serves as reference.

The sculpt directory can host any number of <name>-<board>.sculpt files,
each containing a list of ingredients to be incorporated into the
Sculpt system image. The <name> can be specified to the sculpt.run
script. E.g., the following command refers to the 'default-pc.sculpt'
file:

  make run/sculpt KERNEL=nova BOARD=pc SCULPT=default

If no 'SCULPT' argument is supplied, the value 'default' is used.

A .sculpt file refers to a selection of files found at various
subdirectries named after their respective purpose. In particular, There
exists a subdirectory for each file in Sculpt's config fs, like
nitpicker, drivers... The .sculpt file selects the alternative to use
by a simple tag-value notation.

  drivers: pc

The supported tags are as follows.

*Optional* selection of /config files. If not specified, those files are
omitted, which prompts Sculpt to manage those configurations
automatically or via the Leitzentrale GUI:

  fonts
  nic_router
  event_filter
  wifi
  runtime
  gpu_drv

Selection of mandatory /config files. If not specified, the respective
'default' alternative will be used.

  nitpicker
  deploy
  fb_drv
  clipboard
  drivers
  numlock_remap
  leitzentrale
  usb
  system
  ram_fs

Furthermore, the .sculpt file supports the optional selection of
supplemental content such as a set of launchers.

  launches: nano3d system_shell

Another type of content are the set of blessed pubkey/download files
used for installing and verifying software on target.

With the new version, it has become possible to supply a depot with the
the system image. The depot content is assembled according to the 'pkg'
attributes found in launcher files and the selected deploy config.
The resulting depot is incorporated into the system image as 'depot.tar'
archive. It can be supplied to the Sculpt system by mounting it into the
ram fs as done by the 'ram_fs/depot' configuration for the ram fs.

It is possible to add additional boot modules to the system image. There
are two options.

  build: <list of targets>

This tag prompts the sculpt.run script to build the specified targets
directly using the Genode build system and add the created artifacts
into the system image as boot modules.

  import: <list of depot src or pkg archives>

This tag instructs Sculpt to supply the specifid depot-archive content
as boot modules to the system image. This change eliminates the need for
board-specific pkg/sculpt-<board> archives. The board-specific
specializations can now be placed directly into the respective .sculpt
files by using 'import:'.

To make the use of Sculpt as testbed during development more convenient,
the log output of the drivers, leitzentrale, and runtime subsystems
can be redirected to core using the optional 'LOG=core' argument, e.g.,

  make run/sculpt KERNEL=linux BOARD=linux LOG=core

The former pkg/sculpt-installation and pkg/sculpt-installation-pc
archives have been replaced by pkg/sculpt_distribution-pc, which
references the generic pkg/sculpt_distribution archive. Those pkgs are
solely used for publishing / distribution purposes.

Fixes #4369
2022-01-19 12:38:11 +01:00
Norman Feske
fcc96a2c46 tool/run: way to obtain list of build artifacts
The new function 'build_artifacts' returns a list of artifacts created
by the Genode build system. The list can be supplied as argument to
the 'build_boot_image' function.

Note that the list covers only program targets and shared libraries.
Other artifacts created as side effects of custom rules are not covered.

Fixes #4368
2022-01-19 12:38:11 +01:00
Norman Feske
0eee5d5fc1 mk: record build artifacts in progress.log
Issue #4368
2022-01-19 12:38:11 +01:00
Norman Feske
93d431a831 tool/run: skip build if build-target list is empty
This patch prevents the run tool from issuing 'make' in the build
directory if no build targets are specified, which prompts the build
system to build everything.
2022-01-19 12:35:49 +01:00
Norman Feske
410cd9cfc4 run: avoid superfluous call of depot auto update
If only versioned archives are supplied to a depot function like
'create_tar_from_depot_binaries', the depot/create tool is called
with zero arguments, resulting in a help message. The patch detects
this case and skips the call.
2022-01-19 12:35:49 +01:00
Norman Feske
48f0307234 create_builddir: remove 'linux' option
Since unifying the build directories accross architectures, the special
case of the 'linux' platform is no longer needed. Linux can be targeted
from regular CPU-architecture-specific build directories via:

  KERNEL=linux BOARD=linux

Fixes #4366
2022-01-19 12:35:49 +01:00
Norman Feske
88ca8d1a72 base: fix potential memory leak in allocator_avl
When used by the 'Allocator_avl' the slab allocator's backing store is
dynamically disabled and re-enabled while adding/freeing ranges.
However, during those operations, slab entries can be freed. This,
in turn, can result in the release of a slab block (when the freed slab
entry happens to be the last entry of the block). In this corner case,
'Slab::_release_backing_store' operation has no effect because no
backing-store allocator is set. As a result, the block is no longer
referenced but not physically freed.

The patch fixes the problem by skipping '_free_curr_sb' whenever
no backing store is defined. So the completely empty block remains
in the working set.

Thanks to Peter for reporting and fixing this issue!

Fixes #4367
2022-01-19 12:35:49 +01:00
Tomasz Gajewski
3bbe7d9d07 tool/depot/create: typo fix 2022-01-19 12:35:49 +01:00
Christian Prochaska
8e252f79f8 Remove mutex from 'Genode::Trace_output'
Fixes #4356
2022-01-19 12:35:49 +01:00
Christian Helmuth
e6c5e5e8b9 dde_bsd: update mirror URL
OpenBSD 6.6 disappeared from fau.de, so we switch to ftp.openbsd.org.
2022-01-19 12:35:49 +01:00
Norman Feske
ce53d88235 sculpt: support base-linux
- Consider 'sdl' as source of input events in the event-filter
  configuration as generated by the sculpt manager

- Supply an artificial 'platform_info' ROM as requested by the
  sculpt manager to obtain the affinity-space information

- Substitute 'fs_rom' for 'cached_fs_rom' as a workaround for the
  lack of support for managed dataspaces on Linux

Fixes #4362
2022-01-19 12:35:49 +01:00