Important: The information in this document is obsolete and should not be used for new development.
|
|
Boot Blocks
The first two logical blocks on every Macintosh volume are boot blocks. These blocks contain system startup information: instructions and information necessary to start up (or "boot") a Macintosh computer. This information consists of certain configurable system parameters (such as the capacity of the event queue, the number of open files allowed, and so forth) and is contained in a boot block header. The system startup information also includes actual machine-language instructions that could be used to load and execute the System file. Usually these instructions follow immediately after the boot block header. Generally, however, the boot code stored on disk is ignored in favor of boot code stored in a resource in the System file.The structure of the boot block header can be described by the Pascal
BootBlkHdr
data type.
Note that there are two boot block header formats. The current format includes two fields at the end that are not contained in the older format. These fields allow the Operating System to size the System heap relative to the amount of available physical RAM. A boot block header that conforms to the older format sets the size of the System heap absolutely, using values specified in the header itself. You can determine whether a boot block header uses the current or the older format by inspecting a bit in the high-order byte of the
- WARNING
- The format of the boot block header is subject to change. If your application relies on the information presented here, it should check the boot block header version number and react gracefully if that number is greater than that documented here.
bbVersion
field, as explained in its field description.
TYPE BootBlkHdr = {boot block header} RECORD bbID: Integer; {boot blocks signature} bbEntry: LongInt; {entry point to boot code} bbVersion: Integer; {boot blocks version number} bbPageFlags: Integer; {used internally} bbSysName: Str15; {System filename} bbShellName: Str15; {Finder filename} bbDbg1Name: Str15; {debugger filename} bbDbg2Name: Str15; {debugger filename} bbScreenName: Str15; {name of startup screen} bbHelloName: Str15; {name of startup program} bbScrapName: Str15; {name of system scrap file} bbCntFCBs: Integer; {number of FCBs to allocate} bbCntEvts: Integer; {number of event queue elements} bb128KSHeap: LongInt; {system heap size on 128K Mac} bb256KSHeap: LongInt; {used internally} bbSysHeapSize: LongInt; {system heap size on all machines} filler: Integer; {reserved} bbSysHeapExtra: LongInt; {additional system heap space} bbSysHeapFract: LongInt; {fraction of RAM for system heap} END;
Field Description
bbID
- A signature word. For HFS volumes, this field always contains the value $4C4B.
bbEntry
- The entry point to the boot code stored in the boot blocks. This
field contains machine-language instructions that translate toBRA.S *+$90
(orBRA.S *+$88
, if the older block header format is used), which jumps to the main boot code following the boot block header. This field is ignored, however, if bit 6 is clear in the high-order byte of thebbVersion
field or if the low-order byte in that field contains $D.bbVersion
- A flag byte and boot block version number. The high-order byte of this field is a flag byte whose bits have the following meanings:
Bit Meaning 0-4 Reserved; must be 0 5 Set if relative system heap sizing is to be used 6 Set if the boot code in boot blocks is to be executed 7 Set if new boot block header format is used - If bit 7 is clear, then bits 5 and 6 are ignored and the version number is found in the low-order byte of this field. If that byte contains a value that is less than $15, the Operating System ignores any values in the
bb128KSHeap
and bb256KSHeap fields and configures the System heap to the default value contained in thebbSysHeapSize
field. If that byte contains a value that is greater than or equal to $15, the Operating System sets the System heap to the value inbbSysHeapSize
. In addition, the Operating System executes
the boot code in thebbEntry
field only if the low-order byte contains $D.- If bit 7 is set, the Operating System inspects bit 6 to determine whether to execute the boot code contained in the
bbEntry
field and bit 5 to determine whether to use relative System heap sizing. If bit 5 is clear, the Operating System sets the System heap to the value
inbbSysHeapSize
. If bit 5 is set, the System heap is extended by the value inbbSysHeapExtra
plus the fraction of available RAM specified inbbSysHeapFract
.bbPageFlags
- Used internally.
bbSysName
- The name of the System file.
bbShellName
- The name of the shell file. Usually, the system shell is the Finder.
bbDbg1Name
- The name of the first debugger installed during the boot process. Typically this is Macsbug.
bbDbg2Name
- The name of the second debugger installed during the boot process. Typically this is Disassembler.
bbScreenName
- The name of the file containing the startup screen. Usually this is StartUpScreen.
bbHelloName
- The name of the startup program. Usually this is Finder.
bbScrapName
- The name of the system scrap file. Usually this is Clipboard.
bbCntFCBs
- The number of file control blocks (FCBs) to put in the FCB buffer. In system software version 7.0 and later, this field specifies only the initial number of FCBs in the FCB buffer, because the Operating System can usually resize the FCB buffer if necessary. See "File Control Blocks" on page 2-81 for details on the FCB buffer.
bbCntEvts
- The number of event queue elements to allocate. This number determines the maximum number of events that the Event Manager can store at any one time. Usually this field contains the value 20.
bb128KSHeap
- The size of the System heap on a Macintosh computer having
128 KB of RAM.bb256KSHeap
- Reserved.
bbSysHeapSize
- The size of the System heap on a Macintosh computer having
512 KB or more of RAM. This field might be ignored, as explained in the description of thebbVersion
field.filler
- Reserved.
- bbSysHeapExtra
- The minimum amount of additional System heap space required. If bit 5 of the high-order word of the
bbVersion
field is set, this value is added tobbSysHeapSize
.- bbSysHeapFract
- The fraction of RAM available to be used for the System heap. If
bit 5 of the high-order word of thebbVersion
field is set, this fraction of available RAM is added tobbSysHeapSize
.
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2007 Apple Inc. All rights reserved. | Terms of use | Privacy Notice |