Commit Graph

33 Commits

Author SHA1 Message Date
Martin Stein 0c7c285079 mmio: provide basic verbosity
The verbosity must be enabled at two levels: at compile time
via an enum that switches the availability of verbosity code
and via two members of 'Mmio' named '_read_verbose' and
'_write_verbose'. The latter are initialized to 0 (change this to
enable verbosity globally) and can be used to locally enable
(or disable) verbosity in deriving classes.

Ref #753
2013-06-25 14:52:53 +02:00
Martin Stein 1c38667a96 base: Mmio::wait_for(...) for whole registers
Ref #706
2013-05-22 18:32:05 +02:00
Christian Prochaska 562ac7d059 64-bit fixes
Fixes #734.
2013-05-10 11:16:12 +02:00
Martin Stein 028ef7d776 mmio: fix bug in read/write array items
Fix #668
2013-05-06 11:11:04 +02:00
Stefan Kalkowski 04b8418b54 Let memcmp correspond to the C standard (fix #628)
By now, the memcmp implementation of Genode's basic string utilities just
returned whether two memory blocks are equal or differ. It gave no hint which
block is greater, or lesser than the other one. This isn't the behaviour
anticipated by implementations that rely on the C standard memcmp, e.g. GCC's
libsupc++, or the nic_bridge's AVL tree implementation.
2013-01-24 11:02:49 +01:00
Norman Feske 73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Sebastian Sumpf 1a30bac3ea base: fix memmove implementation
Also make 'memcpy' to behave like memmove on region overlap.

Issue #604
2013-01-10 21:19:22 +01:00
Martin Stein 28f81c4a9c base: avoid shift warning in register array
Fix #422
2013-01-08 11:36:52 +01:00
Martin Stein b7c1404fbf base & core: Use FIFO to queue RM faulters.
By now RM faulters are hold in a LIFO. Thus a starvation problem
occurs on managed dataspaces when multiple threads throw pagefaults
continuously.
2012-11-23 12:20:26 +01:00
Torsten Hilbrich 7d30ffc907 base: Fix a number of warnings about unused parameters
The warnings are shown if components using the genode base are
compiled with -Wextra -Wall enabled.

Fixes #489.
2012-11-14 16:38:38 +01:00
Norman Feske 0c76bc9cfd Add support for specialized session interfaces
This patch introduces principal support for extending session interfaces
with specialized functionality in a clean way. For example, an 'Uart'
interface may implement the 'Terminal' interface but also offers
additional functions for setting the baud rate. A service that
implements the 'Uart' service will then automatically announce both the
'Uart' and 'Terminal' services.
2012-11-07 13:43:04 +01:00
Alexander Boettcher 9eeec09ebe Fix log2 and alignment calculation - 64bit issue 2012-09-24 09:18:00 +02:00
Sebastian Sumpf 88ac32e3bb Base: New 'memcpy' implementation
Added CPU specific memcpy function ('memcpy_cpu'), which is tried first in
default 'memcpy'. Improved default 'memcpy' to copy eight byte chunks.
2012-08-07 22:21:54 +02:00
Martin Stein 66bec10276 Fix bug in MMIO framework and test it
Avoid that members of a inheritor overlay those of the
register- and MMIO-framework.

Beautify register- and MMIO-framework.
2012-07-31 12:08:03 +02:00
Norman Feske 693922d789 Support for 64-bit registers in 'util/register.h'
For 64-bit registers we cannot compute MASK and SHIFT values via enums
because enum values are always of type int. But we can use static member
functions instead. Furthermore, the patch fixes the type trait for
64-bit registers. (apparently, this access width was never used so far)
2012-07-25 19:14:06 +02:00
Norman Feske cfda8ac4ae Add bitfield polling support to MMIO framework 2012-07-09 15:07:32 +02:00
Martin Stein 4b90cba132 Boolean fields and strict write on Registers/MMIO 2012-05-29 13:54:58 +02:00
Martin Stein f01f42fdd7 Avoid ambiguousness of entry members in FIFO 2012-05-29 13:54:58 +02:00
Ivan Loskutov fa4935627a Fix error for 7th argument call_member 2012-03-30 19:55:55 +02:00
Ivan Loskutov 59221f9c17 Fix misprint 2012-03-30 19:47:35 +02:00
Stefan Kalkowski e34adf883c Introduce design pattern for uncopyable objects.
Introduce a new Noncopyable class, one can derive from to mark a class of
objects to be uncopyable. This way the compiler can check for any violations
for you.
2012-03-16 18:24:52 +01:00
Norman Feske 3e41ff7f23 Minor coding style fix
The 'detail' tag is not conform to the coding style. Tools may stumble
over it.
2012-02-28 08:50:15 +01:00
Martin Stein bf7a5c2b69 Review doc and style for release. ref #69 2012-02-23 10:42:12 +01:00
Martin Stein 70ae53fe3c Simplify interface of the MMIO framework, ref #69
Parameterize register and bitfield templates to always take their
bitwidth instead of the according types or width exponents as arguments.
2012-02-23 10:42:12 +01:00
Martin Stein 7044b264e6 Beautify class names in 'register.h' and 'mmio.h'
Replace 'Reg_array' in 'Genode::Mmio' by 'Register_array' and 'Subreg'
in 'Genode::Register', 'Genode::Mmio::Register'and
'Genode::Mmio::Register_array' by 'Bitfield'.

Update and beautify comments in the according headers and test programs.
2012-02-23 10:42:12 +01:00
Martin Stein e1285335ab Replace 'Subreg_array' with 'Reg_array'.
'Reg_array' contains items whose width can be the width of the register
storage type at a max. Nethertheless they can be smaller and iterate all
subregs that are covered by the item width. The array uses as much
successive instances of its storage type as needed.

The test 'run/util_mmio' also tests these new features heavily.
2012-02-23 10:42:12 +01:00
Martin Stein 01bb7536dd Complement test for MMIO framework
The run script 'run/util_mmio.run' runs a test over basic
functionalities of 'Mmio::Register' and 'Mmio::Register::Subreg'. The
test covers the functions 'read' and 'bits', 'set', 'clear' and 'get'.

Inline function in 'Mmio::Register::Subreg' whose definition otherwise
looks ugly.
2012-02-23 10:42:12 +01:00
Martin Stein 9329b91aca Extract more generic parts from 'Genode::Mmio'
To accommodate CPU registers, which have a structured layout but don't
depend on a region base address, this patch introduces the generic
'Genode::Register' and 'Genode::Subreg' to 'register.h'.
'Mmio::Register' and 'Mmio::Subreg' inherit from them.
2012-02-23 10:42:11 +01:00
Martin Stein 1f75ebe9e5 First version of generic MMIO access framework
The MMIO access framework consists of an abstraction for a contiguous
MMIO area with a base address set dynamically. Within this class 'Mmio'
are declarations for 'Register' and 'Subreg'. These two can be
parameterized statically via template parameters to create arbitrary
MMIO structures.

Whereas 'Register' relies to a POD like subregion of 'Mmio', 'Subreg'
relies to a MMIO region within a specific 'Register' and therefore is
smaller or equal then the storage type of its superior 'Register'.

Furthermore with 'Reg_array' and 'Subreg_array', there exists the
possibility to handle arrays of uniform contiguous registers or subregs
by index. 'Subreg_array' therefore abstracts from the width boundary of
its superior 'Register' and handles a steady distance between its
members in addition. Both also check array size limits.

Related to issue #69.
2012-02-23 10:42:11 +01:00
Norman Feske dc4f6871c3 Make argument types of min and max more flexible 2012-02-14 16:44:42 +01:00
Norman Feske 210eb98598 Support const RPC functions with no arguments
Until now, the RPC framework did not support const RPC functions. Rather
than being a limitation inherent to the concept, const RPC functions
plainly did not exist. So supporting them was not deemed too important.
However, there are uses of RPC interfaces that would benefit from a way
to declare an RPC function as const. Candidates are functions like
'Framebuffer::Session::mode()' and 'Input::Session::is_pending()'.

This patch clears the way towards declaring such functions as const.
Even though the patch is simple enough, the thorough support for
const-qualified RPC functions would double the number of overloads for
the 'call_member' function template (in 'base/include/util/meta.h'). For
this reason, the patch does support const getter functions with no
arguments only. This appears to be the most common use of such
functions.
2012-01-27 16:54:05 +01:00
Norman Feske 08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Genode Labs da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00