Compare commits

..

163 Commits

Author SHA1 Message Date
Christian Helmuth
d69cb1ba7b version: 18.11 2018-11-29 14:15:25 +01:00
Norman Feske
456dda9ac0 Release notes for version 18.11 2018-11-29 14:12:41 +01:00
Christian Helmuth
11eecdc7bd depot: update recipe hashes 2018-11-29 11:54:31 +01:00
Stefan Kalkowski
34480c9269 test-rm_fault: use ld.lib.so to test read-only mem
Due to the changing environment this test is executed (like depot_autopilot)
the binary test-rm_fault used to check ROM dataspace's read-only property
does not suit anymore. This commit changes the binary to ld.lib.so that is
normally still provided as a ROM dataspace.

Ref #3027
2018-11-29 11:54:31 +01:00
Stefan Kalkowski
fa67ec52ae cpu_sampler_noux: do not test platforms w/o pkg
Platform without driver-interactive package will fail. Therefore,
whitelist which platforms do work in the run-script
2018-11-29 11:54:31 +01:00
Stefan Kalkowski
41dfc51beb test-expat: use zero-filled read buffer
Fix #3062
2018-11-29 11:54:31 +01:00
Stefan Kalkowski
9857a0c956 depot_autopilot: disable test-python for ARM
The test for python requires x86 to be built. Therefore, there is no test
binary available when trying to execute that test on ARM with depot_autopilot.
2018-11-29 11:54:31 +01:00
Johannes Kliemann
db162477a4 ada: fix exception handling
Fixes #3061
2018-11-29 11:54:31 +01:00
Christian Prochaska
3b1653dad7 sculpt: update Arora launcher for release 18.11 2018-11-29 11:54:31 +01:00
Stefan Kalkowski
d7fa4cfb8b hw: enable eager FPU context switch for ARM
* Add an ieee754 FPU test
* Remove simple fpu test

Fix #2822
2018-11-29 11:54:31 +01:00
Norman Feske
4b4247f412 window layouter: limit maximized size to client
This patch constraints the window size of the generated layout to the
minimum of the client's real window size and the wanted window size
(both may differ when resizing or maximizing windows).
2018-11-29 11:54:31 +01:00
Norman Feske
08bb689ae7 window layouter: bring unknown windows to front
This patch improves the handing of new appearing windows for which only
a wildcard assignment - but no exact assignment - rule exists. In the
prior version, an interactively raised window would stay in front of
such a window, which is unintuitive. The new version applies the
to-front mechanism to unknown new windows. For known new windows (with
an exact assignment rule) their original stacking position is preserved.
2018-11-29 11:54:30 +01:00
Norman Feske
4145417f67 window_layouter: improve window-resize handling
This patch solves an off-by-one problem in the window-size calculation,
which resulted in sporadic artificial resize requests. In Sculpt, this
glitch caused flickering artifacts in VirtualBox windows caused by
superfluous guest desktop-resize handling.

Furthermore, the patch introduces the dropping of resize requests with
unchanged content.
2018-11-29 11:54:30 +01:00
Josef Söntgen
af5869cd07 sculpt: update download_debian launcher for 18.11 2018-11-29 11:54:30 +01:00
Alexander Boettcher
876f60169c sculpt: update top_view to 18.11 2018-11-29 11:54:30 +01:00
Alexander Boettcher
4ea98dfee4 sculpt: update browser VMs for 18.11 2018-11-29 11:54:30 +01:00
Emery Hemingway
376f086ec1 Split off graphical Mirage run into mirage_pretty
Ref #2945
2018-11-29 11:54:30 +01:00
Norman Feske
005d6d6b35 sculpt: trim config/deploy default
The commented-out <start> nodes are prone to become inconsistent with
the launchers. Hence, this patch removes them. Start nodes should better
be added by the '+' menu, at least initially.

Furthermore, the patch directs requests for the vfs.lib.so ROM to core's
ROM service to reduce the impact of low-level ABI changes (i.e., the
packet-stream layout) on existing vfs/libc-based packages.
2018-11-29 11:54:30 +01:00
Martin Stein
89020bc3c0 depot_autopilot: move RTC test to autopilot.list 2018-11-29 11:54:30 +01:00
Norman Feske
538c3a6692 init: consider lacking service name attribute
This patch makes init robust against invalid routing rules that lack a
name attribute in the '<service>' node. This situation may occur when
interactively editing routes in Sculpt.
2018-11-29 11:54:30 +01:00
Sebastian Sumpf
8015dbe8b7 Move OpenJDK to the Genode world repository
This reverts commit 58fb5ed722.

fixes #3060
2018-11-29 11:54:30 +01:00
Sebastian Sumpf
d3dbdae395 libc: add SO_LINGER and TCP_NODELY to socket fs plugin
issue #3060
2018-11-29 11:54:30 +01:00
Sebastian Sumpf
48e07d7dff vfs: support files names of with exactly 100 characters
GNU tar does not null terminate or create a long name for file names of
exactly 100 characters.

issue #3060
2018-11-29 11:54:30 +01:00
Emery Hemingway
2d17af9f28 Libc: use caller integer width for return value of sysctl PHYSMEM
Return a value in the same width as provided by the caller of sysctl for
PHYSMEM and USERMEM. This is to ensure that if a caller provides a
64-bit integer, a 64-bit value will be returned for 32-bit machines.

issue #3060
2018-11-29 11:54:29 +01:00
Norman Feske
98518e39cd drivers_interactive-pc: increase ps2_drv caps
This is needed because the added heartbeat monitoring.
2018-11-29 11:54:29 +01:00
Christian Helmuth
af49ec7583 Support custom DEPOT_DIR in noux_tool_chain_auto.run 2018-11-29 11:54:29 +01:00
Emery Hemingway
a20d37c50a Add [depot_user] hook to depot_autopilot 2018-11-29 11:54:29 +01:00
Emery Hemingway
a2bdcc68c2 Throw exception for invalid packets at packet streams
Some application code is dereferencing the pointer returned by
'packet_content' at packet streams without checking that it is valid.
Throw an exception rather than return a null pointer, except for
zero-length packets, which have somewhat implicit invalid content and
that we believe to be properly handled in all current cases.

The client-side of a packet stream cannot take corrective action if the
server-side is sending packets with invalid content, but the servers
that provide packet streams should catch this exception to detect
misbehaving clients.

Ref #3059
2018-11-29 11:54:29 +01:00
Norman Feske
e5d1d26535 sculpt: version 18.11 2018-11-29 11:54:29 +01:00
Sebastian Sumpf
91225fbcca qt5: forward window title to nitpicker
This enables Qt5 applications to set a Genode label via 'setWindowTitle'
from within Qt5 applications, and thus, making them identifiable to
other Genode components, like a layout manager.

fixes #3046
2018-11-29 11:54:29 +01:00
Norman Feske
13be339d81 sculpt: let window layouter recall its prior state
Issue #3024
Issue #3031
2018-11-29 11:46:02 +01:00
Norman Feske
b89cfa95e7 sculpt: launcher for recall_fs
The recall file system is a place where components can remember state.
E.g., to allow the window layouter to recall the window layout of the
previous session.
2018-11-29 11:46:02 +01:00
Norman Feske
6c70a51d28 sculpt_manager: improved popup toggling
In a corner case, the toggling of the popup menu entered a state
where the menu could not be opened anymore by the user. Specifically
the following input sequence triggered this problem.

1. The user opens the menu
2. The user clicks on the menu and holds the button
3. While holding the button, the user moves the pointer to the
   outside of the popup (e.g., to the '+' button)
4. The user releases the button.

In this situation, the popup is closed but the hover information for the
popup contains still the original clicked-on item. Hence, all subsequent
clicks on the '+' appear as both a click on the '+' (opening the popup)
and a click on the "hovered" popup entry (closing the popup).

