Commit Graph

1613 Commits

Author SHA1 Message Date
Josef Söntgen c10ad4ff01 ps2_drv: back down after unsucessful AUX access
The driver might end up in an endless loop on systems that do not
contain an i8042 controller when probing the AUX interface. This
leads to busy looping and in the end to not annoucing the Input
service. Components that wait for the announcement of the service
will therefore hang as well.

Normally a service gets announced only if it is usable but in this
case this is inconvient because it renders all scenarios that use
the input_merger non working on x86 systems that only provide USB
input and do not have PS/2 at all.

Ideally, the PS/2 driver should only be started if the system needs it.
That is currently not feasible and for the time being we post-pone the
inevitable and back down after several unsucessful attempts to read
from the AUX interface while initializing the driver.

Fixes #1871.
2016-02-05 10:59:10 +01:00
Alexander Boettcher f572cf8a05 nova: stop submitting signals on dead sm caps
Fixes #1877
2016-02-05 10:57:04 +01:00
Alexander Boettcher 73de12999d ahci: fix ready status handling of ahci ports
Fixes #1875
2016-02-05 10:52:48 +01:00
Josef Söntgen 46e4c3dc9b usb_drv: release interfaces on Usb session close
Interfaces that have been claimed by a component always have to be
released when the session is closed in case the component
malfunctioned.

Fixes #1869.
2016-02-05 10:47:45 +01:00
Josef Söntgen 245dfc2c08 dde_ipxe: fix probing multiple NICs
Fixes #1870.
2016-02-05 10:47:45 +01:00
Christian Helmuth 81ff63c66b vfs stress: prevent warnings when logging size_t
Thanks @gapry for the observation.

Fixes #1868
2016-02-05 10:47:45 +01:00
Christian Helmuth 4506912f6e dde_ipxe: skip MAC/PHY reset on Intel NICs
Inspired by the mailing-list posting [1], this commit removes the
MAC/PHY reset for all Intel cards and effectively prevents the bandwidth
drop to 10 MBit/s (e.g., on i217lm). I understand it as preliminary fix
for practical reasons - a real fix would be to update the ipxe port and
monitor for more postings like the one mentioned.

