Commit Graph

4302 Commits

Author SHA1 Message Date
Stefan Kalkowski 0973215cf0 Adapt memory quota to recent Fiasco.OC changes
When introducing an avl-tree to re-find known capabilities in Fiasco.OC
(issue #112), the memory demand of apllications was slightly increased.
So we've to give the pl11x driver more memory by default. Fixes #140.
2012-03-06 17:02:48 +01:00
Sebastian Sumpf 10d7022395 ACPI: Handle indirect packages
Scan for packages outside of _PRT-methods (fix #141)
2012-03-06 16:59:02 +01:00
Norman Feske e4cb3ed929 Follow-up for spin-lock unification, ref #123 2012-03-01 10:57:05 +01:00
Stefan Kalkowski 319813a59b Merge spin-lock implementations
Separate spin-lock implementation from lock-implementation and put it into a
non-public header, so it can be re-used by the DDE kit's and Fiasco.OC's
capability-allocator spin lock. Fixes issue #123.
2012-02-29 15:41:17 +01:00
Norman Feske 72183f1536 Fix link in release notes
Thanks to ukn for reporting!
2012-02-28 18:19:41 +01:00
Norman Feske 0b385ea833 Fixed link in news item 2012-02-28 12:16:14 +01:00
Christian Helmuth 92171e9b86 Fiasco.OC: Reduce capability-allocator size
The old variant provided 8K capability slots to all processes on core,
which increased binaries by 180 KB for the static allocator. I reduced it
to 4K capabilities stay under 100 KB overhead for the allocator.

Anyway, pci_drv and pl11x_drv need more RAM quota now: 2M for pl11x_drv
and 1M for pci_drv.
2012-02-28 10:54:42 +01:00
Norman Feske d0d35cd9dd News item for release 12.02 2012-02-28 10:39:18 +01:00
Norman Feske 2bee333c12 Release notes for version 12.02 2012-02-28 10:39:15 +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
Stefan Kalkowski 8f42b58b53 Fiasco.OC: Fix unmap of kernel-capabilities
In the cap-session component in core when freeing a capability, the
corresponding kernel object should be unmapped from all processes and core.
Until now, the unmap operation for removing the kernel object didn't worked
because of using the wrong rights-map. This patch fixes it.

The re-use of capabilities introduced by the last patch triggered this
problem because its essential for the capability-registry to detect
invalidated capabilities.
2012-02-28 08:50:15 +01:00
Stefan Kalkowski 41eaff2cc6 Fiasco.OC: Re-use existing capability selectors
This is an interim fix for issue #112. This patch extends the
'Capability_allocator' class with the ability to register the global
ID of a Genode capability so that the ID gets associated with a
process-local kernel capability. Whenever a Genode capability gets
unmarshalled from an IPC message, the capability-allocator is asked,
with the global ID as key, whether the kernel-cap already exists.
This significantly reduces the waste of kernel-capability slots.

To circumvent problems of having one and the same ID for different kernel
objects, the following problems had to be solved:
* Replace pseudo IDs with unique ones from core's badge allocator
* When freeing a session object, free the global ID _after_ unmapping
  the kernel object, otherwise the global ID might get re-used in some
  process and the registry will find a valid but wrong capability
  for the ID

Because core aggregates all capabilities of all different processes, its
capability registry needs much more memory compared to a regular process.
By parametrizing capability allocators differently for core and non-core
processes, the global memory overhead for capability registries is kept
at a reasonable level.
2012-02-28 08:42:13 +01:00
Christian Prochaska c29b5f7da3 Fix lx_hybrid_ctors test for Ubuntu 11.10
On Ubuntu 11.10 the host library created for the 'lx_hybrid_ctors' test
doesn't get loaded, because the test object in the library is not being
used by the application. This commit fixes the problem by having the
application call a dummy function in the library.

Fixes #120.
2012-02-27 16:05:03 +01:00
Christian Prochaska 77a7207b42 Update the GDB monitor test documentation
The interactive GDB monitor test has changed recently. This patch updates
the documentation accordingly.

Fixes #126.
2012-02-26 13:52:20 +01:00
Sebastian Sumpf 7e00ef96ee ACPI: GSI parser, fix #34
Read GSIs from ACPI tables and rewrite PCI-config space IRQs
2012-02-26 13:37:33 +01:00
Sebastian Sumpf c2c87c8833 AHCI: MSI updates
Disable MSIs on device initialzation. Add ACPI-driver to run script
2012-02-26 13:37:14 +01:00
Sebastian Sumpf b6e355b841 Io_mem_session, fix #128
Free unaligned ranges correctly in range allocator
2012-02-26 13:36:43 +01:00
Norman Feske a9152ff412 Handle lifetime of dynamic allocations in Noux 2012-02-26 13:34:48 +01:00
Norman Feske 4e3be6b146 Pistachio: make sure to generate global thread IDs
The kernel distinguishes local from global IDs by looking at the lowest
6 bits of the thread ID (i.e., in 'L4_ThreadControl'). If those bits are
zero, the ID is interpreted as a local ID. Because those zero bits
overlap with the version bits of global IDs, this invariant could be
violated once the version of a global ID reaches 64. In this case,
'L4_ThreadControl' will return an error on the attempt to create a new
PD. To prevent this from happening, we always set the lowest bit to 1.
2012-02-25 14:40:49 +01:00
Christian Prochaska e085828725 Qt4 cleanup
- Remove example application source code files which also exist in contrib
- Outsource commonly used parts from target.mk files
- Store the current Qt version only in one place
- Add run scripts for the example applications

Fixes #127.
2012-02-24 23:46:10 +01:00
Norman Feske 780507f42b Implementation of wait4 syscall
The 'noux_bash.run' script has become able to present the user with an
interactive bash shell for executing various coreutils programs. It is
still pretty limited, i.e., the environment is not correctly passed to
child processes and pipes are not supported. But bash and coreutils are
operational.
2012-02-24 23:43:35 +01:00
Norman Feske 7e7d290008 Fixed missing counter increment in assign operator 2012-02-24 23:32:08 +01:00
Norman Feske 18d0b316d4 Add wait4 syscall to Noux, just blocking for now 2012-02-24 15:19:38 +01:00
Norman Feske 0bf0b31c54 Build jbig2dec as shared library, fix mupdf.run 2012-02-24 13:39:23 +01:00
Norman Feske 7c98268901 Noux cleanup and source documentation
This patch decomposes the former 'child.h' into several header files,
unifies the naming of classes, and adds source-code documentation.
2012-02-23 10:42:12 +01:00
Christian Prochaska 2bbf40d76a Update Qt4 to version 4.7.4
Fixes #124.
2012-02-23 10:42:12 +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 cbd4830977 Propagate new parent cap to forked process
This patch removes the hardcoded parent cap for the new child by
introducing a facility called 'poke' similar to copy-to-user. This
change makes the fork mechanism kernel-agnostic. The 'noux_fork'
test works on L4/Fiasco, OKL4, NOVA, Fiasco.OC, and L4ka::Pistachio.
Linux is not supported yet.
2012-02-23 10:42:11 +01:00
Norman Feske da5b0ff316 Remove unneeded libm from boot modules 2012-02-23 10:42:11 +01:00
Norman Feske 396a9ee273 Hook for re-establishing default LOG session 2012-02-23 10:42:11 +01:00
Norman Feske 1a833ebd30 Allow for overriding time-related libc functions
If using the libc for Noux programs, the default implementation of these
functions cannot be used because they rely on a dedicated
timeout-scheduler thread. Noux programs, however, are expected to
contain only the main thread. By turning the functions into weak
symbols, the noux libc-plugin can provide custom implementations.
2012-02-23 10:42:11 +01:00
Norman Feske fe2addf5b0 Noux: first functional version of fork
The resource virtualization layer has been extended to support sub RM
sessions because this feature is used by the dynamic linker. Currently,
the address space of the forking process is copied eagerly. However,
different dataspace types are treated differently. For example, only RAM
dataspaces are copied but no ROM dataspaces.

At the libc side, a setjmp/longjmp-based trampoline mechanism is used to
implement the continuation of the main thread inside the new process.
This procedure is also responsible for re-establishing the relationship
to the new process' parent as well as its Noux session.

This version is still in flux and has many rough edges. It is tied to
OKL4 for now.
2012-02-23 10:42:11 +01:00
Norman Feske 3ddf7d2b1b Let reload_parent_cap take the new cap as agument 2012-02-23 10:42:03 +01:00
Norman Feske decfe7c4bb Let process lib deal with fork semantics
The startup procedure of forked processes differs from Genode's
normal process creation by omitting all steps related to ELF loading
and the start of the main thread. To let the process lib support this
distinction, an invalid ELF-binary capability is handled as valid
argument now.
2012-02-22 15:56:45 +01:00
Norman Feske 759af6d9c1 Accessor to obtain parent cap of child
This is needed for the fork support of Noux.
2012-02-22 15:56:45 +01:00
Norman Feske 869c6e1df2 Noux: dim naming noise using the Genode namespace
Because 'Noux::Child' implements several abstract Genode interfaces, the
'Genode::' prefix became almost ubiquitous, making the code harder to
read. By importing the 'Genode' namespace into the 'Noux' namespace,
this patch remedies this inconvenience.
2012-02-22 15:56:45 +01:00
Norman Feske 5aaf04915c Intercept CPU session of Noux::Child
To implement fork semantics, we need to customize the bootstrapping of
the newly created process, in particular the startup of the main thread.
The CPU session interface provides a suitable hook. By virtualizing the
CPU connection of the process to core, we can defer (and parametrize)
the startup of the main thread. Furthermore, this enables us to detect
illegal attempts by the Noux process to create threads in addition to
the main thread.
2012-02-22 15:56:45 +01:00
Norman Feske 652a4afd51 Intercept RAM and RM of Noux processes
By letting Noux processes talk to service implementations local to the
Noux server, we can track RAM allocations and RM operations. This is
needed as a prerequisite to implement fork.
2012-02-22 15:56:45 +01:00
Norman Feske e4cefe58d5 Make Child's reference RAM session configurable
The 'Child' framework used to perform the transfer of session quota
using 'env()->ram_session()' as hard-wired reference account. When
locally virtualizing the RAM session supplied to the 'Child', this
policy does not work. When closing a session, core would try to transfer
session quota to the virtualized RAM service, which is of course not
possible. This patch makes the reference RAM session configable via the
'Child_policy' interface.
2012-02-22 15:56:45 +01:00
Norman Feske 15f0879402 Noux: skeleton for getpid and fork 2012-02-22 15:56:45 +01:00
Norman Feske f3fcb5f56f Facility for reinitializing Platform_env
The new function 'Platform_env::reload_parent_cap' triggers a reload
of the parent capability and its respective resources. It is needed
during the bootstrap of a new process forked from an existing Noux
process.
2012-02-22 15:56:45 +01:00
Norman Feske b6b05a032b Simple fork test and run script
Currently the test is failing because fork is not yet implemented.
2012-02-22 15:56:45 +01:00
Alexandre Bique 42c21e4582 Console: don't use buf for '-' and '0' padding
As buf is not sized depending on the padding, if a huge padding is put
in buf then we could see an overflow.
2012-02-16 09:11:39 +01:00
Alexandre Bique a3266f8ec7 Log console: flush sooner rather than later 2012-02-16 09:11:13 +01:00