Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidation of the driver manager into the sculpt manager #5150

Closed
nfeske opened this issue Mar 18, 2024 · 7 comments
Closed

Consolidation of the driver manager into the sculpt manager #5150

nfeske opened this issue Mar 18, 2024 · 7 comments

Comments

@nfeske
Copy link
Member

nfeske commented Mar 18, 2024

To make the driver management of Sculpt more flexible, runtime-dependent driver components should better move from the static drivers subsystem to the dynamic runtime subsystem. This brings the following benefits:

  • The sculpt manager can dynamically expand the driver's resource quotas. E.g., the RAM needed by Intel FB when encountering large resolutions can be granted by the Sculpt manager by responding to resource requests.
  • Drivers like Intel FB can be removed and restarted during a suspend-resume cycle.
  • Drivers appear as nodes in the component graph, which opens up the potential of hosting driver-specific settings in the node dialogs.
  • USB device management becomes simpler because the host-driver configuration would no longer require an interplay of the Sculpt manager with the static drivers subsystem. Instead, the USB config could follow the same pattern as other configurations. That is, config/usb contains the user-dictated rules whereas config/managed/usb contains the effective configuration (generated by the Sculpt manager, consumed by the USB host driver) that includes the supplements of the Sculpt manager.
@nfeske nfeske added the feature label Mar 18, 2024
nfeske added a commit that referenced this issue Mar 18, 2024
This is a preparatory commit for issue #5150. Board_info is designated
for the selection of device drivers. It is not specific to PCI devices.
nfeske added a commit that referenced this issue Mar 18, 2024
@nfeske
Copy link
Member Author

nfeske commented Mar 18, 2024

Commits 9d19410 and 1b15457 implement the first step, covering the PC framebuffer drivers.

nfeske added a commit to nfeske/genode that referenced this issue Mar 20, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 20, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode-allwinner that referenced this issue Mar 20, 2024
The event filter has been moved to the static init, the USB host and HID
drivers are now hosted at the runtime substem.

Issue genodelabs/genode#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 21, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 21, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 21, 2024
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This patch moves the AHCI driver from the 'drivers -> dynamic'
subsystem to the runtime, managed by the sculpt_manager. One
implication of this change is the new need to supplement a device
port number to the 'Storage_target', in addition to the existing
label and partition. Previously, each block device was addressed by
merely a label specified for a parent session. The meanings of the
'Storage_target' elements are now as follows.

- The label corresponds to the driver component providing the storage.
- The port is used as block-session label when opening the session
  at the driver.
- The partition(s) denote the partition information contained in
  the block session.

Components operating as clients of the AHCI driver (e.g., a file system)
refer to their storage target as <label>-<port>.<partition> when a port
is defined (for AHCI). For drivers w/o ports, like USB storage where
each USB-block driver correponds to only one device, the storage target
is denoted as <label>.<partition>. When no partition table is present,
the '.<partition>' part is omitted.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This patch moves the AHCI driver from the 'drivers -> dynamic'
subsystem to the runtime, managed by the sculpt_manager. One
implication of this change is the new need to supplement a device
port number to the 'Storage_target', in addition to the existing
label and partition. Previously, each block device was addressed by
merely a label specified for a parent session. The meanings of the
'Storage_target' elements are now as follows.

- The label corresponds to the driver component providing the storage.
- The port is used as block-session label when opening the session
  at the driver.
- The partition(s) denote the partition information contained in
  the block session.

Components operating as clients of the AHCI driver (e.g., a file system)
refer to their storage target as <label>-<port>.<partition> when a port
is defined (for AHCI). For drivers w/o ports, like USB storage where
each USB-block driver correponds to only one device, the storage target
is denoted as <label>.<partition>. When no partition table is present,
the '.<partition>' part is omitted.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
As the NVMe driver was the last remaining driver controlled by the
driver manager, this patch removes the 'drivers -> dynamic' subsystem
along with the driver manager from sculpt/drivers/pc.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
The former pkg/drivers_managed-pc has been replaced by the
pkg/sculpt_drivers-pc, which is merely a collection of archives.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
This patch moves the AHCI driver from the 'drivers -> dynamic'
subsystem to the runtime, managed by the sculpt_manager. One
implication of this change is the new need to supplement a device
port number to the 'Storage_target', in addition to the existing
label and partition. Previously, each block device was addressed by
merely a label specified for a parent session. The meanings of the
'Storage_target' elements are now as follows.

- The label corresponds to the driver component providing the storage.
- The port is used as block-session label when opening the session
  at the driver.
