Commit Graph

85 Commits

Author SHA1 Message Date
Emery Hemingway 55c0a947e4 Move generic fs helpers to os/include/file_system
Fixes #1488
2015-05-06 10:55:17 +02:00
Christian Helmuth eee0bf5ab2 init: abort request on invalid route
Fixes #1423
2015-05-06 10:55:16 +02:00
Martin Stein c9272937e7 CPU session: apply quota via relative weightings
Physical CPU quota was previously given to a thread on construction only
by directly specifying a percentage of the quota of the according CPU
session. Now, a new thread is given a weighting that can be any value.
The physical counter-value of such a weighting depends on the weightings
of the other threads at the CPU session. Thus, the physical quota of all
threads of a CPU session must be updated when a weighting is added or
removed. This is each time the session creates or destroys a thread.

This commit also adapts the "cpu_quota" test in base-hw accordingly.

Ref #1464
2015-05-06 10:55:16 +02:00
Josef Söntgen 0383c68bf6 os: use async IRQ interface in Irq_activation
Issue #1456.
2015-04-23 16:48:00 +02:00
Josef Söntgen 85599c072f os: use async IRQ and server lib in drivers
Use the new asynchronous IRQ interface in the mostly used drivers, e.g.:

* ahci_drv: x86/exynos5
* gpio_drv: imx53/omap4
* input_drv: imx53/dummy
* ps2_drv: x86/pl050
* timer_drv

Now, the Irq_session is requested from Gpio::Session:

From now on we use an asynchronous IRQ interface. To prevent triggering
another GPIO IRQ while currently handling the former one, IRQs must
now by acknowledged explicitly. While here, we also changed the GPIO
session interface regarding IRQ management. The generic GPIO component
now wraps the Irq_session managed by the backend instead of using the
GPIO backend methods directly. A client using the GPIO session may
request the Irq_session_capability by calling
'Gpio::Session::irq_session()' and can use this capability when using
a local Irq_session_client.

Issue #1456.
2015-04-23 16:47:59 +02:00
Norman Feske eaab23c012 base: const-correctness of Allocator interface
This patch adds const qualifiers to the functions Allocator::consumed,
Allocator::overhead, Allocator::avail, and Range_allocator::valid_addr.

Fixes #1481
2015-04-17 16:13:22 +02:00
Norman Feske 847ddbf72e os: Remove new operator from packet_stream.h 2015-04-17 16:13:22 +02:00
Norman Feske 270f1068cb os: Move Ring_buffer to Genode namespace
Fixes #1479
2015-04-17 16:13:21 +02:00
Norman Feske d9d65aa86b base: use reference for ascii_to output argument
Issue #1477
2015-04-17 16:13:19 +02:00
Norman Feske d884cf1a9a base: unify ascii_to conversion functions
This patch addresses the first point of the issue #1477, namely
replacing the function-template magic by plain function overloads.

Issue #1477
2015-04-13 14:18:16 +02:00
Christian Prochaska 0fd53c7fe4 Extract numeric string arguments with the correct signedness
There are lots of places where a numeric argument of an argument string
gets extraced as signed long value and then assigned to an unsigned long
variable. If the value in the string was negative, it would not be
detected as invalid (and replaced by the default value), but become a
positive bogus value.

With this patch, numeric values which are supposed to be unsigned get
extracted with the 'ulong_value()' function, which returns the default
value for negative numbers.

Fixes #1472
2015-04-13 14:18:15 +02:00
Norman Feske 87f13d77c0 Omit timer RPC calls for usleep(0) 2015-04-09 16:04:46 +02:00
Norman Feske 26442f782b os: add 'clock_rate' to Rpi platform driver 2015-04-09 16:04:46 +02:00
Norman Feske eaac3cc1bd Revised API documentation
This patch curates the API documentation to become suitable for the
functional specificaton, which is partially generated from the header
files.
2015-04-09 16:04:46 +02:00
Norman Feske e1b4408090 os: turn Xml_node::Attribute to Xml_attribute
Moving the XML attribute class to the Genode namespace simplifies the
API.
2015-04-09 16:04:45 +02:00
Josef Söntgen dd47129bef nic session: link-state change handling
A Nic::Session client can install a signal handler that is used to
propagate changes of the link-state by calling 'link_state_sigh()'.
The actual link state is queried via 'link_state()'.

