Commit Graph

10344 Commits

Author SHA1 Message Date
Alexander Boettcher
8a285a7bee gpu/intel: add more debug registers
issue #4254
2021-08-30 15:00:37 +02:00
Alexander Boettcher
c9809fde67 gpu/intel: remove unused superpage scratch code
Superpages (2M, 1G) are not supported by now, but partially copied over code
from base-hw was around. Remove unused register definitions and remove
non-working super page code do avoid confusion.

issue #4254
2021-08-30 15:00:37 +02:00
Alexander Boettcher
de8327c11a gpu/intel: add more supported chips
support for Gen > 8

+ determine platform, revision and stepping

issue #4254
2021-08-30 15:00:37 +02:00
Alexander Boettcher
0aa17661cc gpu/intel: avoid overlapping ggtt range allocation
Size argument of ggtt free range check is ignored, which leads to
overlapping allocations inside, which leads to unavailable IO-MEM exceptions
thrown by core.

issue #4254
2021-08-30 15:00:37 +02:00
Norman Feske
82a51d8eaa build: operate ccache in preprocessor mode
This avoids consistency problems when header files are shadowed.

Fixes #4256
2021-08-30 15:00:37 +02:00
Norman Feske
040628894c build: introduce GLOBAL_DEPS variable
The new varible can be used to trigger the rebuild of the entire target
whenever any of the listed files changes.

Fixes #4255
2021-08-30 15:00:37 +02:00
Johannes Schlatow
b5dd1dd01b trace: consolidate Trace_buffer implementations
Both, trace_logger and vfs_trace had their own trace_buffer.h. This
commit consolidates the existing implementations and provides the
resulting trace_buffer.h at 'include/trace/'. It thereby becomes part of
the trace api archive.

genodelabs/genode#4244
2021-08-30 15:00:37 +02:00
Johannes Schlatow
ffbd26d63f depot: add trace policy api
genodelabs/genode#4244
2021-08-30 15:00:36 +02:00
Johannes Schlatow
1416b2258f Trace_buffer: do not reprocess last read entry
genodelabs/genode#4244
2021-08-30 15:00:36 +02:00
Norman Feske
436d946300 recipes/api/genode_c_api: add src/lib/genode_c_api
The source codes are needed to use the API because they are statically
linked.
2021-08-30 15:00:36 +02:00
Norman Feske
324ad33736 lx_emul: prevent clk_disable_unused
Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
2cb4157211 lx_emul: support IRQCHIP_DECLARE initcalls
Similar to CLK_OF_DECLARE, this patch extends lx_emul with ability to
extend the __irqchip_of_table with secondary interrupt controllers.

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
c95af254f4 lx_emul: sanitize size 0 for __kmalloc
Driver code such as mfd-core.c may pass 0 as argument n to kcalloc,
which eventually results in an allocation size 0.

  res = kcalloc(cell->num_resources, sizeof(*res), GFP_KERNEL);

Since 'res' is checked against NULL for success, kmalloc must not return
a NULL pointer in this case. The patch works around this issue by
forcing an allocation size of 1 byte in this case.

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
29032caf40 lx_emul: support CLK_OF_DECLARE initcall mechanism
Clock providers such as drivers/clk/sunxi-ng/ccu-sun8i-r.c don't use
regular init calls but declare their init functions via CLK_OF_DECLARE,
which fill the __clk_of_table. Linux populates the table statically by
using special sections declared in the linker script. In contrast, we
populate the table by expanding the macro to global constructor
functions.

