Commit Graph

7669 Commits

Author SHA1 Message Date
Norman Feske
f1b46c3205 Move depot keys to repos/gems/sculpt/depot
This change keeps the version-controlled 'pubkey' and 'download' files
separate from files generated via depot/create or downloaded via
depot/download. So one can remove the entire depot/ directory without
interfering with git.

Furthermore, depot keys can now be hosted in supplemental repositories
independent from Genode's main repository.

Fixes #4364
2022-01-19 12:35:49 +01:00
Norman Feske
03cbf435e5 base-linux: increase global cap limit to 20000
This is a prerequisite for executing sculpt.run on Linux.

Issue #4362
2022-01-19 12:35:49 +01:00
Christian Prochaska
5fed1641a4 virtualbox6: reduce 'Vm_connection' priority
Fixes #4361
2022-01-19 12:35:49 +01:00
Piotr Tworek
d610f9f4f1 Fix some signed/unsigned implicit conversions.
Fix some trivial cases where the signedness of the constant value does
not match the signedness of type the code expects to see. GCC can be
asked to warn about those by passing Wsign-covnersion flag.

Issue #4354
2022-01-19 12:35:48 +01:00
Piotr Tworek
f2dab083f6 os: Properly initialize File_system::Watch_handle.
This comes up when building the code with clang 13. It happens due to
recently enabled Wconversion warning, which in case of clang also
enables implicit-int-conversion warning. The warning reads:

  fs_file_system.h:937:44: error: higher order bits are zeroes after
  implicit conversion [-Werror,-Wimplicit-int-conversion]
                        ::File_system::Watch_handle fs_handle { -1U };
                                                    ~~~~~~~~~   ^~~

This can be fixed by properly specifying fs_handle value to be of
unsigned long type.

Issue #4354
2022-01-19 12:35:48 +01:00
Piotr Tworek
27b798fa4f base: Make int to access_t conversion explicit.
As far as I can tell this is not raised by any released GCC versions.
Clang 13 on the other hand warns about it due to implicit-int-conversion
warning which is automatically enabled together with Wconversion. The
problem is relatively simple, shifting access_t value does not always
produce result which is also of access_t type. For example, if access_t
is uint16_t, shifting it will produce integer result. This can be
observed even with GCC. Building the following C++ example will fail:

  #include <type_traits>
  #include <stdint.h>

  int test() {
      uint16_t a = 0xabcd;
      static_assert(std::is_same_v<decltype(a<<1), uint16_t>);
      return 0;
  }

Changing uint16_t in the static_assert to int, will allow the code to
build.

Make such int to access_t implicit conversion explicit to allow the code
to be compiled with both GCC and clang.

Issue #4354
2022-01-19 12:35:48 +01:00
Alexander Tormasov
b3f8b49873 mk: add golang as target for compilation
Fixes #4358
2022-01-19 12:35:48 +01:00
Alexander Boettcher
507e5ac776 vmm_x86: fix sporadic test failures on x86_32 nova
Explicitly configure wanted exits instead of using the "random" primary
ctrl value.
2022-01-19 12:35:48 +01:00
Sergey Platonov
81acd46518 libc: nameserver file in configured socket directory
The path for the `nameserver` file was fixed to `/socket/nameserver`.
So, if the socket directory was configured differing from `/socket`, DNS
did not work. Now the default path for the `nameserver` takes into
account the path configured in the `socket` libc config attribute.

Fixes #4318
Fixes #4343
2022-01-19 12:35:48 +01:00
Johannes Schlatow
2e1a1c199e lwip plugin: support large backlog values
iperf, e.g., uses INT_MAX as backlog argument to the listen() call

Fixes genodelabs/genode#4341
2022-01-19 12:35:48 +01:00
Sebastian Sumpf
79e69a5549 nic_loopback: Adjust to packet allocator changes
Remove '_expected_offset' check on round trip test from RX packet,
because allocators between RX/TX can have different allocation
strategies. Rely on 'pattern' check for RX packets only.

In loopback server alloc size must match actual packet size.

