Opened 15 years ago

Closed 10 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 by Jakub Jermář, 15 years ago

Cc: jakub@… added

comment:2 by Jakub Jermář, 15 years ago

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 by Jiri Svoboda, 15 years ago

Component: kernel/genarch

comment:4 by Jakub Jermář, 13 years ago

Milestone: 0.5.0

comment:5 by Jakub Jermář, 13 years ago

Type: taskenhancement

comment:6 by Jakub Jermář, 10 years ago

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.