Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 10 years ago

Closed 5 years ago

#64 closed enhancement (wontfix)

Detect devices by traversing the kernel device tree starting at root and proceed towards leaves

Reported by: Jakub Jermář Owned by:
Priority: major Milestone:
Component: helenos/kernel/genarch Version: mainline
Keywords: ofw Cc: jakub@…
Blocker for: Depends on:
See also:

Description

Currently, the sparc64 kernel determines physical addresses of devices by ascending from the OFW device leaf node towards the OFW device tree root and recalculating (mapping) the address as dictated by the child node reg property and the parent node ranges property. This approach works, but has some limitations:

  • works in the counter-intuitive way
  • depends on the fact that /aliases contains the path to the device of interest so that the algorithm knows in which node to start
  • some nodes can be visited repeatedly
  • some devices are not noticed by the kernel
  • an OFW node "driver" needs to assume that it is attached to a certain type of the parent node (e.g. "if I am not attached to PCI, then I don't know what to do…")

For the sake of the sparc64 kernel, but also the ppc32 kernel (see #63), it would be better if the kernel traversed the tree descending from the root node towards the leaf nodes. The traversal would not follow edges that lead to an unknown/unsupported node. For each visited node, the physical address would be calculated. The same approach can be used for mapping interrupts.

Change History (6)

comment:1 Changed 10 years ago by Jakub Jermář

Cc: jakub@… added

comment:2 Changed 10 years ago by Jakub Jermář

Summary: Detect devices by traversing the kernel device tree starting at root and proceeed towards leavesDetect devices by traversing the kernel device tree starting at root and proceed towards leaves

comment:3 Changed 10 years ago by Jiri Svoboda

Component: kernel/genarch

comment:4 Changed 9 years ago by Jakub Jermář

Milestone: 0.5.0

comment:5 Changed 9 years ago by Jakub Jermář

Type: taskenhancement

comment:6 Changed 5 years ago by Jakub Jermář

Resolution: wontfix
Status: newclosed

Closing as Will Not Fix. Instead, we should focus on removing device knowledge from the kernel altogether.

Note: See TracTickets for help on using tickets.