The patch explicitely clears the popup's hover information when closing
the popup.
2018-11-29 11:46:02 +01:00
Emery Hemingway
7f1974e9e8 Update lwIP to 2.1.2
Fix #3035
2018-11-29 11:46:02 +01:00
Alexander Boettcher
9f4801363c tool: use static analyzer with depot creation tool
Convince wrapper to make static analyzer working with tool/depot/* tools.

Issue #3022
2018-11-29 11:46:02 +01:00
Alexander Boettcher
8199b3e685 tool: support static clang analyzer in build.mk
Issue #3022
2018-11-29 11:46:02 +01:00
Emery Hemingway
918281b01f Genode SDK
Makefile for generating a Genode SDK.

Fix #2948
2018-11-29 11:46:02 +01:00
Emery Hemingway
447329eaee Chroot: change root to explicit prefix and label sub-dirs
Change the root of a session request into an explicit path and apply the
label-to-path conversion using the "path_prefix" policy attribute. This
is in addition to only applying a root change with a "path" attribute.

Ref #3031
Fix #3056
2018-11-29 11:46:02 +01:00
Johannes Schlatow
74f2954013 packet_stream: improve buffer alignment
The bulk buffer is now 64Byte-aligned so that the allocated
packets get aligned likewise (assumed the packet allocator uses an
appropriately aligned block size). This ensures that each packet
starts at a new cache line on common platforms.

Issue #3053
2018-11-29 11:46:02 +01:00
Johannes Schlatow
4e375ec6df zynq: move RAM size to board defs 2018-11-29 11:46:02 +01:00
Johannes Schlatow
dc0bfd7008 zynq: zero-copy implementation of nic_drv
- Packet stream buffers are directly passed to DMA.
- Also enables pause frames and checksum offloading.

Issue #3053
2018-11-29 11:46:01 +01:00
Emery Hemingway
8ad56a6c0e Move libc headers to conform to x86_32, x86_64, and arm SPECS
Move the libc-i386, libc-amd64, and libc-arm include directories into
the standard "include/spec" directory. This allows the platform specific
headers in the libc API package to be detected in a generic manner.

Ref #3051
2018-11-29 11:46:01 +01:00
Emery Hemingway
7a11384177 Merge pthread into libc library
The pthread API is considered a standard feature of libc so better to
simply merge it with the libc. Pthreads are in fact already a part of
the libc in the form of weak symbols. This merger is also a prerequisite
for better integrating pthreads with the libc I/O task.

Fix #3054
2018-11-29 11:46:01 +01:00
Christian Prochaska
fe322b8e82 test-xml_generator: enable code coverage analysis
Issue #3048
2018-11-29 11:46:01 +01:00
Christian Prochaska
5639f31295 depot_autopilot.run: integrate gcov tool
Issue #3048
2018-11-29 11:46:01 +01:00
Christian Prochaska
651d9f587f depot.inc: 'append_src_and_api_depot_packages_to_tar' function
This function adds the src and api depot packages for the given pkg or src
packages to the given tar archive.

Issue #3048
2018-11-29 11:46:01 +01:00
Christian Prochaska
1f985dec38 mk: add 'COVERAGE' option
'COVERAGE=yes' in 'target.mk' adds gcov-specific compiler flags and links the
program with libgcov.

Issue #3048
2018-11-29 11:46:01 +01:00
Christian Prochaska
e74771e047 libports: add libgcov and gcov tool
Issue #3048
2018-11-29 11:46:01 +01:00
Emery Hemingway
18e855e4d5 Genode toolchain depot package
Fix #3028
2018-11-27 11:38:13 +01:00
Emery Hemingway
15039f3ae8 Update MPFR port URL
Ref #3028
2018-11-27 11:38:13 +01:00
Emery Hemingway
63b6e04dae Move GMP spec directories to standard locations
Ref #3028
2018-11-27 11:38:13 +01:00
Christian Prochaska
fd7ab79fe0 vfs: implement 'complete_sync()' in 'Single_file_system'
Fixes #3047
2018-11-27 11:38:13 +01:00
Ben Larson
cde542c37c libc: read whole file into buffer
Fix #3023
2018-11-27 11:36:36 +01:00
Martin Stein
789d908cee depot_autopilot: show result statistic
Print a line like "succeeded: 35 failed: 11 skipped: 2" below the list of test
results. Adds further attributes to <previous-results> to communicate also the
previous statistics.
2018-11-27 11:36:36 +01:00
Martin Stein
c405ec19ce pkg/test-rm_fault: event "Error: could modify ROM" 2018-11-27 11:36:36 +01:00
Martin Stein
c65a13b3a4 run/depot_autopilot: power off before reboot 2018-11-27 11:36:36 +01:00
Johannes Kliemann
eb7c367e25 ada: replace local runtime implementation with port
Fixes #3044
2018-11-27 11:36:36 +01:00
Christian Helmuth
dee4d43eb9 Use common abort message in solo5 run scripts
This enables our nightly tools to detect this abort is not fatal but
because of an unsupported platform.
2018-11-27 11:36:35 +01:00
Ben Larson
1039ef7a65 qt5: avoid unresponsive window when aborting close
Fixes #2997
2018-11-27 11:36:35 +01:00
Norman Feske
c6fd0055b1 sculpt: split window manager into multiple pkgs
This commit moves the window layouter and window decorator into
dedicated packages that can now be combined with the "wm" server at
runtime and restarted/reconfigured/swapped-out independently.

To use the window manager, one must start the 'wm', 'window_layouter',
and one of the 'motif_decorator' or 'themed_decorator' subsystems.

Fixes #3024
2018-11-27 11:36:35 +01:00
Martin Stein
eab7f54139 depot_autopilot: skip libc_getenv on foc x86
When doing the libc_getenv test on autopilot+foc+x86 and one of the
subsequent tests crashes the system so it gets rebooted by the run
script, the system doesn't come up again. It gets stuck after core
initialization.

Issue #3027
2018-11-27 11:36:35 +01:00
Martin Stein
abd3855161 test/rm_nested: fix EP double dissolve
Fixes #3045
2018-11-27 11:36:35 +01:00
Christian Helmuth
712df01341 libports: update hash of downloaded fatfs sources
The author updated http://www.elm-chan.org/fsw/ff/arc/ff13b.zip recently
with a marginal change of documents/doc/appnote.html.
2018-11-27 11:36:35 +01:00
Emery Hemingway
e63a870bce Update lwIP to 2.1.1
Fix #3035
2018-11-27 11:36:35 +01:00
Martin Stein
e0b7fb1929 nic_bridge: fixed MAC addresses
Enable configuration of a fixed MAC address for each client.

Fixes #3040
2018-11-27 11:36:35 +01:00
Stefan Kalkowski
a062ba6dd2 base: add tlb shootdown test metric to smp test
Fix #3041
2018-11-27 11:36:35 +01:00
Stefan Kalkowski
36fe50ebad base: unify mp_server and affinity test
* remove outdated cpufreq test for Arndale
* execute new SMP test on hardware not in Qemu in nightly tests

Ref #3041
2018-11-27 11:36:35 +01:00
Norman Feske
19d7a488de init: health monitoring of child components
Fixes #3039
2018-11-27 11:36:34 +01:00
Stefan Kalkowski
d56a7beadc hw: increase cpu frequency on Wandboard Quad
Ref #1807
2018-11-16 15:17:06 +01:00
Stefan Kalkowski
8c460b3ea5 hw: enable l2-cache on Wandboard Quad (fix #1807) 2018-11-16 15:17:06 +01:00
Norman Feske
4cffefe1dd News item about Genode Component Public License 2018-11-16 15:07:53 +01:00
Christian Helmuth
70e7499e48 depot: update recipe hashes 2018-11-16 15:07:53 +01:00
Martin Stein
2d041ac0fc depot_autopilot: evaluate sets of test packages 2018-11-16 15:07:53 +01:00
Martin Stein
146f45f3d4 Archive recipes for autopilot tests 2018-11-16 15:07:53 +01:00
Martin Stein
6a540652fa pkg/test-fs_report: add autopilot events 2018-11-16 15:07:53 +01:00
Martin Stein
0c60b312be liports/recipes: api/ and src/python 2018-11-16 15:07:53 +01:00
Martin Stein
21efcf9e45 os/recipes: src/nic_bridge 2018-11-16 15:07:53 +01:00
Emery Hemingway
6c8f1c8796 Add Terminal provider rules to depot deploy and depot autopilot
Support the '<terminal/>' tag in the depot package runtime '<provides/>'
declaration.

Fix #3034
2018-11-16 15:07:52 +01:00
Emery Hemingway
bc539ce892 Native Solo5 bindings
A shared library implementation of the unikernel middleware.

https://github.com/Solo5/solo5

Fix #2945
2018-11-16 15:07:52 +01:00
Emery Hemingway
5a4dab88d6 PDF viewer: revert changes to framebuffer model
The PDF viewer can crash under a number of conditions due to changes to
the internal framebuffer model that were made to support mouse wheel
panning. These changes are reverted until the model can be reimplemented
to explicitly support page panning.

Fix #3021
2018-11-16 15:07:52 +01:00
Norman Feske
1a75c5227e Rename wm pkg to motif_wm
This way, we can subsequently introduce a new 'wm' pkg that contains the
window manager only, w/o any hard-wired decorator and layouter.

Issue #3024
2018-11-16 15:07:52 +01:00
Christian Helmuth
61863e2ffb qt5: configurable layouter/decorator in run scripts 2018-11-16 15:07:52 +01:00
Norman Feske
c60604062c decorator: improve robustness of window restacking
This patch improves the detection of new appearing top-most windows.
Such a window should prompt the decorator to bring the corresponding
nitpicker view(s) to the front of the view stack. The original
implementation relied on hints provided by the layouter (the 'topped'
attribute). With the patch, the decorator tracks the top-most window by
itself, which improves the robustness.

As a second improvement, the patch defers the destruction of windows to
the point when all other window operations are completed. This hides
intermediate states when replacing one window by another in one step,
which is typical for console-like scenarios. Hence, this patch should
eliminate flickering artifacts when switching from one virtual console
to another.

Issue #3031
2018-11-16 14:53:26 +01:00
Norman Feske
a973d9902b gems: flexible window layouter
This commit replaces the former floating_window_layouter with a new
window_layouter component that supports the subdivision of screen space
into columns and rows, the concept of layers, and the principle ability
to store window layout information across reboots. The latter is
accomplished by reflecting the component's internal state as a 'rules'
report to the outside.

Fixes #3031
2018-11-16 14:53:20 +01:00
Martin Stein
5bb5a62d37 timeout_types.xsd: allow 0 seconds
The previous range was from 1..X because we only used it for durations. But
with the Depot Autopilot we want to use it also for a timestamp.
2018-11-16 14:37:47 +01:00
Martin Stein
a1ff3cc317 base-foc: recipes for ARMv7a platforms
* In base-foc/recipes/src/ replace base-foc with base-foc-pc
* To base-foc/recipes/src add base-foc-arndale, base-foc-pbxa9
* Ensure that the correct base-foc recipe is choosen by the run module
  'boot_dir/foc'
2018-11-16 14:37:47 +01:00
Martin Stein
655fbbd984 base-hw: recipes for ARMv7a platforms
* To base-hw/recipes/src add base-hw-arndale, base-hw-imx53_qsb,
  base-hw-imx53_qsb_tz, base-hw-odroid_xu, base-hw-panda, base-hw-rpi,
  base-hw-wand_quad
* Ensure that the correct base-hw recipe is choosen by the run module
  'boot_dir/hw'
2018-11-16 14:37:20 +01:00
Norman Feske
f93294975b base-linux: avoid double define of __always_inline
This patch fixes the following build problem that occurs on recent
GNU/Linux systems:

  /usr/include/x86_64-linux-gnu/sys/cdefs.h:307:0: error: "__always_inline" redefined
  ...
  /usr/include/linux/stddef.h:5:0: note: this is the location of the previous definition

The code in 'cdefs.h' does not check if the '__always_inline' is already
defined. The patch works around the problem by including the 'sys/cdefs.h'
first.
2018-11-16 14:37:20 +01:00
Martin Stein
ee91d7339c run: prevent duplicates in missing archive warning 2018-11-16 14:37:20 +01:00
Martin Stein
941f785b7f Add tests to autopilot.list 2018-11-16 14:37:20 +01:00
Martin Stein
f64ec500bf run/rtc: assert spec x86 and !linux 2018-11-16 14:37:20 +01:00
Martin Stein
36932ee129 run/fs_packet: raise test timeout 2018-11-16 14:37:20 +01:00
Martin Stein
0c70a69618 run/dynamic_config_slave: fix cap quota 2018-11-16 14:37:20 +01:00
Martin Stein
0b3351991a run/dynamic_config_loader: fix cap quota 2018-11-16 14:37:20 +01:00
Martin Stein
99d9830968 run/dynamic_config: fix caps attribute 2018-11-16 14:37:20 +01:00
Martin Stein
719848d59a run/trace_logger: remove unnecessary stuff 2018-11-16 14:37:20 +01:00
Martin Stein
fff80bfe6c run/terminal_crosslink: fix cap quota 2018-11-16 14:37:20 +01:00
Martin Stein
4e29c1ca40 test/xml_node: move to base 2018-11-16 14:37:19 +01:00
Martin Stein
ed1cec2efa test/xml_generator: move to base 2018-11-16 14:37:19 +01:00
Martin Stein
510d7644fa test/weak_ptr: move to os/ as it uses a timer 2018-11-16 14:37:19 +01:00
Martin Stein
51cae1f0a3 Add base lib to tests
For being able to build the tests via source archives, the 'base'
library must be denoted as dependency explicitely in their 'target.mk' file.
This is because when building archives, the API dependencies of used APIs are
not taken into account.
2018-11-16 14:37:19 +01:00
Martin Stein
0b8ea50589 test/slab: move to os/ as it uses timer driver 2018-11-16 14:37:19 +01:00
Martin Stein
ebfd49661e test/init: remove unused _expected_log_message 2018-11-16 14:37:19 +01:00
Martin Stein
0eef5b506c test-util_mmio: rename test-mmio 2018-11-16 14:37:19 +01:00
Martin Stein
590dc1ac59 test/util_mmio: simplify success conditions 2018-11-16 14:37:19 +01:00
Martin Stein
f439cf0de1 test/rm_nested: destroy all objects before finish
Explicit destruction of test objects (esp. RM connection) tests for
regressions in the service life-time implementation.

Issue #3012
2018-11-16 14:37:19 +01:00
Martin Stein
ebdb3c4c32 ada lib: prepare for creation of packages 2018-11-16 14:37:19 +01:00
Martin Stein
5e8c53f61c base_types.xsd: allow session labels of length 0 2018-11-16 14:37:19 +01:00
Stefan Kalkowski
fe3f67f712 test: add simple cpu benchmark test (fix #3026) 2018-11-16 14:37:19 +01:00
Stefan Kalkowski
24e6a5ee73 test/memcpy: add Genode's memset to the suite
Ref #3016
2018-11-16 14:37:18 +01:00
Alexander Boettcher
f53a56982c clang: use template keyword on template methods
avoids tons of warnings

Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
886619f63e base: set parent info in child_process solely once
clang:
 warning: Value stored to 'parent_info' is never read

Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
5120e5138c nova: avoid null pointer warnings
Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
f7364d8463 base: avoid warnings in list.h
clang:

error: member 'Element' found in multiple base classes of different types

Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
fc0dbc3f70 base: avoid null pointer warnings
warning: Called C++ object pointer is null

Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
17f7147ac1 base: avoid warnings about shift operations
clang:
 warning: The result of the '<<' expression is undefined
2018-11-16 14:37:18 +01:00
Alexander Boettcher
4b62f091a9 base: fix accessibility of enum in bit_array.h
avoids warning by clang:

error: 'BITS_PER_WORD' is a private member of 'Genode::Bit_array_base'

Issue #3022
2018-11-16 14:37:18 +01:00
Alexander Boettcher
9ee3843f35 timer: fix conversion error in timeout handling
clang complains: comparison is always false due to limited range of data type

Issue #3022
2018-11-16 14:37:18 +01:00
Christian Prochaska
7c9e850235 qt5: add typeinfo and vtable symbols to symbol files
Fixes #3025
2018-11-16 14:37:18 +01:00
Christian Helmuth
0867da28a2 depot: update recipe hashes 2018-10-29 09:36:23 +01:00
Emery Hemingway
3e5ac64ee2 Libc: support monotonic time without RTC
Use the Timer session duration for CLOCK_MONOTONIC and  CLOCK_UPTIME.
Use the Genode::Duration object for passing internal time, it supports
sub-millisecond time and helps disambiguate units of time.

Fix #3018
2018-10-29 09:36:23 +01:00
Emery Hemingway
6178e378c1 Test libc sleep and gettime in run/libc
Ref #3018
2018-10-29 09:36:22 +01:00
Emery Hemingway
3e31e2ba53 VFS LwIP: blocking TCP write
Block and loop until application writes are sent or buffered in their
entirety. Do not call "tcp_output" directly, LwIP calls this procedure
internally and calling it again appears to disrupt the LwIP TCP state
machine.

Fix #3017
2018-10-29 09:36:22 +01:00
Emery Hemingway
3958ea50a0 Allocator_avl: apply_any method
Provide an `apply_any` method for accessing any member of the allocator,
this is provided for destructing members of the allocator.

Ref #2996
2018-10-29 09:36:22 +01:00
Christian Helmuth
9ca214eee8 usb: quickfix pointer-emulation for touch screen
Move button-event reporting behind pointer-position update.

This is just a quickfix to restore correct pointer emulation with
dde_linux usb_drv. It does not change usb_hid_drv because the approach
is a questionable workaround of the current input event handling, which
reports events promptly on occurrence of inputs events and ignores
synchronization events completely. The original contrib code reported
the button press before absolute x and y positioning followed by a sync
event.

Issue #3019
2018-10-29 09:36:22 +01:00
Josef Söntgen
9557e64822 gems: add interactive SSH Terminal component
This component allows access to Terminal sessions via interactive SSH
sessions. Please read _repos/gems/src/server/ssh_terminal/README_ for
more detailed information.

Fixes #3014.
2018-10-29 09:36:22 +01:00
Josef Söntgen
82fb76c142 libssh: add async event bind patch
Issue #3014.
2018-10-29 09:36:22 +01:00
Josef Söntgen
9ab288d8e3 libports: update libssh to 0.8.4
Issue #3014.
2018-10-29 09:36:22 +01:00
Alexander Boettcher
5446c52c43 base: make Entrypoint placeable on specific cpu
Fixes #3008
2018-10-29 09:36:22 +01:00
Pirmin Duss
b112b7b4ce mesa: fix port_prepare on ARCH Linux
Issue #3003
2018-10-29 09:36:22 +01:00
Norman Feske
f21493272d test for measuring memcpy throughput (fix #3016) 2018-10-29 09:36:22 +01:00
Johannes Kliemann
c2d85ff554 Ada: allow separate GCC for gnatmake
Fixes #3011
2018-10-29 09:36:22 +01:00
Alexander Boettcher
b8cc468f02 base: support assignment of invalid weak_ptr
This fixes the region-map component implementation in core, which uses a
'Genode::Weak_ptr<Genode::Region_map_component> _faulting_region_map'
member. This member is assigned a valid weak_ptr or an invalid weak_ptr
according to the state machine.

Fixes #3012
2018-10-29 09:36:22 +01:00
Alexander Boettcher
e6ddffb93c nova: exclude framebuffer range from buddy memory
Fixes #3013
2018-10-29 09:36:21 +01:00
Alexander Boettcher
ca727ea3d9 nova: update to latest r10 branch
- which avoids some false postive overmap mappings
- and contains more accurate kernel memory accounting.

Fixes #3009
2018-10-29 09:36:21 +01:00
Norman Feske
7d641d5f1f base: add Reconstructible::conditional method
The new 'conditional' method simplifies the typical use case for
'Constructible' objects where the constructed/destructed state depends
on a configuration parameter. The method alleviates the need to
re-implement the logic again and again.

The patch also removes the 'Reconstructible' constructor arguments
because they are unused.

Fixes #3006
2018-10-29 09:36:21 +01:00
Martin Stein
fe303f0e46 init/config.xsd: add <service> specification
Fixes #3007
2018-10-29 09:36:21 +01:00
Alexander Boettcher
5473a36f81 seoul: produce hash stable port
Remove line printing the user name and the date in generated source code.

Fixes #3004
2018-10-29 09:36:21 +01:00
Emery Hemingway
cf7e23f0d6 Tool/run: configure power_on/amt and log/amt separately
Fix #3005
2018-10-29 09:36:21 +01:00
Martin Stein
ae55954919 nic_router_flood: reworked to stress/analyze more
Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
7b47c8f0c6 net_flood: fix CRC error, make more precise
Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
304cb290d9 nic_router: rework quota accounting
* Account all RAM/CAP quota of a session except quota for metadata used in
  core. The latter is considered when asking if a session can afford to make
  an operation but it does not get accounted to always be able to pay back all
  quota when a session closes. The general accounting mechanism is moved from
  atop of the allocators down to the level of RAM/RM session operations.
* report statistics about session objects and quota if <report stats="yes"
  quota="yes"/> is configured. (default is yes if <report> is present)

Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
bd77bb41df nic_router: improve handling of TCP termination
Like suggested by RFC 2663, reprogram the dissolve timeout of a TCP link
state to 2 times the maximum segment lifetime (by default 1 minute) when
receiving a matching packet with the FIN flag set, or with the ACK flag
set to acknowledge a FIN of the remote side.

Mark a link state as closed (no further reprogramming of the dissolve
timeout) and set the dissolve timeout to 2 times the maximum segment
lifetime when receiving a packet with the RESET flag set.

Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
3db7181104 nic_router: limit packets handled per signal
Make it configurable how many packets get handled at a max per signal to
prevent DoS attacks by clients.

Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
b48c917984 nic_router: allow ld_verbose attribute
Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
d6c6549354 nic_router: destroy links on insufficient resource
If the NIC router has insufficient CAP or RAM quota for the creation of
a state object for an interface, it tries to destroy a certain amount of
existing state objects of this interface to free resources. Afterwards,
it retries handling the current packet once. If it does fail again, the
router drops the packet.

Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
4442c79526 nic_router: "packet alloc" error only when verbose
Issue #2953
2018-10-29 09:36:21 +01:00
Martin Stein
364f69edad Xml_generator: fix and test missing '\0'
Ensure that a '\0' always appears at the end of the ouput of the XML
generator.  Previously, exceptions during the Node(...) constructor
might have prevented this. This commit also extends the xml_generator
test to drive a harder test on exceptions in the Xml_generator.

Issue #2953
2018-10-29 09:36:20 +01:00
Martin Stein
85d589a49c Xml_generator: fix exception handling in Node(...)
When the functor provided to the Node constructor throws an exception,
do revert all changes in reverse order. Previously, the changes made
to the parent node were not considered by the exception handler which
caused unnecessary characters to remain in the out buffer for each
reverted node.

Issue #2953
2018-10-29 09:36:20 +01:00
Christian Helmuth
e88081a454 depot: update recipe hashes 2018-10-01 11:25:03 +02:00
Christian Prochaska
31ca9d9ad7 libusb: fix page fault after failed USB transfer
Fixes #3002
2018-10-01 10:41:46 +02:00
Christian Prochaska
9c6120ccad usb_drv: call 'mod_timer()' with absolute timeout value
Fixes #3001
2018-10-01 10:41:46 +02:00
Sebastian Sumpf
0cc87d3c85 ldso: check for DYNAMIC segment in ELF files
If the DYNAMIC segment cannot be located the ELF file may be statically
linked. In this case an error is raised.

Fixes #3000
2018-10-01 10:41:46 +02:00
Alexander Boettcher
a8ed11e75b sel4/arm: make alignment faults visible
Fixes #2993
2018-10-01 10:41:46 +02:00
Edgard Schmidt
24a2b15eec tutorial: document required KERNEL argument 2018-10-01 10:41:46 +02:00
Edgard Schmidt
0a74f35062 tutorial: remove blocking run_genode_until line 2018-09-24 11:48:16 +02:00
Edgard Schmidt
a3fdefa6f9 tutorial: remove unused variable 2018-09-24 11:44:37 +02:00
Josef Söntgen
d56454f153 dde_bsd: update mirror URL 2018-09-24 11:18:23 +02:00
Emery Hemingway
c697fb6345 Simple bulk TCP test
Send 8 MiB from one socket to another, anticipating short writes and
short reads from sockets.

Fix #2989
2018-09-24 11:18:23 +02:00
Roman Iten
f65a7650c5 depot: allow to inject version command
Issue #2991
2018-09-24 11:18:23 +02:00
Josef Söntgen
018aebc0c8 wifi_drv: re-arm scan timer when enabled again
Issue #2988.
2018-09-21 15:51:58 +02:00
Josef Söntgen
f888c70982 wifi_drv: use dynamic allocations for AP list
Issue #2988.
2018-09-21 15:51:33 +02:00
Alexander Boettcher
9eabe316bf depot: support for gpg command override
Fixes #2981
2018-09-21 15:49:52 +02:00
1478 changed files with 28140 additions and 14260 deletions

View File

@@ -1 +1 @@
18.08
18.11

View File

@@ -4,6 +4,29 @@
===========
Dual licensing of 3rd-party Genode components | 2018-11-16
##########################################################
| To nurture a sustainable ecosystem around the Genode OS framework, we
| introduce a new approach for conducting dual-licensing businesses enabled
| by Genode.
Since founded ten years ago, Genode Labs pursues the Genode project based on a
dual-licensing business model, which allows us to fund the development of
Genode as an independent team. The licensing business is enabled by the
combination of the AGPLv3 as a strong copyleft license with the library-like
nature of Genode. Until today, this model is applicable to our framework but
impractical for 3rd-party component developers. To foster a sustainable
ecosystem around Genode, we wish to enable others to pursue a similar business
model while maintaining the spirit of open collaboration and free software.
We eventually crafted a new license called "Genode Component Public License"
(Genode CPL) specifically for components developed by 3rd parties, outside of
Genode Labs. The article
[https://genode.org/documentation/articles/component_public_license - Dual licensing of 3rd-party Genode components]
provides the rationale, license text, and FAQ of this software license.
Sculpt with Visual Composition | 2018-09-21
###########################################

1107
doc/release_notes-18-11.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -38,7 +38,8 @@ SRC_CC += stack_area.cc \
signal_transmitter_proxy.cc \
signal_receiver.cc \
thread_start.cc \
trace_session_component.cc
trace_session_component.cc \
heartbeat.cc
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
@@ -77,3 +78,4 @@ vpath dump_alloc.cc $(GEN_CORE_DIR)
vpath stack_area.cc $(GEN_CORE_DIR)
vpath pager_ep.cc $(GEN_CORE_DIR)
vpath platform_rom_modules.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)

View File

@@ -1 +1 @@
2018-09-11 d340e19f9801c16c7884f2473f2eeecde84dc7ca
2018-11-27 611bb7bfeeb9f1cf18b479024a6f9a0040cbd52f

View File

@@ -38,7 +38,8 @@ SRC_CC += stack_area.cc \
signal_transmitter_proxy.cc \
signal_receiver.cc \
thread_start.cc \
trace_session_component.cc
trace_session_component.cc \
heartbeat.cc
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
@@ -70,5 +71,6 @@ vpath signal_receiver.cc $(GEN_CORE_DIR)
vpath core_rpc_cap_alloc.cc $(GEN_CORE_DIR)
vpath core_region_map.cc $(GEN_CORE_DIR)
vpath platform_rom_modules.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)
vpath %.cc $(REP_DIR)/src/core
vpath %.cc $(REP_DIR)/src/lib/base

View File

@@ -0,0 +1,7 @@
This archive contains the Fiasco.OC-specific part of Genode.
It also contains the source code of the Fiasco.OC kernel in the
'src/kernel/foc' directory.
Please note that Fiasco.OC has a license distinct from Genode. Fiasco.OC's
license can be found at 'src/kernel/foc/COPYING-GPL-2'.

View File

@@ -0,0 +1,7 @@
RECIPE_DIR := $(REP_DIR)/recipes/src/base-foc-pbxa9
include $(GENODE_DIR)/repos/base-foc/recipes/src/base-foc_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += pbxa9" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-14 778d83a4be78dcd6d1e4d45f1ca103def7b298a5

View File

@@ -0,0 +1,7 @@
RECIPE_DIR := $(REP_DIR)/recipes/src/base-foc-arndale
include $(GENODE_DIR)/repos/base-foc/recipes/src/base-foc_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += arndale" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 cf3fa9aa12c4a234c40e274f9f34adf970b8615e

View File

@@ -0,0 +1 @@
base

View File

@@ -0,0 +1,7 @@
This archive contains the Fiasco.OC-specific part of Genode.
It also contains the source code of the Fiasco.OC kernel in the
'src/kernel/foc' directory.
Please note that Fiasco.OC has a license distinct from Genode. Fiasco.OC's
license can be found at 'src/kernel/foc/COPYING-GPL-2'.

View File

@@ -0,0 +1,7 @@
RECIPE_DIR := $(REP_DIR)/recipes/src/base-foc-pbxa9
include $(GENODE_DIR)/repos/base-foc/recipes/src/base-foc_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += pbxa9" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 fe18a97034e44fda5a886cb6294ffb9fdfda7069

View File

@@ -0,0 +1 @@
base

View File

@@ -0,0 +1,7 @@
This archive contains the Fiasco.OC-specific part of Genode.
It also contains the source code of the Fiasco.OC kernel in the
'src/kernel/foc' directory.
Please note that Fiasco.OC has a license distinct from Genode. Fiasco.OC's
license can be found at 'src/kernel/foc/COPYING-GPL-2'.

View File

@@ -0,0 +1,3 @@
RECIPE_DIR := $(REP_DIR)/recipes/src/base-foc-pc
include $(GENODE_DIR)/repos/base-foc/recipes/src/base-foc_content.inc

View File

@@ -0,0 +1 @@
2018-11-27 44cec6d014bd5d259ef484f1926dadf0b86542a9

View File

@@ -0,0 +1 @@
base

View File

@@ -1 +0,0 @@
2018-09-11 4e8800fd9dc2adf6abeed5d3eca0a487a1a01cdb

View File

@@ -24,7 +24,7 @@ include/spec/%/trace/timestamp.h:
content: README
README:
cp $(REP_DIR)/recipes/src/base-foc/README $@
cp $(RECIPE_DIR)/README $@
content: lib/import config etc
lib/import config etc:

View File

@@ -51,6 +51,11 @@ struct Genode::Vm_state : Genode::Cpu_state_modes
Genode::uint32_t tls3;
Genode::uint32_t cpacr;
/**
* Fpu registers
*/
Genode::uint32_t fpscr;
Genode::uint64_t d0_d31[32];
/**
* Timer related registers

View File

@@ -31,6 +31,13 @@ struct Genode::Vm_state : Genode::Cpu_state_modes
Genode::addr_t dfar;
Genode::addr_t ttbr[2];
Genode::addr_t ttbrc;
/**
* Fpu registers
*/
Genode::uint32_t fpscr;
Genode::uint64_t d0_d31[32];
Genode::addr_t irq_injection;
};