issue #4312
2022-01-19 12:35:48 +01:00
Josef Söntgen
94a7c32fb4 libports: remove FUSE fs run script snippet
This file is only needed by the FUSE-based file system servers in
the world repository.

Fixes #4353.
2022-01-19 12:35:48 +01:00
Christian Helmuth
18e00c7772 depot_autopilot: enable riscv 2022-01-19 12:35:48 +01:00
Sebastian Sumpf
08c1e69d71 nic/packet_allocator: align allocations to 2 bytes
Override 'try_alloc/free' because ethernet frame headers are 14 bytes
(src/dst mac (12) + ethertype (2)) causing the IP header to be 2 byte
aligned, leading to problems on platforms that require load/store
operations to be naturally aligned when reading, for example, 4 byte IP
addresses. Therefore, we align the allocation to 2 bytes, so the IP
header is aligned to 4.

issue #4312
2022-01-19 12:35:48 +01:00
Norman Feske
5611fd2355 depot: update recipe hashes 2021-12-17 15:06:38 +01:00
Norman Feske
d658648a09 test/block_cache: tweak RAM quota for base-nova 2021-12-17 15:06:38 +01:00
Norman Feske
3cc6df3116 base: tighten affinity handling
This patch improves the robustness of the CPU-affinity handling.

- The types in base/affinity.h received the accessors
  'Location::within(space)' and 'Affinity::valid', which alleviates
  the fiddling with coordinates when sanity checking the values,
  in init or core.

- The 'Affinity::Location::valid' method got removed because its
  meaning was too vague. For sanity checks of affinity configurations,
  the new 'within' method is approriate. In cases where only the x,y
  values are used for selecting a physical CPU (during thread creation),
  the validity check (width*height > 0) was not meaningful anyway.

- The 'Affinity::Location::from_xml' requires a 'Affinity::Space'
  as argument because a location always relates to the bounds of
  a specific space. This function now implements the selection of
  whole rows or columns, which has previously a feature of the
  sandbox library only.

- Whenever the sandbox library (init) encounters an invalid affinity
  configuration, it prints a warning message as a diagnostic aid.

- A new 'Affinity::unrestricted' function constructs an affinity that
  covers the whole affinity space. The named functions clarifies
  the meaning over the previous use of the default constructor.

- Core's CPU service denies session requests with an invalid
  affinity parameter. Previously, it would fall back to an
  unrestricted affinity.

Issue #4300
2021-12-17 15:06:38 +01:00
Christian Helmuth
e21ca736b8 fetchurl: remove duplicate from used_apis in recipe 2021-12-17 15:06:38 +01:00
Christian Helmuth
a80a22c819 recipes: don't declare implemented API in used_apis
Prevents "*** detected duplicates in REPOSITORIES" on recipe build.
2021-12-17 15:06:38 +01:00
Sebastian Sumpf
7dcd9a9f8d vfs_trace: remove Trace::Session::subject_info
issue #4349
2021-12-17 15:04:49 +01:00
Norman Feske
d370f56a77 Remove obsolete Trace::Session::subject_info RPC
Issue #3610
Fixes #4349
2021-12-17 15:04:49 +01:00
Sebastian Sumpf
43da93bb6f noux: add RISC-V gnu build support
issue #4312
2021-12-17 15:04:49 +01:00
Stefan Kalkowski
6dbdb966fc virtio: remove bitfield in Index template
Eliminates note of GCC about bitfield as parameter semantic change.

Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
609af0037f liblzma: silent some warnings
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
f6dd1c96f6 libdrm: silent warnings
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
793a667872 gmp: silent warnings
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
1779cc7a2f freetype: silent some warnings
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
86df5b1285 jitterentropy: fix if condition, fix warning
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
f5193874c8 e2fsprogs: eliminate warnings, fix strncat bug
Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
2c569953d0 base: replace ELF flags bitfield with booleans
Instead of using a bitfield for storing rwx and skip boolean value,
take a boolean instead. This fixes a note giv]en by GCC 9.1 about
changes semantics of bitfields given as parameter by value on ARM.

Ref #4344
2021-12-17 15:04:48 +01:00
Stefan Kalkowski
b11731d6b2 dde_linux: silent warning in fork
When initializing a task_struct within the lx_emul library
we have to temporarily use a big object on the stack.

