PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Using the 'boot' Selector

The 'boot' DriverGestalt status call is made both by the Startup Disk control panel when the user selects a device and by the Start Manager when the ROM is trying to match a device in the drive queue with the device specified in PRAM. The DriveNum of the device's DrvQEl is placed in the ioVRefNum field of DriverGestaltParam. In the case of a SCSI device, it is necessary to return the data in a particular format so that the startup code knows on which SCSI bus, ID, and LUN the boot device can be found. It needs this information so that it can attempt to load that driver first. A SCSI driver can return the following data:

biPB.scsiHBAslotNumber          -> driverGestaltBootResponse.slot
biPB.scsiSIMsRsrcID             -> driverGestaltBootResponse.sRSRC
targetID<<3 + LUN               -> driverGestaltBootResponse.extDev
partition number                -> driverGestaltBootResponse.partition

As shown, the disk driver can copy the values found in BusInquiry into the slot and sRSRC fields and can generate the extDev field by left-shifting the target ID by 3 bits (0 to 31 range) and adding the logical unit number (0 to 8 range). The partition field enables the selection of a single partition on a multiply partitioned device as the boot device. It is not interpreted by the ROM or the startup disk 'cdev', so the driver can choose a meaning and a value for this field. Typically the driver would enumerate the partitions laid out on a disk and return the number of the partition for the drive specified in the ioVRefNum field.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)