The __clk_of_table is then processed by the call of of_clk_init(NULL).

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
36af114d78 lx_emul: enhance krealloc implementation
Issue #4253
2021-08-30 15:00:36 +02:00
Christian Prochaska
149bd999f3 vfs_oss: support more commands for VirtualBox 6 and sndio
Fixes #4252
2021-08-30 15:00:36 +02:00
Christian Helmuth
a6fb61dbf2 vbox6: support dynamic framebuffer resolution
Issue #4031
2021-08-30 15:00:36 +02:00
Johannes Schlatow
50cc51f132 tool: support new u-boot FIT image format
Fixes genodelabs/genode#4250
2021-08-30 15:00:36 +02:00
Christian Helmuth
c54473abea vbox6: update to version 6.1.26
Issue #4031
2021-08-30 15:00:35 +02:00
Christian Helmuth
611e93a5f2 vbox6: kick AHCI asynchronous IO thread
Issue #4031
2021-08-30 15:00:35 +02:00
Christian Helmuth
d6bde82894 vbox6: add libyuv to pkg recipe
Issue #4031
2021-08-30 15:00:35 +02:00
Johannes Schlatow
88b3880c77 base: fix shift overflow error in Bitfield::mask()
Fixes genodelabs/genode#4249
2021-08-30 15:00:35 +02:00
Christian Helmuth
7618c9410a depot: update recipe hashes 2021-08-18 15:06:12 +02:00
Johannes Schlatow
5e284bfb35 trace: disable tracing when owner disappears
* Disable trace source and release ownership on subject destruction.
* Note, since the policy module is also destroyed on descruction of the
  session component, the traced component must not access the policy
  module when acknowledging the disabled state (else: page fault).

Fixes genodelabs/genode#4247
2021-08-18 15:06:12 +02:00
Johannes Schlatow
81d939f947 test-trace: test destruction of trace subjects
If the trace subjects are not properly destructed when the TRACE client
disappears, enabled sources will be owned by a non-existing client.
In other words, when a TRACE client disappears all sources owned by the
client must be disabled.

genodelabs/genode#4247
2021-08-18 15:06:12 +02:00
Johannes Schlatow
9898341d4a depot_autopilot: fix ineffective test-trace
test-trace always passed, although tracing was never enabled because the
trace subject was not within the first 32 subjects.

* increase number of queried subjects
* output error if trace subject was not found

genodelabs/genode#4247
2021-08-18 15:06:12 +02:00
Martin Stein
812fdec27c nic_router: propagate dns domain name via dhcp
With this commit, the NIC router DHCP client reads out the first DNS domain
name (DHCP option 15) if any from a DHCP reply that generates an IPv4 config
for a domain and stores the name together with the IPv4 config for that domain.
DNS domain names are reported via the new report tag '<dns-domain>' if the
'config' attribute in the config tag '<report>' is set.

Furthermore, the NIC router DHCP server becomes able to obtain a DNS domain
name from another domain that has a DHCP client dynamically (given the config
attribute 'dns_config_from' is set and no static DNS config is given) or
statically from its configuration (new config tag '<dns-domain>') and propagate
this name with DHCP replies (DHCP option 15).

The 'nic_router_dhcp_*' tests are adapted to test the new feautures.

The commit also gets rid of some mirrored files in
'test/nic_router_dhcp/manager'.

Fixes #4246
2021-08-18 15:06:12 +02:00
Martin Stein
fa64aae7f8 nic_router: config attribute 'dns_config_from'
WARNING: BREAKS CONFIG COMPATIBILITY!

This commit changes the configuration interface of the NIC router in a way that
may break systems that use the component without proper adjustment!

How to adjust:
At each occurrence of the 'dns_server_from' attribute in a NIC router
configuration replace the attribute name with 'dns_config_from'. The attribute
value remains unaltered.

DETAILED DESCRIPTION

The new attribute name 'dns_config_from' reflects that also other aspects of
the DNS configuration of the denominated domain are used by the DHCP server
that holds the attribute. This commit is a preparation for forwarding also the
domain name (DHCP option 15) with the mechanism behind the attribute.

Ref #4246
2021-08-18 15:06:12 +02:00
Martin Stein
1111472af7 nic_router: make Ipv4_config a class
The fact that the IPv4 config was a struct with all data members public was a
mere leftover of an early state of the NIC router. Today, the router
implementation style is to avoid structs and public data members wherever
possible.

This commit slightly changes the behavior of the router regarding log output.
The router used to print malformed IPv4 configurations to the log only if
the 'verbose' config flag was set using this style:

! [my_domain] malformed dynamic IP config: interface 10.0.2.1/24 ...

Now, malformed IPv4 configurations are only printed if the
'verbose_domain_state' config flag is set (like with any IP4v configuration
states) using this style:

