Commit Graph

244 Commits

Author SHA1 Message Date
Norman Feske
daee1f4cb8 timer/nova: prevent potential division by zero
This case triggered with the leitzentrale.run script on Qemu.
The frequency value must never initialized with zero.

Fixes #3663
2020-02-27 14:46:59 +01:00
Alexander Boettcher
5440cd4b50 base: use blockade in thread
Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
00f69bc70d base: add mutex as derivate of lock
The mutex class is more restrictive in usage compared to
Genode::Lock.

- At initialiation time it is ever unlocked.
- No thread is permitted to lock twice. Warn about it
  in case it happens.
- Only the lock onwer is permitted to unlock the mutex.
  Warn about it and don't unlock the mutex in case it happens.

Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
7b964fa700 base: add affinity space info to platform info
Issue #3599
2020-02-04 15:51:10 +01:00
Alexander Boettcher
734752d6b5 base-nova: show size of framebuffer correctly 2020-02-04 15:51:09 +01:00
Christian Helmuth
18f90ca1e3 nova: request stack pointer on page fault
The SP value is part of the Page_fault_info object but was not requested
from the kernel on portal creation.
2020-01-02 15:30:28 +01:00
Alexander Boettcher
1ac33caa90 nova: handle rpc_entrypoint destruction better
Fixes #1921
2019-12-20 11:31:39 +01:00
Alexander Boettcher
a41dd48986 nova: avoid invalid capability counting overhead
- handle it the same way as done for other kernels

Fixes #3579
2019-12-20 11:29:21 +01:00
Alexander Boettcher
0a1bc1f4b7 nova: add requesting time of killed SCs
Fixes #3587
2019-12-19 17:01:42 +01:00
Stefan Kalkowski
f82714f341 vm_session: return vcpu id when creating vcpu
Ref #3553
2019-11-21 14:29:36 +01:00
Martin Stein
ead385dd17 base-nova: EFI sys-table pointer in platform info
Ref #3430
2019-08-13 12:02:03 +02:00
Alexander Boettcher
7ec37b2d8d vbox5: adjust to run with Fiasco.OC
- use priorities solely with nova
- handle exceptions during vCPU creation
- avoid assertion in vga_vbda
- silence compiler warnings about outdated register keyword

Issue #3111
2019-06-13 12:22:49 +02:00
Christian Helmuth
72478a9e31 nova: provide missing Rpc_entrypoint::is_myself()
The symbol is implemented by the common implementation but was missing
from the nova-specific fork of rpc_entrypoint.cc.
2019-06-13 12:22:48 +02:00
Alexander Boettcher
ab6315d6b4 vm_session: add fpu state for x86
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher
07ee9654e4 vm_session: consume spurious wakeups on nova
Issue #3111
2019-05-27 14:53:32 +02:00
Alexander Boettcher
b50e54b0a8 nova: adjust to g++ 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska
7fadfbbd9f Treat 'implicit fallthrough' errors as warnings
After fixing the warnings, the compiler option should be removed.

Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska
382371d9e4 nova: remove '-Wabi' compiler option
Fixes #3351
2019-05-27 14:46:53 +02:00
Christian Helmuth
22af4436f7 nova: log sp/bp on unresolvable exception 2019-05-16 13:11:03 +02:00
Christian Prochaska
940ba9ba95 base-nova: fix compile errors with GCC 8.3.0
Fixes #3325
2019-05-16 13:11:02 +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
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
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
526554741f vm_session: evaluate priority (nova)
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
3a1bbfad28 nova: implement vm_session interface
Issue #3111
2019-04-01 19:33:51 +02:00
Norman Feske
8f2212ea1e nova: disable -Wsuggest-override for the kernel
Issue #3159
2019-02-19 11:12:12 +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
Alexander Boettcher
2c969f1167 nova: skip smp revoke test in Qemu 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
Norman Feske
158650ff01 base-nova: remove signal-delivery failure warning
Fixes #3136
2019-01-30 13:55:19 +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
5120e5138c nova: avoid null pointer warnings
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
3824ad4756 nova: define kernel memory based on system memory
Switch to kernel branch, that determines the available system memory during
boot time. The overall kernel memory is still static, but during boot time
dynamically the amount can be chosen. Following 3 config option exists:

CONFIG_MEMORY_BOOT is the amount of kernel memory allocated in the BSS
statically - effectively chosen during link time - see linker script.

CONFIG_MEMORY_DYN_MIN && CONFIG_MEMORY_DYN_PER_MILL configures the dynamic
part of the kernel memory allocation applied during early kernel boot time.
CONFIG_MEMORY_DYN_MIN is the amount of memory which should be allocated at
least. CONFIG_MEMORY_DYN_PER_MILL defines the amount of the system memory in
per mill which should be allocated at most. The overall maximum kernel memory
is restricted to ~1G (64bit), due to the chosen internal virtual memory layout.

Fixes #2985
2018-09-21 13:19:19 +02:00
Alexander Boettcher
bc9f0fdc34 nova: lock pager object state during fault lookup
Fixes #2950
2018-09-05 11:10:02 +02:00
Alexander Boettcher
237f6a6a62 nova: provide microcode data via platform_info
Issue #2762
2018-08-28 16:46:05 +02:00
Martin Stein
fbe9d26c47 trace: initialize trace control in Thread::start
Previously, the trace control of a thread was initialized in its
constructor (which is generic for all components). This has the
disadvantage that the CPU-session-pointer member of the thread might not
be valid at this point. And it cannot be replaced by using the
"deprecated_env" CPU session neither as constructing the deprecated
environment in causes troubles in Core. But as the trace control
shouldn't be needed in Core anyway, the initialization can be moved to
the Thread::start implementation of non-core components. This code
already takes care of the CPU session pointer.

Fixes #2901
2018-08-02 14:36:35 +02:00
Alexander Boettcher
bac7ba6639 nova: remove echo thread in core
and replace by remote delegate syscall

Fixes #2895
2018-08-02 14:36:33 +02:00
Alexander Boettcher
0db81f66ae nova: propagate vga text info via platform_info
Issue #2880
2018-07-03 09:39:31 +02:00
Alexander Boettcher
3148b67288 nova: use kernel branch r10
- Reordering and cleanup of commits to form a common branch shared by others
- Add right bit to deny portal usage for cross-core IPC
- avoid GP when switching on AMD SVM if disabled by UEFI/BIOS

Issue #2854
2018-06-29 10:44:58 +02:00
Alexander Boettcher
193e14a489 grub2: avoid switching modes
to reduce flickering during boot

Issue #2778
2018-06-12 12:11:44 +02:00
Alexander Boettcher
70028f8445 nova: export kernel messages via memory
Fixes #2207
2018-06-12 12:11:37 +02:00
Alexander Boettcher
30c69e73b3 core: restrict mapping size recursively on regions 2018-05-31 12:28:15 +02:00