Commit Graph

629 Commits

Author SHA1 Message Date
Stefan Kalkowski
941e918b46 vmm: unify armv7/v8 virtualization
Fix #3638
2020-04-17 12:52:02 +02:00
Alexander Boettcher
22d71d5a8b os: use Mutex/Blockade
Issue #3612
2020-04-17 12:40:12 +02:00
Alexander Boettcher
dc90740549 nic_router: accept DHCP reply with missing option
The options are not always set, which throws exception. This leads to not
accepting the selected IP address.

Fixes #3716
2020-04-17 12:40:12 +02:00
Josef Söntgen
336228f357 os: handle SYNC packet in lx_fs
Call 'fsync(2)' on files and directories.

Fixes #3711.
2020-04-17 12:39:32 +02:00
45a74023a7 part_block: support for up to 128 sessions
Allow sessions for each of the 128 sessions supported by GPT.

Fix #3705
2020-03-26 11:38:59 +01:00
Martin Stein
ba55409c86 nic_router: keep dyn IP when updating domain obj
When updating the domain object of interfaces that stay with the same domain
during a reconfiguration, until now, the normal "detach raw" function was used.
This caused the old domain object to discard a dynamic IP config as all
interfaces detached. This caused interfaces also to discard network links
established with the old configuration although it wasn't necessary. Thus, now
we use a dedicated "detach" in case that an interface actually stays with its
domain. This new "detach" doesn't decrease the interface counter of the domain,
so, it'll not discard its dynamic IP config. If, however, during a
reconfiguration, there's no interface calling this function (all interfaces
move to another or no domain), the dynamic IP config is still discarded as
expected.

Fixes #3686
2020-03-26 11:38:55 +01:00
Martin Stein
c1b6000248 nic_router: don't call DHCP client on requests
Until now, the DHCP client was called also for DHCP requests when an interface
had a domain but yet no IP config. Now, an interface distinguishes between DHCP
requests and replies first and then accordingly calls the DHCP server or the
DHCP client if they're available. This also prevents that the DHCP client has
to handle packet headers other than that of DHCP.

Fixes #3681
2020-03-26 11:38:55 +01:00
Martin Stein
0a468a07a7 nic_router: fix lifetime of DHCP clients
Let the DHCP client be a constructible member of Interface that is constructed
only as long as the interface is attached to a domain with a dynamic IP config.
This prevents DHCP client timeouts from a period with dynamic IP config to
trigger after a reconfiguration to a static IP config. Furthermore, handle
DHCP-reply packets at an interface only when the DHCP client its constructed.
Otherwise drop such packets.

Ref #3681
2020-03-26 11:38:55 +01:00
Stefan Kalkowski
6d48b5484d hw: correct the ARM cache maintainance operations
This commit fixes the following issues regarding cache maintainance
under ARM:

* read out I-, and D-cache line size at runtime and use the correct one
* remove 'update_data_region' call from unprivileged syscalls
* rename 'update_instr_region' syscall to 'cache_coherent_region' to
  reflect what it doing, namely make I-, and D-cache coherent
* restrict 'cache_coherent_region' syscall to one page at a time
* lookup the region given in a 'cache_coherent_region' syscall in the
  page-table of the PD to prevent machine exceptions in the kernel
* only clean D-cache lines, do not invalidate them when pages where
  added on Cortex-A8 and ARMv6 (MMU sees phys. memory here)
* remove unused code relicts of cache maintainance

In addition it introduces per architecture memory clearance functions
used by core, when preparing new dataspaces. Thereby, it optimizes:

* on ARMv7 using per-word assignments
* on ARMv8 using cacheline zeroing
* on x86_64 using 'rept stosq' assembler instruction

Fix #3685
2020-03-26 11:38:55 +01:00
Sebastian Sumpf
103dcdeea8 vmm: ARMv8 virtio improvements
net:
* increase queue size to 1024 (more stable on Linux)
* use mac address from Nic session instead of random one
* handle data that is larger than rx descriptor correctly (copy less)
* clear descriptor header (12 bytes) on rx

generic:
* always use 'avail_idx' (tx and rx)
* added barriers when reading/writing queues (TMP)

Ref #3620
2020-02-27 14:46:59 +01:00
Sebastian Sumpf
f77531138a vmm: ARMv8 virtio for network and console
Simple console and network implementation of the Virtio protocol.

Fix #3620
2020-02-27 14:46:59 +01:00
Sebastian Sumpf
c8b3b060aa vmm: ARMv8 add 'local_address' to Ram_allocator
Ref #3620
2020-02-27 14:46:59 +01:00
Stefan Kalkowski
7780ee6a34 vmm: do not lock inside VMM
We do not use the VMM with several CPUs until now.
On the other hand there is a dead-lock due to the
generic timer calling the cpu handler function explicitly,
which already holds the lock. For the time-being remove the lock.