The nic-driver interface now provides a Driver_notification callback,
which is used to forward link-state changes from the driver to the
Nic::Session_component.

The following drivers now provide real link state: dde_ipxe, nic_bridge,
and usb_drv. Currently, OpenVPN, Linux nic_drv, and lan9118 do not
support link state and always report link up.

Fixes #1327
2015-03-27 11:53:13 +01:00
Josef Söntgen e4f6fca355 packet_allocator: catch expection when calling free()
If a client acknowledges the same packet more than once, the packet also
gets freed more than once. At the second attempt the underlaying
Bit_array will throw an 'Invalid_clear' exception, which results in an
uncaught exception that leads to an abort() call in the freeing
component.

Fixes #1462.
2015-03-27 11:53:13 +01:00
Norman Feske 560a58e5c6 Move packet stream to Genode namespace, fix #1455 2015-03-19 08:57:22 +01:00
Norman Feske 001b069509 Simplify base/semaphore.h, fix #1453 2015-03-19 08:57:21 +01:00
Norman Feske 2ddf941660 Abandon Init::Traditional_child_policy, fix #1449 2015-03-19 08:57:20 +01:00
Alexander Boettcher 71c3fa53da os: add input touch event type
Issue #1444
2015-03-19 08:57:18 +01:00
Norman Feske e8336acafc base,os: Coding-style unification
Fixes #1432
2015-03-13 12:17:23 +01:00
Martin Stein c78efd4428 odroid_xu: prevent tests with sd/platform/ahci/fb
Drivers like SD-Card, platform, AHCI, and framebuffer are specified as Exynos5
compliant. But they are at least not compliant with Odroid-XU although this is
Exynos5. Thus, prevent tests that rely on such drivers when building for
hw_odoid_xu. Furthermore, make previous Arndale regulator/consts.h,
uart_defs.h, and some Board_base enums available to all Exynos5 builds to
enable at least building the drivers.

Fixes #1419
2015-02-27 11:48:36 +01:00
Christian Prochaska 70540e6f8e Improve 'Timed_semaphore' accuracy
Fixes #1421
2015-02-27 11:48:07 +01:00
Alexander Boettcher 8c66a4b1be base: support phys range specifier in ram_session
Fixes #696
2015-02-16 13:40:38 +01:00
Alexander Boettcher 95ff5ba11d base: support range restriction in allocator
Issue #696
2015-02-16 13:40:38 +01:00
Josef Söntgen 4ca1284e0e vfs: do not return early on directory operations
When returning early on directory operations, file systems that might
be able to handle the request but come after the current one are not
tried.

Fixes #1400.
2015-02-16 13:40:36 +01:00
Josef Söntgen 0a835e4ce9 os: structured timestamp in Rtc session
Instead of returning an uint64_t value, return a structured time stamp.
This change is only visible to components using Rtc_session directly.

Fixes #1381.
2015-02-16 13:40:34 +01:00
Sebastian Sumpf 0c2bdf9edd usb_drv: Remote USB driver interface
Issue #1329
2015-02-16 13:40:33 +01:00
Christian Helmuth 86eb3f4a0d rtc: rename get_current_time() to current_time()
Issue #1344
2015-01-26 12:28:41 +01:00
Alexander Boettcher 0f18ecc142 base: handle input overflow exception
Fixes #1348
2015-01-09 11:52:06 +01:00
Sebastian Sumpf 6f8f9085f3 os: Add virtual destructor to block driver
Fixes #1339.
2015-01-06 15:10:17 +01:00
Martin Stein 16b4e7d73a os: add missing include in vea9x4/pl011_defs.h
fix #1303
2014-11-28 12:02:38 +01:00
Martin Stein 8f9355b360 thread API & CPU session: accounting of CPU quota
In the init configuration one can configure the donation of CPU time via
'resource' tags that have the attribute 'name' set to "CPU" and the
attribute 'quantum' set to the percentage of CPU quota that init shall
donate. The pattern is the same as when donating RAM quota.

! <start name="test">
!   <resource name="CPU" quantum="75"/>
! </start>

This would cause init to try donating 75% of its CPU quota to the child
"test".  Init and core do not preserve CPU quota for their own
requirements by default as it is done with RAM quota.