View File

@@ -64,6 +64,7 @@ SRC_CC += kernel/object.cc
SRC_CC += init_main_thread.cc
SRC_CC += capability.cc
SRC_CC += stack_area_addr.cc
SRC_CC += heartbeat.cc
# provide Genode version information
include $(BASE_DIR)/src/core/version.inc

View File

@@ -16,5 +16,7 @@ SRC_CC += spec/arm/kernel/thread_update_pd.cc
SRC_CC += kernel/vm_thread_off.cc
SRC_CC += kernel/kernel.cc
SRC_S += spec/arm/vfpv2.s
# include less specific configuration
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm/core-hw.inc

View File

@@ -11,5 +11,7 @@ INC_DIR += $(BASE_DIR)/../base-hw/src/core/spec/arm_v7
SRC_CC += spec/arm_v7/cpu.cc
SRC_CC += spec/arm_v7/perf_counter.cc
SRC_S += spec/arm/vfpv3-d32.cc
# include less specific configuration
include $(BASE_DIR)/../base-hw/lib/mk/spec/arm/core-hw.inc

View File

@@ -13,6 +13,6 @@ NR_OF_CPUS = 2
# we need more specific compiler hints for some 'special' assembly code
# override -march=armv7-a because it conflicts with -mcpu=cortex-a15
#
CC_MARCH = -mcpu=cortex-a15
CC_MARCH = -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
include $(REP_DIR)/lib/mk/bootstrap-hw.inc