Ref #3620
2020-02-27 14:46:59 +01:00
Stefan Kalkowski
2e2625e952 vmm: check ring-buffer capacity in pl011 model
Ref #3620
2020-02-27 14:46:58 +01:00
Stefan Kalkowski
55c3eb7c14 vmm: fix GIC interrupt register bit shifts
Ref #3620
2020-02-27 14:46:58 +01:00
Sebastian Sumpf
3995d2f4a2 part_block: switch to Request_stream and Job APIs
- use Job API as block connection back end
- use Request_stream API as front end
- use Mmio framework for gpt and mbr parsing
- implement sync correctly

fixes #3652
2020-02-27 14:46:57 +01:00
Norman Feske
a888041ba4 cached_fs_rom: fix file-handle leak
Fixes #3634
2020-02-20 12:08:16 +01:00
Martin Stein
d56b21d329 nic_router: do not change ethernet header as hub
When forwarding domain-local traffic like a hub, the NIC router shouldn't
modify packets at all.

Fixes #3625
2020-02-10 14:21:47 +01:00
Christian Prochaska
d8e2c95597 vfs server: ensure retry for stalled session
Fixes #3600
2020-02-04 15:51:09 +01:00
Christian Helmuth
cebc963396 Cleanup linux_rtc_drv and lx_fs target.mk
Original patch by Roman Iten and Pirmin Duss.

Issue #3466
2019-12-19 17:01:42 +01:00
091e5157aa vfs server: fix File_system namespace warnings
Issue #3564
2019-12-19 16:59:03 +01:00
Alexander Boettcher
2778debc29 ram_fs: close open nodes on session close
Fixes #3559
2019-11-22 15:59:13 +01:00
Norman Feske
6e098a9d17 ram_fs: apply session policy to write / mtime ops
This patch extends the distinction between read-only and writeable
sessions to packet-stream operations for WRITE and WRITE_TIMESTAMP.
2019-11-21 16:21:19 +01:00
Norman Feske
4622ddb46f nitpicker: add version attribute in clicked report
This patch addresses a corner case where the nitpicker focus is not
solely defined by mouse clicks or (exclusively) by a window manager, but
by a policy component that takes mouse clicks and other policy (e.g.,
a lock screen) into account. It ensures that each click that follows a
focus change (however initiated) results in a new "clicked" report even
when the report looks the same. To allow the policy component to
uniquely distiguish subsequent reports, the report features a new
'version' attribute.

Fixes #3493
2019-11-21 14:31:52 +01:00
Stefan Kalkowski
972e1893c9 os: introduce vmm component for ARMv8
Fix #3553
2019-11-21 14:29:36 +01:00
Norman Feske
3aaed7188f ram_fs: tie writeable bit to session policy
Related to issue #3507
2019-11-21 14:26:01 +01:00
Norman Feske
ee64e29e77 vfs server: tie writeable bit to session policy
This patch let the VFS server reflect the session policy via the
writeable bit in directory entries instead of merely forwarding the bit
from the respective VFS plugin. This way, all files originating from a
read-only file-system session automatically appear in directory listings
as read-only files.

Related to issue #3507
2019-11-21 14:25:43 +01:00
Norman Feske
9b7915facb vfs server: redesigned internal control flow
This patch reworks the VFS server to become easier to understand.

- The packet-stream handling is hidden from the node types.

- Introduced the notion of a "job" as an abstraction from the raw packet
  stream.

- The processing of requests is split into three phases:
  (1) accepting new jobs,
  (2) the execution of jobs, and
  (3) the delivery of acknowledgements.

- There is no longer a global fifo of pending nodes. Instead, each
  session has a fifo of "active" nodes, which are nodes that wait
  for the completion of jobs.

- The Io_node type no longer uses virtual functions as hooks for
  the derrived classes. Instead, it provides a number of utility
  functions.

- The control flow of the 'Io_progress_handler' is now the same as
  for the session-local packet-stream handler.

- Removed dependency from 'file_system/node.h', which is a relic
  from the ram_fs.

While reworking the code, the following semantic changes were made
additionally.

- The handling of SEEK_TAIL no longer overwrites the file content at the
  end of the file.

- Removed diagnostic message at session-creation time.

- Write loop for continuous files

Issue #3547
Issue #2303
2019-11-19 14:54:13 +01:00
Josef Söntgen
f5c5479faa ram_block: use Number_of_bytes to parse block size
Using this helper rather than parsing as size_t directly allows use to
use size suffixes, e.g. K, M, G.

Fixes #3540.
2019-11-19 14:44:02 +01:00
Martin Stein
0ad0153626 nic_router: fix broken uplink label on re-config
Uplink labels were stored in the uplink objects as reference. As uplink objects
may be re-used on re-configuration to avoid unnecessary closing and re-opening
of NIC sessions, the label reference could get invalid as the object that
stored the label content didn't get re-used. Thus, the label is now copied to
the uplink object.

Fixes #3529
2019-11-19 14:42:23 +01:00
Martin Stein
cd37bff514 nic_router: do not report while re-configuring
Fixes #3528
2019-11-19 14:42:23 +01:00
Martin Stein
27c2a66bbd nic_router: report link state
This adds two new boolean attributes to the <report> tag of the NIC router
configuration 'link_state' and 'link_state_triggers'. The former decides
whether to report the link state of each NIC interface (downlink, uplinks) at
the NIC router. The other decides whether to trigger reporting each time the
link state of an interface changes.

