Commit Graph

154 Commits

Author SHA1 Message Date
Norman Feske d6ee72d241 Fix file name 2012-11-29 09:55:09 +01:00
Martin Stein 1258126986 base_hw: Enable ldso test
Fix #527, fix #350
2012-11-28 22:51:13 +01:00
Norman Feske 0dbb5e1696 Propagate 'Range_allocator::alloc_aligned' errors
This patch reflects eventual allocation errors in a more specific way to
the caller of 'alloc_aligned', in particular out-of-metadata and
out-of-memory are considered as different conditions.

Related to issue #526.
2012-11-28 22:51:09 +01:00
Alexander Boettcher 7ee4b75156 Fix vesa_drv on native hardware
When vesa_drv tries to access values lying across region boundaries, the
second region may be not mapped.

Fixes #524
2012-11-27 20:08:54 +01:00
Sebastian Sumpf 7d8f446475 OSS: Open Sound System server
Currently supports Intel HDA, AC97, and ES1370 audio cards. See README
for further details.
2012-11-27 15:32:39 +01:00
Sebastian Sumpf 8ac3209aa8 DDE_KIT: Startup synchronization for IRQ thread
Wait until 'entry' function of IRQ threads is called.
2012-11-27 12:00:03 +01:00
Norman Feske ae4fdf6418 Run script for fork bomb test 2012-11-27 10:40:13 +01:00
Christian Prochaska 3b4115bc0c ldso: increase 'MEM_SIZE' in 'mmap()'
Fixes #521.
2012-11-26 20:58:10 +01:00
Norman Feske 0bcf55800f Eagerly map DMA buffers
This patch is a work-around for issue #452.
2012-11-26 09:45:20 +01:00
Stefan Kalkowski 5f81705488 Atapi: limit block count in DMA request (fix #514)
The block count in DMA requests is limited to 8 bit. Therefore,
if a client requests more than 255 blocks in a single packet request,
split the request in a loop.
2012-11-23 12:20:28 +01:00
Ivan Loskutov 5e66b6d5ed Add OMAP4 GPIO driver
Add Gpio session interface. Add test for Pandaboard.

Fixes #427
2012-11-23 12:20:27 +01:00
Norman Feske deb465e442 Improve robustness of chroot-related tests 2012-11-23 12:20:27 +01:00
Norman Feske 8e831d2224 base-linux: Support customization of UIDs and GIDs
With this patch, custom UIDs and GIDs can be assigned to individual
Genode processes or whole Genode subsystems.

The new 'base-linux/run/lx_uid.run' script contains an example of how to
use the feature.

Fixes #510
2012-11-22 09:21:48 +01:00
Norman Feske 959df5d46b Generalize handling of PD-session arguments
On Linux, we want to attach additional attributes to processes, i.e.,
the chroot location, the designated UID, and GID. Instead of polluting
the generic code with such Linux-specific platform details, I introduced
the new 'Native_pd_args' type, which can be customized for each
platform. The platform-dependent policy of init is factored out in the
new 'pd_args' library.

The new 'base-linux/run/lx_pd_args.run' script can be used to validate
the propagation of those attributes into core.

Note that this patch does not add the interpretation of the new UID and
PID attributes by core. This will be subject of a follow-up patch.

Related to #510.
2012-11-21 20:04:07 +01:00
Norman Feske bcabbe2c92 Add 'Thread_base::join()'
Using the new 'join()' function, the caller can explicitly block for the
completion of the thread's 'entry()' function. The test case for this
feature can be found at 'os/src/test/thread_join'. For hybrid
Linux/Genode programs, the 'Thread_base::join()' does not map directly
to 'pthread_join'. The latter function gets already called by the
destructor of 'Thread_base'. According to the documentation, subsequent
calls of 'pthread_join' for one thread may result in undefined behaviour.
So we use a 'Genode::Lock' on this platform, which is in line with the
other platforms.

Related to #194, #501
2012-11-19 12:43:34 +01:00
Christian Helmuth 2cdac0eb32 bomb test: stack size on 64-bit / dense logging 2012-11-15 12:58:47 +01:00
Martin Stein cfa0a40d5e base_hw & omap4: USB HID and framebuffer driver.
Implement 'Signal_receiver::pending()'.

Provide display-subsystem MMIO.

Avoid method ambiguousness in 'Irq_context' in
'dde_linux/src/drivers/usb/signal/irq.cc'
(it derives from two list element classes when using 'base_hw').

Enables demo scenario with 'hw_panda_a2'.
2012-11-14 16:36:50 +01:00
Martin Stein 612735732a base_hw & omap4: Timer driver.
Fix bug regarding idle thread in thread scheduling in
'base-hw/src/core/kernel.cc'.

Fix regarding signal submit in signal framework in
'base-hw/src/core/kernel.cc'.
2012-11-14 16:36:50 +01:00
Martin Stein 31d57a6257 Nested init on i.MX31 via base_hw. Rework base_hw.
Implies support for the ARMv6 architecture through 'base-hw'.

Get rid of 'base/include/drivers' expect of 'base/include/drivers/uart'.

Merge with the support for trustzone on VEA9X4 that came from
Stefan Kalkowski.

Leave board drivers in 'base/include/platform'.

Rework structure of the other drivers that were moved to
'base_hw/src/core' and those that came with the trustzone support.

Beautify further stuff in 'base_hw'.

Test 'nested_init' with 'hw_imx31' (hardware) and 'hw_panda_a2' (hardware),
'demo' and 'signal' with 'hw_pbxa9' (qemu) and 'hw_vea9x4'
(hardware, no trustzone), and 'vmm' with 'hw_vea9x4'
(hardware, with trustzone).
2012-11-14 16:36:41 +01:00
Norman Feske 5b4edeb031 Introduce 'Uart::Session' interface
The new 'Uart::Session' interface is an extension of the
'Terminal::Session' interface that allows for configuring UART-specific
parameters, i.e., the baud rate.
2012-11-07 13:43:09 +01:00
Norman Feske 21c22b8b5b Black-list 'tar_rom.run' on Linux 2012-11-06 17:16:06 +01:00
Norman Feske bb8d090922 Resolve possible ambiguity of 'strcmp' 2012-11-06 09:35:47 +01:00
Norman Feske b45242c50f Add chroot support to core
Since the recent move of the process creation into core, the original chroot trampoline
mechanism implemented in 'os/src/app/chroot' does not work anymore. A
process could simply escape the chroot environment by spawning a new
process via core's PD service. Therefore, this patch moves the chroot
support into core. So the chroot policy becomes mandatory part of the
process creation.  For each process created by core, core checks for
'root' argument of the PD session. If a path is present, core takes the
precautions needed to execute the new process in the specified chroot
environment.

This conceptual change implies minor changes with respect to the Genode
API and the configuration of the init process. The API changes are the
enhancement of the 'Genode::Child' and 'Genode::Process' constructors to
take the root path as argument. Init supports the specification of a
chroot per process by specifying the new 'root' attribute to the
'<start>' node of the process. In line with these changes, the
'Loader::Session::start' function has been enhanced with the additional
(optional) root argument.
2012-11-05 17:31:05 +01:00
Norman Feske 97162332c9 Whitespace fix 2012-11-05 17:31:04 +01:00
Norman Feske 371b8fd12d Remove mirroring of 'lx_rpath' in 'app/chroot'
Thanks to the exclusive use of SCM rights for delegating access rights
to memory objects and RPC entrypoints, Genode processes outside of core
won't need to access any files.
2012-11-05 17:31:04 +01:00
Christian Helmuth 7c77d0ee5f Prevent compiler warnings
Fixes #464.
2012-11-05 10:57:29 +01:00
Norman Feske 19a996bcb9 Follow gcc's suggestions about using braces 2012-11-01 17:04:06 +01:00
Norman Feske 3772a526f6 Remove superfluous include 2012-11-01 17:04:06 +01:00
Norman Feske d1de48e4a4 Fix narrowing issue reported by gcc-4.7 2012-11-01 17:04:03 +01:00
Torsten Hilbrich 06ce0a8ef1 loader: Fix warnings about uninitialized variable
g++ 4.4.5 outputs the following warnings in our code using the loader
session:

.../base/include/base/capability.h: In member function 'typename Genode::Trait::Call_return<typename IF::Ret_type>::Type Genode::Capability<RPC_INTERFACE>::call() const [with IF = Loader::Session::Rpc_view_geometry, RPC_INTERFACE = Loader::Session]':
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::width' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::height' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::buf_x' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::buf_y' may be used uninitialized in this function

This is easily fixed with providing a default constructor.

Because of the C++ rules regarding initialer lists code that used
them for View_geometry had to be modified to use a normal construction
call.  In my tests only Nitpicker had to be changed.
2012-11-01 14:48:18 +01:00
Norman Feske fb452ce6ba Add const qualifiers 2012-10-30 12:25:19 +01:00
Christian Prochaska 5a88e106df Define '__dso_handle' in shared libraries.
The '__dso_handle' symbol is needed when building with GCC 4.7.

Fixes #437.
2012-10-30 12:17:00 +01:00
Norman Feske 746f3d4603 Add missing variable initialization 2012-10-30 12:06:55 +01:00
Stefan Kalkowski 4a92eb5660 Implement VMM for Linux in VEA9x4 normal-world 2012-10-29 10:08:30 +01:00
Stefan Kalkowski 94ea3a0acb Move away drivers from generic base-repository
Driver definitions which are used by kernel/core in base-hw, and also by other
drivers (e.g. from the os repository) have to reside in the generic
base-repository, for instance some uart drivers. All drivers which are
interesting for one of the sites only (sp804 for timer driver, or
cortex_a9 cpu driver for base-hw) should reside in the respective repos.

Factorize cpu context out of Cortex A9 specific definitions. Moreover, there
is already a Cpu_state object containing all common ARM registers. We use
this as a base for the cpu context switching done by the base-hw kernel.
The Cpu_state class get extended by a cpu-exception field, that stores the kind
of exception raised when the corresponding context got interrupted. This
information is used not only by the base-hw kernel, but also by the TrustZone
VMM that is build currently.
2012-10-29 10:08:29 +01:00
Stefan Kalkowski 96d45c1159 Define board declarations in a more generic fashion
By naming all board declaration (previously in base/include/drivers/board) the
same way, and putting them in platform-specific include-pathes, we save additional
declaration redirection in the base-hw kernel, and in driver definitions.
2012-10-24 16:41:13 +02:00
Stefan Kalkowski d3902e8538 Make nic_bridge's MAC address range configurable
By adding a "mac=XX:XX:XX:XX:XX:XX" attribute/value pair to the nic_bridge's
configuration one can define the first MAC address from which the nic_brigde
will allocate MACs for it's clients. Note: that the least relevant byte will
be ignored, and ranges from 0-255. Fixes #424.
2012-10-24 16:39:02 +02:00
Christian Helmuth 502976dec1 PCI: log PCI device as bus:device.function tuple
Refers to comment in #417.
2012-10-18 21:51:54 +02:00
Martin Stein 9dba710989 Enable 'signal' test on 'base_hw'. 2012-10-12 13:10:45 +02:00
Sebastian Sumpf ff0c7825e4 ACPI/IRQ: Add interrupt mode to IRQ connection
Read flags (polarity/trigger) from MADT and add information to 'Irq_connection'
arguments.

Issue #390
2012-10-09 13:47:47 +02:00
Norman Feske 4a1b545770 Move 'Child' API implementation to library 2012-10-09 13:45:33 +02:00
Norman Feske b62492837d Move 'Static_root' to public place
The 'Static_root' class template has proven to be useful for more than
one program. So we expose it as part of the API in the os repository.
2012-10-08 15:08:26 +02:00
Norman Feske 64245dde3a Avoid superfluous compiler warnings
GCC warns about uninitialized local variables in cases where no
initialization is needed, in particular in the overloads of the
'Capability::call()' function. Prior this patch, we dealt with those
warnings by using an (unreliable) GCC pragma or by disabling the
particular warning altogether (which is a bad idea). This patch removes
the superfluous warnings by telling the compiler that the variable in
question is volatile.
2012-10-08 15:08:21 +02:00
Alexander Boettcher ec66788f11 NOVA: cleanup - remove _first_sel special handling
Replace dislocation of extern variables with simplistic convention
2012-10-08 15:08:12 +02:00
Christian Prochaska 56243820ee ram_fs: always set '_length' in 'File::truncate()'
Fixes #381.
2012-10-08 15:07:58 +02:00
Christian Prochaska e9ac4b653b Add support for symbolic links
This patch adds support for symbolic links in libc, libc plugins, file
system servers and Noux.

Fixes #322.
2012-10-08 15:05:02 +02:00
Alexander Boettcher 6862ab481a NOVA: drop special utcb handling of main thread
Unify handling of UTCBs. The utcb of the main thread is with commit
ea38aad30e at a fixed location - per convention.
So we can remove all the ugly code to transfer the utcb address during process
creation.

To do so also the UTCB of the main thread of Core must be inside Genode's
thread context area to handle it the same way. Unfortunately the UTCB of the
main thread of Core can't be chosen, it is defined by the kernel.

Possible solutions:
- make virtual address of first thread UTCB configurable in hypervisor
- map the utcb of the first thread inside Core to the desired location

This commit implements the second option.

Kernel patch: make utcb map-able
With the patch the Utcb of the main thread of Core is map-able.

Fixes #374

Noux actually uses the sp variable during thread creation and expects to be
set accordingly. This wasn't the case for the main thread, it was ever set
to the address of the main thread UTCB.
2012-10-04 14:35:38 +02:00
Christian Prochaska 9dc213b296 'Genode::Path': Remove superfluous slashes first
Fixes #367.
2012-09-25 13:18:36 +02:00
Stefan Kalkowski 5c36639031 Fix UDP checksum calculation (fixes #360)
Missing parantheses around the calculation of last byte address in a UDP
Packet led to dereferencing the wrong value, thereby the UDP checksum
calculation failed, whenever an odd byte-count UPD packet was calculated.
Many thanks to Markus Partheymueller who discovered this issue and its
resolution.
2012-09-24 09:17:59 +02:00
Stefan Kalkowski 62d81ae487 Timer: make ram_quota and stack platform-dependent 2012-09-19 14:28:36 +02:00