! [my_domain] dynamic IP config: malformed (interface 10.0.2.1/24 ...)

Fixes #4242
2021-08-18 15:06:12 +02:00
Martin Stein
9e6f7988c2 nic_router: list dns servers in one dhcp option 6
The NIC router DHCP server used to add an extra option 6 field to DHCP replies
for each DNS server address. This conflicts with RFC #2132 section 3.8 which
states that the addresses should be listed within one option 6 field without
delimiter. The discrepancy is fixed by this commit.

Ref #4242
2021-08-18 15:06:12 +02:00
Johannes Schlatow
80c1459e79 fs_query: catch File::Truncated_during_read
Fixes genodelabs/genode#4241
2021-08-18 15:06:12 +02:00
Johannes Schlatow
0840cfe834 vfs_trace: report correct size for value files
File size must be the same as the number of bytes that can be read from
the file. Otherwise, this will trigger a `Truncated_during_read`
exception.

Fixes genodelabs/genode#4240
2021-08-18 15:06:12 +02:00
Martin Stein
e648e7255a nic_router: optional icmp type 3 on fragm. ipv4
Via a new configuration attribute, the user can decide whether the router
should answer dropped fragmented IPv4 with an ICMP "destination unreachable"
packet and, if so, which value the ICMP code field of this packet should have.
The default is that the router doesn't send such responses (silently dropping
fragmented IPv4). The behavior is tested by the 'nic_router_ipv4_fragm' test.

Fixes #4236
2021-08-18 15:06:12 +02:00
Martin Stein
06a4608f4a nic_router: report dropped fragmented IPv4
If the new attribute 'dropped_fragm_ipv4' of the <report> tag in the NIC router
config is set "yes", the router will report the number of packets that were
dropped per interface respectively domain because fragmented IPv4 is not
supported. The default is not to report the counter. The behavior is tested by
the 'nic_router_ipv4_fragm' test.

Ref #4236
2021-08-18 15:06:12 +02:00
Martin Stein
619474bc90 nic_router: drop fragmented IPv4
The NIC router used to ignore the IPv4 header fields "More fragments" and
"Fragment offset" completely. Therefore higher-level protocols of fragmented
IPv4 were interpreted wrong because each fragment was considered a self-
standing packet, expecting, for instance UDP/TCP headers somewhere inside of
the UDP/TCP data field. Normally, such packets were dropped as soon as the
UDP/TCP checksum check failed because of the misinterpretation. However,
it was also possible for fragmented IPv4 to pass the router although normally
only partially.

IPv4 fragmentation support in the router would introduce some potential
security risks and is presumably not an easy endeavor. So, for now, we settled
on not supporting IPv4 fragmentation. With this commit, the router simply drops
all fragmented IPv4. This is reflected to the log for each fragment as "drop
packet (fragmented IPv4 not supported)" when 'verbose_packet_drop="yes"' is
configured.

The new test 'run/nic_router_ipv4_fragm' is an automated test for this
behavior. The test is added to the autopilot list.

Ref #4236
2021-08-18 15:06:12 +02:00
Martin Stein
b0e558f486 net/icmp: cast from integer to 'Code' enum
Add a function to the header for doing this cast.

Ref #4236
2021-08-18 15:06:12 +02:00
Christian Prochaska
d7a27c448d qt5: implement 'CancelableSyncSocket::Shutdown()'
Fixes #4239
2021-08-18 15:06:12 +02:00
Martin Stein
626b2f9cf2 run/libc_vfs_fs_fat: add to autopilot
Excludes board 'virt_qemu' from the test as we don't have block device drivers
for this board.

Ref #4220
2021-08-18 15:06:12 +02:00
Martin Stein
2533d7b4b6 vfs/fatfs: cleanup implementation
- remove redundant file system factory

- remove dead code block

  The code was guarded by preprocessor directives checking whether the
  contrib code define "_USE_MKFS" is 1. As "_USE_MKFS" is not set one
  for our port of FAT, the code was never executed and can be removed.