Ref #4344
2021-12-17 15:04:48 +01:00
Josef Söntgen
f9e0548d0c sculpt_manager: integrate GPU device access
Similar to other devices allow for selecting a graphics device as
well. This is currently only useful on iMX8-based systems like
iMX8Q-EVK and MNT Reform2 where the driver is explicitly started
from a pkg.

Fixes #4342.
2021-12-17 15:04:48 +01:00
Piotr Tworek
1a9fad4022 virtio_nic: Tweak default buffer sizes.
After VirtIO::Queue refactoring buffers no longer share the same
dataspace as VirtIO rings. This makes optimal buffer calculations a lot
easier. In this case 64 buffers 2kB each will need precisely 128kB of
RAM. Previous value of 2016 will just waste 768b.

Fixed #4347
2021-12-17 15:04:48 +01:00
Piotr Tworek
643747b912 os: Refactor VirtIO::Queue implementation.
The key changes in this patch are:
* Buffer allocation is moved into a separate Buffer_pool helper. The
  implementation of the buffer allocation strategy does not change.
  The helper allocates a single RAM dataspace and splits it in multiple,
  equally sized chunks.
* Management of main descriptor ring is enacapsulated in Descriptor_ring
  helper class.
* Use separate RAM dataspaces for descriptor rings and buffers.
  Previously both of them were packed into a single dataspace. This
  might have been more RAM efficient, but IMO it made the code uglier and
  harder to understand.
* All of the VirtIO::Queue members are now initialized on the class member
  initializer list. This is possible due to previously listed changes.
* Since all VirtIO::Queue members are initalized on member initalizer
  list, some additional ones can be marked as const, ex _avail, _used ring
  pointers.
* Move descriptor writing code into a common method used by both
  write_data and write_data_read_reply members. This avoids some code
  duplication between those methods.
* Get rid of request_irq argument that most public VirtIO::Queue methods
  accept. None of the existing drivers use it and I doubt this will
  change any time soon.
* Use Genode namespace by default in Virtio.

This patch also fixes at least one bug that I discovered while working
on VirtIO block device driver. Namely, when chaining descriptors only the
first descriptor in the chain should be exposed in the available ring.

Issue #4347
2021-12-17 15:04:48 +01:00
Sebastian Sumpf
75509d77b5 base-hw: Remove 'riscv_qemu' and move to 'genode-riscv'
issue #4312
2021-12-17 15:04:48 +01:00
Sebastian Sumpf
0fc2db50f0 ieee754: add test for riscv
issue #4312
2021-12-17 15:04:47 +01:00
Sebastian Sumpf
ee5d300f72 stdcxx: riscv support
issue #4312
2021-12-17 15:04:47 +01:00
Sebastian Sumpf
a4d67c3262 libm: riscv support
issue #4312
2021-12-17 15:04:47 +01:00
Sebastian Sumpf
7c976a83e0 libc: riscv support
libc-gen, libc-setjmp, task startup

issue #4312
2021-12-17 15:04:47 +01:00
Norman Feske
890842dce2 base-hw/lib/mk/spec/cortex_a8/core-hw.inc (usb_armory) 2021-12-17 15:04:47 +01:00
Norman Feske
63f78b6255 ports: avoid implicit conversions
Issue #23
2021-12-17 15:04:47 +01:00
Norman Feske
dea467f692 libports: avoid implicit conversions
Issue #23
2021-12-17 15:04:47 +01:00
Norman Feske
8a1675e12e gems: avoid implicit conversions
Issue #23
2021-12-17 15:04:46 +01:00
Norman Feske
5bd8fa9678 dde_linux: avoid implicit conversions
Issue #23
2021-12-17 15:04:45 +01:00
Norman Feske
1aa4f29300 demo: avoid implicit conversions
Issue #23
2021-12-17 15:04:45 +01:00
Norman Feske
04cf6ea3ab os: avoid implicit conversions
Issue #23
2021-12-17 15:04:45 +01:00
Norman Feske
03047009b1 base: avoid implicit conversions
This patch is a prerequisite for compiling the code with
the warnings -Wconversion enabled.

