Commit Graph

99 Commits

Author SHA1 Message Date
Christian Prochaska
e90d21c9ab wifi_drv: add missing 'Libc::with_libc()'
Fixes #2506
2017-08-28 16:49:45 +02:00
Norman Feske
50a1b84308 usb_drv: wait for first valid config
This patch defers the initialization of the USB driver until its
configuration is valid.
2017-08-17 10:59:44 +02:00
Christian Helmuth
c475edccfc dde_linux: use internal setjmp/longjmp only 2017-05-02 15:29:03 +02:00
Christian Helmuth
cb43e04691 ldso: defer execution of static constructors
Ldso now does not automatically execute static constructors of the
binary and shared libraries the binary depends on. If static
construction is required (e.g., if a shared library with constructor is
used or a compilation unit contains global statics) the component needs
to execute the constructors explicitly in Component::construct() via
Genode::Env::exec_static_constructors().

In the case of libc components this is done by the libc startup code
(i.e., the Component::construct() implementation in the libc).

The loading of shared objects at runtime is not affected by this change
and constructors of those objects are executed immediately.

Fixes #2332
2017-03-24 16:20:04 +01:00
Josef Söntgen
27cc20049e wifi: fix off-by-one in min PSK length handling
The MIN_PSK_LENGTH constant was not adjusted to accommodate for the
semcantic change when switching from using the raw char array to using
the Genode::String class. The Genode::String::length() method includes
the terminating NUL byte while strlen() does not.

Fixes #2296.
2017-02-28 13:00:44 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Josef Söntgen
a2cff03539 dde_linux: remove usage of deprecated env()
Fixes #2280.
2017-02-28 12:59:17 +01:00
Emery Hemingway
48150a706b update Reporter constructors
The Reporter utility needs a reference to the environment at
construction to establish Report connections.

Ref #1987
Fix #2232
2017-02-07 19:20:29 +01:00
Norman Feske
cd3a5852d6 Warn about the use of deprecated headers
This commit enables compile-time warnings displayed whenever a deprecated
API header is included, and adjusts the existing #include directives
accordingly.

Issue #1987
2017-01-31 12:01:18 +01:00
Emery Hemingway
745eb89237 lib/component: pass extended Libc::Env
Libc::Env is the Genode::Env interface extended to cover access
to the XML content of the 'config' ROM and a VFS instance. This
deduplicates the burden of components to attain and manage
these resources.

Fix #2217
Ref #1987
2017-01-13 13:07:01 +01:00
Sebastian Sumpf
dfae61c76d intel_fb: Fix dynamic linking issues
Fixes #2208
2017-01-13 13:06:52 +01:00
Norman Feske
4da52517c1 Simpify startup of dynamically linked binaries
This patch removes the component_entry_point library, which used to
proved a hook for the libc to intercept the call of the
'Component::construct' function. The mechansim has several shortcomings
(see the discussion in the associated issue) and was complex. So we
eventually discarded the approach in favor of the explicit handling of
the startup.

A regular Genode component provides a 'Component::construct' function,
which is determined by the dynamic linker via a symbol lookup.
For the time being, the dynamic linker falls back to looking up a 'main'
function if no 'Component::construct' function could be found.

The libc provides an implementation of 'Component::construct', which
sets up the libc's task handling and finally call the function
'Libc::Component::construct' from the context of the appllication task.
This function is expected to be provided by the libc-using application.
Consequently, Genode components that use the libc have to implement the
'Libc::Component::construct' function.

The new 'posix' library provides an implementation of
'Libc::Component::construct' that calls a main function. Hence, POSIX
programs that merely use the POSIX API merely have to add 'posix' to the
'LIBS' declaration in their 'target.mk' file. Their execution starts at
'main'.

Issue #2199
2017-01-13 13:06:52 +01:00
Alexander Boettcher
3e0aeab89e intel_fb: avoid heap warning
Fixes #2168
2016-12-23 16:52:09 +01:00
Norman Feske
25a7ea3d40 base: rename 'Volatile_object' to 'Reconstructible'
Fixes #2151
2016-12-01 17:46:50 +01:00
Stefan Kalkowski
4b09e357e0 intel_fb_drv: dummy implementation of lrc irqs
Ref #2179
2016-11-30 13:38:06 +01:00
Christian Helmuth
53271d8c5f Use default component stack size where appropriate 2016-11-30 13:38:06 +01:00
Christian Helmuth
104775aa56 wifi: support for scans in connected state
The 'connected_scan_interval' config attribute specifies the scan
interval in seconds. The commit also removes the deprecated ram_fs
component from the test run script.
2016-11-25 15:27:28 +01:00
Alexander Boettcher
800de566e2 intel_fb: update mode list for different displays
Fixes #2152
2016-11-08 15:35:42 +01:00
Alexander Boettcher
61e1cf76c2 intel_fb: fix framebuffer freeup
drm_framebuffer_remove takes care of references to CRTC pointers before
freeing up framebuffer object. Directly calling the destroy function may cause
dangling CRTC pointers pointing inside the framebuffer object.

