Commit Graph

204 Commits

Author SHA1 Message Date
Ehmry - b20ca5f254 Revert "Core: exit with child exit value"
Not actually useful, and causes a null deference on NOVA.
2020-01-22 17:10:03 +01:00
Ehmry - 3d68a520cb Tag release 19.11
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEsIWqvdxEKaxX80hspyRgNBfs1rcFAl3fpmAACgkQpyRgNBfs
 1rcezQ//ZoYChufO6m2CByuPUbITql12b6oyOjmvcw16NW+Nsf2EodwMeCk/9yyM
 kWIxqOtXp1yFPGNf8ebEkTu5YXYMkHrUds4V6nQ4nQnyk7VnQmR3XTnqP8Sr27Hp
 fHi7Dddjxufexeyb6bwis04mK4PeFWXk/D6H4nh6ZeaR30g/GQ+Wt4N64a+HcQ1g
 kLMKuLlooOoq0L9q8IVLAtQoKNR1LP6x0FKGH8B6elwns8rXna2fRSlCB+W7qLwl
 K/pQadaIkwQNj8TEXuQxdGOR1GIrTbUz9ExS6U1yPXjqK06CunDZqsn+Cv5G7p+5
 ybMaViXwDGilZjhNLTjAbPhqhoOVu+yDB5gwzKiYt6/gTKP8N+VUpXKhGpzu/0ya
 wEt2b/43vmPm1NsBQQFU6vmjyW0W0iOl+a1tetv/qFo4mzQNesbVlu6t91b0EAjp
 C0JzZj9UHj/QkKgLIPkWMVWyz+VtODUeFhMLV6+86wzFmqSNhbaL0K/1LvX3AHZR
 5M/sjMRdtRL9U7Xv/LTn/Sgisk5wT2wfI9dpkAZALZjm22751mSTv9XhdLC/+XpA
 0F7cfSg36DphYsyPmSQ9+Q79rpU+bvuuTbqAsLdYcflMaW4bsIOd4j5Lk3adIPbN
 EE0uu+CD1GbqpKy+vLr+2EIlYpVNRTQKLklmkmhb+ZBuvUo00cU=
 =4dhl
 -----END PGP SIGNATURE-----

Merge tag '19.11'

Tag release 19.11
2019-11-28 13:21:13 +01:00
Stefan Kalkowski f82714f341 vm_session: return vcpu id when creating vcpu
Ref #3553
2019-11-21 14:29:36 +01:00
Ehmry - 5e87eee9b8 Genode::Capability_space: bypass static constructor where possible 2019-10-04 00:52:03 +02:00
Ehmry - 4952b37e4c Core: exit with child exit value
Effective for base-linux only.
2019-10-03 21:25:36 +02:00
Alexander Boettcher ab6315d6b4 vm_session: add fpu state for x86
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher faee97dd1e sel4: let seoul-kernelbuild.run succeed
Issue #3111
2019-05-27 14:46:53 +02:00
Stefan Kalkowski a1e70b9ba4 kernel: differentiate board-specific components
Components like kernel, core, and bootstrap that are built for a
specific board need to reside inside the same architectural dependent
build directory. For instance there are sel4, foc, and hw kernel builds
for imx6q_sabrelite and imx7d_sabre, which have to reside inside the same
arm_v7 build directory.
This commit names those components explicitely, and adapts the run-tool to it.