View File

@@ -25,7 +25,7 @@ NR_OF_CPUS = 2
# we need more specific compiler hints for some 'special' assembly code
# override -march=armv7-a because it conflicts with -mcpu=cortex-a15
#
CC_MARCH = -mcpu=cortex-a15
CC_MARCH = -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/exynos5/core-hw.inc

View File

@@ -10,7 +10,6 @@ INC_DIR += $(BASE_DIR)/../base-hw/src/core/spec/arm_gic
# add C++ sources
SRC_CC += spec/cortex_a9/kernel/cpu.cc
SRC_CC += spec/cortex_a9/fpu.cc
SRC_CC += spec/cortex_a9/board.cc
SRC_CC += spec/cortex_a9/timer.cc
SRC_CC += spec/arm/smp/kernel/thread_update_pd.cc

View File

@@ -9,6 +9,6 @@ SRC_CC += hw/spec/arm/arm_v7_cpu.cc
SRC_CC += hw/spec/32bit/memory_map.cc
SRC_S += bootstrap/spec/arm/crt0.s
CC_MARCH = -mcpu=cortex-a9
CC_MARCH = -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp
include $(BASE_DIR)/../base-hw/lib/mk/bootstrap-hw.inc

View File

@@ -13,7 +13,7 @@ SRC_CC += platform_services.cc
NR_OF_CPUS += 2
CC_MARCH = -mcpu=cortex-a9
CC_MARCH = -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc

View File

@@ -1 +1 @@
2018-04-17 a1f75dc9604b2b807717473e7e73f738880a59bb
2018-11-27 907d508d17bc57d4348038f78d058723cdee5728

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += arndale" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 dc9f02e760588af3fb4ca13a253f622713adc4b9

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += imx53_qsb" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 e9d1992511cbde7b6da8dd1a92d8d58f464387bf

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += imx53_qsb trustzone" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 b2b1f2c5f590822e2bf29ba0be2c83f134c0de65

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += odroid_xu" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 4c9b4f2486299c30514fa796d4b6bbc69f5b0c1b

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += panda" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 b8e997ad469a1cead6f6d3bd462e965015496656

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -1 +1 @@
2018-09-11 67a702597bf17e6d7465eedf6b97510545b40ca1
2018-11-27 c51981468d6bce0ed4baa96b15309679ac4e5748

View File

@@ -1 +1 @@
2018-09-11 64134c4fc1c1587578959ea23a9d9a65573da879
2018-11-27 dbba3d4a49f2beb3da31c61d08008fb2db875083

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += rpi" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 1471d789821119a38fc4ebc08ad99695206f62e4

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -0,0 +1,5 @@
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += wand_quad" >> etc/specs.conf

View File

@@ -0,0 +1 @@
2018-11-27 84dbb21342c6ce592304e0ded4bd0c309d1daf6a

View File

@@ -0,0 +1,2 @@
base-hw
base

View File