Issue #23
2021-12-17 15:04:44 +01:00
Norman Feske
c79a59655d Add -Wconversion to strict build mode 2021-12-17 15:04:43 +01:00
Johannes Schlatow
b1bbd72e84 net: fix tail size calculation in Ethernet_frame
The const-variant of the data() method contained an erroneous
calculation of the tail size. This led to the size guard throwing
exceptions when trying to parse TCP packets that only contained the
TCP header.

Fixes genodelabs/genode#4340
2021-12-17 15:04:43 +01:00
Norman Feske
162ddb1fdb virtio: fix len calculation
Thanks to Piotr Tworek for the fix and his explanation as follows:

The basic idea is to try to fit payload data into the descriptor used to
send the header. If there is no payload, or the payload fits exactly
into the remaining space in the header decriptor, len should be 0 and
only one descriptor should be used. In such case the "next" and "flags"
members of the descriptor structure should be set to 0.

In case there is some extra payload data to send, but its size is
bigger than the remaining free space in the descriptor used to send the
header, len should contain the remaining size of the payload that
can't be sent via the header descriptor. The code will then chain
additional descriptors to handle this remainder.

With the len variable shadowing, the code will never queue the remaining
data.

Issue #4327
2021-12-17 15:04:43 +01:00
Stefan Kalkowski
6cc6047962 platform_drv: introduce clocks, power, reset
Share datastructures for clock, power and reset related configurations
per device. In the generic platform driver component these structures
are kept empty. Driver derivates can fill the clocks settings, power and
reset switches with life. The former Driver::Env gets removed.

Fix #4338
2021-12-17 15:04:39 +01:00
Stefan Kalkowski
f11d2b5b54 autopilot: automated stress test for platform_drv
Fix #4330
2021-12-17 14:56:53 +01:00
Stefan Kalkowski
132e4fe815 platform_drv(arm): robust re-configuration support
This change of the inner working of the platform driver for ARM allows
clients to have permanent open sessions, as long as a policy node matches
the client. If devices disappear from the policy resp. from the set of
available devices (hotplug), the devices ROM of the session gets updated,
and a corresponding device session gets closed. If the device remains
untouched in the configuration but other devices appeared/disappeared, the
device session is not affected.

Ref #4330
2021-12-17 14:56:46 +01:00
Norman Feske
6d231597b4 allocator_avl.h: remove debug feature 2021-12-02 10:03:26 +01:00
Norman Feske
a0a1f6455a base/string.h: avoid fallthrough cases 2021-12-02 10:02:48 +01:00
Christian Helmuth
92b7be4d11 depot: update recipe hashes 2021-11-30 12:08:54 +01:00
Christian Helmuth
13dab699b1 base: invalidate entire range on VM-session detach
The requested guest-physical memory range may comprise multiple attached
dataspace regions, which must all be detached. This is not required for
the current vbox5 implementation, but for vbox6 as the current API
suggests these semantics.

This commit can be seen as intermediate fix as a real fix should change
the API to prevent long-running detach loops in core that may lock out
requests by other components.
2021-11-29 15:11:53 +01:00
Stefan Kalkowski
7eb3da71b5 base-hw: check managing_system property for SMC
* When issuing a secure-monitor-call on behalf of a PD session client
  first check the permission via the 'managing_system' property.

Fix #4321
2021-11-29 15:11:53 +01:00
Stefan Kalkowski
14de84fae6 base: be more restrictive with 'managing_system'
* Only give managing_system permission when all parent nodes of the
  corresponding component agree in doing so.
* Move the physical memory constrains heuristic from sandbox library to core

Fix #4335
2021-11-29 15:11:53 +01:00
Johannes Schlatow
916683b6d6 platform_drv(arm): fix cap and memory leaks
* Track all caps and ram quotas of the sub-sessions properly
* Release DMA buffers, it is not done implicitely when destroying
  the Constrained_ram_allocator
* Do not replenish quota before really releasing memory from
  the allocator