Fixes #2140
2016-11-08 15:26:29 +01:00
Josef Söntgen
44bcf6bbf0 wifi_drv: add config knob to disable 11n mode
The 11n mode can forcefully be disabled by setting the 'disable_11n'
attribute to 'true'. This is workaround for certain 6200 ABG cards
that apparently do not support this mode.

Fixes #2124.
2016-10-21 12:39:35 +02:00
Norman Feske
e370e08e01 Define Genode::size_t as unsigned long
Fixes #2105
2016-10-21 12:39:29 +02:00
Norman Feske
17c79a9e23 base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.

While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).

To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.

Issue #1987
2016-08-29 17:27:10 +02:00
Josef Söntgen
edf90aec42 wifi_drv: transition to the new base API
Issue #1987.
2016-06-28 11:09:28 +02:00
Stefan Kalkowski
101d052ddb intel_fb_drv: consider aligned pitch value
* Align pitch value to 64 byte (thanks to cnuke for investigation)
* Get rid of extra dataspace retrival and attachment, now that we always buffer
* Consistently name all lx_emul helpers: lx_* (get rid of dde*)
* Add missing file headers

Fix #1997
2016-06-28 11:09:27 +02:00
Stefan Kalkowski
558cc8e00c intel_fb_drv: make buffering mandatory
Instead of providing a buffer to the client and blitting from that
to the "real" framebuffer as an option, with this commit we always do so.
Thereby its possible to immediately destroy the old framebuffer used by
hardware when a configuration change is done, and a new framebuffer
is used. This also simplifies the modesetting.
Moreover, this commit fixes an issue when not using the connector reporting.
Until now the initial mode detection of connectors was only done when
the report was created. this is a regression that entered the driver
when upgrading to the recent Linux kernel version.

Ref #1997
2016-06-28 11:09:27 +02:00
Sebastian Sumpf
d48219138c usb: transition to the new base API
* remove all 'Genode::env()' calls
* use attached roms to read configuration
* use compoenent framework
* remove all PDBG, PINF, PWRN macros

Issue #1987
Fixes #2019
2016-06-28 11:09:25 +02:00
Emery Hemingway
8ae2f65da8 uniform XML boolean attribute access
Replace 'attribute(...).has_value("yes")`
with 'attribute_value(..., false)'.

This allows for boolean configuration to be set with values such as
"true", "false", "yes", "no", or "1", "0".

Fixes #2002
2016-06-22 12:21:42 +02:00
Stefan Kalkowski
0c13effaa8 intel_fb: enable polling for connector changes
To circumvent problems on platforms with shaky hotplug interrupt notification
introduce a "poll" configuration option to the driver, which enables
polling for connector changes.

Fix #2004
2016-06-22 12:17:17 +02:00
Stefan Kalkowski
11bead1811 intel_fb_drv: componentize
Issue #1987
2016-06-22 12:17:16 +02:00
Stefan Kalkowski
e1c451f19a dde_linux: update intel_fb to 4.4.3
Issue #1974.
2016-05-26 15:54:13 +02:00
Josef Söntgen
b9e7fb1edf dde_linux: update wifi to 4.4.3
Issue #1974.
2016-05-26 15:54:11 +02:00
Norman Feske
807be83b1b Remove inconsistent use of 'is_' prefix
Fixes #1963
2016-05-23 15:52:39 +02:00
Norman Feske
fd401bdf53 Thread API cleanup
This patch cleans up the thread API and comes with the following
noteworthy changes:

- Introduced Cpu_session::Weight type that replaces a formerly used
  plain integer value to prevent the accidental mix-up of
  arguments.
- The enum definition of Cpu_session::DEFAULT_WEIGHT moved to
  Cpu_session::Weight::DEFAULT_WEIGHT
- New Thread constructor that takes a 'Env &' as first argument.
  The original constructors are now marked as deprecated. For the
  common use case where the default 'Weight' and 'Affinity' are
  used, a shortcut is provided. In the long term, those two
  constructors should be the only ones to remain.
- The former 'Thread<>' class template has been renamed to
  'Thread_deprecated'.
- The former 'Thread_base' class is now called 'Thread'.
- The new 'name()' accessor returns the thread's name as 'Name'
  object as centrally defined via 'Cpu_session::Name'. It is meant to
  replace the old-fashioned 'name' method that takes a buffer and size
  as arguments.