- remove uneffective config attributes

  Apparently, the former XML attributes to the plugin 'drive' and
  'codepage' had no effect. I tested them in a scenario with the VFS
  block server on a disk-image boot-module as back end. Regardless of
  the 'drive' value, the block session label was always "0". Regardless
  of the 'codepage' value, the FAT on the disk image succeeded to mount
  when not using '--codepage' for 'mkfs.fat' and failed to mount when
  using '--codepage' to specify a supported but foreign codepage for
  'mkfs.fat' (e.g. "720").

Ref #4220
2021-08-18 15:06:12 +02:00
Martin Stein
60c8369718 lib/fatfs: get rid of global static constructors
There was one global static constructor:

! namespace Fatfs { static Constructible<Platform> _platform; }

This caused applications that used the lib or the <fatfs> VFS plugin to end up
in an uncaught exception due to Genode::Component complaining that method
'construct' returned without executing pending static constructors if they
didn't call Genode::Env::exec_static_constructors().

As the use of Genode::Env::exec_static_constructors() is discouraged in Genode,
this commit rather moves the '_platform' object to the scope of the
initializing function and introduces a global static pointer to the object that
gets set by the initializing function. Although this prevents the exception, it
is, technically speaking even worse than the former solution as the new pointer
isn't checked for validity in contrast to the 'Constructible' object.

However, so far, I don't see a clean solution to this problem without the need
for Genode::Env::exec_static_constructors().

Fixes #4220
2021-08-18 15:06:12 +02:00
Christian Helmuth
b59e2ba677 microcode_intel: archive moved to GitHub finally
As version 20180807a is not provided on GitHub, I updated the port to
the most recent release 20210608.

Issue #2762
2021-08-18 15:06:12 +02:00
Sebastian Sumpf
c3e8c22a6d sculpt: integrate intel_gpu_drv
* the GPU multiplexer now offers the platform service to the Intel
  framebuffer driver (driver_manager)
* ajdusted drivers_managed-pc to hand out resources to the GPU driver
* adjust quotas

issue #4233
2021-08-18 15:06:11 +02:00
Sebastian Sumpf
2fe70f111b intel_fb_drv: Aperture exhaustion and display IRQ patch
* display an error in case the aperture is too small for all
  framebuffers
* handle display engine IRQs only

issue #4233
2021-08-18 15:06:11 +02:00
Sebastian Sumpf
1727de30b7 gpu/intel: free DMA, clear ggtt
* free DMA caps in case platform client's session is closed
* clear GGTT of platform client upon session close

issue #4233
2021-08-18 15:06:11 +02:00
Sebastian Sumpf
6c003a13d2 gpu/intel: add platform service for display handling
The platform services is intented to be used by dde_linux's intel_fb_drv
in order to initlialize displays.

* implement and announce platform session
* limit accessible GTT and aperture of client to 64 MB
* forward display engine IRQs to platform client
* move all PCI resources to 'Igd::Resources' class in order to make them
  accessible by the platform service and the GPU driver
* fix fence register allocation for id zero (return true)

issue #4233
2021-08-18 15:06:11 +02:00
Alexander Boettcher
11192b18e6 gpu/intel: dump status context register bits
Issue #4148 #4233
2021-08-18 15:06:11 +02:00
Alexander Boettcher
fe867765a8 gpu/intel: support multiple exec buffer per client
required for mesa-21

Issue #4148 #4233
2021-08-18 15:06:11 +02:00
Alexander Boettcher
ffc89f3edf gpu/intel: let guard page handling up to client
For mesa-21 the client takes care and manages
the virtual address space of the vGPU by itself and the intel/gpu driver
can't add silently a guard page anymore. Move the patch to the drm/ioctl
of the former mesa version.

Issue #4148 #4233
2021-08-18 15:06:11 +02:00
Alexander Boettcher
067b7d7c67 gpu/intel: deny virtual address above 1 << 48
commit avoids memory corruption in the ppgtt page insertion code

Issue #4148 #4233
2021-08-18 15:06:11 +02:00
Josef Söntgen
4b653fbac1 gpu/intel: handle double insertion in PPGTT
As the PPGTT is populated by the client, the client has to account for
guard pages and so forth.

Issue #4148 #4233
2021-08-18 15:06:11 +02:00