Issue #4330
2021-11-29 15:11:53 +01:00
Johannes Schlatow
e256969489 platform_drv(arm): fix destruction order
The Session_component must be destroyed before updating the device
model because the Session_component must also release all previously
acquired devices. If the device model is updated before, the devices
might have been removed.

Issue #4330
2021-11-29 15:11:53 +01:00
Johannes Schlatow
7a2826a2fe base: fix use after free in Genode::Heap
Fixes genodelabs/genode#4334
2021-11-29 15:11:53 +01:00
Alexander Boettcher
45cebd774d cpu_balancer: avoid dynamic policy allocation
Pre-allocate all possible type of policy objects as part of the thread meta
state to avoid increased memory consumption due to different policy object
sizes. The cpu_balancer accounts the memory per client and can't forward
potentially occurring out-of-ram exceptions during config-ROM update phases.

Fixes #4333
2021-11-29 15:11:53 +01:00
Alexander Boettcher
1f58b05255 cpu_balancer: limit mem increase on config update
The commits avoids reading in and allocating memory for all potentially
threads, which are potentially currently not existent (but configured in the
policy beforehand). Instead the policy is read in and evaluated when a thread
is created and policy changes are solely applied to existing/running threads.
By this the commit avoids the increase of memory consumption during the
evaluation of policies during config ROM updates.

Issue #4333
2021-11-29 15:11:53 +01:00
Piotr Tworek
30b3ad218f virt_qemu: Use VirtIO fb driver instead of ramfb.
This driver should be better suited for VirtIO based board like
qemu_virt.
2021-11-29 15:11:53 +01:00
Piotr Tworek
7c1888644a os: Add VirtIO framebuffer driver.
This implements the necessary bits to provide 2D framebuffer support on
top of VirtIO GPU device as implemented in Qemu. I don't know if any
other implementation of this specific device exists.

Compared to the ramfb driver which already exists in Genode Virtio FB driver
has one major benefit. It allows Qemu window to be dynamically resized at
runtime. The driver will treat this as resolution change and act accordingly.
Ramfb driver can currently only use the hardcoded 1024x768 screen size. Changing
screen resolution might not sound like a big deal, but it is rather useful to
run Genode on Qemu in full screen mode.
2021-11-29 15:11:53 +01:00
Piotr Tworek
2ec9e69fd4 os: Add support for reading VirtIO responses.
Some more advanced devices like VirtIO GPU do expect they can receive
responses to VirtIO commands they issue via VirtIO queue. Such responses
are not sent via a separate device writeable queue. Instead the driver
is expected to queue some additional descriptors and buffers which the
device can then use to provide the reply.

This patch adds support for such write-data-read-response opeartion to
Genode VirtIO::Queue implementation. The implementation is pretty simple
and does not support any fancy features like receiving the response
asynchronously. Instead the operation will use caller provided callback
to wait for the device to process the command. Once this callback
returns the write-data-read-response VirtIO::Queue function will invoke
another callback passing received response as argument.
2021-11-29 15:11:53 +01:00
Christian Helmuth
0bb0ac079a sculpt: version 21.11 2021-11-29 15:11:53 +01:00
Josef Söntgen
fcc236d906 libports: add mesa_gpu-etnaviv recipe
Similar to the existing 'mesa_gpu' pkgs add one for 'etnaviv'
as well.

Issue #4329.
2021-11-29 15:11:53 +01:00
Josef Söntgen
17da7c88d0 import-libdrm: fix building etnaviv as recipe
Make sure all needed headers are found when building via depot.

Issue #4329.
2021-11-29 15:11:53 +01:00
Josef Söntgen
4d93187d31 libdrm: introduce Gpu session for etnaviv
* The Gpu session back end translates all DRM API requests of the
  client into matching Gpu session operations.

* Enable ioctl for etnaviv

Fixes #4329.
2021-11-29 15:11:53 +01:00
Josef Söntgen
645e51dc1d gpu: add information for etnaviv driver
Mesa queries information about the underlying device and this header
denotes the layout of the information. It is also used by the driver
itself to populate the 'info_dataspace'.