The CPU quota that a process owns can be applied through the thread
constructor. The constructor has been enhanced by an argument that
indicates the percentage of the programs CPU quota that shall be granted
to the new thread. So 'Thread(33, "test")' would cause the backing CPU
session to try to grant 33% of the programs CPU quota to the thread
"test". By now, the CPU quota of a thread can't be altered after
construction. Constructing a thread with CPU quota 0 doesn't mean the
thread gets never scheduled but that the thread has no guaranty to receive
CPU time. Such threads have to live with excess CPU time.

Threads that already existed in the official repositories of Genode were
adapted in the way that they receive a quota of 0.

This commit also provides a run test 'cpu_quota' in base-hw (the only
kernel that applies the CPU-quota scheme currently). The test basically
runs three threads with different physical CPU quota. The threads simply
count for 30 seconds each and the test then checks wether the counter
values relate to the CPU-quota distribution.

fix #1275
2014-11-28 12:02:37 +01:00
Alexander Boettcher 0b194c9689 init: restrict cpu_sessions to configured affinity
Fixes #1289
2014-11-14 12:01:45 +01:00
Christian Helmuth 20afccf6ed vfs: use 256-byte buffer in log file system
128 bytes is not much for logging-output line length esp. when also
counting the color sequences of PDBG() and friends.
2014-11-12 14:44:16 +01:00
Christian Helmuth f8dcf76480 dde_kit: panic does not return
The attributes enables to use panic as final statement in branches of
functions declared to return.
2014-11-12 14:44:16 +01:00
Norman Feske e4c636b0a0 init: clamp priority values to valid range
This patch ensures that priority values passed as session arguments
are within the valid range of priorities. Without the clamping, a child
could specify a priority of a lower priority band than the one assigned
to the subsystem. Thanks to Johannes Schlatow for reporting this issue.

Fixes #1279
2014-11-12 14:44:15 +01:00
Josef Söntgen 35239b84df dde_kit: remove jiffies alias
The alias is rather Linux-specific and also prevents particularly
tailored jiffies implementations. For the existing dde_linux ports (usb
and lxip) we just define jiffies to be dde_kit_timer_ticks with a
preprocessor macro.
2014-10-21 11:05:15 +02:00
Norman Feske 08d28e9b94 nitpicker: add 'session_control' RPC function
The new 'session_control' function can be used to perform operations on
the global view stack that span one or multiple sessions, e.g., bringing
all views of specific sessions to the front, or hiding them.
2014-10-13 15:21:54 +02:00
Norman Feske 2f5cff5347 os: add 'Attached_dataspace::invalidate' 2014-10-13 15:21:54 +02:00
Norman Feske b2b5d1b2d2 os: make reusable cli_monitor headers public
The child handling as done by CLI monitor is worth reusing. Hence, this
patch moves the corresponding headers to 'os/include/cli_monitor/'.
2014-10-13 15:21:54 +02:00
Norman Feske 28119e3536 os: add 'Reporter::name' accessor 2014-10-13 15:21:54 +02:00
Norman Feske 13bce287ad os: add 'Xml_node::for_each_sub_node'
The new function template simplifies the common case of iterating
through the sub nodes of an XML node.
2014-10-13 15:21:53 +02:00
Norman Feske 3a1ecdd5a7 os: fix race in 'os/child_policy_dynamic_rom.h' 2014-10-13 15:21:53 +02:00
Norman Feske c48a4ebce8 os: add texture_rgb888.h and texture_rgb565.h
The headers 'texture_rgb565.h' and 'texture_rgb888' contain
template specializations needed for using the 'Texture::rgba' function
for the respective pixel formats. The specializations were formerly
contained in application-local code.
2014-10-13 15:21:53 +02:00
Norman Feske 40d92b7cec os: improve alpha-channel support for Pixel_rgba
This patch add an optional alpha argument to the constructor, which may
be passed to a pixel type representing an alpha channel. Furthermore,
a new overload of the mix function has been added to accommodate use
cases where one texture is applied to both a pixel surface and an alpha
channel.
2014-10-13 15:21:53 +02:00
Norman Feske b01c74ae12 os: define ALPHA8 pixel format 2014-10-13 15:21:53 +02:00
Norman Feske e20c27c9ab init: use file name as label for redirected ROMs 2014-10-13 15:21:52 +02:00
Christian Prochaska d7c2a5cd7f VFS: acquire tar dataspace only once
Fixes #1271
2014-10-13 08:43:55 +02:00