[1] http://lists.ipxe.org/pipermail/ipxe-devel/2015-December/004511.html
2016-02-05 10:47:45 +01:00
Christian Helmuth 20c9b02326 Mark Server::Entrypoint noncopyable 2016-02-05 10:47:45 +01:00
Stefan Kalkowski 3bfd2aa3c9 nic_bridge: use the server framework (fix #1865)
Let the Server::Entrypoint do all the work: RPC and signal handling.
Additionally get rid of the Net::Env global environment.
2016-02-05 10:47:45 +01:00
Josef Söntgen 71b621775b vbox: remove USB (OHCI) pass-through support
The usage of the USBProxyDevice is no longer necessary because USB
pass-through is now supported by using the xHCI device model.

Issue #1863.
2016-02-05 10:47:44 +01:00
Josef Söntgen a62859bb39 vbox: Enable XHCI + usb filter in runscript
Issue #1863.
2016-02-05 10:47:44 +01:00
Josef Söntgen 6a2aa903ca vbox: xHCI device model for USB pass-through
This device model enables USB2 and USB3 device passthrough support
for guests running in VirtualBox. It uses the qemu-usb library.

Fixes #1863.
2016-02-05 10:47:44 +01:00
Sebastian Sumpf b2a1129bd9 vbox: support unaligned mmio writes
Issue #1863
2016-02-05 10:47:43 +01:00
Sebastian Sumpf a640be9a24 qemu-usb: xHCI model as library
NEC USB3 controller ported from Qemu 2.4.1. See README for more
details.

Issue #1863.
2016-02-05 10:47:43 +01:00
Josef Söntgen e233fe0b71 os: add component for filtering USB devices report
The 'usb_report_filter' component takes the devices report from the
USB driver and generates a new devices report after checking each
entry against its device white-list. Before emitting the new report
it changes the configuration of the USB driver to contain the
required policy entries.

See 'repos/os/src/app/usb_report_filter/README' for more details.

Issue #1863.
2016-01-27 16:15:34 +01:00
Sebastian Sumpf 716eab21e3 usb_drv: change Usb session and raw driver
- Use 'label' attribute to identify device instead of
  bus/dev and vendor_id/product_id

- Implement release_interface RPC

- Report 'label' as well as 'bus' and 'dev'

- Add policy handling to raw driver (includes reconfiguration
  at runtime)

- Use own memory backing store for large DMA allocations

Issue #1863.
2016-01-27 16:15:34 +01:00
Christian Helmuth 3daa8a3d04 report_rom: update documentation of policy config 2016-01-26 16:50:20 +01:00
Josef Söntgen 8982bc5843 intel_fb_drv: handle displays with EDID extensions
Fixes #1860.
2016-01-26 16:25:54 +01:00
Christian Helmuth 2a698ffd5f signal: prevent submission of contexts w/o receiver
This prevents a sporadic null-pointer dereference in the nic_loopback
test, which occurred once in 100 runs. I'm not sure if there's still a
race window (we may investigate) with context dissolve.
2016-01-26 16:20:47 +01:00
Stefan Kalkowski b84a47b4db lxip: do not poll for nic session signals
Instead of polling for new Nic session signals, when waiting for
network packets with a timeout, block on the signal receiver, and
register a timer event beforehand using the same signal receiver.

Fix #1862
Ref #1864
2016-01-26 16:20:47 +01:00
Stefan Kalkowski 5fc9f68941 hw_x86_64: do not reference any muen specifics
Do not build core-muen_on library without the muen soecifier set.
Do not reference files of the muen contrib directory in the first
pass of make's rule analysis, when parding the muen specific kernel
makefile.

Fix #1859
2016-01-26 16:20:47 +01:00
Stefan Kalkowski c3d4802ac8 hw: re-implement lazy FPU context switch
The new implementation of the FPU and FPU context is taken out to
separate architecture-dependent header files. The generic Cpu_lazy_state
is deleted. There is no hint about the existence of something like an
FPU in the generic non-architexture-dependent code anymore. Instead the
architecture-dependent CPU context of a thread is extended by an FPU
context where supported.

Moreover, the current FPU implementations are enhanced so that threads
that get deleted now release the FPU when still obtaining it.

Fix #1855
2016-01-26 16:20:38 +01:00
Martin Stein f9ccfe3a04 tz_vmm usb_armory: document guest login data
The login data is otherwise only indirectly documented through the command that configures it in the rootfs tutorial [1].

[1] https://github.com/inversepath/usbarmory/wiki/Preparing-a-bootable-microSD-image#root-file-system

Fixes #1856
2016-01-26 16:20:38 +01:00
Alexander Boettcher 0423369f7f base: Unbound_thread exception in rm::add_client 2016-01-26 16:20:38 +01:00
Alexander Boettcher 7598f09295 nova: check for valid platform_pd pointer 2016-01-26 16:20:38 +01:00
Christian Helmuth 8e50464a1a linux: remove lx_environ symbol from audio_drv 2016-01-26 16:20:38 +01:00
Christian Helmuth a09172aa7e linux: fix whitespace in nic_drv 2016-01-26 16:20:37 +01:00
Norman Feske f045b1c680 ports: refined noux_fork test
Thanks to the log_terminal server, we no longer rely on a separate UART
for the noux output. We also skip the indirection of using a tar archive
but rather start the test-noux_form program as a mounted ROM module.
2016-01-26 16:20:37 +01:00
Norman Feske fc6c2537ee vfs: add Rom_file_system::dataspace
By providing this function, we can start a mounted ROM module as program
under Noux.
2016-01-26 16:20:37 +01:00
Norman Feske 900c795df2 os: add Attached_rom_dataspace::cap accessor
The accessor works analogously to the Attached_dataspace.
2016-01-26 16:20:37 +01:00
Stefan Kalkowski f539cf1231 hw: adjust core's signal thread's stack size
The stack size should be architecture dependent.

Fix #1854
2016-01-26 16:20:37 +01:00
Stefan Kalkowski 5afad64586 hw: preserve core's context-area (Fix #1853)
Remove core's context-area from its virtual memory allocator
2016-01-26 16:20:37 +01:00
Stefan Kalkowski b0b4c3c7fa noux: consider stack alignment constraints
The interim stack in a forked noux process has to consider the architecture
dependent stack alignment constraints.

Fix #1852
2016-01-26 16:20:37 +01:00
Stefan Kalkowski 040cd95580 noux: fix context-area re-initialization in fork
With commit e74b53d5dd the fork semantic in noux
changed slightly, and broke platforms like hw & sel4, where the UTCB is mapped
directly into the thread's context area. The change moved the re-initialization
to a point where the new noux process' thread stack-pointer was already switched
back to the context area. But to re-initialize the context area RPC calls must
be done, and the UTCB must be used therefore. On the other side the UTCB is
found implicitly by the stack-pointer, whereby a stack-pointer located in the
context-area refers to a UTCB that is expected to reside in the context-area
as well. But the UTCB gets overlayed inside the context area by the
context-area's re-initialization - we've come round in a circle.

This commit rolls back the move of the re-initialization routine. To preserve
the intention of the original commit, the context-area location is stored in
a static variable, so that the Native_config API is not needed anymore.

Fix #1851
2016-01-26 16:20:36 +01:00
Stefan Kalkowski e143683196 noux: remove dummy local ram service (Fix #1850) 2016-01-26 16:20:36 +01:00
Christian Helmuth 1616295179 x86emu: download from xorg.freedesktop.org
ftp.x.org has not been available for a week now.
2016-01-26 16:20:36 +01:00
Stefan Kalkowski 7aff1895bf hw: enable SMP for ARM Cortex A9
This commit enables multi-processing for all Cortex A9 SoCs we currently
support. Moreover, it thereby enables the L2 cache for i.MX6 that was not
enabled until now. However, the QEMU variants hw_pbxa9 and hw_zynq still
only use 1 core, because the busy cpu synchronization used when initializing
multiple Cortex A9 cores leads to horrible boot times on QEMU.

During this work the CPU initialization in general was reworked. From now
on lots of hardware specifics were put into the 'spec' specific files, some
generic hook functions and abstractions thereby were eliminated. This
results to more lean implementations for instance on non-SMP platforms,
or in the x86 case where cache maintainance is a non-issue.

Due to the fact that memory/cache coherency and SMP are closely coupled
on ARM Cortex A9 this commit combines so different aspects.

Fix #1312
Fix #1807
2016-01-26 16:20:18 +01:00
Martin Stein 2b2007bc3f hw: add Pl310::Debug register definitions
Ref #1312
2016-01-15 16:42:12 +01:00
Martin Stein c58de0d80e hw_panda: driver for Cortex-A9 wakeup generator
Ref #1312
2016-01-15 16:42:12 +01:00
Martin Stein 5755245609 hw: end interrupts SMP-safe on ARM (Ref #1312) 2016-01-15 16:42:12 +01:00
Stefan Kalkowski 166672fe16 hw: l2 cache initialization is platform specific
On ARM Cortex A9 platforms the external PL310 L2 cache controller
needs to be initialized dependent on the SoC. For instance on Pandaboard
it needs to call the firmware running in TrustZone's secure world,
on i.MX6 it initializes it directly, on other boards it doesn't need
to be initialized at all, because the bootloader already did so.
Therefore, we should implement the PL310 intialization in board specific
code and not in the base class implementation.

Ref #1312
2016-01-15 16:42:12 +01:00
Stefan Kalkowski e05d26567d hw: make 'smp' property an aspect (Ref #1312)
This commit separates certain SMP aspects into 'spec/smp' subdirectories.
Thereby it simplifies non-SMP implementations again, where no locking
and several platform specific maintainance operations are not needed.
Moreover, it moves several platform specifics to appropriated places,
removes dead code from x86, and starts to turn global static pointers
into references that are handed over.
2016-01-15 16:42:12 +01:00
Alexander Boettcher c0a2388978 x86: avoid warning if memory is attached twice
Issue #1848
2016-01-13 14:59:05 +01:00
Alexander Boettcher cec3ca6a70 x86: use slave label to differentiate device PDs
Issue #1848
2016-01-13 14:59:05 +01:00
Alexander Boettcher 82e35326b7 os: support different binary name for slaves
Issue #1848
2016-01-13 14:59:04 +01:00
Alexander Boettcher daf67f7baa intel_fb: remove x201 workaround
The workaround is no longer needed as we now propagate the proper device
ID as BDF to the kernel in the platform driver.

Issue #1848
2016-01-13 14:58:01 +01:00
Alexander Boettcher a258caa7ab nova: propagate bdf for assign_pci properly
Now, the right PCI bus:device:function (BDF) is reported to the kernel
during assign_pci syscall - beforehand it was ever 0:0.0. The BDF is
needed to lookup the correct DMAR unit the kernel has to configure. This
was revealed as the DMAR unit for Intel graphics on x201 is not the same
as for all other PCI devices we have drivers for on this platform.

Fixes #1848
2016-01-13 14:57:02 +01:00
Josef Söntgen eb16ad3ad9 noux-pkg: port of tar-1.27
Issue #403
2016-01-13 14:49:11 +01:00
Emery Hemingway 9f9510ddb1 libc: implement fstatat by wrapping stat and lstat
Fixes #403
2016-01-13 14:49:11 +01:00
Emery Hemingway 3087b72438 os/path.h: new convenience functions
Infix operators == and !=.
Capacity accessor.

Issue #403
2016-01-13 14:49:11 +01:00
Martin Stein b63941f456 hw imx53 tz_vmm: fix compiler warnings
There were warnings in tz_vmm/block.cc due to an unitialized variable.

Fixes #1849
2016-01-13 12:28:07 +01:00
Guido Witmond 2e0e767f93 Upgrade lighttpd to 1.4.38
Fixes #1839
2016-01-13 11:14:05 +01:00
Adrian-Ken Rueegsegger 8ab0638be9 platform_drv: report MSI masking capability 2016-01-13 11:14:04 +01:00
Emery Hemingway b9c234a341 Libc: sigprocmask reports all signals blocked
Fixes #1756
2016-01-13 11:13:52 +01:00
Emery Hemingway 7186c45de6 noux: getdtablesize support
Fixes #1847
2016-01-08 15:07:58 +01:00
Emery Hemingway 976833f171 libc: getdtablesize support
Issue #1847
2016-01-08 15:07:57 +01:00
Emery Hemingway 2d50552522 Remove Genode namespace from File_system
Fixes #1845
2016-01-08 14:48:52 +01:00
Josef Söntgen 9fb08e045a libports: fix delay in SDL audio backend
Instead of using the 'alloc()' method to allocate new packets use
the 'next()' method with the previous packet. This is needed because
the last audio stack changes broke the semantics assumed by 'alloc()'.

We now keep track of the already queued packets by hand.

Fixes #1827.
2016-01-08 14:48:17 +01:00
Emery Hemingway 56c637c1f6 VFS tar: always set dirent type
Assume tar nodes with missing records are directories.

Fixes #1843
2016-01-08 14:37:58 +01:00
Josef Söntgen b4c5fb2d29 sdl: use Genode::destroy to free framebuffer
Fixes #1838.
2016-01-08 14:37:57 +01:00
Christian Helmuth a98e9c1822 libc: fix test for libc_block 2016-01-08 14:37:57 +01:00
Norman Feske 948cb3ef0a os: minor whitespace fixes in nic_loopback 2016-01-08 14:37:57 +01:00
Alexander Boettcher 1d5aa4ca7e nova: avoid warnings because of oom handling
Use kernel branch which is more accurate in accounting memory, which avoids
kernel messages of following form:

[0] warning: insufficient resources ...

Fixes #1830
2016-01-08 14:37:57 +01:00
Adrian-Ken Rueegsegger b1b3c7bf34 doc: Extend Muen tutorial to match new build process 2016-01-08 14:37:57 +01:00
Adrian-Ken Rueegsegger cb68f9a320 hw: Add kernel/spec/muen/target.mk to build Muen SK
This adds the automated compilation of the Muen Separation Kernel and
the required components to the hw_x86_64_muen build process.
2016-01-08 14:37:56 +01:00
Adrian-Ken Rueegsegger 8d2f2b0101 hw: Add port for Muen Separation Kernel
For additional information about the Muen SK refer to the project page
at [1].

[1] - http://muen.codelabs.ch/
2016-01-08 14:37:56 +01:00
Christian Helmuth acab2515e1 base-linux: remove get_pid debug helper
Fixes #1829
2015-12-21 09:22:40 +01:00
Alexander Boettcher 7ee3e98551 nova: update kernel to fix assertion
Some special pages (0-page, 1-page) in the kernel must not be freed up
during PD destruction.

Fixes #1828
2015-12-18 15:04:25 +01:00
Christian Helmuth 6699290766 Optional label in Nic::Connection constructor
Fixes #1826
2015-12-17 15:15:24 +01:00
Christian Helmuth c43bd472ac packet_stream: peek_packet() should be const
This also fixes the wrong return type.

Fixes #1800
2015-12-17 11:12:53 +01:00
Martin Stein 6deb80f66d ahci_bench: fix condition for test end
Fixes #1824
2015-12-17 10:41:09 +01:00
Martin Stein 852b799cd4 blk-bench: don't write if not requested
Because a check for the TEST_WRITE configuration was missing as condition for a
packet submit, the test caused unwanted write access to the device.

Ref #1824
2015-12-17 10:39:47 +01:00
Martin Stein 96649c716d Remove obsolete block_bench test
This test is deprecated according to its author and test/blk/bench
shall be used instead.

Ref #1824
2015-12-17 10:39:06 +01:00
Christian Helmuth 14c8380507 xml_generator: support bool and integer types
The Xml_generator is extended by overloads for bool as well as signed
and unsigned int, long, and long long.

Fixes #1819
2015-12-17 10:38:19 +01:00
Christian Helmuth 98a4cb27b2 decorator_stress: explicitly generate long values
Explicitly cast floats to long as we currently do not plan to support
float in Xml_generator and previously the value was implicitly casted to
long anyway.

Issue #1819
2015-12-17 10:38:19 +01:00
Christian Helmuth 971b531d58 platform_drv: increase RAM config for -O0 builds (again) 2015-12-17 10:38:19 +01:00
Christian Helmuth 40b8da8755 rom filter: amend name of run script in README 2015-12-17 10:38:19 +01:00
Emery Hemingway 6e9fa10e65 server/report_rom: partial ROM label matching
Fixes #1801
2015-12-17 10:38:18 +01:00
Christian Prochaska 23ff3b1877 nitpicker: fix focus change permission checks
Fixes #1816
2015-12-17 10:38:18 +01:00
Christian Helmuth dc17e16897 signal: cleanup allocations / reset globals in test
I conserve these cleanups to enable the looped execution of all test
functions as I did to hunt a bug. The loop can easily be added to
main().
2015-12-10 13:17:11 +01:00
Josef Söntgen 48738bbf63 libports: update libssh to 0.7.2
Fixes #1811.
2015-12-10 13:16:29 +01:00
Josef Söntgen 1073d6077b noux-pkg: update OpenSSH to 7.1p1
Fixes #1810.
2015-12-10 13:16:29 +01:00
Josef Söntgen 50b8094d0d noux: extent network errno handling
Add ECONNRESET, ECONNABORTED and EHOSTUNREACH.

Issue #1810.
2015-12-10 13:16:29 +01:00
Josef Söntgen cebef2bda3 noux: make copy of input fds in SYSCALL_SELECT
Executing the system call will change the input fds as a side-effect
because the select_in.fds and select_out.fds structure are part of a
union. Since the original select_in.fds content is needed afterwards
make a copy instead of using a reference.

Fixes #1809.
2015-12-10 13:16:29 +01:00
Josef Söntgen 8ca4f7a794 noux-pkg: update lynx to 2.8.8rel.2
Fixes #1818.
2015-12-10 13:16:28 +01:00
Alexander Boettcher a73c6470f6 nova: handle hip/mb memory region of size 0
Fixes #1814
2015-12-10 13:16:28 +01:00
Alexander Boettcher d0db15031a run: provide missing timer route for vbox_pointer
Add missing timer route.

Fixes #1817
2015-12-10 13:16:28 +01:00
Alexander Boettcher 4e00e8ac68 run: enable vbox pointer for vbox_auto* scripts
Makes mouse shapes of Windows VM visible.

Issue #1817
2015-12-10 13:16:28 +01:00
Alexander Boettcher 1aa6a2a4a1 nova: fix kernel freezing
Fixes #1815
2015-12-10 13:16:28 +01:00
Christian Prochaska 89d3083c9f qt5: update the 'lib_mk_file_generator' README file
Fixes #1813
2015-12-10 13:16:27 +01:00
Stefan Kalkowski 2316937e58 hw: remove main thread's initial UTCB from vm area
The main thread's UTCB, used during bootstrap of the main thread before
it allocates its context area, needs to be outside the virtual memory
area controlled by the RM session, because it is needed before the main
thread can access its RM session.

Fix #1804
2015-12-10 13:16:27 +01:00
Christian Helmuth 610b733133 liquid_fb: generate periodic sync events
Issue #1762
2015-12-10 13:16:27 +01:00
Christian Helmuth e387d2098d demo: adapt nested nitpicker config 2015-12-10 13:16:27 +01:00
Christian Helmuth 2b321b9ce8 nitpicker: improve diagnostic of policy configuration
This patch adds diagnostic messages during the label-policy application,
if no policy for the session label was found or if the domain configured
in the policy node does not exist.
2015-12-10 13:16:27 +01:00
Stefan Kalkowski 23f9761297 base: minimize critical section in Semaphore::up
When unblocking a thread in Semaphore::up() while holding the fifo meta-data
lock, it might happen that the lock holder gets destroyed by the one it was
unblocking. This happened for instance in the pthread test in the past, where
thread destruction was synchronized via a semaphore. There is no need to hold
the lock during the unblock operation, so we should do it outside the critical
section.

Fix #1333
2015-12-10 13:16:27 +01:00
Stefan Kalkowski 9efa3ceccf pthreads: use simple Genode::Semaphore as backend
Instead of using Timed_semaphore, we can directly use the simpler
Genode::Semaphore for pthread's 'sem_t' type.

Ref #1333
2015-12-10 13:16:27 +01:00
Martin Stein 492bd39619 epit timer: raise precision
Previously we used a pretty slow external clock source for the timer. This
resulted in such a low TICS_PER_MS value that the granularity wasn't
sufficient to find a setup with a precision better than 1 second error per
minute. Now we use the so-called High Frequency Reference Clock as input
with TICS_PER_MS=33333 and the timer precision is significantly < 1 second per
minute.

Fixes #1805
2015-12-10 13:16:26 +01:00
Martin Stein 01643ccd94 cpu_quota hw exynos5: raise error tolerance
From our observations we can tell that the error should not exceed 4%.
However, there is no reasonable explanation by now why the test results
are less stable on these platforms. We have tried several things that
did not lead to an explanation or improvement:

  * changing the timing parameters of the scheduler
  * switching off SMP
  * double-checking the speed of userland and kernel timers

Ref #1805
2015-12-10 13:16:26 +01:00
Martin Stein 227b539193 cpu_quota x86_64: fix RAM quota and stack size
The test threads previously used a stack size independent from the machine
word width. Qemu was previously configured to provide 64Mb of RAM which isn't
sufficient for x86_64.

Ref #1805
2015-12-10 13:16:26 +01:00
Martin Stein a3a8978d77 cpu_quota zynq_qemu: raise error tolerance
On Qemu, the test results for Xilinx Zynq-7000 are less stable than usual.

Ref #1805
2015-12-10 13:16:26 +01:00