3 Replies Latest reply: Nov 29, 2009 5:00 AM by 807559 RSS

    How to trace the construction of the device tree in solaris?

    807559
      Hi Experts,

      I want to trace the device tree construction process in Soalris, including the hardware device and the peseudo device.


      Thanks,
      Eric
        • 1. Re: How to trace the construction of the device tree in solaris?
          807559
          Hi Eric - I assume you mean you want to trace the driver loading process in Solaris. On SPARC systems, the actual device tree is constructed prior to the boot loading process and is made available for inspection through OBP commands.

          You can get a transcript of driver loading process, aka mod loading, during the boot session by the following setting in /etc/system and rebooting:

          set moddebug=0x80000000

          The setting enables verbose messages that write to the system console as well as /var/adm/messages. There can be some odd side effects owing to the slowdown by this I/O. In particular, messages may write to the console even after the windowing system has started.
          • 2. Re: How to trace the construction of the device tree in solaris?
            807559
            Thanks.
            I think "build a device node on device tree " not means " the driver module is loaded".
            I want to know when the device node is built for a pseudo device?
            • 3. Re: How to trace the construction of the device tree in solaris?
              807559
              The following steps explain the device tree construction. But it does not handle the psedo device.
              So I also want to know how the pseudo device is added on the device tree.

              The system goes through the following steps to build the tree:

              1. The CPU is initialized and searches for firmware.
              2. The main firmware (OpenBoot, Basic Input/Output System (BIOS), or Bootconf) initializes and creates the device tree with known or self-identifying hardware.
              3. When the main firmware finds compatible firmware on a device, the main firmware initializes the device and retrieves the device's properties.
              4. The firmware locates and boots the operating system.
              5. The kernel starts at the root node of the tree, searches for a matching device driver, and binds that driver to the device.
              6. If the device is a nexus, the kernel looks for child devices that have not been detected by the firmware. The kernel adds any child devices to the tree below the nexus node.
              7.The kernel repeats the process from Step 5 until no further device nodes need to be created.