Fix #3316
2019-05-27 14:46:52 +02:00
Christian Prochaska 5a2e7a8d66 base-sel4: fix compile errors with GCC 8.3.0
Fixes #3328
2019-05-16 13:11:02 +02:00
Alexander Boettcher c0a00019c0 foc/sel4: place vcpu thread on same cpu as ep
Issue #3111
2019-05-06 16:15:27 +02:00
Stefan Kalkowski f42c21f16b platform_info: add kernel information (fix #3295) 2019-05-06 16:15:26 +02:00
Alexander Boettcher 05fa063068 vm_session: support to trace vCPU
Issue #3111
2019-05-06 16:15:26 +02:00
Stefan Kalkowski 4bcd9169c0 sel4: add timer for imx7d_sabre
Fix #3292
2019-05-06 16:15:26 +02:00
Alexander Boettcher cc64c43758 vm_session: adjustments to work with seoul vmm
for foc, nova, sel4

Issue #3111
2019-05-06 16:15:26 +02:00
Alexander Boettcher 393643515c base: extend attach of vm_session
by offset, size, writeable and executable parameter

Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher d2229ab381 vm_session: evaluate priority
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher 450c8dc149 vm_session: track dataspaces used by attach
Track the dataspaces used by attach and add handling of flushing VM space
when dataspace gets destroyed (not triggered via the vm_session interface).

Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher ae16edf1d6 trace: support more facets of execution time
- execution time per thread context
- execution time per scheduling context
- quantum and priority

Issue #3192
2019-04-09 12:30:34 +02:00
Alexander Boettcher ef130a3bf9 sel4/x86: implement vm_session interface
Issue #3111

- enable vt-x in kernel configuration

Kernel patches:

- add unrestricted guest support
- avoid kernel boot failure when vt-x is not available
- avoid nullpointer in kernel when vcpu is not fully setup
- avoid vcpu scheduling bug which causes starvation on same/below prio level
- save efer register correctly from guest
2019-04-01 19:33:52 +02:00
Christian Helmuth bce4fa9531 sel4: user virtual-memory size of 8 GiB on 64-bit 2019-02-26 14:45:07 +01:00
Norman Feske b3727a9b46 Add missing override annotations
Issue #3159
2019-02-19 11:12:11 +01:00
Norman Feske aa66b5d62f base: remove dependency from deprecated APIs
This patch adjusts the implementation of the base library and core such
that the code no longer relies on deprecated APIs except for very few
cases, mainly to keep those deprecated APIs in tact for now.

The most prominent changes are:

- Removing the use of base/printf.h

- Removing of the log backend for printf. The 'Console' with the
  format-string parser is still there along with 'snprintf.h' because
  the latter is still used at a few places, most prominently the
  'Connection' classes.

- Removing the notion of a RAM session, which does not exist in
  Genode anymore. Still the types were preserved (by typedefs to
  PD session) to keep up compatibility. But this transition should
  come to an end now.

- Slight rennovation of core's tracing service, e.g., the use of an
  Attached_dataspace as the Argument_buffer.

- Reducing the reliance on global accessors like deprecated_env() or
  core_env(). Still there is a longish way to go to eliminate all such
  calls. A useful pattern (or at least a stop-gap solution) is to
  pass the 'Env' to the individual compilation units via init functions.

- Avoiding the use of the old 'Child_policy::resolve_session_request'
  interface that returned a 'Service' instead of a 'Route'.

Issue #1987
2019-02-19 11:08:17 +01:00
Ehmry - 38ab456c78 Remove pointers from Genode::Fifo interface
Replace methods of Genode::Fifo returning pointers with methods which
call lambdas with references.

Ref #3135
2019-02-19 11:08:17 +01:00
Norman Feske bcb24e316c base: fix warnings reported by LLVM analyzer
The warnings were false positives though.
2019-02-12 10:33:14 +01:00
Norman Feske 6b289a1423 base/core: use references instead of pointers
This patch replaces the former prominent use of pointers by references
wherever feasible. This has the following benefits:

* The contract between caller and callee becomes more obvious. When
  passing a reference, the contract says that the argument cannot be
  a null pointer. The caller is responsible to ensure that. Therefore,
  the use of reference eliminates the need to add defensive null-pointer
  checks at the callee site, which sometimes merely exist to be on the
  safe side. The bottom line is that the code becomes easier to follow.

* Reference members must be initialized via an object initializer,
  which promotes a programming style that avoids intermediate object-
  construction states. Within core, there are still a few pointers
  as member variables left though. E.g., caused by the late association
  of 'Platform_thread' objects with their 'Platform_pd' objects.

* If no pointers are present as member variables, we don't need to
  manually provide declarations of a private copy constructor and
  an assignment operator to avoid -Weffc++ errors "class ... has
  pointer data members [-Werror=effc++]".

This patch also changes a few system bindings on NOVA and Fiasco.OC,
e.g., the return value of the global 'cap_map' accessor has become a
reference. Hence, the patch touches a few places outside of core.

Fixes #3135
2019-02-12 10:33:13 +01:00
Stefan Kalkowski b765cef359 replace Wandboard by i.MX6 reference board
Instead of using the Wandboard Quad, the reference hardware from NXP
i.MX6 Quad Sabrelite will be used by Fiasco.OC, sel4 and hw by default.
2019-01-30 13:35:28 +01:00
Norman Feske bf62d6b896 Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the
dynamic linker), it belongs to the base repository.

Besides moving the timer and its related infrastructure (alarm, timeout
libs, tests) to the base repository, this patch also moves the timer
from the 'drivers' subdirectory directly to 'src' and disamibuates the
timer's build locations for the various kernels. Otherwise the different
timer implementations could interfere with each other when using one
build directory with multiple kernels.

Note that this patch changes the include paths for the former os/timer,
os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/.

Issue #3101
2019-01-14 12:33:57 +01:00
Stefan Kalkowski 7f1692b3ca core: support unmap of managed dataspace generally
This commit solves several issues:

* correct calculation of overlap region when detaching regions
  in managed dataspaces
* prevent unmap of Fiasco.OC's core log buffer
* calculate the core-local address of regions in managed dataspaces
  if possible at all and use it to unmap on kernels where this is
  needed

Fix #976
Fix #3082
2019-01-07 12:33:56 +01:00
Alexander Boettcher 7536b665f1 core: avoid null pointer reference warning
Issue #3022
2019-01-07 12:25:44 +01:00
Alexander Boettcher a8ed11e75b sel4/arm: make alignment faults visible
Fixes #2993
2018-10-01 10:41:46 +02:00
Alexander Boettcher e6d20aba93 base: support to attach RAM dataspaces readonly
Fixes #1633
2018-05-30 13:36:27 +02:00
Martin Stein 52a69b8a6f base-sel4: handle PTE selectors exceeded
In Vm_space::map when allocating a new page-table-entry selector, the
allocator may throw an exception that there are no selecztors left which
was not caught by now.  Now, we catch this exception, flush the mapping
cache to free all selectors again and retry to allocate.