Issue #4329.
2021-11-29 15:11:52 +01:00
Josef Söntgen
8155505b41 mesa/etnaviv: guard unmapImage call
We may call this function only in case mapImage was successful.

Issue #4329.
2021-11-29 15:11:52 +01:00
Josef Söntgen
d39af2206c mesa_gpu-etnaviv: etnaviv already part of mesa
Since the parts of the 'etnaviv' library are already part of the
'mesa.lib.so' that is normally loaded along-side remove the
duplication here.

Issue #4329.
2021-11-29 15:11:52 +01:00
Norman Feske
133d21ad38 event_filter: add touch-click filter
This filter bridges the gap between a touchscreen driver, which
generates raw touch events and traditional GUI applications that expect
a pointer (absolute motion, press/release of the left mouse button).

Fixes #4332
2021-11-29 15:11:52 +01:00
Norman Feske
09d020508c depot: recipes for pin-control/state session APIs
Issue #4315
2021-11-29 15:11:52 +01:00
Norman Feske
dc39a8db62 base: introduce Allocator::try_alloc
This patch changes the 'Allocator' interface to the use of 'Attempt'
return values instead of using exceptions for propagating errors.

To largely uphold compatibility with components using the original
exception-based interface - in particluar use cases where an 'Allocator'
is passed to the 'new' operator - the traditional 'alloc' is still
supported. But it existes merely as a wrapper around the new
'try_alloc'.

Issue #4324
2021-11-29 15:11:52 +01:00
Christian Helmuth
9591e6caee vbox6: CPU halt/wakeup via RTSEMEVENTMULTI
The former use of Pthread conditionals did not cover the corner case of
early wakeups just before halting the CPU. These wakeups were simply
lost which resulted in sporadic halts of about 500 ms (the maximum timeout
of all halts in VirtualBox). RTSEMEVENTMULTI preserves early wakeups
and effectively prevents the CPU from halting.

Additionally, we now wakeup the target CPU on VMMR0_DO_GVMM_SCHED_POLL
and, thus, mimic the behavior of the original implementation slightly
better,

Slightly related to #4313
2021-11-29 15:10:53 +01:00
Johannes Schlatow
a65807ff08 rom_filter: optionally skip top-level node
Since the top-level node of the output ROM is always generated by the
rom_filter, there is no way to pass-through the content of an input ROM
without wrapping in an addition XML node.

genodelabs/genode#4326
2021-11-29 15:10:53 +01:00
Josef Söntgen
059c7ed74a dde_linux: prevent debug message in memory backend
The Allocator_avl back end will display diagnostic messages if the
address to be freed is not at the beginning of a block. This happens
regulary when 'struct page' objects are not freed in allocation order.

Issue #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
98385a7658 allocator_avl: return 0 for improper size_at call
In case the given address is not the start of a block bail instead of
making improper size assumptions.

Issue #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
49bf58a2ae lx_kit: free dataspace interface
Allow for freeing of manually managed dataspaces.

Fixes #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
327ec61ee3 lx_kit: get buffer dataspace from virt addr
Introduce a method to access the dataspace capability of the underlying
backing store for a memory allocation. This is necessary for drivers
where the memory is managed manually and the capability needs to be
given to a client.

Issue #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
cd7a65a313 dde_linux: extended pgtable header for etnaviv
The 'pgprot_noncached' function is referenced by the driver code.

Issue #4325.
2021-11-29 15:10:53 +01:00
Stefan Kalkowski
23514bf5c2 dde_linux: add runqueues symbol for -O0 build 2021-11-29 15:10:53 +01:00
Christian Helmuth
974627f700 vbox6: adapt to GUI framebuffer size on startup
Explicitly, adapt to current framebuffer/window size after
initialization finished. This ensures the use of the correct framebuffer
dimensions in scenarios without a window manager.

Thanks to Raphael for the patch.
2021-11-29 15:10:53 +01:00
Norman Feske
3b456e0037 test/resource_request: ignore spurious requests
This patch makes the test less dependent on the rate of state updates by
calculating the upgraded quota from the values found in the state report
instead of simply increasing the '_ram_quota' for each incoming report.
2021-11-29 15:10:53 +01:00
Norman Feske
231ac187fe base: introduce Ram_allocator::try_alloc
This patch replaces the 'Ram_allocator::alloc' RPC function by a
'try_alloc' function, which reflects errors as 'Attempt' return value
instead of an exception.

