Compare commits

...

83 Commits

Author SHA1 Message Date
Norman Feske
0f9cb72cfa depot: update recipe hashes 2021-03-29 13:46:49 +02:00
Norman Feske
27527bf165 wm: allow clients to upgrade session caps
This patch adds the handling neccessary for clients to upgrade the cap
quota of their GUI session. Until now, the upgrade mechanism supported
only RAM quota.

The limitation became visible once a client - in the particular case the
motif_decorator - attempted the cap upgrade of its GUI session. The cap
quota would arrive at the wm, but the wm would keep it instead of
forwarding the quota to nitpicker. This resulted in an infinite retry
loop at the motif_decorator, ultimatedly depleting all its cap quota.
2021-03-29 13:45:25 +02:00
Norman Feske
f839b3ecba wm: make hover handling robust against input races
The window manager infers the overall state from the intercepted input
events for the decorator and all GUI clients. However, each of those
parties have an independent input-event stream. Whereas the order of
events within one GUI session is strict, the order of events between GUI
sessions is arbitrary. The window manager wrongly relied on a global
event ordering to track the pointed-at GUI session.

The patch removes the assumption of a global event order by tracking the
relevant pointer state for each GUI session independently and evaluating
these states when propagating the pointer position to the decorator.

Fixes #4059
2021-03-29 13:45:24 +02:00
Norman Feske
bfea27a258 Tweak to support delete key in bash
This commit modified bash's builtin mapping of character sequences to
readline-functionality to detect the sequence of the delete symbol as
generated by the terminal.

Fixes #4058
2021-03-29 13:45:24 +02:00
Christian Helmuth
4f91d71cf9 zynq_qemu: disable fb_bench and nic_router_flood tests 2021-03-29 13:45:24 +02:00
Jean-Adrien DOMAGE
32169cd137 add I2c driver for imx8q based platform
This commit introduces a new i2c driver for the imx8q_evk based platform.

Fixes #4052
2021-03-29 13:45:24 +02:00
Norman Feske
eb89b13327 depot: update recipe hashes 2021-03-24 11:32:53 +01:00
Norman Feske
b51c1a0fe3 News item for Sculpt 21.03 2021-03-24 11:32:53 +01:00
Norman Feske
f90cd542cb sculpt: documentation update 2021-03-24 11:32:53 +01:00
Christian Helmuth
dce272ba8f tool/xkb2ifcfg: update README to event_filter 2021-03-24 11:09:08 +01:00
Alexander Boettcher
141af733aa vbox5: remove priority bands from vbox5-* packages 2021-03-24 10:34:55 +01:00
Alexander Boettcher
945b4760ef sculpt: remove vfs.lib and init from common rules
to support packages using own build versions and to detect packages missing
to specify dependency on init.
2021-03-24 10:34:55 +01:00
Alexander Boettcher
53041f4cd8 usb_host: support to disable usb controller types
The commits adds the same configuration values as supported up to now by
the monolithic usb driver. In contrast to the original, by default all drivers
are started. Disabling a controller type is used by Sculpt, e.g. for OHCI if
running Sculpt inside Virtualbox.
2021-03-23 11:50:37 +01:00
Alexander Boettcher
521f61b9e0 usb_hid: disable wacom driver
Issue #3997
2021-03-23 11:32:24 +01:00
Norman Feske
ca50a41d28 depot: update recipe hashes 2021-03-23 11:28:53 +01:00
Norman Feske
b29f1497bf depot_query: sort depot-user scan results
Related to issue #4054
2021-03-23 11:28:21 +01:00
Norman Feske
ca5522d4d9 sculpt: move chargen files to config/keyboard/
The addition of further keyboard layouts would otherwise pollute the
config/ directory too much.

Caution: When updating Sculpt OS, don't reuse your existing
config/event_filter file unmodified! You need to replace the chargen
includes, pointing to the new location, e.g.,

  <include rom="en_us.chargen"/>
  <include rom="special.chargen"/>

must be changed to

  <include rom="keyboard/en_us"/>
  <include rom="keyboard/special"/>

Issue #4055
2021-03-23 11:28:21 +01:00
Norman Feske
36ef41626a sculpt: keyboard-layout selection dialog
This patch extends the settings dialog with the ability to select the
keyboard layout between the options that are included in the sculpt
image. The manual configuration is of course still possible by editing
the /config/event_filter directly.

If both the fonts configuration and the event-filter configuration are
managed manually, the settings button and window are not displayed.

Fixes #4055
2021-03-23 11:28:21 +01:00
Norman Feske
e9ac14ed49 fs_query: report dir content in alphabetic order
By sorting the reported output, all consumers of the reports become able
to rely on a deterministic order. For example, the file browser of
Sculpt OS, the launcher menu items, and the depot-selection items will
appear in a predictable order.

Fixes #4054
2021-03-23 11:28:20 +01:00
Norman Feske
8f1db47c26 sculpt: screen capturing and event injection
This patch adds session-routing options to connect components to the
capture/event interfaces of the global nitpicker GUI server or the
leitzentrale GUI server. It thereby enables the implementation of screen
capturing components, remote management tools, or virtual keyboards.

Since those services are very powerful, they are subsumed under the
"hardware" category of the component graph as opposed to the GUI
category, which guarantees the separation of clients.

Fixes #4053
2021-03-23 11:28:20 +01:00
Norman Feske
d2fc834bfa os: depot recipe for pkg/test-capture
This package allows for experimenting with the capture-session
interface.
2021-03-18 17:36:35 +01:00
Christian Prochaska
3d432331b9 libc: mmap: use VFS handle as reference for shared mappings
Fixes #4050
2021-03-17 16:30:41 +01:00
Christian Prochaska
446df00d0d libc: support 'RLIMIT_DATA' resource in 'getrlimit()'
Fixes #4049
2021-03-16 17:45:40 +01:00
Tomasz Gajewski
2f0898d2a9 dde_linux: fixes in makefiles
Issue #3972
2021-03-16 11:25:25 +01:00
Christian Prochaska
9a0217f21a imx8: use 'snps,dis_u2_susphy_quirk'
Fixes #4048
2021-03-16 11:19:32 +01:00
Christian Prochaska
0cfafa1c8f usb_host_drv: support command timeouts and bool properties
Fixes #4047
2021-03-16 11:19:17 +01:00
Norman Feske
2c85e48a0d Revert "run: tweak CRLF translation in log scripts"
The substitution eats carriage-return characters in some cases such as
the Pine-A64-LTS board connected via an TTL-232R-RPi cable.
2021-03-12 15:08:11 +01:00
Norman Feske
15780a657c sd_card_bench.run: allow timer to reach IO_MEM
This is needed on seL4 on i.MX6 where the user-level timer driver
accesses memory-mapped I/O registers directly.
2021-03-12 12:09:17 +01:00
Norman Feske
5c5b56d1e0 depot: update recipe hashes 2021-03-12 12:08:24 +01:00
Norman Feske
00900d82b5 sculpt: tweak window motions in leitzentrale 2021-03-12 12:01:39 +01:00
Alexander Boettcher
18182b11da base: exit loop on cpu session close
if session can't be closed immediately, e.g. if the service is provided by
a child (cpu_balancer) and not by the parent.

Issue #4029
2021-03-12 12:01:39 +01:00
Norman Feske
8eb514d6b5 sculpt: interactive priority configuration
This patch reworks the resource-assignment dialog to allow the user to
select the scheduling priority in addition to the CPU affinity.

Fixes #4045
2021-03-12 12:01:39 +01:00
Alexander Boettcher
8a8de970a5 sculpt: add system clock package to index
Issue #4046
2021-03-12 12:01:39 +01:00
Sid Hussmann
cae3e447d6 vfs/pipe: fix pagefault during congested pipes
Issue #4030
2021-03-12 12:01:39 +01:00
Alexander Boettcher
f98d10a3f3 depot_deploy: support packages providing Rtc
Fixes #4046
2021-03-12 12:01:39 +01:00
Alexander Boettcher
521663c6de system_rtc: add standalone runtime package
Package contains no rtc driver, which must be provided separately.