@@ -163,7 +163,6 @@ static constexpr Genode::Boot_modules_header & header() {
Platform::Platform()
: bootstrap_region((addr_t)&_prog_img_beg,
((addr_t)&_prog_img_end - (addr_t)&_prog_img_beg)),
core_pd(ram_alloc),
core_elf_addr(header().base),
core_elf(core_elf_addr)
{

View File

@@ -127,7 +127,7 @@ class Bootstrap::Platform
Bootstrap::Pic pic { };
Ram_allocator ram_alloc { };
Memory_region const bootstrap_region;
Genode::Constructible<Pd> core_pd;
Genode::Constructible<Pd> core_pd { };
addr_t core_elf_addr;
Elf core_elf;

View File

@@ -20,11 +20,19 @@ namespace Bootstrap { struct Actlr; }
struct Bootstrap::Actlr : Bootstrap::Cpu::Actlr
{
struct Smp : Bitfield<6, 1> { };
struct Fw : Bitfield<0, 1> { };
struct L2_prefetch_enable : Bitfield<1, 1> { };
struct L1_prefetch_enable : Bitfield<2, 1> { };
struct Write_full_line : Bitfield<3, 1> { };
struct Smp : Bitfield<6, 1> { };
static void enable_smp()
{
auto v = read();
Fw::set(v, 1);
L1_prefetch_enable::set(v, 1);
L2_prefetch_enable::set(v, 1);
Write_full_line::set(v, 1);
Smp::set(v, 1);
write(v);
}

View File

@@ -62,6 +62,22 @@
add sp, r0, r1
/****************
** Enable VFP **
****************/
mov r0, #0xf
lsl r0, #20
mcr p15, 0, r0, c1, c0, 2 /* write to CPACR to enable VFP access */
mcr p15, 0, r0, c7, c5, 4 /* deprecated ISB instruction <= ARMv6 */
vmrs r0, fpexc /* enable the VFP by read/write fpexc */
mov r1, #1 /* enable bit 30 */
lsl r1, #30
orr r0, r1
vmsr fpexc, r0
/************************************
** Jump to high-level entry point **
************************************/

View File

@@ -56,15 +56,15 @@ class Board::L2_cache : Hw::Pl310
unsigned long _init_value()
{
Aux::access_t v = 0;
Aux::Associativity::set(v, 1);
Aux::Way_size::set(v, 3);
Aux::Share_override::set(v, 1);
Aux::Reserved::set(v, 1);
Aux::Ns_lockdown::set(v, 1);
Aux::Ns_irq_ctrl::set(v, 1);
Aux::Data_prefetch::set(v, 1);
Aux::Inst_prefetch::set(v, 1);
Aux::Early_bresp::set(v, 1);
Aux::Associativity::set(v, Aux::Associativity::WAY_16);
Aux::Way_size::set(v, Aux::Way_size::KB_64);
Aux::Share_override::set(v, true);
Aux::Replacement_policy::set(v, Aux::Replacement_policy::PRAND);
Aux::Ns_lockdown::set(v, true);
Aux::Ns_irq_ctrl::set(v, true);
Aux::Data_prefetch::set(v, true);
Aux::Inst_prefetch::set(v, true);
Aux::Early_bresp::set(v, true);
return v;
}

View File

@@ -28,7 +28,7 @@ namespace Board {
using namespace Wand_quad;
using L2_cache = Hw::Pl310;
struct L2_cache;
using Cpu_mmio = Hw::Cortex_a9_mmio<CORTEX_A9_PRIVATE_MEM_BASE>;
using Serial = Genode::Imx_uart;
@@ -38,4 +38,51 @@ namespace Board {
};
}
struct Board::L2_cache : Hw::Pl310
{
L2_cache(Genode::addr_t mmio) : Hw::Pl310(mmio)
{
Aux::access_t aux = 0;
Aux::Full_line_of_zero::set(aux, true);
Aux::Associativity::set(aux, Aux::Associativity::WAY_16);
Aux::Way_size::set(aux, Aux::Way_size::KB_64);
Aux::Share_override::set(aux, true);
Aux::Replacement_policy::set(aux, Aux::Replacement_policy::PRAND);
Aux::Ns_lockdown::set(aux, true);
Aux::Data_prefetch::set(aux, true);
Aux::Inst_prefetch::set(aux, true);
Aux::Early_bresp::set(aux, true);
write<Aux>(aux);
Tag_ram::access_t tag_ram = 0;
Tag_ram::Setup_latency::set(tag_ram, 2);
Tag_ram::Read_latency::set(tag_ram, 3);
Tag_ram::Write_latency::set(tag_ram, 1);
write<Tag_ram>(tag_ram);
Data_ram::access_t data_ram = 0;
Data_ram::Setup_latency::set(data_ram, 2);
Data_ram::Read_latency::set(data_ram, 3);
Data_ram::Write_latency::set(data_ram, 1);
write<Data_ram>(data_ram);
Prefetch_ctrl::access_t prefetch = 0;
Prefetch_ctrl::Data_prefetch::set(prefetch, 1);
Prefetch_ctrl::Inst_prefetch::set(prefetch, 1);
write<Prefetch_ctrl>(prefetch | 0xF);
}
using Hw::Pl310::invalidate;
void enable()
{
Pl310::mask_interrupts();
write<Control::Enable>(1);
}
void disable() {
write<Control::Enable>(0);
}
};
#endif /* _SRC__BOOTSTRAP__SPEC__WAND_QUAD__BOARD_H_ */

View File

@@ -29,6 +29,186 @@ Bootstrap::Platform::Board::Board()
{
Aipstz aipstz_1(AIPS_1_MMIO_BASE);
Aipstz aipstz_2(AIPS_2_MMIO_BASE);
static volatile unsigned long initial_values[][2] {
// (IOMUX Controller)
{ 0x20e0000, 0x1 },
{ 0x20e0004, 0x48643005 },
{ 0x20e0008, 0x221 },
{ 0x20e000c, 0x1e00040 },
{ 0x20e0034, 0x593e4a4 },
{ 0x20e004c, 0x0 },
{ 0x20e0050, 0x0 },
{ 0x20e0054, 0x0 },
{ 0x20e0090, 0x1 },
{ 0x20e0094, 0x1 },
{ 0x20e0098, 0x1 },
{ 0x20e00a4, 0x16 },
{ 0x20e00a8, 0x4 },
{ 0x20e00ac, 0x2 },
{ 0x20e00b0, 0x2 },
{ 0x20e00b4, 0x2 },
{ 0x20e00b8, 0x2 },
{ 0x20e00c4, 0x11 },
{ 0x20e015c, 0x0 },
{ 0x20e0160, 0x0 },
{ 0x20e0164, 0x0 },
{ 0x20e0168, 0x0 },
{ 0x20e016c, 0x0 },
{ 0x20e0170, 0x0 },
{ 0x20e0174, 0x0 },
{ 0x20e0178, 0x0 },
{ 0x20e017c, 0x0 },
{ 0x20e0180, 0x0 },
{ 0x20e0184, 0x0 },
{ 0x20e0188, 0x0 },
{ 0x20e018c, 0x0 },
{ 0x20e0190, 0x0 },
{ 0x20e0194, 0x0 },
{ 0x20e0198, 0x0 },
{ 0x20e019c, 0x0 },
{ 0x20e01a0, 0x0 },
{ 0x20e01a4, 0x0 },
{ 0x20e01a8, 0x0 },
{ 0x20e01ac, 0x0 },
{ 0x20e01b0, 0x0 },
{ 0x20e01b4, 0x0 },
{ 0x20e01b8, 0x0 },
{ 0x20e01bc, 0x0 },
{ 0x20e01c0, 0x0 },
{ 0x20e01c4, 0x0 },
{ 0x20e01c8, 0x0 },
{ 0x20e01cc, 0x0 },
{ 0x20e01d4, 0x1 },
{ 0x20e01e4, 0x3 },
{ 0x20e0220, 0x0 },
{ 0x20e0224, 0x3 },
{ 0x20e022c, 0x4 },
{ 0x20e023c, 0x16 },
{ 0x20e0248, 0x12 },
{ 0x20e0250, 0x5 },
{ 0x20e0264, 0x5 },
{ 0x20e0268, 0x4 },
{ 0x20e026c, 0x4 },
{ 0x20e0270, 0x4 },
{ 0x20e0274, 0x4 },
{ 0x20e02b8, 0x0 },
{ 0x20e0320, 0x2 },
{ 0x20e0348, 0x0 },
{ 0x20e0354, 0x0 },
{ 0x20e0358, 0x0 },
{ 0x20e035c, 0x0 },
{ 0x20e0360, 0x17059 },
{ 0x20e0364, 0x17059 },
{ 0x20e0368, 0x17059 },
{ 0x20e03a0, 0xf0b0 },
{ 0x20e03a4, 0x100b1 },
{ 0x20e03a8, 0x100b1 },
{ 0x20e03ac, 0x100b1 },
{ 0x20e03b8, 0x1b8b1 },
{ 0x20e03c0, 0x1b0b1 },
{ 0x20e03c4, 0x1b0b1 },
{ 0x20e03c8, 0x1b0b1 },
{ 0x20e03cc, 0x1b0b1 },
{ 0x20e03d8, 0x1b8b1 },
{ 0x20e0470, 0x10 },
{ 0x20e0474, 0x10 },
{ 0x20e0478, 0x10 },
{ 0x20e047c, 0x10 },
{ 0x20e0484, 0x10 },
{ 0x20e0488, 0x10 },
{ 0x20e048c, 0x10 },
{ 0x20e0490, 0x10 },
{ 0x20e0494, 0x10 },
{ 0x20e0498, 0x10 },
{ 0x20e049c, 0x10 },
{ 0x20e04a0, 0x10 },
{ 0x20e04a4, 0x10 },
{ 0x20e04a8, 0x10 },
{ 0x20e04ac, 0x10 },
{ 0x20e04b0, 0x10 },
{ 0x20e04b4, 0x10 },
{ 0x20e04b8, 0x10 },
{ 0x20e04bc, 0x10 },
{ 0x20e04c0, 0x10 },
{ 0x20e04c4, 0x10 },
{ 0x20e04c8, 0x10 },
{ 0x20e04cc, 0x10 },
{ 0x20e04d0, 0x10 },
{ 0x20e04d4, 0x10 },
{ 0x20e04d8, 0x10 },
{ 0x20e04dc, 0x10 },
{ 0x20e04e0, 0x10 },
{ 0x20e05e8, 0xb0 },
{ 0x20e05f0, 0xb0 },
{ 0x20e05f4, 0x17059 },
{ 0x20e05fc, 0xb0 },
{ 0x20e0600, 0xb0b0 },
{ 0x20e060c, 0x1b8b1 },
{ 0x20e0618, 0x1b0a8 },
{ 0x20e0638, 0x130b0 },
{ 0x20e063c, 0x110b0 },
{ 0x20e0640, 0x130b0 },
{ 0x20e0644, 0x130b0 },
{ 0x20e064c, 0x1b0b0 },
{ 0x20e06a4, 0x10059 },
{ 0x20e0704, 0x0 },
{ 0x20e0708, 0x1b0b1 },
{ 0x20e0738, 0x10059 },
{ 0x20e073c, 0x10059 },
{ 0x20e0740, 0x17059 },
{ 0x20e0744, 0x17059 },
{ 0x20e083c, 0x1 },
{ 0x20e0870, 0x0 },
{ 0x20e0874, 0x0 },
{ 0x20e08a8, 0x2 },
{ 0x20e08ac, 0x2 },
{ 0x20e092c, 0x1 },
{ 0x20e0930, 0x1 },
// (Global Power Controller)
{ 0x20dc008, 0x6a23e613 },
{ 0x20dc00c, 0xff69b64f },
{ 0x20dc010, 0xfffe0003 },
{ 0x20dc014, 0xff30f7ff },
// (Power Management Unit)
{ 0x20c8120, 0x11775 },
{ 0x20c8140, 0x580016 },
{ 0x20c8160, 0x8000000b },
{ 0x20c8170, 0xc0672f67 },
// (Clock Controller Module)
{ 0x20c4018, 0x10204 },
{ 0x20c402c, 0x7312c1 },
{ 0x20c4030, 0x32271f92 },
{ 0x20c4034, 0x12680 },
{ 0x20c4038, 0x12090 },
{ 0x20c4054, 0x78 },
{ 0x20c4058, 0x41a0000 },
{ 0x20c4060, 0x10e0101 },
{ 0x20c4064, 0x2fe62 },
{ 0x20c4068, 0xc03f0f },
{ 0x20c406c, 0x30fc00 },
{ 0x20c4070, 0x3ff0033 },
{ 0x20c4074, 0x3ff3303f },
{ 0x20c4078, 0x30c300 },
{ 0x20c407c, 0xf0000f3 },
{ 0x20c4080, 0xc00 },
{ 0x20c8000, 0x80002053 },
{ 0x20c8020, 0x3040 },
{ 0x20c8070, 0x1006 },
{ 0x20c80a0, 0x80002031 },
{ 0x20c80b0, 0x7a120 },
{ 0x20c80c0, 0xf4240 },
{ 0x20c80e0, 0x80002003 },
{ 0x20c80f0, 0x9391508c },
{ 0x20c8100, 0x5058d01b }
};
unsigned num_values = sizeof(initial_values) / (2*sizeof(unsigned long));
for (unsigned i = 0; i < num_values; i++)
*((volatile unsigned long*)initial_values[i][0]) = initial_values[i][1];
}

View File

@@ -58,7 +58,13 @@ struct Genode::Arm_cpu : public Hw::Arm_cpu
}
};
struct alignas(4) Context : Cpu_state
struct Fpu_context
{
uint32_t fpscr { 1UL << 24 }; /* VFP/SIMD - status/control register */
uint64_t d0_d31[32]; /* VFP/SIMD - general purpose registers */
};
struct alignas(4) Context : Cpu_state, Fpu_context
{
Context(bool privileged);
};
@@ -146,8 +152,6 @@ struct Genode::Arm_cpu : public Hw::Arm_cpu
** Dummies **
*************/
bool retry_undefined_instr(Context&) { return false; }
/**
* Return kernel name of the executing CPU
*/

View File

@@ -115,6 +115,17 @@
stmia r0!, {r1-r3} /* save pc, cpsr and exception type */
clrex /* clear exclusive access needed for cmpxchg */
cps #SVC_MODE
mov r1, #1 /* clear exception state of the VFP */
lsl r1, #30
vmsr fpexc, r1
adr r1, _fpu_save
ldr r1, [r1]
blx r1
/*
* Go to kernel entry code
*/
adr lr, _kernel_entry
ldr lr, [lr]
bx lr
@@ -122,6 +133,9 @@
_kernel_entry:
.long kernel
_fpu_save:
.long vfp_save_fpu_context
.section .text
@@ -133,3 +147,21 @@
idle_thread_main:
wfi
b idle_thread_main
/*****************************
** kernel to userland switch **
*******************************/
.global kernel_to_user_context_switch
kernel_to_user_context_switch:
push { r0 }
mov r0, r1
bl vfp_load_fpu_context
pop { r0 }
mov sp, r0
ldr lr, [sp, #15*4]
ldr r1, [sp, #16*4]
msr spsr_cxsf, r1
ldm sp, {r0-r14}^
subs pc, lr, #0

View File

@@ -1,255 +0,0 @@
/*
* \brief ARM-specific FPU driver for core
* \author Stefan Kalkowski
* \author Martin stein
* \date 2016-01-19
*/
/*
* Copyright (C) 2016-2017 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__ARM__FPU_H_
#define _CORE__SPEC__ARM__FPU_H_
#include <util/register.h>
namespace Genode { class Fpu; }
/**
* FPU driver for the ARM VFPv3-D16 architecture
*/
class Genode::Fpu
{
private:
/**
* Floating-point Status and Control Register
*/
struct Fpscr : Register<32>
{
/**
* Read register value
*/
static access_t read()
{
/* FIXME: See annotation 1. */
access_t v;
asm volatile ("mrc p10, 7, %[v], cr1, cr0, 0" : [v] "=r" (v) ::);
return v;
}
/**
* Override register value
*
* \param v write value
*/
static void write(access_t const v)
{
/* FIXME: See annotation 1. */
asm volatile ("mcr p10, 7, %[v], cr1, cr0, 0" :: [v] "r" (v) :);
}
};
/**
* Floating-Point Exception Control register
*/
struct Fpexc : Register<32>
{
struct En : Bitfield<30, 1> { };
/**
* Read register value
*/
static access_t read()
{
/* FIXME: See annotation 1. */
access_t v;
asm volatile ("mrc p10, 7, %[v], cr8, cr0, 0" : [v] "=r" (v) ::);
return v;
}
/**
* Override register value
*
* \param v write value
*/
static void write(access_t const v)
{
/* FIXME: See annotation 1. */
asm volatile ("mcr p10, 7, %[v], cr8, cr0, 0" :: [v] "r" (v) :);
}
};
public:
class Context
{
private:
/*
* Noncopyable
*/
Context(Context const &);
Context &operator = (Context const &);
friend class Fpu;
struct
{
/* advanced FP/SIMD - system registers */
uint32_t fpscr;
uint32_t fpexc;
/* advanced FP/SIMD - general purpose registers d0-d15 */
uint64_t d0, d1, d2, d3, d4, d5, d6, d7;
uint64_t d8, d9, d10, d11, d12, d13, d14, d15;
};
Fpu * _fpu = nullptr;
public:
Context() : fpexc(Fpexc::En::bits(1)) { }
~Context() { if (_fpu) _fpu->unset(*this); }
};
private:
Context * _context = nullptr;
/**
* Enable FPU
*/
void _enable()
{
Fpexc::access_t fpexc = Fpexc::read();
Fpexc::En::set(fpexc, 1);
Fpexc::write(fpexc);
}
/**
* Disable FPU
*/
void _disable()
{
Fpexc::access_t fpexc = Fpexc::read();
Fpexc::En::set(fpexc, 0);
Fpexc::write(fpexc);
}
/**
* Save FPU context
*/
void _save()
{
/* save system registers */
_context->fpexc = Fpexc::read();
_context->fpscr = Fpscr::read();
/*
* Save D0 - D15
*
* FIXME: See annotation 2.
*/
void * const d0_d15_base = &_context->d0;
asm volatile (
"stc p11, cr0, [%[d0_d15_base]], #128"
:: [d0_d15_base] "r" (d0_d15_base) : );
}
/**
* Load context to FPU
*/
void _load()
{
/* load system registers */
Fpexc::write(_context->fpexc);
Fpscr::write(_context->fpscr);
/*
* Load D0 - D15
*
* FIXME: See annotation 2.
*/
void * const d0_d15_base = &_context->d0;
asm volatile (
"ldc p11, cr0, [%[d0_d15_base]], #128"
:: [d0_d15_base] "r" (d0_d15_base) : );
}
/**
* Return wether the FPU is enabled
*/
bool _enabled()
{
Fpexc::access_t fpexc = Fpexc::read();
return Fpexc::En::get(fpexc);
}
public:
/**
* Initialize FPU
*/
void init();
void switch_to(Context & context)
{
if (_context == &context) return;
_disable();
}
/**
* Return wether the FPU fault can be solved
*
* \param state CPU state of the user
*/
bool fault(Context & context)
{
if (_enabled()) { return false; }
_enable();
if (_context != &context) {
if (_context) {
_save();
_context->_fpu = nullptr;
}
_context = &context;
_context->_fpu = this;
_load();
}
return true;
}
/**
* Unset FPU context
*/
void unset(Context &context) {
if (_context == &context) _context = nullptr; }
};
/*
* Annotation 1
*
* According to the ARMv7 manual this should be done via vmsr/vmrs instruction
* but it seems that binutils 2.22 doesn't fully support this yet. Hence, we
* use a co-processor instruction instead. The parameters to target the
* register this way can be determined via 'sys/arm/include/vfp.h' and
* 'sys/arm/arm/vfp.c' of the FreeBSD head branch as from 2014.04.17.
*/
/*
* Annotation 2
*
* According to the ARMv7 manual this should be done via vldm/vstm instruction
* but it seems that binutils 2.22 doesn't fully support this yet. Hence, we
* use a co-processor instruction instead. The parameters to target the
* register this way can be determined via 'sys/arm/arm/vfp.c' of the FreeBSD
* head branch as from 2014.04.17.
*/
#endif /* _CORE__SPEC__ARM__FPU_H_ */

View File

@@ -19,6 +19,9 @@
using namespace Kernel;
extern "C" void kernel_to_user_context_switch(Cpu::Context*, Cpu::Fpu_context*);
void Thread::exception(Cpu & cpu)
{
switch (regs->cpu_exception) {
@@ -34,7 +37,6 @@ void Thread::exception(Cpu & cpu)
_interrupt(cpu.id());
return;
case Cpu::Context::UNDEFINED_INSTRUCTION:
if (_cpu->retry_undefined_instr(*regs)) { return; }
Genode::warning(*this, ": undefined instruction at ip=",
Genode::Hex(regs->ip));
_die();
@@ -106,14 +108,8 @@ void Thread::proceed(Cpu & cpu)
cpu.switch_to(*regs, pd()->mmu_regs);
regs->cpu_exception = cpu.stack_start();
asm volatile("mov sp, %0 \n"
"msr spsr_cxsf, %1 \n"
"mov lr, %2 \n"
"ldm sp, {r0-r14}^ \n"
"subs pc, lr, #0 \n"
:: "r" (static_cast<Cpu::Context*>(&*regs)),
"r" (regs->cpsr), "r" (regs->ip));
kernel_to_user_context_switch((static_cast<Cpu::Context*>(&*regs)),
(static_cast<Cpu::Fpu_context*>(&*regs)));
}

View File

@@ -0,0 +1,31 @@
/*
* \brief VFPv2 context load/store
* \author Stefan Kalkowski
* \date 2018-05-06
*/
/*
* Copyright (C) 2018 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.
*/
.section .text
.global vfp_save_fpu_context
vfp_save_fpu_context:
vmrs r1, fpscr
stmia r0!, {r1}
vstm r0!, {d0-d15}
mov pc, lr
.global vfp_load_fpu_context
vfp_load_fpu_context:
push { r1, lr }
ldr r1, [r0]
vmsr fpscr, r1
add r1, r0, #4
vldm r1!, {d0-d15}
pop { r1, pc }

View File

@@ -0,0 +1,34 @@
/*
* \brief VFPv3-D32 context load/store
* \author Stefan Kalkowski
* \date 2018-05-06
*/
/*
* Copyright (C) 2018 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.
*/
.section .text
.global vfp_save_fpu_context
vfp_save_fpu_context:
push { r1, lr }
vmrs r1, fpscr
stmia r0!, {r1}
vstm r0!, {d0-d15}
vstm r0!, {d16-d31}
pop { r1, pc }
.global vfp_load_fpu_context
vfp_load_fpu_context:
push { r1, lr }
ldr r1, [r0]
vmsr fpscr, r1
add r1, r0, #4
vldm r1!, {d0-d15}
vldm r1!, {d16-d31}
pop { r1, pc }

View File

@@ -69,10 +69,14 @@ monitor_mode_exception_vector:
_nonsecure_kernel_entry:
ldr lr, [sp, #17*4] /* load kernel sp from vm context */
stmia r0!, {r1-r2} /* save spsr, and exception reason */
mov r1, #1 /* clear exception state of the VFP */
lsl r1, #30
vmsr fpexc, r1
mrc p15, 0, r3, c6, c0, 0 /* move DFAR to r3 */
mrc p15, 0, r4, c2, c0, 0 /* move TTBR0 to r4 */
mrc p15, 0, r5, c2, c0, 1 /* move TTBR1 to r5 */
mrc p15, 0, r6, c2, c0, 2 /* move TTBRC to r6 */
vmrs r7, fpscr /* move FPU ctrl to r7 */
mov r1, #0
mcr p15, 0, r1, c1, c1, 0 /* disable non-secure bit */
.irp mode,27,19,23,18,17 /* save mode specific registers */
@@ -81,7 +85,9 @@ monitor_mode_exception_vector:
stmia r0!, {r1,sp,lr} /* store mode-specific sp and lr */
.endr
stmia r0!, {r8-r12} /* save fiq r8-r12 */
stmia r0!, {r3-r6} /* save MMU registers */
stmia r0!, {r3-r7} /* save MMU registers */
vstm r0!, {d0-d15} /* save FPU registers */
vstm r0!, {d16-d31}
cps #22 /* switch back to monitor mode */
mov r0, #0b111010011 /* spsr to SVC mode, irqs masked */
msr spsr_cxsf, r0
@@ -109,6 +115,12 @@ monitor_mode_enter_normal_world:
msr spsr_cxfs, r2 /* load mode's spsr */
.endr
ldmia r0!, {r8 - r12} /* load fiq r8-r12 */
add r0, r0, #4*4
ldr r1, [r0]
vmsr fpscr, r1
add r1, r0, #4
vldm r1!, {d0-d15}
vldm r1!, {d16-d31}
cps #22 /* switch to monitor mode */
ldmia sp, {r0-lr}^ /* load user r0-r12,sp,lr */
str lr, [sp, #17*4] /* store kernel sp in vm context */

View File

@@ -91,11 +91,16 @@ _host_to_vm:
mcr p15, 0, r10, c6, c0, 0 /* write DFAR */
mcr p15, 0, r11, c6, c0, 2 /* write IFAR */
mcr p15, 0, r12, c13, c0, 1 /* write CIDR */
ldm r0, {r1-r4}
ldm r0!, {r1-r4}
mcr p15, 0, r1, c13, c0, 2 /* write TLS1 */
mcr p15, 0, r2, c13, c0, 3 /* write TLS2 */
mcr p15, 0, r3, c13, c0, 4 /* write TLS3 */
mcr p15, 0, r4, c1, c0, 2 /* write CPACR */
ldr r1, [r0]
vmsr fpscr, r1
add r1, r0, #4
vldm r1!, {d0-d15}
vldm r1!, {d16-d31}
ldmia sp, {r0-r12} /* load vm's r0-r12 */
eret
@@ -106,6 +111,8 @@ _vm_to_host:
mcrr p15, 6, r1, r1, c2 /* write VTTBR */
mcr p15, 4, r1, c1, c1, 0 /* write HCR register */
mcr p15, 4, r1, c1, c1, 3 /* write HSTR register */
mov r1, #0xf
lsl r1, #20
mcr p15, 0, r1, c1, c0, 2 /* write CPACR */
mrs r1, ELR_hyp /* read ip */
mrs r2, spsr /* read cpsr */
@@ -130,7 +137,15 @@ _vm_to_host:
mrc p15, 0, r10, c13, c0, 2 /* read TLS1 */
mrc p15, 0, r11, c13, c0, 3 /* read TLS2 */
mrc p15, 0, r12, c13, c0, 4 /* read TLS3 */
stm r0, {r3-r12}
stm r0!, {r3-r12}
add r0, r0, #4
mov r3, #1 /* clear fpu exception state */
lsl r3, #30
vmsr fpexc, r3
vmrs r4, fpscr
stmia r0!, {r4}
vstm r0!, {d0-d15}
vstm r0!, {d16-d31}
add r0, sp, #13*4
ldr r3, _vt_host_context_ptr
ldr sp, [r3]

View File

@@ -135,13 +135,6 @@ class Genode::Cpu : public Arm_v7_cpu
if (mmu_context.id() && (Ttbr0_64bit::read() != mmu_context.ttbr0))
Ttbr0_64bit::write(mmu_context.ttbr0);
}
/*************
** Dummies **
*************/
bool retry_undefined_instr(Context&) { return false; }
};
#endif /* _CORE__SPEC__CORTEX_A15__CPU_H_ */

View File

@@ -16,75 +16,43 @@
#define _CORE__SPEC__CORTEX_A9__CPU_H_
/* core includes */
#include <spec/arm/fpu.h>
#include <spec/arm_v7/cpu_support.h>
#include <board.h>
namespace Genode { class Cpu; }
namespace Genode { struct Cpu; }
class Genode::Cpu : public Arm_v7_cpu
struct Genode::Cpu : Arm_v7_cpu
{
protected:
/**
* Write back dirty cache lines and invalidate whole data cache
*/
void clean_invalidate_data_cache()
{
clean_invalidate_inner_data_cache();
Board::l2_cache().clean_invalidate();
}
Fpu _fpu { };
/**
* Invalidate whole data cache
*/
void invalidate_data_cache()
{
invalidate_inner_data_cache();
Board::l2_cache().invalidate();
}
public:
/**
* Clean and invalidate data-cache for virtual region
* 'base' - 'base + size'
*/
void clean_invalidate_data_cache_by_virt_region(addr_t base,
size_t const size)
{
Arm_cpu::clean_invalidate_data_cache_by_virt_region(base, size);
Board::l2_cache().clean_invalidate();
}
struct Context : Arm_cpu::Context, Fpu::Context
{
Context(bool privileged)
: Arm_cpu::Context(privileged) {}
};
/**
* Next cpu context to switch to
*
* \param context context to switch to
*/
void switch_to(Context & context, Mmu_context & mmu_context)
{
Arm_cpu::switch_to(context, mmu_context);
_fpu.switch_to(context);
}
/**
* Return wether to retry an undefined user instruction after this call
*
* \param state CPU state of the user
*/
bool retry_undefined_instr(Context & context) {
return _fpu.fault(context); }
/**
* Write back dirty cache lines and invalidate whole data cache
*/
void clean_invalidate_data_cache()
{
clean_invalidate_inner_data_cache();
Board::l2_cache().clean_invalidate();
}
/**
* Invalidate whole data cache
*/
void invalidate_data_cache()
{
invalidate_inner_data_cache();
Board::l2_cache().invalidate();
}
/**
* Clean and invalidate data-cache for virtual region
* 'base' - 'base + size'
*/
void clean_invalidate_data_cache_by_virt_region(addr_t base,
size_t const size)
{
Arm_cpu::clean_invalidate_data_cache_by_virt_region(base, size);
Board::l2_cache().clean_invalidate();
}
static unsigned executing_id() { return Mpidr::Aff_0::get(Mpidr::read()); }
static unsigned executing_id() { return Mpidr::Aff_0::get(Mpidr::read()); }
};
#endif /* _CORE__SPEC__CORTEX_A9__CPU_H_ */

View File

@@ -1,24 +0,0 @@
/*
* \brief CPU driver for core
* \author Martin stein
* \author Stefan Kalkowski
* \date 2016-01-19
*/
/*
* Copyright (C) 2016-2017 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 <cpu.h>
void Genode::Fpu::init()
{
Cpu::Cpacr::access_t cpacr = Cpu::Cpacr::read();
Cpu::Cpacr::Cp10::set(cpacr, 3);
Cpu::Cpacr::Cp11::set(cpacr, 3);
Cpu::Cpacr::write(cpacr);
_disable();
}

View File

@@ -23,8 +23,6 @@
void Kernel::Cpu::init(Kernel::Pic &pic)
{
_fpu.init();
{
Lock::Guard guard(data_lock());

View File

@@ -116,11 +116,6 @@ class Genode::Cpu : public Hw::X86_64_cpu
Fpu & fpu() { return _fpu; }
/**
* Return wether to retry an undefined user instruction after this call
*/
bool retry_undefined_instr(Context&) { return false; }
/**
* Return kernel name of the executing CPU
*/

View File

@@ -32,15 +32,52 @@ class Hw::Pl310 : public Genode::Mmio
struct Aux : Register<0x104, 32>
{
struct Associativity : Bitfield<16,1> { };
struct Way_size : Bitfield<17,3> { };
struct Full_line_of_zero : Bitfield<0,1> {};
struct Associativity : Bitfield<16,1>
{
enum { WAY_8, WAY_16 };
};
struct Way_size : Bitfield<17,3>
{
enum {
RESERVED,
KB_16,
KB_32,
KB_64,
KB_128,
KB_256,
KB_512
};
};
struct Share_override : Bitfield<22,1> { };
struct Reserved : Bitfield<25,1> { };
struct Ns_lockdown : Bitfield<26,1> { };
struct Ns_irq_ctrl : Bitfield<27,1> { };
struct Data_prefetch : Bitfield<28,1> { };
struct Inst_prefetch : Bitfield<29,1> { };
struct Early_bresp : Bitfield<30,1> { };
struct Replacement_policy : Bitfield<25,1>
{
enum { ROUND_ROBIN, PRAND };
};
struct Ns_lockdown : Bitfield<26,1> { };
struct Ns_irq_ctrl : Bitfield<27,1> { };
struct Data_prefetch : Bitfield<28,1> { };
struct Inst_prefetch : Bitfield<29,1> { };
struct Early_bresp : Bitfield<30,1> { };
};
struct Tag_ram : Register<0x108, 32>
{
struct Setup_latency : Bitfield<0,3> { };
struct Read_latency : Bitfield<4,3> { };
struct Write_latency : Bitfield<8,3> { };
};
struct Data_ram : Register<0x10c, 32>
{
struct Setup_latency : Bitfield<0,3> { };
struct Read_latency : Bitfield<4,3> { };
struct Write_latency : Bitfield<8,3> { };
};
struct Irq_mask : Register <0x214, 32> { };
@@ -55,6 +92,12 @@ class Hw::Pl310 : public Genode::Mmio
struct Dwb : Bitfield<1,1> { };
};
struct Prefetch_ctrl : Register<0xf60, 32>
{
struct Data_prefetch : Bitfield<28,1> { };
struct Inst_prefetch : Bitfield<29,1> { };
};
void _sync() { while (read<Cache_sync>()) ; }
public:

View File

@@ -1 +1 @@
2018-08-22 ed4d40ace8c08804171ce57f945a31ae096e668f
2018-11-27 e3975b23b28b50fbb0ca13e8305deb6491f10feb

View File

@@ -1 +1 @@
2018-09-11 44f6a206e43c371e50935e3443e79b4586b4b13b
2018-11-27 9bc5ae3b23333e187702f57360ecf14c9adb3558

View File

@@ -33,6 +33,7 @@ SRC_CC = main.cc \
core_log_out.cc \
default_log.cc \
env_reinit.cc \
heartbeat.cc \
thread.cc thread_myself.cc
INC_DIR += $(REP_DIR)/src/core/include \
@@ -65,6 +66,7 @@ vpath signal_receiver.cc $(GEN_CORE_DIR)
vpath trace_session_component.cc $(GEN_CORE_DIR)
vpath core_rpc_cap_alloc.cc $(GEN_CORE_DIR)
vpath default_log.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)
vpath thread.cc $(BASE_DIR)/src/lib/base
vpath thread_myself.cc $(BASE_DIR)/src/lib/base
vpath trace.cc $(BASE_DIR)/src/lib/base

View File

@@ -44,6 +44,7 @@
#define size_t __SIZE_TYPE__
/* Linux includes */
#include <sys/cdefs.h> /* include first to avoid double definition of '__always_inline' */
#include <linux/futex.h>
#include <unistd.h>
#include <signal.h>

View File

@@ -40,7 +40,8 @@ SRC_CC += stack_area.cc \
bios_data_area.cc \
trace_session_component.cc \
signal_transmitter_noinit.cc \
signal_receiver.cc
signal_receiver.cc \
heartbeat.cc
INC_DIR = $(REP_DIR)/src/core/include \
$(REP_DIR)/src/include \
@@ -73,4 +74,5 @@ vpath dump_alloc.cc $(GEN_CORE_DIR)
vpath platform_rom_modules.cc $(GEN_CORE_DIR)
vpath platform_services.cc $(GEN_CORE_DIR)/spec/x86
vpath stack_area.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)
vpath %.cc $(REP_DIR)/src/core

View File

@@ -1 +1 @@
95f7056d34c5d48ef9dfbf67f5053fd0486e47b8
d31259810f0f2b08e41bc9aa89a445ae22794d20

View File

@@ -4,7 +4,7 @@ DOWNLOADS := nova.git
# r10 branch
URL(nova) := https://github.com/alex-ab/NOVA.git
REV(nova) := b156131007c928e2968fc5e551cea402c1886919
REV(nova) := 27a54981ac0baf0e4e048f5d5ad98fe9c605c35a
DIR(nova) := src/kernel/nova
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))

