Mac OS X Internals: A Systems Approach
We saw in Chapter 4 that Open Firmware hands control over to BootX, the Mac OS X bootloader, which performs various operations before the Mac OS X kernel can begin to execute. In this chapter, we continue discussion from the point where the kernel takes over from BootX. We will look at the important events that occur during kernel startup, visit various kernel subsystems, see how they are initialized, see how the kernel launches the first user-space program, and look at the details of user-level startupup to the point where the system is ready for the user. In doing so, we will come across numerous concepts and terms that have not been introduced so far in this book. In this sense, this chapter makes a number of implicit or explicit forward references. Perhaps the most fruitful approach to understanding system startup would be to refer to Darwin sourceespecially the xnu packagein conjunction with this chapter. It is important to realize that the Mac OS X kernel is an evolving entity: Its internal details are subject to change, and sometimes change greatly, across revisions.
In this chapter, we associate names of kernel functions with the pathnames of the files that implement them. For example, _start() [osfmk/ppc/start.s] means that the function _start() is implemented in the file osfmk/ppc/start.s in the kernel source tree. Unless stated otherwise, all pathnames are relative to the kernel source tree's root directory, which is usually named xnu-x.y.z, where x, y, and z are components of the kernel's version number. An important purpose of referring to functions along with their implementation files is to allow easy lookups of further information. Moreover, you can see which portions of the kernel the caller and the callee belong to. Examples of path prefixes are osfmk (Mach), bsd (BSD), iokit (the I/O Kit), libkern (the I/O Kit kernel library), libsa (the stand-alone library), and pexpert (the Platform Expert).
|
Категории