Issue #4046
2021-03-12 12:01:39 +01:00
Alexander Boettcher
9b5bedefc7 expanding_pd_session: remove cap warning message
which are caused often when a component runs a bit longer and has dynamic
resource usage, e.g. running Genode's tool chain.
2021-03-12 12:01:39 +01:00
Norman Feske
8ecc258d3f sculpt: introduce runtime priorities
This patch adds 4 priority levels to the runtime subsystem. The highest
priority is used for components that are critical for the operation of
Sculpt, in particular the Leitzentrale GUI. All regularly deployed
components are assigned the lowest priority by default.

With priorities available in the runtime subsystem, this patch flattens
the priority levels at the top-level init to only two levels and
overlays the priority bands of the drivers, leitzentrale, and runtime
subsystems into one priority band. This has three benenfits:

- This change prevents the starvation of the Leitzentrale GUI from a
  spinning high-priority driver (issue #3997).

- The change will also ease the hosting of latency-critical components
  in the runtime subsystem that are prioritized higher than regular
  components, the storage stack, and the network stack.

- The Leitzentrale GUI remains always perfectly responsive regardless
  of the workloads deployed from packages. In the previous version,
  the runtime graph was sometimes stuttering on high system load.

Issue #4045
2021-03-12 12:01:39 +01:00
Sebastian Sumpf
7bbd050f25 riscv: adjust timeout run script to RISC-V
* Limit required memory for RISC-V to 15 MB per buffer

issue #4021
2021-03-12 12:01:39 +01:00
Norman Feske
7e7c10e66c Add sandbox test to depot autopilot
Issue #4044
2021-03-12 12:01:39 +01:00
Norman Feske
d5d3b3c3a4 test.run: support binaries other than init
This change enables the use of runtime pkgs that specify the test binary
directly as attribute in the <runtime> node.
2021-03-12 12:01:39 +01:00
Norman Feske
2baa283d87 vfs_lwip: reduce repeated warnings
This patch avoids the repeated warning "read blocked until lwIP
interface is ready" by printing the message only once. Otherwise,
the log is flooded with those warnings when falkon web browser
is started on Sculpt OS without network connectivity.
2021-03-12 12:01:39 +01:00
Josef Söntgen
4a12b5c653 mixer: fix README with regard to boolean values
Issue #4043.
2021-03-12 12:01:39 +01:00
Josef Söntgen
ba6c4a664f mixer: use audible default settings
In case there is no valid configuration the component used to mute
output by default. This, however, might lead to the assumption that
audio is not working at all. Instead set the master output volume to
50% and the per application volume to 100%.

Fixes #4043.
2021-03-12 12:01:38 +01:00
Norman Feske
9093c293cb sandbox: destroy 'Session_state' of local services
This patch adds the missing destruction of session-state objects of
local services when closing a session. Because of the missing
destruction, those session-state object remained part of the server
ID space. This becomes a problem once the backing store of the session
state object vanishes, that is when the client child gets removed from
the sandbox. Hence, the removal of a child with an open session to a
local service would lead to the corruption of the server ID space.

This patch adds the missing session.destroy() call.

Fixes #4044
2021-03-12 12:01:38 +01:00
Norman Feske
935bb36fe4 base: fix child destruction while close requested
This patch fixes a corner case where a child is destructed while a
asynchronous close request to a sibling server is still pending.

The child immediately discarded the session ID as the end of the
close-session processing, assuming that this ID is never to be needed
again. The session-state continues to exist to handle asynchrous close
protocol with the server.

However, if the child is destructed at this point (before the server
responded to the session request), the destruction of the child would
not cover the discharging of the session state because the session state
was no longer be part of the client's ID space. So once the asynchronous
close response from the server came in, the session state contained
stale information, in particular a stale closed_callback pointer.

The patch fixes the problem by deferring the discarding of the client ID
to the point where the session state is actually destructed. So the
session of a pending close response is covered by the child destructor.

Thanks to Pirmin Duss for reporting this issue along with a test
scenario for reproducing it!

Fixes #4039
2021-03-12 12:01:38 +01:00
Norman Feske
755aed7cb2 dde_linux: don't spin when panicking
Issue #3997
2021-03-12 12:01:38 +01:00
Sebastian Sumpf
6223ae4413 riscv: Interrupt controller support
- Enable the "platform-level interrupt controller" PLIC on base-hw
- The RISC-V specification offers only a register description, but no
  layout for the register set. This implies the layout is platform
  dependent, and therefore, implemented separately for Qemu

issue #4042
2021-03-12 12:01:38 +01:00
Sebastian Sumpf
bebba3876e run boot_dir hw: build debug ELF binaries again
- build debug version of core and bootstrap found under
  _var/run/<runscript>.core_ (.bootstrap). This is a regression when
  switching from object to archive library linkage of core.

fixes #4027
2021-03-12 12:01:38 +01:00
Norman Feske
aa0a98bd43 base-foc/hw: avoid use of placement new operator
Fixes #2106
2021-03-12 12:01:38 +01:00
Josef Söntgen
42f3d2eccd qemu-usb: reset completion pointer
Reset the completion pointer to prevent a double free in case the
packet is processed during ISOC IN request handling.

Fixes #4041.
2021-03-12 12:01:38 +01:00
Josef Söntgen
c03534e355 boot_dir/nova: enable intel_hwp
Instruct bender to enable Intel HWP on supported CPUs unconditionally
to gain more insight by using the feature most prominently in Sculpt.

Fixes #4040.
2021-03-12 12:01:38 +01:00
Norman Feske
1e0d843464 libc: avoid using placement new operator
Issue #2106
2021-03-12 12:01:38 +01:00
Norman Feske
8c7d34ff21 rpi_platform_drv: remove placement new operator
Issue #2106
2021-03-12 12:01:38 +01:00
Norman Feske
d6a312f438 tool/builddir: pass --ccache to run tool
With this patch, the build directory's CCACHE configuration is applied
to the building of depot archives when using the --depot-auto-update
feature.

Note that this is effective only when resetting the hash files before
building so that each depot-auto-update results in the same-named
versions. Otherwise, the include paths (that include the version name as
part of the path) make cache hits impossible.

Issue #4004
2021-03-12 12:01:38 +01:00
Norman Feske
6544cca320 tool/run: add --ccache argument
If this argument is combined with --depot-auto-update, the run tool
enables the use of ccache when invoking the depot/create tool.

Issue #4004
2021-03-12 12:01:38 +01:00
Norman Feske
3d0ed5992d tool/depot/create: add CCACHE=1 option
This commit complements issue #4004 with support for the depot/create
tool. If CCACHE=1 is specified at the command line, the build directory
for building a binary archive is configured with 'CCACHE := yes'.
2021-03-12 12:01:38 +01:00
Norman Feske
366fda0e47 sculpt: release part_block after device discovery
This patch triggers the immediate removal of part_block once the
discovery of a fresh inserted USB stick has completed. Without the
patch, part_block was retained until the runtime was reconfigured the
next time for other reasons (e.g., toggling an inspect view). Until the
next reconfituration, part_block tended to stand in the way of directly
assigning the USB device to a VM.
2021-03-12 12:01:38 +01:00
Christian Helmuth
7ce1f8e92d Enable en_us chargen in drivers_interactive-imx8q_evk
Issue #4038
2021-03-12 12:01:37 +01:00
Christian Helmuth
6e9843bd05 test-libc_fifo_pipe: more cap quota required for sel4/x86_64
Issue #4030
2021-03-12 12:01:37 +01:00
Norman Feske
2ff252360d sculpt: avoid flickering of leitzentrale
This patch increases the RAM quota of the nitpicker instance for the
leitzentrale to make it suffice for the buffering of content during
resize operations. This fixes a flickering artifact when having an
inspect view open while entering a WLAN passphrase. When the connect
button appears or disappears (depending on the number of written
characters), some parts of the inspect terminal would flicker sometimes.
2021-03-12 12:01:37 +01:00
Norman Feske
9de61e7014 base: detect truncated session args
This patch reflects the truncation of session arguments (e.g., by very
long session labels) by denying the session request.

Fixes #4037
2021-03-12 12:01:37 +01:00
Norman Feske
6712eac7e6 platform driver: use same label for all device PDs
Fixes #4037
2021-03-12 12:01:37 +01:00
Martin Stein
25a212aa24 nic_router: fix uncaught bit alloc exception
* catch every possible path of the Bit_allocator_dynamic::Out_of_indices
  exception
* add unconditional log output in the new "catch" directives, so, we will be
  able to debug the problem a bit more in detail next time

Fixes #4036
2021-03-12 12:01:37 +01:00
Alexander Boettcher
89ffc48576 depot_deploy: integrate shim and adapt sculpt
Issue #3837
Issue #4029
2021-03-12 12:01:37 +01:00
Norman Feske
9a5bc9caf0 cpu_balancer.run: use shim for hosting cpu_burner
This way, the redirected env sessions for the CPU burner are no longer
called directly by init. Init stays independent from the behavior of the
CPU balancer.

Issue #3837
Issue #4029
2021-03-12 12:01:37 +01:00
Norman Feske
c0a7565c21 os: shim helper for safe routing of env sessions
This shim component can be used in case where env sessions of child
(i.e., child's PD session) must be routed to another child of init.

Without the shim, init would directly need to interact with these
sessions and would thereby make itself dependent of the server's
behavior. RPC calls to a server hosted as a child lead to all kinds of
problems such as livelock situations, and putting the robustness of init
at the whim of its child.

With the shim, init merely needs to bootstrap the shim component by
routing the shim's env sessions to core as usual. The server is only
used for the sessions for the actual application hosted atop the shim.

Issue #3837
Issue #4029
2021-03-12 12:01:37 +01:00
Alexander Boettcher
a02ec07e49 sculpt_manager: add PD as service
Issue #3837
2021-03-12 12:01:37 +01:00
Alexander Boettcher
1f29055927 depot_deploy: support providing CPU and PD service
Issue #3837
2021-03-12 12:01:37 +01:00
Alexander Boettcher
7af276ac81 cpu_balancer: add support to provide PD service
Issue #3837
2021-03-12 12:01:37 +01:00
Tomasz Gajewski
de62582905 prepare_port: simple cache for downloads
Fixes #4028
2021-03-12 12:01:37 +01:00
Norman Feske
ba567f4ba8 Avoid double slashes in select_from_repositories
Issue #4019
2021-03-12 12:01:37 +01:00
Alexander Boettcher
ee0ed273e6 vm_stress: increase cap quota for 3 & 4 vcpu test
due to changes by

   base: refactor VM/vCPU API

   Issue #3554
2021-03-12 12:01:37 +01:00
Norman Feske
e1bb0e8e15 usb_host: refine class heuristics on device report
This patch is an interim fix for using HID devices that offer a HID
interface as not the first interface. It also supplements the
interface classes as supplemental information to the USB-devices
report.

Fixes #4035
2021-03-12 12:01:37 +01:00
Norman Feske
2e4ccc1459 usb_host: reflect ENOSPC as STALL
Issue #4035
2021-03-12 12:01:37 +01:00
Norman Feske
80522fadf6 usb_hid: don't touch non-HID interfaces
Issue #4035
2021-03-12 12:01:36 +01:00
Norman Feske
2ce4a3b400 sculpt: version 21.03 2021-03-12 12:01:36 +01:00
Norman Feske
c68443e2eb base-hw: support packaging of multi-arch boards
With this patch, the board/<name>/arch property file can have multiple
lines where each line denotes an instruction-set architecture supported
for the board.

Issue #4019
Fixes #4034
2021-03-12 12:01:36 +01:00
Stefan Kalkowski
9685a8b60d drivers_managed-imx8q_evk: add dummy_rtc_drv
Ref #4033
2021-03-12 12:01:36 +01:00
Tomasz Gajewski
23e3079f46 tool/run: option to copy tftp served files
Fixes #3386
2021-03-12 12:01:36 +01:00
Stefan Kalkowski
10b56afff0 rtc_drv: add dummy driver
* Add dummy driver implementation and depot package
* Extend configuration to allow setting an initial RTC value

Fix #4033
2021-03-12 12:01:36 +01:00
Sebastian Sumpf
d4b58b689c base-hw: fix RISC-V duration calculation
Simplify calculation of Timer::_duration, the old implementation caused
the time running backwards sometimes. This makes
'nic_router_dhcp_*' and 'event_filter' run scripts succeed.

issue #4021
2021-03-12 12:01:36 +01:00
Norman Feske
1826ff8a59 sculpt: constrain initial log-window size
This prevents the log terminal from adjusting itself to the whole screen
size before the leitzentrale window layout is applied. This intermediate
size can otherwise exhaust the 8 MiB of RAM quota of the log terminal.

Issue #3970
2021-03-12 12:01:31 +01:00
458 changed files with 4612 additions and 1273 deletions

View File

@@ -4,6 +4,56 @@
===========
Sculpt OS release 21.03 | 2021-03-24
####################################
| Version 21.03 of the Sculpt operating system makes the system resilient
| against classes of driver failures, adds configurable real-time priorities,
| and introduces interfaces for screen capturing and user-event injection.
Sculpt OS 21.03 incorporates the many improvements of the latest two Genode
releases. Thanks to Genode's concept of
[https://genode.org/documentation/release-notes/21.02#Pluggable_network_device_drivers - pluggable device drivers],
the system has reached a new level of robustness against malfunctioning
drivers. For example, if the Intel graphics driver trips over an unsupported
external display, the driver gets automatically restarted while all graphical
applications keep running. Or as another example, should the overly complex
Wifi driver have a hick-up, it can be restarted with a simple mouse click
without harming the networking stacks running on top.
Even though Genode supports static-priority scheduling since more than a
decade, Sculpt did not make this feature available to end users so far. The
new version changes that. For each component, the user can now take a
deliberate decision about the hard scheduling priority, e.g., prioritizing
latency-critical multi-media applications over computational workloads or
virtual machines.
Speaking of workloads, to push the limits of what is possible with Sculpt OS,
the new version introduces additional interfaces that can be assigned to
components. First, it has become possible to redirect the interaction of a
component with the kernel through another component, thereby enabling features
like dynamic CPU-load balancing to be implemented as plain user-level
services. Second, there are new interfaces for capturing the screen and for
injecting input events. The latter interfaces pave the ground for virtual
keyboards, screen-sharing application, or remote administration scenarios.
Under the hood, there are plenty of improvements that make the life of
Sculpt users better. The keyboard layout can now be picked from a menu.
The Chromium-based Falkon web browser runs circles around the previous
version. Menu items and file lists appear nicely sorted. Terminal windows
immediately respond to global font-size changes. On modern Intel machines,
Sculpt leverages Intel Hardware P-states (HWP) for power and thermal
management now. You can find an illustrated tour of these and more changes in
a dedicated
[https://genodians.org/nfeske/2021-03-24-sculpt-os - article at Genodians.org].
The updated [https://genode.org/documentation/articles/sculpt-21-03 - manual]
goes into detail about the use of the new system.
The ready-to-use system image for version 21.03 is available at the
[https://genode.org/download/sculpt - Sculpt download page].
Genode OS Framework release 21.02 | 2021-02-25
##############################################

View File

@@ -1 +1 @@
2021-02-24 a7b98b5b89a2c7689f6580bc00c5fff8d4135bd6
2021-03-11 d5d038d82badefdb0ec442be4dc7b23064ad2831

View File

@@ -1 +1 @@
2021-02-24 2c4c96dbb29da1ed24ff43eadbb750e877787139
2021-03-11 c1f7d1de07d3a55d5e43f6ab5fb67b502ab1d0bb

View File

@@ -1 +1 @@
2021-02-24 9058df67eb2164f59b72413155de64db4642d728
2021-03-11 9383498670ce6668c8b99da3e62008b21a5932aa

View File

@@ -1 +1 @@
2021-02-24 ec209212b3654b5f264348fd085af23c2d59c5f2
2021-03-11 50104241d20d23e928d3b27d0931d14112c68e82

View File

@@ -1 +1 @@
2021-02-24 ffb864a1deaaaaa5bf3cfe152a7691df6d6624fc
2021-03-11 43cc39f70c8bfe4df3427c94d096d7e218b7b24c

View File

@@ -1 +1 @@
2021-02-24 674453dbc7ae17de231060924cae2063e2c47562
2021-03-11 742459157b61720e96c17bb6cfbf7ac085a4df2f

View File

@@ -86,7 +86,7 @@ class Genode::Cap_index_allocator_tpl : public Cap_index_allocator
/* if we found a fitting hole, initialize the objects */
if (j == cnt) {
for (j = 0; j < cnt; j++)
new (&_indices[i+j]) T();
construct_at<T>(&_indices[i+j]);
return &_indices[i];
}
}
@@ -102,14 +102,14 @@ class Genode::Cap_index_allocator_tpl : public Cap_index_allocator
* construct the Cap_index pointer from the given
* address in capability space
*/
T * const obj = reinterpret_cast<T*>(kcap_to_idx(addr));
T * const obj_ptr = reinterpret_cast<T*>(kcap_to_idx(addr));
if (obj < &_indices[0] || obj >= &_indices[SZ]) {
if (obj_ptr < &_indices[0] || obj_ptr >= &_indices[SZ]) {
ASSERT(0, "cap index out of bounds");
throw Index_out_of_bounds();
}
return new (obj) T();
return construct_at<T>(obj_ptr);
}
void free(Cap_index* idx, size_t cnt) override

View File

@@ -48,7 +48,6 @@ class Genode::Native_capability::Data : public Avl_node<Data>
uint8_t dec();
addr_t kcap() const;
void* operator new (__SIZE_TYPE__, Data* idx) { return idx; }
void operator delete (void* idx) { memset(idx, 0, sizeof(Data)); }

View File

@@ -1 +1,2 @@
arm_v7a
arm_v8a

View File

@@ -12,6 +12,7 @@ SRC_CC += spec/riscv/kernel/cpu.cc
SRC_CC += spec/riscv/kernel/interface.cc
SRC_CC += spec/riscv/kernel/pd.cc
SRC_CC += spec/riscv/cpu.cc
SRC_CC += spec/riscv/pic.cc
SRC_CC += spec/riscv/platform_support.cc
SRC_CC += spec/riscv/timer.cc
SRC_CC += spec/64bit/memory_map.cc

View File

@@ -1 +1 @@
2021-02-24 a4c7d49dbac4a5b892a0227d485cd25299d7e194
2021-03-11 5f70d9ee12b71eeda56fed778219365271c78934

View File

@@ -1 +1 @@
2021-02-24 75b5d0d84f1c8fd96b2dcfd3c7f8435f6b896ddb
2021-03-11 d370add0c416bc0f2e7ae83de6d2f10f9ea59823

View File

@@ -1 +1 @@
2021-02-24 039c2a50c7fa22701ae678a7a395e952b14315e1
2021-03-11 be82a7e08f0a16f93f689b8d3d747ea90fab396f

View File

@@ -1 +1 @@
2021-02-24 d7bfe72d1d83df706a0321677cb19848c845366a
2021-03-11 0f3db9a963d53504843478924551bc619667d8d4

View File

@@ -1 +1 @@
2021-02-24 d122ddee70f0b075de8cec50a41c9f4783702e05
2021-03-28 d4983186c11a48fecfc87fbc15f16f6bb45d91e5

View File

@@ -1 +1 @@
2021-02-24 ed3c9c51fdc3ae18141f0bc986a7796ad37bb1d0
2021-03-11 8176ee1808ba28e0e84ad00154d88ecf8d0cbfff

View File

@@ -1 +1 @@
2021-02-24 1f6873b9f9dd8301e34780f28af2383f4a691392
2021-03-11 76290d876f3ca43436d7cfd0558b264be0aac69a

View File

@@ -1 +1 @@
2021-02-24 679d1c6b4f822b67cfc1857f4553a5feedefc4cb
2021-03-11 b399a660467f8107c0297cb502f80f64432d6ef6

View File

@@ -1 +1 @@
2021-02-24 16be6612f8122fdbf1d709848358d80e24cfc99a
2021-03-11 6bc53d97397ed97bd275b81a4af771e59f0a29db

View File

@@ -1 +1 @@
2021-02-24 139e4e52f3cfe996cbe494759104917a13f1880f
2021-03-11 37a51e7eeed1c8902b6a12a7e6f9ba0c4857fb45

View File

@@ -1 +1 @@
2021-02-24 0743ce5111a3799e87516db8f798f14acfac3b24
2021-03-11 d722eae5ebbafea313995f3443f903c0c965be9f

View File

@@ -1 +1,4 @@
CONTENT += src/core/board/virt_qemu_64 \
src/bootstrap/board/virt_qemu_64
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

View File

@@ -1 +1 @@
2021-02-24 e5ff7e6b49b29595fbb00c2b2525a137ee9f6809
2021-03-11 06c48030f17bcd7ba888145b208e27146c6ea687

View File

@@ -1 +1 @@
2021-02-24 bbe990bba6528782af85ec77456d34efeb732528
2021-03-11 7eed185acd78e556e5cc69ecd1db6ce43a724238

View File

@@ -60,11 +60,11 @@ SRC_LIB_STARTUP_SPECS(x86_64) := x86_64
SRC_LIB_STARTUP_SPECS(riscv) := riscv
# location of hw-ld.mk file
LD_MK_DIR(arm_v6) := lib/mk/spec/arm
LD_MK_DIR(arm_v7a) := lib/mk/spec/arm
LD_MK_DIR(arm_v8a) := lib/mk/spec/arm_v8
LD_MK_DIR(x86_64) := lib/mk/spec/x86_64
LD_MK_DIR(riscv) := lib/mk/spec/riscv
LD_MK_DIRS(arm_v6) := lib/mk/spec/arm
LD_MK_DIRS(arm_v7a) := lib/mk/spec/arm
LD_MK_DIRS(arm_v8a) := lib/mk/spec/arm_v8
LD_MK_DIRS(x86_64) := lib/mk/spec/x86_64
LD_MK_DIRS(riscv) := lib/mk/spec/riscv
#
@@ -80,7 +80,8 @@ arch_undefined:
" missing file $(BOARD_ARCH_PATH)\n\n"
false
else
ARCH := $(firstword $(shell cat $(BOARD_ARCH_PATH)))
SHELL := bash
ARCHS := $(sort $(shell cat $(BOARD_ARCH_PATH)))
endif
@@ -88,37 +89,45 @@ endif
# Enumeration of package content
#
#
# Function to obtain the content for the board's supported architectures
#
# The parameter is the variable name for one of the subdirectories defined
# above. The 'sort' is merely used to remove duplicates.
#
selected_content = $(sort $(foreach A,$(ARCHS),${$1($A)}))
BASE_DIR := $(GENODE_DIR)/repos/base
BASE_HW_DIR := $(GENODE_DIR)/repos/base-hw
SRC_TIMER := target.inc include hw main.cc
SRC_INCLUDE_HW += $(notdir $(wildcard $(BASE_HW_DIR)/src/include/hw/*.h)) \
$(addprefix spec/,${SRC_INCLUDE_HW_SPECS(${ARCH})}) \
$(addprefix spec/,${call selected_content,SRC_INCLUDE_HW_SPECS}) \
uart
SRC_BOOTSTRAP += hw env.cc init.cc lock.cc log.cc thread.cc \
platform.cc platform.h \
$(addprefix spec/,${SRC_BOOTSTRAP_SPECS(${ARCH})}) \
$(addprefix spec/,${call selected_content,SRC_BOOTSTRAP_SPECS}) \
$(addprefix board/,$(BOARD))
SRC_LIB_BASE += $(notdir $(wildcard $(BASE_HW_DIR)/src/lib/base/*.cc)) \
$(notdir $(wildcard $(BASE_DIR)/src/lib/base/*.cc)) \
${SRC_LIB_BASE_SPECS(${ARCH})}
${call selected_content,SRC_LIB_BASE_SPECS}
SRC_LIB_STARTUP += init_main_thread.cc _main.cc \
$(addprefix spec/,${SRC_LIB_STARTUP_SPECS(${ARCH})})
$(addprefix spec/,${call selected_content,SRC_LIB_STARTUP_SPECS})
SRC_CORE += $(notdir $(wildcard $(BASE_HW_DIR)/src/core/*.cc)) \
$(notdir $(wildcard $(BASE_HW_DIR)/src/core/*.h)) \
$(notdir $(wildcard $(BASE_DIR)/src/core/*.cc)) \
$(addprefix spec/,${SRC_CORE_SPECS(${ARCH})}) \
$(addprefix spec/,${call selected_content,SRC_CORE_SPECS}) \
$(addprefix board/,$(BOARD)) \
version.inc target.inc include hw kernel
LIB_MK := base-hw-common.mk base-hw.mk bootstrap-hw.inc core-hw.inc \
timeout-hw.mk cxx.mk base.inc base-common.inc startup.inc \
$(addprefix spec/,${LIB_MK_SPECS(${ARCH})})
$(addprefix spec/,${call selected_content,LIB_MK_SPECS})
CONTENT += $(addprefix src/timer/,$(SRC_TIMER)) \
$(addprefix src/include/hw/,$(SRC_INCLUDE_HW)) \
@@ -169,7 +178,8 @@ etc/specs.conf:
content: generalize_target_names
generalize_target_names: $(CONTENT)
# apply kernel-agnostic convention of naming the timer and ld.lib.so
mv ${LD_MK_DIR(${ARCH})}/ld-hw.mk ${LD_MK_DIR(${ARCH})}/ld.mk
for subdir in ${call selected_content,LD_MK_DIRS}; do \
mv $$subdir/ld-hw.mk $$subdir/ld.mk; done
sed -i "s/ld-hw/ld/" src/lib/ld/hw/target.mk
sed -i "s/hw_timer_drv/timer/" src/timer/hw/target.mk
# supplement BOARD definition that normally comes form the build dir

View File

@@ -60,8 +60,8 @@ Bootstrap::Platform::Board::Board()
{ 0x303301EC, 0x0 },
{ 0x303301FC, 0x1 },
{ 0x30330200, 0x1 },
{ 0x3033021C, 0x5 },
{ 0x30330220, 0x5 },
{ 0x3033021C, 0x10 }, /* Enable SION I2c2_scl */
{ 0x30330220, 0x10 }, /* Enable SION I2c2_sda */
{ 0x30330224, 0x10 },
{ 0x30330228, 0x10 },
{ 0x3033022C, 0x12 },
@@ -126,8 +126,8 @@ Bootstrap::Platform::Board::Board()
{ 0x30330464, 0x49 },
{ 0x30330468, 0x49 },
{ 0x3033046C, 0x16 },
{ 0x30330484, 0x16 },
{ 0x30330488, 0x16 },
{ 0x30330484, 0x67 }, /* I2c2_scl pullup resistor 40 ohm */
{ 0x30330488, 0x67 }, /* I2c2_sda pullup resistor 40 ohm */
{ 0x3033048C, 0x67 },
{ 0x30330490, 0x67 },
{ 0x30330494, 0x76 },

View File

@@ -20,7 +20,7 @@ using namespace Board;
Bootstrap::Platform::Board::Board()
:
early_ram_regions(Memory_region { RAM_BASE, RAM_SIZE } ),
core_mmio()
core_mmio(Memory_region { PLIC_BASE, PLIC_SIZE })
{ }
unsigned Bootstrap::Platform::enable_mmu()

View File

@@ -0,0 +1,38 @@
/**
* \brief Platform-level interrupt controller layout (PLIC)
* \author Sebastian Sumpf
* \date 2021-03-05
*/
/*
* Copyright (C) 2021 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _CORE__SPEC__RISCV_QEMU__PLIC_H_
#define _CORE__SPEC__RISCV_QEMU__PLIC_H_
namespace Board { class Plic; }
struct Board::Plic : Genode::Mmio
{
enum { NR_OF_IRQ = 32 };
struct Enable : Register_array<0x80, 32, 32, 1> { };
struct Id : Register<0x1ff004, 32> { };
Plic(Genode::addr_t const base)
:
Mmio(base) { }
void enable(unsigned value, unsigned irq)
{
write<Enable>(value, irq);
}
void el(unsigned, unsigned) { }
};
#endif /* _CORE__SPEC__RISCV_QEMU__PLIC_H_ */

View File

@@ -644,7 +644,7 @@ void Thread::_call_new_irq()
}
Genode::Irq_session::Trigger trigger =
(Genode::Irq_session::Trigger) (user_arg_3() & 0b1100);
(Genode::Irq_session::Trigger) ((user_arg_3() >> 2) & 0b11);
Genode::Irq_session::Polarity polarity =
(Genode::Irq_session::Polarity) (user_arg_3() & 0b11);

View File

@@ -28,8 +28,13 @@ void Thread::exception(Cpu & cpu)
using Stval = Genode::Cpu::Stval;
if (regs->is_irq()) {
/* there are only cpu-local timer interrupts right now */
cpu.interrupt(cpu.timer().interrupt_id());
/* cpu-local timer interrupt */
if (regs->irq() == cpu.timer().interrupt_id()) {
cpu.interrupt(cpu.timer().interrupt_id());
} else {
/* interrupt controller */
_interrupt(0);
}
return;
}

View File

@@ -0,0 +1,25 @@
/*
* \brief RISC-V PIC initialization
* \author Sebastian Sumpf
* \date 2021-03-05
*/
/*
* Copyright (C) 2021 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#include <board.h>
#include <pic.h>
#include <platform.h>
Board::Pic::Pic() :
_plic(Genode::Platform::mmio_to_virt(Board::PLIC_BASE))
{
/* enable external interrupts */
enum { SEIE = 0x200 };
Hw::Riscv_cpu::Sie external_interrupt(SEIE);
}

View File

@@ -3,11 +3,11 @@
* \author Sebastian Sumpf
* \date 2015-06-02
*
* There currently is no interrupt controller defined for the RISC-V platform.
* The platform specific PLIC-register layout can be found in 'plic.h'
*/
/*
* Copyright (C) 2015-2017 Genode Labs GmbH
* Copyright (C) 2015-2021 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
@@ -16,14 +16,23 @@
#ifndef _CORE__SPEC__RISCV__PIC_H_
#define _CORE__SPEC__RISCV__PIC_H_
#include <irq_session/irq_session.h>
#include <util/mmio.h>
#include <plic.h>
namespace Board { class Pic; }
/**
* Dummy PIC driver for core
* PIC driver for core for one CPU
*/
class Board::Pic
{
private:
Plic _plic;
Plic::Id::access_t _last_irq { 0 };
public:
enum {
@@ -32,15 +41,45 @@ class Board::Pic
* when SMP is an aspect of CPUs only compiled where necessary
*/
IPI = 0,
NR_OF_IRQ = 15,
NR_OF_IRQ = Plic::NR_OF_IRQ,
};
Pic() { }
bool take_request(unsigned & i) { i = 0; return true; }
void unmask(unsigned, unsigned) { }
void mask(unsigned) { }
void finish_request() { }
void irq_mode(unsigned, unsigned, unsigned) { }
Pic();
bool take_request(unsigned & irq)
{
irq = _plic.read<Plic::Id>();
if (irq == 0) return false;
_last_irq = irq;
return true;
}
void finish_request()
{
_plic.write<Plic::Id>(_last_irq);
}
void unmask(unsigned irq, unsigned)
{
if (irq > NR_OF_IRQ) return;
_plic.enable(1, irq);
}
void mask(unsigned irq)
{
if (irq > NR_OF_IRQ) return;
_plic.enable(0, irq);
}
void irq_mode(unsigned irq, unsigned trigger, unsigned)
{
using namespace Genode;
if (irq > NR_OF_IRQ || trigger == Irq_session::TRIGGER_UNCHANGED)
return;
_plic.el(trigger == Irq_session::TRIGGER_EDGE ? 1 : 0, irq);
}
};
#endif /* _CORE__SPEC__RISCV__PIC_H_ */

View File

@@ -27,7 +27,7 @@ void Platform::_init_io_port_alloc() { }
void Platform::_init_additional_platform_info(Genode::Xml_generator&) { }
long Platform::irq(long const /* user_irq */) { return 0; }
long Platform::irq(long const user_irq ) { return user_irq; }
bool Platform::get_msi_params(addr_t /* mmconf */, addr_t & /* address */,

View File

@@ -24,7 +24,7 @@ Board::Timer::Timer(unsigned)
{
/* enable timer interrupt */
enum { STIE = 0x20 };
asm volatile ("csrs sie, %0" : : "r"(STIE));
Hw::Riscv_cpu::Sie timer(STIE);
}
@@ -39,8 +39,8 @@ time_t Board::Timer::stime() const
void Timer::_start_one_shot(time_t const ticks)
{
_device.timeout = _device.stime() + ticks;
Sbi::set_timer(_device.timeout);
_device.last_time = _device.stime();
Sbi::set_timer(_device.last_time + ticks);
}
@@ -58,9 +58,7 @@ time_t Timer::_max_value() const {
time_t Timer::_duration() const
{
addr_t time = _device.stime();
return time < _device.timeout ? _device.timeout - time
: _last_timeout_duration + (time - _device.timeout);
return _device.stime() - _device.last_time;
}

View File

@@ -31,7 +31,7 @@ struct Board::Timer
TICKS_PER_US = TICKS_PER_MS / 1000,
};
Kernel::time_t timeout = 0;
Kernel::time_t last_time { 0 };
Kernel::time_t stime() const;

View File

@@ -43,6 +43,14 @@ struct Hw::Riscv_cpu
struct Asid : Bitfield<44,16> { };
struct Mode : Bitfield<60, 4> { };
);
struct Sie
{
Sie(Genode::addr_t bits)
{
asm volatile ("csrs sie, %0" : : "r"(bits));
}
};
};
#endif /* _SRC__LIB__HW__SPEC__RISCV__CPU_H_ */

View File

@@ -25,6 +25,9 @@ namespace Hw::Riscv_board {
RAM_BASE = 0x80020000,
RAM_SIZE = 0x7fe0000,
TIMER_HZ = 10000000,
PLIC_BASE = 0xc002000,
PLIC_SIZE = 0x200000,
};
enum { UART_BASE, UART_CLOCK };

View File

@@ -11,6 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <util/construct_at.h>
#include <base/component.h>
/* core includes */
@@ -22,10 +24,10 @@
using Genode::size_t;
using Genode::addr_t;
using Genode::construct_at;
using Kernel::Cpu_share;
using Kernel::Cpu_scheduler;
void * operator new(__SIZE_TYPE__, void * p) { return p; }
struct Data
{
@@ -73,15 +75,15 @@ void create(unsigned const id)
Cpu_share * const s = share(id);
void * const p = (void *)s;
switch (id) {
case 1: new (p) Cpu_share(2, 230); break;
case 2: new (p) Cpu_share(0, 170); break;
case 3: new (p) Cpu_share(3, 110); break;
case 4: new (p) Cpu_share(1, 90); break;
case 5: new (p) Cpu_share(3, 120); break;
case 6: new (p) Cpu_share(3, 0); break;
case 7: new (p) Cpu_share(2, 180); break;
case 8: new (p) Cpu_share(2, 100); break;
case 9: new (p) Cpu_share(2, 0); break;
case 1: construct_at<Cpu_share>(p, 2, 230); break;
case 2: construct_at<Cpu_share>(p, 0, 170); break;
case 3: construct_at<Cpu_share>(p, 3, 110); break;
case 4: construct_at<Cpu_share>(p, 1, 90); break;
case 5: construct_at<Cpu_share>(p, 3, 120); break;
case 6: construct_at<Cpu_share>(p, 3, 0); break;
case 7: construct_at<Cpu_share>(p, 2, 180); break;
case 8: construct_at<Cpu_share>(p, 2, 100); break;
case 9: construct_at<Cpu_share>(p, 2, 0); break;
default: return;
}
data()->scheduler.insert(*s);

View File

@@ -12,6 +12,7 @@
*/
/* base includes */
#include <util/construct_at.h>
#include <base/component.h>
#include <base/log.h>
@@ -27,8 +28,6 @@ using Genode::size_t;
using Kernel::Double_list;
using Kernel::Double_list_item;
void * operator new(__SIZE_TYPE__, void * p) { return p; }
struct Item_load { char volatile x = 0, y = 0, z = 0; };
@@ -53,7 +52,7 @@ struct Data
Data()
{
for (unsigned i = 0; i < nr_of_items; i++) {
new (&items[i]) Item(i + 1); }
Genode::construct_at<Item>(&items[i], i + 1); }
}
};

View File

@@ -1 +1 @@
2021-02-22 0126810fad17d2552e490536d80c90cabfe1f390
2021-03-11 4ab4ab408aa38109d6f12f402f477667c90229da

View File

@@ -1 +1 @@
2021-02-24 ba48f50b40ad1a161c110073eef9786256800542
2021-03-11 2847f916b65cee82243e88b9ac37550148f46dc5

View File

@@ -1 +1 @@
2021-02-24 f38302ea412be3cc8d780562ad96b3643eb95c04
2021-03-11 17d4c88f9d9a66aaa4a12881c052368c750934fc

View File

@@ -1 +1 @@
2021-02-24 14a16d0f4f81ea3e589c3862af1cb4eeee1f931d
2021-03-11 36594a3e445254981972ee7344007c39d01343c7

View File

@@ -1 +1 @@
2021-02-24 893dde4747ce142312457021c47a00821ee234e6
2021-03-11 40cad32d46b41ff202699b56799bea094e3ab34c

View File

@@ -1 +1 @@
2021-02-24 cca2c60b74a3c850c9cfe2b70abefc797a9b4612
2021-03-11 e05db17e84c0e013de0a5f1f64927559f765111b

View File

@@ -1 +1 @@
2021-02-24 5ddb85cfc1a730d11d5cab0b9a1fd00c0fbb3fa7
2021-03-11 cb90473929b319c88f303e2b8be685b38d7f218e

View File

@@ -1 +1 @@
2021-02-24 385d296363b2d8bdb41620d7a2bcebd641aa6f00
2021-03-11 55161b8d80dfceeb49a86fb079d5bc2da99a84f8

View File

@@ -1 +1 @@
2021-02-22 a829700bd28f7005df4de3309d500e869d45e1bb
2021-03-11 422336be0df3e934241b2e604639cebf2f8cd452

View File

@@ -1 +1 @@
2021-02-22 f1863b41d6a25dc053b9178ec7628157abe536da
2021-03-11 78784775a843844e44be50488deb9dcdb527ac49

View File

@@ -1 +1 @@
2021-02-22 d2597b9e3e8744e899a4976ab76a9739362b6f03
2021-03-11 b6065537111f0c0413c0bf60e2ba08988527a55e

View File

@@ -1 +1 @@
2021-02-22 7b97086b00c288ea0ec3bc52ce530f9a0b03b0ae
2021-03-11 c86fbe815ae272a2145834a8866728239ff2576c

View File

@@ -1 +1 @@
2021-02-22 51d5bc5b4e213bf391c172dc151fedc98350a414
2021-03-11 7d36319b75c784fe0ab1155a2b0a7ef253520148

View File

@@ -1 +1 @@
2021-02-22 a2a856ad057a965eac446e030cdecf1cbf2d4005
2021-03-11 fb48019493336c5272f21784d54a3ff3f1ec7363

View File

@@ -1 +1 @@
2021-02-22 16bebb2381238b508a62edd20a8674409e51ebe4
2021-03-11 4022f12861437311fb9ea61a3e087ed0864082eb

View File

@@ -1 +1 @@
2021-02-22 cc33bd18f29fa69c7b62f3c7083f382a69986354
2021-03-11 b5590a260586868920aeaa862bafb25336ae69d7

View File

@@ -1 +1 @@
2021-02-22 e63674e9b01328fcfde7b5139737d9cc8a8c0b99
2021-03-11 11ca3f1513c595b6615d9de8260415aa23e07178

View File

@@ -1 +1 @@
2021-02-22 76768a4f944f6e29599b57f4032ede85835ce627
2021-03-11 fde994103028f9db2f2ac590afd08f0f0e65428c

View File

@@ -1 +1 @@
2021-02-22 ce1698df9ca15ccb797f77e42d385a60a316a6ca
2021-03-11 ee9d1b4e5a590bcbe09de934a7babfb9bdc23c9a

View File

@@ -1 +1 @@
2021-02-22 b13a9d664e117a183307ef3e871ca186dda9cdd2
2021-03-11 be7d501282a2bb52dc4a667a99fbe1d704429720

View File

@@ -1 +1 @@
2021-02-22 834437b1ebcb9cb73989bdf8b32a8847921ba270
2021-03-11 377fcd2645530d46cf3bb7f88517592059819018

View File

@@ -1 +1 @@
2021-02-22 353f2e9434b97a5e2317efdd2199fedf70841e0d
2021-03-11 92a6045bdb05036f7cef97af0c18ceb1dc46e2dc

View File

@@ -1 +1 @@
2021-02-22 288a3fe93f1bec570a73352142643fe3c0989f5e
2021-03-11 2fca657c0433e46bb7321aa3515e172a27e1ce39

View File

@@ -1 +1 @@
2021-02-22 c6c748fde5b5be107f812900676c3d59e567d4cd
2021-03-11 fbcaa67441bca5ba013e04809e8e4d2d339f4829

View File

@@ -1 +1 @@
2021-02-22 9ff70e3fa7ab767554772142081d2dde2c83da15
2021-03-11 af054801b6ee01f027cbf5a695dc3bdacb202869

View File

@@ -1 +1 @@
2021-02-22 f7e406661a48022fe1ae9af4e6c184550ba44516
2021-03-11 149579a23c2768c1aa6d1614cfbef35695788bc4

View File

@@ -1 +1 @@
2021-02-22 6d38ffa87c3df64ab5f919bac1dce3b7252801b9
2021-03-11 85fae872e5df583817787a2d72b1ba687f34e318

View File

@@ -50,10 +50,7 @@ struct Genode::Expanding_pd_session_client : Pd_session_client
[&] () {
return retry<Out_of_caps>(
[&] () { return Pd_session_client::alloc(size, cached); },
[&] () {
warning("cap quota exhausted, issuing resource request to parent");
_request_caps_from_parent(UPGRADE_CAPS);
},
[&] () { _request_caps_from_parent(UPGRADE_CAPS); },
NUM_ATTEMPTS);
},
[&] () {

View File

@@ -467,7 +467,6 @@ Child::Close_result Child::_close(Session_state &session)
_policy.session_state_changed();
session.discard_id_at_client();
session.service().wakeup();
return CLOSE_PENDING;
@@ -871,8 +870,13 @@ void Child::close_all_sessions()
* warnings generated by threads that are losing their PD while still
* running.
*/
while (unsigned long id_value = any_cpu_session_id(_id_space).value)
(void)close(Parent::Client::Id{id_value});
while (unsigned long id_value = any_cpu_session_id(_id_space).value) {
Close_result const close_result = close(Parent::Client::Id{id_value});
/* break infinte loop if CPU session is provided by a child */
if (close_result != CLOSE_DONE)
break;
}
_initial_thread.destruct();
@@ -926,7 +930,11 @@ void Child::close_all_sessions()
auto close_fn = [&] (Session_state &session) {
session.closed_callback = nullptr;
session.ready_callback = nullptr;
(void)_close(session);
Close_result const close_result = _close(session);
if (close_result == CLOSE_PENDING)
session.discard_id_at_client();
};
while (_id_space.apply_any<Session_state>(close_fn));

View File

@@ -121,6 +121,11 @@ namespace {
Parent::Session_args const &args,
Affinity const &affinity) override
{
if (!args.valid_string()) {
warning(name.string(), " session denied because of truncated arguments");
throw Service_denied();
}
Mutex::Guard guard(_mutex);
/*

View File

@@ -1 +1 @@
2021-02-22 2f35505d3af01f9503dec01304113582ea69dd28
2021-03-11 3fd39ab434af7e31ba24449de1e7224d5563354f

View File

@@ -1 +1 @@
2021-02-22 2bc852f01901bccec1048d6dc819cabc51edb16c
2021-03-11 29155ea2d1bb5cde19e8a1caf0ffe79b141c389d

View File

@@ -1 +1 @@
2021-02-22 9226fa12bad4928633cc5cf215d0692b594ecd32
2021-03-11 582933bc296e804e33744544f992813c84eeff39

View File

@@ -1 +1 @@
2021-02-22 fc68bc4330bb47a28983f5b07f1e81deeffeee56
2021-03-11 ebb9af5a3560cd3e7d8e6d738a54bd1d307d917e

View File

@@ -34,5 +34,5 @@ INC_DIR += $(SRC_DIR) \
INC_DIR += $(REP_DIR)/src/include
INC_DIR += $(ARCH_SRC_INC_DIR)
INC_DIR += $(LXIP_CONTRIB_DIR)/include \
$(LXIP_CONTRIB_DIR)/include/uapi \
$(LXIP_CONTRIB_DIR)/include/uapi
INC_DIR += $(LIB_CACHE_DIR)/lxip_include/include/include/include

View File

@@ -23,12 +23,12 @@ CC_C_OPT += -std=gnu89
CC_C_OPT += -Wno-unused-but-set-variable -Wno-pointer-sign
CC_C_OPT += -include $(LIB_INC_DIR)/lx_emul.h
CC_CXX_OPT = -fpermissive
CC_CXX_OPT += -fpermissive
SRC_CC = dummies.cc lxcc_emul.cc nic_handler.cc \
timer_handler.cc random.cc
SRC_CC += malloc.cc printf.cc env.cc
SRC_CC += malloc.cc printf.cc bug.cc env.cc
SRC_C += driver.c dummies_c.c lxc_emul.c
@@ -42,9 +42,6 @@ SRC_C += lib/checksum.c
SRC_C += lib/rhashtable.c
SRC_C += drivers/net/loopback.c
# DHCP support
SRC_C += net/ipv4/ipconfig.c
#SRC_C = net/ipv4/inet_connection_sock.c
net/ethernet/eth.o: SETUP_SUFFIX="_eth"

View File

@@ -18,6 +18,6 @@ CC_OPT += -DCONFIG_INET -DCONFIG_BASE_SMALL=0 -DCONFIG_DEBUG_LOCK_ALLOC \
-DCONFIG_IP_PNP_DHCP
CC_C_OPT += -include $(LXIP_DIR)/include/lx_emul.h
CC_CXX_OPT = -fpermissive
CC_CXX_OPT += -fpermissive
CC_CXX_WARN_STRICT =

View File

@@ -20,7 +20,7 @@ SRC_CC += dummies.cc init.cc lxcc_emul.cc nic.cc socket_call.cc random.cc \
# lx_kit
SRC_CC += mapped_io_mem_range.cc irq.cc pci.cc malloc.cc scheduler.cc \
work.cc timer.cc printf.cc env.cc
work.cc timer.cc printf.cc bug.cc env.cc
SRC_C += lxc_emul.c dummies_new.c

View File

@@ -1,7 +1,7 @@
_/src/event_filter
_/src/imx8q_evk_drivers
_/src/imx8_fb_drv
_/src/platform_drv
_/src/usb_host_drv
_/src/usb_hid_drv
_/raw/drivers_interactive-imx8q_evk
_/src/event_filter
_/src/imx8_fb_drv
_/src/imx8q_evk_drivers
_/src/platform_drv
_/src/usb_hid_drv
_/src/usb_host_drv

View File

@@ -1 +1 @@
2021-02-22 b59a3be929e93e4cbf32a9c0da99b8cd2e5a06d5
2021-03-23 528f7801fb3df9388842bbd56b5825726beda67b

View File

@@ -1 +1 @@
2021-02-22 dd892c92a83adf5efd4475f22effd8a9c8f692e5
2021-03-22 997e478be25aa43c870b6a298e5bc510cf80b851

View File

@@ -1 +1 @@
2021-02-22 f31f969bb01b4ef936e311d20fc19905d6e6ee42
2021-03-11 bf9e8e8a5394dee403b68dc008ec86d8be264dd9

View File

@@ -1 +1 @@
2021-02-22 3872c3120c7a4f2a755060f581e57c4ad8bde599
2021-03-11 6083fa0283ce69cf340f03ea4a2df57082e08410

View File

@@ -1 +1 @@
2021-02-22 a01a4ffa2be47d456a76dcf547d6f42ef32fc44b
2021-03-11 ca1627fb8895f13c12f18442099cee9f0d40e973

View File

@@ -1 +1 @@
2021-02-22 52bd8aa8e0a61a6fcd63f15580141a23301e5b10
2021-03-11 548e094d9c6e78826f23c2cd1acb6512112b895e

View File

@@ -1 +1 @@
2021-02-22 d55ce45326a1269737aea610af6911a5ce0ec744
2021-03-22 750f42aba1d21278e4b11d42b4925b98d3faaeb2

View File

@@ -1,4 +1,7 @@
content: drivers.config fb_drv.config
content: drivers.config fb_drv.config event_filter.config en_us.chargen special.chargen
drivers.config fb_drv.config:
drivers.config fb_drv.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-imx8q_evk/$@ $@
en_us.chargen special.chargen:
cp $(GENODE_DIR)/repos/os/src/server/event_filter/$@ $@

View File

@@ -86,6 +86,7 @@
<clock name="usb_phy2_gate"/>
<property name="compatible" value="snps,dwc3"/>
<property name="dr_mode" value="host"/>
<property name="snps,dis_u2_susphy_quirk"/>
</device>
<device name="dcss">
@@ -167,20 +168,11 @@
<route> <any-service> <parent/> </any-service> </route>
</start>
<start name="event_filter">
<resource name="RAM" quantum="1M" />
<provides> <service name="Event" /> </provides>
<config>
<output>
<merge>
<input name="usb_hid_drv"/>
<input name="touch_drv"/>
</merge>
</output>
<policy label="usb_hid_drv -> " input="usb_hid_drv"/>
<policy label="touch_drv -> " input="touch_drv"/>
</config>
<start name="event_filter" caps="80">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Event"/> </provides>
<route>
<service name="ROM" label="config"> <parent label="event_filter.config"/> </service>
<service name="Event"> <parent/> </service>
<any-service> <parent/> </any-service>
</route>
@@ -212,7 +204,7 @@
<config use_report="yes"/>
<route>
<service name="ROM" label="report"> <child name="report_rom"/> </service>
<service name="Event"> <child name="event_filter"/> </service>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="RM"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
@@ -248,7 +240,7 @@
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
<service name="Event"> <child name="event_filter"/> </service>
<service name="Event"> <child name="event_filter" label="touch"/> </service>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="Gpio"> <child name="gpio_drv"/> </service>
</route>

View File

@@ -0,0 +1,24 @@
<config>
<output>
<chargen>
<merge>
<input name="usb"/>
<input name="touch"/>
</merge>
<mod1>
<key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
</mod1>
<mod2>
<key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
</mod2>
<mod3>
<key name="KEY_RIGHTALT"/> <!-- AltGr -->
</mod3>
<repeat delay_ms="230" rate_ms="90"/>
<include rom="en_us.chargen"/>
<include rom="special.chargen"/>
</chargen>
</output>
<policy label="usb" input="usb"/>
<policy label="touch" input="touch"/>
</config>

View File

@@ -1 +1 @@
2020-10-08 d0c719c729a811b1bee1fc2f3506a5803f3d2eb6
2021-03-22 7b97ee51908fce00ae968c8f331111fae34e34b2

View File

@@ -1 +1 @@
2021-02-22 a1093d9a66fbade7e4660d6ff8e7d4fd13c284aa
2021-03-11 2f7b321dad6adf9075f9cb936bc4c66e21613f3a

View File

@@ -1 +1 @@
2021-02-22 e6275ba555a82fcead4ec5e58a3dc4db0c42467e
2021-03-11 8605f167d1888e7fd2088a9472a48b7772d134d9

View File

@@ -1 +1 @@
2021-02-22 6e680e70e8dd4b054beb8997ab4bb24dc2536cd3
2021-03-11 7545d8013ce0b07b3ca7f2dc520d8e3d6f97511f

View File

@@ -1 +1 @@
2021-02-22 57c16101241a4f03d09dc6994e341ca4adaa3a0c
2021-03-22 ac45c57d05c1cf668b18f26308fa7ae6867781fb

View File

@@ -1 +1 @@
2021-02-22 53df01daf0cfea6618ff86a35cde937b6306e68f
2021-03-23 dcdbcf4fce0997b5f7511dcacc30962a4a5ffd33

View File

@@ -1 +1 @@
2021-02-22 0f38a1f903f8a6fa53904c54b132ad0ccd4524e1
2021-03-23 4f3186e3af1fa48e6a2ec9bd13466bb2198df4a7

View File

@@ -1 +1 @@
2021-02-22 fbf17e8f4165bbc4a1b015640f008b8e9e24354d
2021-03-11 dd810fc4703ca698ef4787903f15cda7b302d0d0

View File

@@ -1 +1 @@
2021-02-22 29480cd50b32f06f05d5675583243a013839a2e9
2021-03-22 0f0938886369311131b56d74b673bf5c50822870

View File

@@ -1 +1 @@
2021-02-22 366b695a85cc358d441a4ba37daf358dfda12eb7
2021-03-11 e382ad2b56df4ad282d9ca74805e10393916d24a

View File

@@ -78,6 +78,7 @@ proc platform_drv_config_non_x86 {} {
<clock name="usb_phy2_gate"/>
<property name="compatible" value="snps,dwc3"/>
<property name="dr_mode" value="host"/>
<property name="snps,dis_u2_susphy_quirk"/>
</device>
<policy label="usb_drv -> "> <device name="usb_host_2"/> </policy>
}

Some files were not shown because too many files have changed in this diff Show More