Fixes #3527
2019-11-19 14:42:23 +01:00
Martin Stein
58247737fd nic_router: free MAC on session-creation exception
If a MAC address was once allocated for a downlink and during the further
creation of the downlink an exception caused the creation to be aborted, the
NIC router didn't free the MAC address again.

Ref #3525
2019-11-19 14:42:23 +01:00
Martin Stein
ebcca179ed nic_router: fix 'catch' paths in session creation
The handling of exceptions during session creation implies freeing and
detaching the RAM DS behind the session env and session component. But this
was done using the session env located in the same RAM DS, which must
lead to problems. Now, the session env from the RAM DS is copied to the stack
and the operations are done on this temporary instance instead.

Ref #3525
2019-11-19 14:42:22 +01:00
Martin Stein
0ed5655086 nic_router: do DHCP when re-config to dynamic IP
When re-configuring a domain from using a static IP config to using a dynamic
IP config, attached interfaces didn't react with doing DHCP discover. This bug
is fixed now and the nic_router_flood test was adapted in a way that it tests
the described behavior.

Fix #3518
2019-11-19 14:42:22 +01:00
Norman Feske
5bb366513b Remove os/src/app/cli_monitor
Nowadays, we use standard command-line tools like vim to edit init
configurations dynamically, which alleviates the need for a custom CLI.
The CLI-monitor component was too limited for use cases like Sculpt
anyway.

The patch also removes the ancient (and untested for long time)
terminal_mux.run script, which used to be the only remaining user of the
CLI monitor.

Issue #3512
2019-11-19 14:23:56 +01:00
Norman Feske
5ab1505d43 file system: enhanced file status info
This patch extends the 'File_system::Status',
'File_system::Directory_entry', and the related 'Vfs' types with
the following additional information:

- Distinction between continuous and transactional files (Node_type)
  (issue #3507)
- Readable, writeable, and executable attributes (Node_rwx),
  replacing the former 'mode' bits
  (issue #3030)

The types 'Node_rwx', 'Node_type' are defined twice,
once for the VFS (vfs/types.h) and once for the 'File_system'
session (file_system_session/file_system_session.h).
Similarly, there is a direct correspondance between
'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'.

This duplication of types follows the existing pattern of keeping the
VFS and file-system session independent from each other.
2019-11-19 14:23:56 +01:00
Christian Helmuth
edc9545229 input: move control-modifier handling into clients
Moving the handling into the input-session clients enables more
sophisticated implementations (like Qt5) to apply key-symbol based
handling of those modifiers like correct CTRL-A with QWERTY and AZERTY
layouts and distinction of CTRL-J and Return.

Issue #3483
2019-11-19 14:23:54 +01:00
Christian Helmuth
bbd27a54d3 input_filter: fix de_de/fr_fr character generators
Issue #3483
2019-11-19 14:23:54 +01:00
Norman Feske
6a063364da fs_rom: adaptation to added file-modification time
Issue #1784
2019-11-19 14:17:30 +01:00
Josef Söntgen
99b632f86c server/vfs: add modification time
Issue #1784.
2019-11-19 14:17:30 +01:00
Josef Söntgen
2e5166efd7 lx_fs: add modification time
Issue #1784.
2019-11-19 14:17:30 +01:00
Josef Söntgen
2ec3aaf639 file_system_session: add modification time
* add modification_time member
* add WRITE_TIMESTAMP packet
2019-11-19 14:17:30 +01:00
Pirmin Duss
d953030c0e lx_fs: respect writeable session argument
Fixes #3492
2019-09-12 12:28:41 +02:00
Christian Helmuth
701b1d41e8 input_filter: update character generators
This adds complete character-generator configurations for English (US),
German (Germany and Switzerland), and French (France and Switzerland).
The configs are manually amended and stripped-down versions of
xkb2ifcfg generated configs.

Issue #3483
2019-08-28 14:22:33 +02:00
Christian Helmuth
ca850c787f input_filter: dead-key sequence support
Issue #3483
2019-08-28 14:22:32 +02:00
Norman Feske
ceae637416 part_block: support for AHDI partition scheme
This patch enhances part_block with support for parsing the AHDI
partition scheme, and the detection of the GEMDOS variant of FAT as used
by Atari TOS. As a side effect of the implementation, the patch improves
the MBR parsing code by avoiding pointers and using const qualifiers.

Fixes #3470
2019-08-21 12:37:00 +02:00
Norman Feske
6399fc12ac clipboard: allow for dynamic reconfiguration 2019-07-09 08:58:38 +02:00
Norman Feske
db6e013577 clipboard: match client labels against focus
When setting the config attribute 'match_labels="yes"', the clipboard
performs plausibility checks for copy and paste operations against the
nitpicker focus.

Issue #3437
2019-07-09 08:58:38 +02:00
Josef Söntgen
d32e8390c2 os: remove trace_fs
This component is superseded by the 'vfs_trace' plugin.

Issue #3294.
2019-07-09 08:55:24 +02:00