beautypg.com

Open firmware and the device tree, Interrupt layout, Machine identification – Apple iMac User Manual

Page 67

background image

C H A P T E R 5

Software

What Is Different

67

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

5

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

Interrupt Layout

5

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

5

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