- Adaptation of the thread test to the new API

Issue #1954
2016-05-23 15:49:55 +02:00
Norman Feske
da5d182ad3 base: remove 'Native_thread' from public API
Issue #1832
2016-04-11 11:51:42 +02:00
Josef Söntgen
8982bc5843 intel_fb_drv: handle displays with EDID extensions
Fixes #1860.
2016-01-26 16:25:54 +01:00
Stefan Kalkowski
d65beb970d dde_linux: KMS-based Intel framebuffer driver (II)
* enable i915 driver from Linux 3.14.5
* tested for generation 5 till 8 GPUs

The driver can be configured at run-time via the config ROM. Every
connector of the graphic card can be configured separately using the
following syntax

  <config>
    <connector name="LVDS-11" width="1280" height="800" enabled="true"/>
  </config>

Also, when enabled within the intel framebuffer driver configuration like
the following

  <config buffered="yes"/>

a simple ram dataspace is propagated to the client and the driver
itselfs copies from that buffer to the framebuffer triggered via refresh
calls. This option is useful to alleviate tearing effects.

The  driver distributes all available connectors of the graphic card and
their supported resolutions via a report. It looks like follows

  <connectors>
    <connector name="LVDS-11" connected="1">
      <mode width="1280" height="800" hz="60"/>
      ...
    </connector>
    ...
  </connectors>

The driver distributes the report only if this is stated within its
configuration, like the following

  <config>
    <report connectors="yes"/>
  </config>

Fix #1764
2015-11-29 18:17:07 +01:00
Norman Feske
520c36d77f dde_linux: KMS-based Intel framebuffer driver (I)
Ref #1764
2015-11-29 18:17:06 +01:00
Josef Söntgen
9fc7519972 wifi_drv: handle hidden SSID
Form now on always generate a configuration that handles nidden SSIDs
well and document the configuration in more detail.

Fixes #1746.
2015-11-04 14:09:25 +01:00
Stefan Kalkowski
ed52d5a211 Introduce 'spec' subdirectories to outline aspects
Instead of holding SPEC-variable dependent files and directories inline
within the repository structure, move them into 'spec' subdirectories
at the corresponding levels, e.g.:

  repos/base/include/spec
  repos/base/mk/spec
  repos/base/lib/mk/spec
  repos/base/src/core/spec
  ...

Moreover, this commit removes the 'platform' directories. That term was
used in an overloaded sense. All SPEC-relative 'platform' directories are
now named 'spec'. Other files, like for instance those related to the
kernel/architecture specific startup library, where moved from 'platform'
directories to explicit, more meaningful places like e.g.: 'src/lib/startup'.

Fix #1673
2015-09-16 13:58:50 +02:00
Christian Helmuth
5230adfd63 wifi: pseudo library to install firmware
The patch prevents linking wifi_drv on each build.
2015-09-09 15:14:29 +02:00
Sebastian Sumpf
0a1664b892 usb_drv: remove dde_kit
issue #1565
2015-06-22 14:43:33 +02:00
Norman Feske
65837e8ae9 wifi: fix condition for non-protected connections 2015-06-09 11:00:11 +02:00
Josef Söntgen
88fc1eee61 wifi_drv: add verbose attribute in config node
Among others, the driver will now print the MAC address of the wireless
device when 'verbose="yes"' is added to <config>.

Issue #1439.
2015-03-13 12:17:27 +01:00
Josef Söntgen
f94176af3f wifi_drv: handle invalid config_rom and psk
* Only attach the config_rom dataspace if it is valid.
* Check if PSK has a valid length.

Issue #1439.
2015-03-13 12:17:25 +01:00
Josef Söntgen
894974f73b wifi_drv: copy firmware images to build directory
Always copy the firmware images to the bin directory within the
build directyry when building the wifi_drv binary.

Issue #1415.
2015-02-27 11:48:06 +01:00
Josef Söntgen
85031f1c1a wifi: report wlan networks
The wifi_drv now provides two reports. The first one contains all
accesspoints that were found while scanning the supported frequencies.
The second one reports the state of the driver, i.e., if it is
conntected to an accesspoint or not. In addition to that, the driver
now gets its configuration via a ROM session.

More detailed information are available in 'repos/dde_linux/README'.

Issue #1415.
2015-02-27 11:48:06 +01:00
Sebastian Sumpf
0c2bdf9edd usb_drv: Remote USB driver interface
Issue #1329
2015-02-16 13:40:33 +01:00
Josef Söntgen
703e3622ff wifi_drv: Port of the Linux wireless stack 2014-11-28 12:02:36 +01:00
Norman Feske
ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00