Apple Desktop Computer Open Firmware and the Device Tree, Interrupt Layout, Machine Identification

Page 67

C H A P T E R 5

Software

Once Open Firmware locates a startup device and successfully loads a Mac OS ROM, image it passes information about the chosen device in the bootpath variable. This information, rather than that previously set in PRAM, is subsequently used by the Mac OS ROM to locate the device containing the startup System Folder.

IMPORTANT

The previous API for controlling the startup device selection, using _GetDefaultStartup and _SetDefaultStartup, is not effective on the iMac.

Open Firmware and the Device Tree

NewWorld relies heavily on a functioning Open Firmware with a complete device tree.

Interrupt Layout

The interrupt layout is determined by information in the device tree. An interrupt tree overlays the other information in the device tree to describe how the interrupts are configured. The Trampoline code traverses this device tree interrupt tree and builds data structures that are used to dispatch interrupts. The device tree interrupt tree is defined in the Open Firmware Recommended Practice: Interrupt Mapping. It is not necessary to change any of the interrupt dispatching code, either 68K or native. All the necessary information is retrieved from the device tree.

This interrupt dispatch code has drastically reduced latency times as compared to all previous PCI Macintosh computers.

Machine Identification

Applications can find out which machine they are running on by calling the Gestalt Manager. The gestaltMachineType value returned for the iMac is 406 (196 hexadecimal).

Because NewWorld uses the same Universal and ProductInfo tables for all computer models that it runs on, those computers all have the same Box Flag. All those computers use the same enablers, and no patches are made to the

What Is Different

67

Image 67
Contents Apple iMac Computer Page Contents RAM Expansion Devices and PortsRtas SoftwareRtas NV-RAM Appendix Abbreviations IndexFigures and Tables Page About This Developer Note Contents of This NoteATA Devices PowerPC G3 MicroprocessorSupplemental Reference Documents Mac OSOpen Firmware USB DevicesE F a C E Introduction Features Shows a front view of the computer Case and External FeaturesFront view 2Side view showing I/O bay System Software Compatibility IssuesVideo RAM Expansion Modules Main RAM Expansion ModulesUSB Ports and Devices Page Architecture Architecture G3 Microprocessor Processor moduleBackside Cache Memory Controller and PCI Bridge Main Logic BoardController IC Video Display Subsystem USB ControllerBuilt-in Modem Infrared Link Module Devices and Ports USB Ports USB ConnectorsGND Transfer Types SupportedADB Compatibility USB Compatibility IssuesUSB Controller Serial Port CompatibilityMacintosh-To-Macintosh Connections USB Storage DevicesKeyboard Layout KeyboardKeyboard and USB MouseVideo Display Hard Disk DriveSound System Infrared Communication LinkExternal Sound Input Sound InputsSound Outputs Built-in MicrophoneExternal Sound Output Sound SpecificationsHeadphone Jacks Total harmonic distortion Internal Modem Ethernet PortPage RAM Expansion Expansion Slots Removing the Logic Board AssemblyPlacing the Computer Face Down Unfastening the Cables Removing the bottom coverRAM Expansion Removing the Retaining Screws 3Logic board assembly handle and retaining screwsRemoving the EMI Shield Removing the Logic Board AssemblyLocations of the Expansion Slots 6Locations of the RAM expansion slots Main RAM ExpansionElectrical Design of RAM SO-DIMMs Mechanical Design of RAM SO-DIMMsSdram Devices Configuration of RAM SO-DIMMs Address Multiplexing RAM SO-DIMM Electrical LimitsVideo RAM Expansion Page Software Why Make This Change? What Has Changed Features of the New Approach Data Structures and Files PerformanceRAM Footprint User ExperienceBoot ROM Contents Rtas Mac OS ndrv DriversToolbox Image File Contents Trampoline Code NewWorld Boot ProcessToolBox ROM Image Interrupt Handling What Is DifferentRAM Footprint Outmoded ResourcesStartup Disk Control Panel NanoKernelInterrupt Layout Open Firmware and the Device TreeMachine Identification Software Abbreviations Chrp NMI Page Index Nvram X, Y, Z Allen Watson