View File

@@ -1 +1 @@
2018-09-19 50a7c1db85cd1cfc2c39ae67d05182329d1abed5
2018-11-27 f935610963309ea600504f10913af99350d481f9

View File

@@ -164,6 +164,9 @@ inline int map_local(Genode::addr_t const pd, Nova::Utcb *utcb,
if ((to_end - to_curr) < (1UL << order))
order = log2(to_end - to_curr);
if (order >= sizeof(void *)*8)
return 1;
int const res = map_local(pd, utcb,
Mem_crd((from_curr >> 12), order - get_page_size_log2(), permission),
Mem_crd((to_curr >> 12), order - get_page_size_log2(), permission),

View File

@@ -660,76 +660,84 @@ Platform::Platform() :
/* export x86 platform specific infos */
unsigned const pages = 1;
void * phys_ptr = 0;
ram_alloc()->alloc_aligned(get_page_size(), &phys_ptr, get_page_size_log2());
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
addr_t const core_local_addr = _map_pages(phys_addr, pages);
void * phys_ptr = nullptr;
if (ram_alloc()->alloc_aligned(get_page_size(), &phys_ptr,
get_page_size_log2()).ok()) {
Genode::Xml_generator xml(reinterpret_cast<char *>(core_local_addr),
pages << get_page_size_log2(),
"platform_info", [&] ()
{
xml.node("acpi", [&] () {
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
addr_t const core_local_addr = _map_pages(phys_addr, pages);
xml.attribute("revision", 2); /* XXX */
if (!core_local_addr) {
ram_alloc()->free(phys_ptr);
} else {
if (rsdt)
xml.attribute("rsdt", String<32>(Hex(rsdt)));
Genode::Xml_generator xml(reinterpret_cast<char *>(core_local_addr),
pages << get_page_size_log2(),
"platform_info", [&] ()
{
xml.node("acpi", [&] () {
if (xsdt)
xml.attribute("xsdt", String<32>(Hex(xsdt)));
});
xml.node("boot", [&] () {
if (!boot_fb)
return;
xml.attribute("revision", 2); /* XXX */
if (!efi_boot && (Resolution::Type::get(boot_fb->size) != Resolution::Type::VGA_TEXT))
return;
if (rsdt)
xml.attribute("rsdt", String<32>(Hex(rsdt)));
xml.node("framebuffer", [&] () {
xml.attribute("phys", String<32>(Hex(boot_fb->addr)));
xml.attribute("width", Resolution::Width::get(boot_fb->size));
xml.attribute("height", Resolution::Height::get(boot_fb->size));
xml.attribute("bpp", Resolution::Bpp::get(boot_fb->size));
xml.attribute("type", Resolution::Type::get(boot_fb->size));
xml.attribute("pitch", boot_fb->aux);
});
});
xml.node("hardware", [&] () {
xml.node("features", [&] () {
xml.attribute("svm", hip->has_feature_svm());
xml.attribute("vmx", hip->has_feature_vmx());
});
xml.node("tsc", [&] () {
xml.attribute("invariant", cpuid_invariant_tsc());
xml.attribute("freq_khz" , hip->tsc_freq);
});
xml.node("cpus", [&] () {
unsigned const cpus = hip->cpus();
for (unsigned i = 0; i < cpus; i++) {
xml.node("cpu", [&] () {
unsigned const kernel_cpu_id = Platform::kernel_cpu_id(i);
xml.attribute("id", i);
xml.attribute("package", hip->cpu_desc_of_cpu(kernel_cpu_id)->package);
xml.attribute("core", hip->cpu_desc_of_cpu(kernel_cpu_id)->core);
xml.attribute("thread", hip->cpu_desc_of_cpu(kernel_cpu_id)->thread);
xml.attribute("family", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->family)));
xml.attribute("model", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->model)));
xml.attribute("stepping", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->stepping)));
xml.attribute("platform", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->platform)));
xml.attribute("patch", String<12>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->patch)));
if (xsdt)
xml.attribute("xsdt", String<32>(Hex(xsdt)));
});
xml.node("boot", [&] () {
if (!boot_fb)
return;
if (!efi_boot && (Resolution::Type::get(boot_fb->size) != Resolution::Type::VGA_TEXT))
return;
xml.node("framebuffer", [&] () {
xml.attribute("phys", String<32>(Hex(boot_fb->addr)));
xml.attribute("width", Resolution::Width::get(boot_fb->size));
xml.attribute("height", Resolution::Height::get(boot_fb->size));
xml.attribute("bpp", Resolution::Bpp::get(boot_fb->size));
xml.attribute("type", Resolution::Type::get(boot_fb->size));
xml.attribute("pitch", boot_fb->aux);
});
}
});
xml.node("hardware", [&] () {
xml.node("features", [&] () {
xml.attribute("svm", hip->has_feature_svm());
xml.attribute("vmx", hip->has_feature_vmx());
});
xml.node("tsc", [&] () {
xml.attribute("invariant", cpuid_invariant_tsc());
xml.attribute("freq_khz" , hip->tsc_freq);
});
xml.node("cpus", [&] () {
unsigned const cpus = hip->cpus();
for (unsigned i = 0; i < cpus; i++) {
xml.node("cpu", [&] () {
unsigned const kernel_cpu_id = Platform::kernel_cpu_id(i);
xml.attribute("id", i);
xml.attribute("package", hip->cpu_desc_of_cpu(kernel_cpu_id)->package);
xml.attribute("core", hip->cpu_desc_of_cpu(kernel_cpu_id)->core);
xml.attribute("thread", hip->cpu_desc_of_cpu(kernel_cpu_id)->thread);
xml.attribute("family", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->family)));
xml.attribute("model", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->model)));
xml.attribute("stepping", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->stepping)));
xml.attribute("platform", String<5>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->platform)));
xml.attribute("patch", String<12>(Hex(hip->cpu_desc_of_cpu(kernel_cpu_id)->patch)));
});
}
});
});
});
});
});
unmap_local(__main_thread_utcb, core_local_addr, pages);
region_alloc()->free(reinterpret_cast<void *>(core_local_addr), pages * get_page_size());
unmap_local(__main_thread_utcb, core_local_addr, pages);
region_alloc()->free(reinterpret_cast<void *>(core_local_addr), pages * get_page_size());
_rom_fs.insert(new (core_mem_alloc())
Rom_module(phys_addr, pages * get_page_size(),
"platform_info"));
_rom_fs.insert(new (core_mem_alloc())
Rom_module(phys_addr, pages * get_page_size(),
"platform_info"));
}
}
}
/* core log as ROM module */
@@ -738,16 +746,22 @@ Platform::Platform() :
unsigned const pages = 4;
size_t const log_size = pages << get_page_size_log2();
ram_alloc()->alloc_aligned(log_size, &phys_ptr, get_page_size_log2());
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
if (ram_alloc()->alloc_aligned(log_size, &phys_ptr,
get_page_size_log2()).ok()) {
addr_t const core_local_addr = _map_pages(phys_addr, pages, true);
memset(reinterpret_cast<void *>(core_local_addr), 0, log_size);
addr_t const phys_addr = reinterpret_cast<addr_t>(phys_ptr);
_rom_fs.insert(new (core_mem_alloc()) Rom_module(phys_addr, log_size,
"core_log"));
addr_t const virt = _map_pages(phys_addr, pages, true);
if (virt) {
memset(reinterpret_cast<void *>(virt), 0, log_size);
init_core_log( Core_log_range { core_local_addr, log_size } );
_rom_fs.insert(new (core_mem_alloc()) Rom_module(phys_addr, log_size,
"core_log"));
init_core_log( Core_log_range { virt, log_size } );
} else
ram_alloc()->free(phys_ptr);
}
}
/* export hypervisor log memory */
@@ -771,12 +785,19 @@ Platform::Platform() :
unsigned index = first_index;
for (unsigned i = 0; i < 32; i++)
{
void * phys_ptr = 0;
ram_alloc()->alloc_aligned(get_page_size(), &phys_ptr, get_page_size_log2());
void * phys_ptr = nullptr;
if (ram_alloc()->alloc_aligned(get_page_size(), &phys_ptr,
get_page_size_log2()).error())
break;
addr_t phys_addr = reinterpret_cast<addr_t>(phys_ptr);
addr_t core_local_addr = _map_pages(phys_addr, 1);
if (!core_local_addr) {
ram_alloc()->free(phys_ptr);
break;
}
Cap_range * range = reinterpret_cast<Cap_range *>(core_local_addr);
construct_at<Cap_range>(range, index);

View File

@@ -178,6 +178,12 @@ void Capability_map::remove(Genode::addr_t const sel, uint8_t num_log_2,
while (last_sel > last_range) {
uint8_t left_log2 = log2(last_sel - last_range);
/* take care for a case which should not happen */
if (left_log2 >= sizeof(last_range)*8) {
error("cap remove error");
return;
}
remove(last_range, left_log2, revoke);
last_range += 1UL << left_log2;

View File

@@ -40,8 +40,17 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst,
if (rcv_caps != ~0UL) {
/* calculate max order of caps to be received during reply */
unsigned short log2_max = rcv_caps ? log2(rcv_caps) : 0;
if ((1U << log2_max) < rcv_caps) log2_max ++;
unsigned short log2_max = 0;
if (rcv_caps) {
log2_max = log2(rcv_caps);
/* if this happens, the call is bogus and invalid */
if ((log2_max >= sizeof(rcv_caps) * 8))
throw Ipc_error();
if ((1UL << log2_max) < rcv_caps)
log2_max ++;
}
rcv_window.rcv_wnd(log2_max);
}

View File

@@ -41,7 +41,8 @@ SRC_CC += stack_area.cc \
signal_transmitter_proxy.cc \
signal_receiver.cc \
thread_start.cc \
trace_session_component.cc
trace_session_component.cc \
heartbeat.cc
INC_DIR += $(REP_DIR)/src/core/include $(GEN_CORE_DIR)/include \
$(REP_DIR)/src/include $(GEN_SRC_DIR)/include
@@ -75,3 +76,4 @@ vpath default_log.cc $(GEN_CORE_DIR)
vpath stack_area.cc $(GEN_CORE_DIR)
vpath pager_ep.cc $(GEN_CORE_DIR)
vpath platform_rom_modules.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)

View File

@@ -1 +1 @@
2018-09-11 8ea606caab24ffc669aeb5d9167d9c6210c2837a
2018-11-27 f3a807a0f5ee4033f69f2cccc68c4e25554ebcb4

View File

@@ -39,7 +39,8 @@ SRC_CC = stack_area.cc \
signal_transmitter_proxy.cc \
signal_receiver.cc \
thread_start.cc \
trace_session_component.cc
trace_session_component.cc \
heartbeat.cc
INC_DIR += $(REP_DIR)/src/core/include $(GEN_CORE_DIR)/include \
$(REP_DIR)/src/include $(GEN_SRC_DIR)/include
@@ -73,3 +74,4 @@ vpath core_region_map.cc $(GEN_CORE_DIR)
vpath stack_area.cc $(GEN_CORE_DIR)
vpath pager_ep.cc $(GEN_CORE_DIR)
vpath platform_rom_modules.cc $(GEN_CORE_DIR)
vpath heartbeat.cc $(GEN_CORE_DIR)

View File

@@ -1 +1 @@
2018-09-11 471af5922e500c478fa47ac88ea8691841890383
2018-11-27 8321c99e33f261b6088e6375256815590f1d56b3

View File

@@ -21,7 +21,8 @@ GEN_SRC_CC += \
rom_session_component.cc \
signal_receiver.cc \
signal_transmitter_proxy.cc \
trace_session_component.cc
trace_session_component.cc \
heartbeat.cc
REP_SRC_CC += \
capability_space.cc \

View File

@@ -1 +1 @@
2018-09-11 9368374ecf4a0eaca266c3c05f4f6df2a76826e6
2018-11-27 d6b7a57753b6bcd38bb4e39232497a4e5d455ee9

View File

@@ -93,6 +93,7 @@ class Genode::Ipc_pager : public Native_capability
addr_t _fault_type = 0; /* type of fault */
bool _pf_write = false; /* true on write fault */
bool _pf_exec = false; /* true on exec fault */
bool _pf_align = false; /* true on unaligned fault */
Mapping _reply_mapping { };
@@ -151,6 +152,16 @@ class Genode::Ipc_pager : public Native_capability
* Return true if page fault was on non-executable memory
*/
bool exec_fault() const { return _pf_exec; }
/**
* Return true if page fault was due to unaligned memory access
*/
bool align_fault() const { return _pf_align; }
/**
* Install memory mapping after pager code executed.
*/
bool install_mapping();
};
#endif /* _CORE__INCLUDE__IPC_PAGER_H_ */

View File

@@ -389,22 +389,30 @@ class Genode::Vm_space
_cap_sel_alloc.free(_vm_pad_cnode.sel());
}
void map(addr_t const from_phys, addr_t const to_virt,
bool map(addr_t const from_phys, addr_t const to_virt,
size_t const num_pages, Cache_attribute const cacheability,
bool const writable, bool const executable, bool flush_support)
{
Lock::Guard guard(_lock);
bool ok = true;
for (size_t i = 0; i < num_pages; i++) {
off_t const offset = i << get_page_size_log2();
if (!_map_frame(from_phys + offset, to_virt + offset,
cacheability, writable, executable,
flush_support))
warning("mapping failed ", Hex(from_phys + offset),
" -> ", Hex(to_virt + offset), " ",
!flush_support ? "core" : "");
if (_map_frame(from_phys + offset, to_virt + offset,
cacheability, writable, executable,
flush_support))
continue;
ok = false;
warning("mapping failed ", Hex(from_phys + offset),
" -> ", Hex(to_virt + offset), " ",
!flush_support ? "core" : "");
}
return ok;
}
bool unmap(addr_t const virt, size_t const num_pages,

View File

@@ -47,12 +47,14 @@ void Ipc_pager::wait_for_fault()
reply_and_wait_for_fault();
}
bool Ipc_pager::install_mapping()
{
_badge = Genode::install_mapping(_reply_mapping, _badge);
return _badge;
}
void Ipc_pager::reply_and_wait_for_fault()
{
if (_badge)
_badge = install_mapping(_reply_mapping, _badge);
seL4_Word badge = Rpc_obj_key::INVALID;
seL4_MessageInfo_t page_fault_msg_info;
@@ -76,6 +78,7 @@ void Ipc_pager::reply_and_wait_for_fault()
_pf_write = fault_info.write;
_pf_exec = fault_info.exec_fault();
_fault_type = seL4_MessageInfo_get_label(page_fault_msg_info);
_pf_align = fault_info.align_fault();
_badge = badge;
}
@@ -187,6 +190,23 @@ void Pager_entrypoint::entry()
" ip=", Hex(_pager.fault_ip()),
" pf-addr=", Hex(_pager.fault_addr()));
_pager.reply_save_caller(obj->reply_cap_sel());
return;
}
try {
/* install memory mappings */
if (_pager.install_mapping())
return;
/* on alignment fault don't reply and submit signal */
if (_pager.align_fault()) {
warning("alignment fault, addr=", Hex(_pager.fault_addr()),
" ip=", Hex(_pager.fault_ip()));
throw 1;
}
} catch (...) {
reply_pending = false;
obj->submit_exception_signal();
}
});
}

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