Issue #4322
Issue #3612
2021-11-29 15:10:53 +01:00
Norman Feske
959bcae557 base: add util/attempt.h utility
Fixes #4322
2021-11-29 15:10:52 +01:00
Norman Feske
694dff8a5c base: sort symbols/ld with LC_COLLATE=C 2021-11-29 15:10:52 +01:00
Christian Helmuth
68caa26407 virt_qemu: use "-device ramfb"
Issue #4282
2021-11-29 15:10:52 +01:00
Norman Feske
4cfd954e1e Remove dependency from 'which' utility
Debian declared the 'which' utility as deprecated.

Fixes #4319
2021-11-29 15:10:52 +01:00
Norman Feske
293d545b97 sandbox: use Genode::update_list_model_from_xml
This patch replaces the former local implementation by the function
provided in 'util/list_model.h'.

Issue #4317
2021-11-29 15:10:52 +01:00
Norman Feske
4df7e6adde util/list_model.h: Add update_list_model_from_xml
The new 'update_list_model_from_xml' function template simplifies the
use of the list model utility by alleviating the need for implementing a
custom policy class for each model. Instead, the transformation is done
using a few lambda functions given directly as arguments.

Issue #4317
2021-11-29 15:10:52 +01:00
Norman Feske
449f647e58 dde_linux: lx_emul interface for GPIO pin access
This patch introduces the lx_emul/pin.h interface that enables GPIO stub
drivers to interact with Genode's Pin_control and IRQ sessions via a
simple C API.

Fixes #4316
2021-11-29 15:10:52 +01:00
Norman Feske
f2a627c107 os: Pin_control and Pin_state session interfaces
The new interfaces are meant to gradually replace the existing
Gpio_session interface.

- Each session refers to a single pin.
- The session types distiguish the direction of the signal as input or
  output.
- Pin coordinates can be selected via session labels.
- GPIO interrupts are covered by the regular IRQ session interface.

The interfaces are accompanied by framework utilities and interfaces:

- os/pin_driver.h
- pin_control_session/component.h
- pin_state_session/component.h

These headers relieve GPIO drivers from implementing boilerplate code by
providing device-agnostic portions. The A64 pio driver serves as
reference for using those utilities.

  https://github.com/nfeske/genode-allwinner/tree/master/src/drivers/pin/a64

Fixes #4315
2021-11-29 15:10:52 +01:00
Johannes Schlatow
2ecb09ba7e tool/run: move nic model to qemu_args file
Always instantiating a network device with id `net0`, removes the need to call
append_qemu_nic_args in run scripts unless we want to add forwarding
rules.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Johannes Schlatow
522a1cdc5b tool/run: read board-specific qemu args from file
Allow specifying additional qemu arguments for externally supported boards
(e.g. zynq_qemu) by adding a `qemu_args` file in the board-property directory.

The syntax of the qemu_args file is as follows:
- Arguments can appear in a single line or in multiple lines as the
  lines will be appended (separated by a whitespace) to the global
  qemu_args variable.
- If the line is prepended with a `foobar:` expression. The arguments
  are only added if the foobar spec is present.

Note, that a `-m` argument specified in the qemu_args file will
override the arguments provided by the run scripts.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Johannes Schlatow
c0c2ed2bf5 tool/run: make qemu RAM sanity check more robust
First, the former implementation has only considered the pure numerical
variant of the -m argument. Yet, qemu also allows specifying the amount
of memory by `-m 1G`, `-m size=1G` and more.

Second, the default amount of memory for BOARD=pc was 512M (800M in case of okl4).
Since the depot_autopilot.run also required at least 768M on all
platforms it seems reasonable to take 800M as a default value for BOARD=pc and
thereby remove the special treatment of okl4.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Alexander Boettcher
c774272366 vbox5/6: set ia32_tsc_aux for rdtscp usage
Fixes #4314
2021-11-29 15:10:52 +01:00