- The partition(s) denote the partition information contained in
  the block session.

Components operating as clients of the AHCI driver (e.g., a file system)
refer to their storage target as <label>-<port>.<partition> when a port
is defined (for AHCI). For drivers w/o ports, like USB storage where
each USB-block driver correponds to only one device, the storage target
is denoted as <label>.<partition>. When no partition table is present,
the '.<partition>' part is omitted.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
As the NVMe driver was the last remaining driver controlled by the
driver manager, this patch removes the 'drivers -> dynamic' subsystem
along with the driver manager from sculpt/drivers/pc.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 22, 2024
The former pkg/drivers_managed-pc has been replaced by the
pkg/sculpt_drivers-pc, which is merely a collection of archives.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 25, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 25, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue genodelabs#5150
nfeske added a commit to nfeske/genode that referenced this issue Mar 25, 2024
nfeske added a commit to nfeske/genode that referenced this issue Mar 25, 2024
This patch moves the AHCI driver from the 'drivers -> dynamic'
subsystem to the runtime, managed by the sculpt_manager. One
implication of this change is the new need to supplement a device
port number to the 'Storage_target', in addition to the existing
label and partition. Previously, each block device was addressed by
merely a label specified for a parent session. The meanings of the
'Storage_target' elements are now as follows.

- The label corresponds to the driver component providing the storage.
- The port is used as block-session label when opening the session
  at the driver.
- The partition(s) denote the partition information contained in
  the block session.

Components operating as clients of the AHCI driver (e.g., a file system)
refer to their storage target as <label>-<port>.<partition> when a port
is defined (for AHCI). For drivers w/o ports, like USB storage where
each USB-block driver correponds to only one device, the storage target
is denoted as <label>.<partition>. When no partition table is present,
the '.<partition>' part is omitted.

Issue genodelabs#5150
nfeske added a commit that referenced this issue Apr 12, 2024
nfeske added a commit that referenced this issue Apr 12, 2024
The move of block, USB, and input drivers from the drivers subsystem to
the runtime alleviates the need for routing those sessions between the
subsystems.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
This patch harmonizes the driver management between the sculpt manager
and the phone manager by hosting the individual drivers in a new
'Drivers' class with a narrow interface towards 'Sculpt::Main'. The
patch also introduces a clean separation of the 'Board_info' between
features detected at runtime (on PC hardware), statically
known/managed features (phone hardware), and options that can be
toggled at runtime.

With common patterns for managing drivers in place now, this commit
also moves the former runtime/wifi_drv.cc and runtime/nic_drv.cc
code to driver/wifi.h and driver/nic.h. The _drv suffix of the wifi
and nic driver components have been dropped.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
This patch removes the remains of the original block-device discovery as
done by the former driver manager. Block sessions are now always
provided by components hosted in the runtime subsytem. The storage node
of the graph is no more.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
This patch replaces the dynamic use of Attached_rom_dataspace by a
new Rom_handler utility, which implicitly covers the initial import of
content (safely using 'local_submit'), the registration of the signal
handler, passes the Xml_node to the handler function (no need to
manually call 'update'), and provides scoped access to the content via a
'with_xml' method. The latter reinforces a programming style that does
not need to copy Xml_node objects.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
GPU drivers always reside in the runtime subsystem now.
This patch eliminates the risk of requesting a GPU session at the
drivers subsystem, which never gets established.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
This patch removes the remains of the original block-device discovery as
done by the former driver manager. Block sessions are now always
provided by components hosted in the runtime subsytem. The storage node
of the graph is no more.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
This patch replaces the dynamic use of Attached_rom_dataspace by a
new Rom_handler utility, which implicitly covers the initial import of
content (safely using 'local_submit'), the registration of the signal
handler, passes the Xml_node to the handler function (no need to
manually call 'update'), and provides scoped access to the content via a
'with_xml' method. The latter reinforces a programming style that does
not need to copy Xml_node objects.

Issue #5150
nfeske added a commit that referenced this issue Apr 12, 2024
GPU drivers always reside in the runtime subsystem now.
This patch eliminates the risk of requesting a GPU session at the
drivers subsystem, which never gets established.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
By moving the event_filter and the numlock_remap_rom from the drivers
subsystem to the static system, the filtering can be applied to drivers
hosted in the runtime and drivers hosted in the drivers subsystem.

