The new types in base/ram.h model different allocation scenarios and
error cases by mere C++ types without using exceptions. They are meant
to replace the former 'Ram_allocator' interface. As of now, the
'Unmapped_allocator' closely captures the former 'Ram_allocator'
semantics. The 'Constrained_allocator' is currently an alias for
'Unmapped_allocator' but is designated for eventually allocating
mapped RAM.
In contrast to the 'Ram_allocator' interface, which talked about
dataspace capabilites but left the lifetime management of the
allocated RAM to the caller, the new API represents an allocation
as a guard type 'Allocation', which deallocates on destruction by
default.
Allocation errors are captured by a 'Result' type that follows
the 'Attempt' pattern.
As a transitionary feature, the patch largely maintains API
compatibility with the original 'Ram_allocator' by providing
the original (exception-based) 'Ram_allocator::alloc' and
'Ram_allocator::free' methods as a wrapper around the new
'Ram::Constrained_allocator'. So components can be gradually
updated to the new 'Ram::' interface.
Issue #5502
The 'Allocation' type represents the result of an allocator, which
guards the lifetime of the allocation. The 'Allocation::Attempt' type is
a suitable result type for allocators that need to reflect either an
successful allocation or an error condition.
Issue #5502
The new variant combines the attempt with unique-pointer semantics
and is thereby usable for returning non-copyable objects such as
RAM 'Allocation'.
Issue #5502
* add RC6 support for GPU GEN9 (Skylake+) and GEN12 (Tiger Lake+), RC6 is
entered by software after CHECK_INACTIVEus of inactivity. When a new
Vgpu is scheduled we trigger a resume from RC6.
* increase VGPU-watchdog timeout to 300ms
issue #5504
After constructed, a 'Thread' object may remain in a dysfunctional state
should the stack allocation have failed. This condition is no longer
reflected as a C++ exception but as result value of 'Thread::info()'.
Keep 'Thread::name' as public constant because the stack is not always
available for storing the name.
The 'stack_top' accessor has been removed because this information is
already provided by 'Thread::info()'.
Issue #5245
In the "<merge>" case, only a subset of the actual
framebuffer was (intentionally) captured to reduce cpu and memory bandwith.
The new blit tool however requires, by now, that the capture size must
be identical to the framebuffer in use.
Issue #5501
This patch reverts the 8px padding of capture buffers as introduced
by commit "nitpicker: alloc padded capture buffer". The padding was
introduced to ease the use of SIMD instructions operating on the capture
buffer (blit2front) assuming that practical screen dimensions are a
multiple of 8px. Unfortunately this assumption is wrong. E.g., some
laptops use a resolution of 1366x768. So the back2front copying cannot
sidestep the handling of the finicky special cases.
Issue #5428
Issue #5501
This patch allows for the use of the back2front operation with textures
that are not a multiple of 8x8 pixels, which makes the utility
compatible with screen resolutions like 1366x768. In such cases, the
implementation falls back to the non-SIMD variant.
Issue #5428
Issue #5501
An exception thrown within `update_urbs` in the Usb::Device of
Usb::Interface utilities can lead to unhandled URBs, because of
the unexpected, early return from the function.
Instead of throwing an exception when the device vanishs, tunnel
an appropriated error return value through the C/C++ call-chain
by using the library-specific URB class derivation as container.
In case of any failure during URB completion, handle it's libusb
specific completion immediatedly.
Ref genodelabs/genode#5434
With this patch, the 'Pd_session' interface no longer implements the
'Ram_allocator' interface, which allows us to change the
'Genode::Ram_allocator' semantics (as a subsequent step) without
affecting core's PD service.
The patch also replaces the client-local implementation of
'Pd_session_client::dataspace_size' by the proper RPC call 'ram_size' to
core, which mitigates the potential risk of de-referencing a dataspace
cap of an untrusted origin. E.g., in scenarios where the monitor
component requests the size of a dataspace allocated by the debugging
target.
Since 'ram_size' is an RPC call, it cannot be const. Hence, the
'Ram_alloctor::dataspace_size' has become non-const.
The new 'Pd_ram_allocator' implements the 'Ram_allocator' interface by
using a PD session.
Issue #5502
Under heavy load, the host may take its time to transfer 2x 16MiB on
some platforms.
Also, I replaced the explicit component builds by import_from_depot.
in order to support running intel/gpu next to boot_fb, which has access
to part of the mmio aperture. The aperture is tried to be accessed not
before a Platform client (intel/display) or the first GPU client
appears.
Fixes#5497
With planned removal of Thread:: exceptions, we need to consider that a
'Thread' object may exist without a valid 'Stack' and therefore without
a valid 'Native_thread', which is hosted as part of the 'Stack'.
This patch reworks the code that accesses the 'Native_thread' to use the
new 'Thread::with_native_thread' interface. Within the local scope,
the native thread is referred to as 'nt'.
The _init_platform_thread and _deinit_platform_thread() have been
replaced by _init_native_thread and _deinit_native_thread, which take
a 'Stack &' as argument.
As a safety caution, 'Native_thread' objects can no longer be copied.
Issue #5245
Prevents the following (long-since unattended) warning in intel_fb.
.../repos/pc/src/driver/framebuffer/intel/pc/spec/x86_64/../../lx_user.c:703:1: warning: the frame size of 2336 bytes is larger than 2048 bytes [-Wframe-larger-than=]
The EDID reported by connected displays contains data to identify
displays based on product strings and PNP IDs. Amended the connectors
report <connector> node by an optional display_name attribute containing
the EDID information if available.
Fixes#5499
To correctly deal with sparsely used cpu numbers on x86,
add an array to the board data-structure that tracks the actual
cpus detected. Later when memory is available, and the per-cpu
kernel stacks and cpu-local memory gets initialized, use the
array to reference the correct memory slots.
Fixgenodelabs/genode#5468
The special `hw/memory_consts.h` header file that is automatically
generated from an assembler base file to avoid pre-processing assembler
files, was missing inclusion guards.
Ref genodelabs/genode#5468
This patch exposes the formatted K/M/G byte output of 'Number_of_bytes'
as a class template function that accepts different basic types. This
enables the easy creation of a formatted output type for a type larger
than size_t.
Introduced in the context of issue #5489
The default IOMMU domain is used as a default if the kernel has IOMMU
support and if devices are not linked explicitly linked to a IOMMU
device. As soon as an IOMMU device is present, the kernel IOMMU is never
used. Hence, there is no point in maintaining the default domain if
there are other domains present.
genodelabs/genode#5494
When a session component has multiple IOMMU domains and `add_range()`
fails not on the first but on another domain, the range is not removed
from the first domain. This causes double insertion on the next try.
genodelabs/genode#5494
Don't copy Xml_node, remove the use of exceptions, split test mechanics
from the scenario's data representation, avoid inheritance, use const
where possible.
Note that this patch also changes the batching of the <replay> scenario.
Unlike the other scenarios, it did not use to cap the maximum number of
jobs according to 'batch' attribute. The interpretation of the 'batch'
attribute has now been unified.
Issue #5411Fixes#5489
When a single TOUCH and TOUCH_RELEASE event are submitted
simultaneously, the input sequence number is incremented twice. In
consequence, menu view will never generate a hover report for the
intermediate sequence number. However, this is the report that the
sculpt manager is waiting for to correlate it with the TOUCH event.
Only incrementing the input sequence number when the state changed from
not clicked to clicked exposes another corner case: When the last event
unfocused a dialog (e.g. the popup dialog) and when the current event
touches the dialog, the seq event is not delivered to the dialog because it
is not focused. Therefore, the seq event should be submitted after submitting
the TOUCH event.
genodelabs/genode#5491
The methods to read and write state to the vCPU were named
from the viewpoint of the `Vcpu_state` data structure that was being
exchanged with the VMM, i.e. `read_vcpu_state()` was reading the data
structure (and writing it into the vCPU) wheras `write_vcpu_state()` was
writing the vCPU's state into `Vcpu_state`. This is confusing from a
more generic understanding of a "vCPU state".
Rename the state manipulation methods into `load()` and `store()`, where
`load()` loads the supplied `Vcpu_state` into the vCPU and `store()` stores the
vCPU's state in the supplied `Vcpu_state`.
Issue #5483