Fixes #2781
2018-05-03 15:31:22 +02:00
Hinnerk van Bruinehsen 2278104a8d sel4: update to version 9.0.0 2018-05-03 15:31:21 +02:00
Christian Helmuth a25ec92a30 sel4: explicit vpath for each file in core
The pattern rule picked up the wrong platform_services.cc in the
depot-archive case only because the archive integrates generic and
sel4-specific source files into REP_DIR.
2018-04-19 12:39:20 +02:00
Alexander Boettcher 0b7e2a1642 sel4: invalidate ram if used uncached later on
Fixes #2665
2018-04-10 11:06:01 +02:00
Alexander Boettcher a6a196f042 sel4: add tsc and svm/vmx feature to platform_info
Issue #2710
2018-03-29 14:59:07 +02:00
Alexander Boettcher 9269d09e18 sel4: support tracing of exec. time of core thread
Issue #2646
2018-02-14 20:41:04 +01:00
Martin Stein abf9557bb5 AVL node/tree: make non-copyable
AVL trees can't be copied with the default copy constructor as the
parent pointer of the first item of both of the resulting trees would
point to the original tree. Copying an AVL node, however, generally
violates the integrity of the corresponding tree. The copy constructor
of Avl_tree is used in some places but in those places it can be
replaced easily. So, this commit deletes the copy constructor of
Avl_node_base which makes Avl_node and Avl_tree non-copyable.

Issue #2654
2018-02-09 13:34:23 +01:00
Norman Feske eba9c15746 Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:

* A class with virtual functions can no longer publicly inherit base
  classed without a vtable. The inherited object may either be moved
  to a member variable, or inherited privately. The latter would be
  used for classes that inherit 'List::Element' or 'Avl_node'. In order
  to enable the 'List' and 'Avl_tree' to access the meta data, the
  'List' must become a friend.

* Instead of adding a virtual destructor to abstract base classes,
  we inherit the new 'Interface' class, which contains a virtual
  destructor. This way, single-line abstract base classes can stay
  as compact as they are now. The 'Interface' utility resides in
  base/include/util/interface.h.

* With the new warnings enabled, all member variables must be explicitly
  initialized. Basic types may be initialized with '='. All other types
  are initialized with braces '{ ... }' or as class initializers. If
  basic types and non-basic types appear in a row, it is nice to only
  use the brace syntax (also for basic types) and align the braces.

* If a class contains pointers as members, it must now also provide a
  copy constructor and assignment operator. In the most cases, one
  would make them private, effectively disallowing the objects to be
  copied. Unfortunately, this warning cannot be fixed be inheriting
  our existing 'Noncopyable' class (the compiler fails to detect that
  the inheriting class cannot be copied and still gives the error).
  For now, we have to manually add declarations for both the copy
  constructor and assignment operator as private class members. Those
  declarations should be prepended with a comment like this:

        /*
         * Noncopyable
         */
        Thread(Thread const &);
        Thread &operator = (Thread const &);

  In the future, we should revisit these places and try to replace
  the pointers with references. In the presence of at least one
  reference member, the compiler would no longer implicitly generate
  a copy constructor. So we could remove the manual declaration.

Issue #465
2018-01-17 12:14:35 +01:00
Norman Feske 552662d594 core: omit allocator info at boot time
Fixes #2549
2017-12-21 15:01:48 +01:00
Alexander Boettcher a36465426b base-<kernel>: export core log as ROM
Issue #2207
2017-12-21 15:01:47 +01:00
Alexander Boettcher 2cb635c3e3 base-*: rename core_log.cc to core_log_out.cc
Issue #2207
2017-12-21 15:01:46 +01:00
Alexander Boettcher 16b395dce3 sel4: use kernel branch 7.0 + our mastered commits
Fixes #2562
2017-12-21 15:01:45 +01:00
Alexander Boettcher 4761826843 sel4: change a error message into warning
This condition is non-fatal in the most cases, so leave it as a
diagnostic message.
2017-11-30 11:23:17 +01:00
Alexander Boettcher 2b6ae514b5 sel4: add mbi2 framebuffer support
Issue #2555
2017-11-30 11:23:09 +01:00
Alexander Boettcher 7d54d1da0c sel4: enable support for direct unmap in core
Issue #2563
2017-11-30 11:23:06 +01:00
Alexander Boettcher 990b7945a7 sel4: use kernel branch 7.0 + our mastered commits
for uefi, multiboot2, benchmark interface adaptations and ARM define build
fixes.

Issue #2562
2017-11-30 11:23:05 +01:00
Alexander Boettcher 9655ebbefe sel4: enable nx bit handling for ARM
Issue #1723
2017-11-01 08:39:49 +01:00
Alexander Boettcher db329b02b5 base: enable executable memory fault handling
Fixes #1723
2017-11-01 08:39:48 +01:00
Alexander Boettcher 013efb58ac sel4: free up top root directory of processes
Issue #2514
2017-10-05 17:39:55 +02:00