This is a preparatory step for moving the USB host and HID drivers to
the runtime.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This commit moves the USB and USB HID driver from the drivers subsystem
into the runtime. The former special USB node of the graph corresponds
now to the USB host-controller driver (named "usb"). The management
options for USB storage devices are available inside this component
node now.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This patch moves the AHCI driver from the 'drivers -> dynamic'
subsystem to the runtime, managed by the sculpt_manager. One
implication of this change is the new need to supplement a device
port number to the 'Storage_target', in addition to the existing
label and partition. Previously, each block device was addressed by
merely a label specified for a parent session. The meanings of the
'Storage_target' elements are now as follows.

- The label corresponds to the driver component providing the storage.
- The port is used as block-session label when opening the session
  at the driver.
- The partition(s) denote the partition information contained in
  the block session.

Components operating as clients of the AHCI driver (e.g., a file system)
refer to their storage target as <label>-<port>.<partition> when a port
is defined (for AHCI). For drivers w/o ports, like USB storage where
each USB-block driver correponds to only one device, the storage target
is denoted as <label>.<partition>. When no partition table is present,
the '.<partition>' part is omitted.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
As the NVMe driver was the last remaining driver controlled by the
driver manager, this patch removes the 'drivers -> dynamic' subsystem
along with the driver manager from sculpt/drivers/pc.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
The former pkg/drivers_managed-pc has been replaced by the
pkg/sculpt_drivers-pc, which is merely a collection of archives.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This patch moves SoC-specific framebuffer and touchscreen drivers
(PinePhone) to the runtime subsystem. They are enabled for the
phone_manager.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
chelmuth pushed a commit that referenced this issue Apr 12, 2024
The move of block, USB, and input drivers from the drivers subsystem to
the runtime alleviates the need for routing those sessions between the
subsystems.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This patch harmonizes the driver management between the sculpt manager
and the phone manager by hosting the individual drivers in a new
'Drivers' class with a narrow interface towards 'Sculpt::Main'. The
patch also introduces a clean separation of the 'Board_info' between
features detected at runtime (on PC hardware), statically
known/managed features (phone hardware), and options that can be
toggled at runtime.

With common patterns for managing drivers in place now, this commit
also moves the former runtime/wifi_drv.cc and runtime/nic_drv.cc
code to driver/wifi.h and driver/nic.h. The _drv suffix of the wifi
and nic driver components have been dropped.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This patch removes the remains of the original block-device discovery as
done by the former driver manager. Block sessions are now always
provided by components hosted in the runtime subsytem. The storage node
of the graph is no more.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
This patch replaces the dynamic use of Attached_rom_dataspace by a
new Rom_handler utility, which implicitly covers the initial import of
content (safely using 'local_submit'), the registration of the signal
handler, passes the Xml_node to the handler function (no need to
manually call 'update'), and provides scoped access to the content via a
'with_xml' method. The latter reinforces a programming style that does
not need to copy Xml_node objects.

Issue #5150
chelmuth pushed a commit that referenced this issue Apr 12, 2024
GPU drivers always reside in the runtime subsystem now.
This patch eliminates the risk of requesting a GPU session at the
drivers subsystem, which never gets established.

Issue #5150
alex-ab added a commit to alex-ab/genode that referenced this issue Apr 12, 2024
alex-ab added a commit to alex-ab/genode that referenced this issue Apr 12, 2024
When the "system" ROM state turns to "suspend",
the S3 state information of the sleep_states ROM are determined and
are used to invoke the privileged Pd::system_control call.

Issue genodelabs#5150
@nfeske
Copy link
Member Author

nfeske commented Apr 12, 2024

The change entered the master branch.

@nfeske nfeske closed this as completed Apr 12, 2024
nfeske added a commit to genodelabs/genode-allwinner that referenced this issue Apr 19, 2024
The event filter has been moved to the static init, the USB host and HID
drivers are now hosted at the runtime substem.

Issue genodelabs/genode#5150
skalk added a commit to genodelabs/genode-imx that referenced this issue Apr 23, 2024
Several components have been moved from the driver subsystem to the runtime,
like: event filter, fb, USB host and HID drivers.

Issue genodelabs/genode#5150
chelmuth pushed a commit to genodelabs/genode-allwinner that referenced this issue Apr 25, 2024
The event filter has been moved to the static init, the USB host and HID
drivers are now hosted at the runtime substem.

Issue genodelabs/genode#5150
chelmuth pushed a commit to genodelabs/genode-imx that referenced this issue Apr 25, 2024
Several components have been moved from the driver subsystem to the runtime,
like: event filter, fb, USB host and HID drivers.

Issue genodelabs/genode#5150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants