Need guidelines: Firmware boot path

From: Benjamin Herrenschmidt (bh40@calva.net)
Date: Fri Jan 07 2000 - 08:54:40 EST


Hi !

I'd need some guidelines about the best way to implement a feature that
is needed on PowerMacs (and possibly other Open-Firmware based machines)
to correctly configure the firmware boot path.

Basically, what we need is to be able, from userland, to figure out the
Open Firmware device path for a given block device or network driver.

This path is a plain string, the only piece of kernel that may be able to
return this information is the device driver itself, either by returning
the OF path it used for it's own probing (for non-PCI devices, this
concerns mainly PowerMac devices in the Apple multifunction ASIC), or by
getting the OF path from a pci bus/dev_fn pair.

Also, each device may need to add device-specific infos to the path (for
example, a block device may need to add a partition number). However,
this additional step may be doable from userland.

So I want to add this feature to the PPC kernel so that the various
installation tools can configure the firmware correctly (the reason why
people don't need this today, and why it will be needed now, is a
different discussion but I can post a separate explanation if one want it).

If there some already defined ioctl for returning such kind of
platform-specific boot informations ? Or should I create some special
node in /proc in which all drivers that have been modified for to return
this information would add an entry ?

Currently, we export the entire Open Firmware device-tree in
/proc/device-tree, so eventually I could write a mecanism for driver to
"register" their major/minor and 'attach' it to the device-tree. (I would
add a specific property in the device node with the major/minor). The
problem is that some devices have several minor for one device entry in
the device-tree, others may have several tree nodes using different
minors but the same major, etc...

Any suggestion ? Is there already a similar mecanism for another platform ?

Regards,
Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:09 EST