Technical information

© Jean Louis-Guérin V1.2a September 2014 Page 50 / 69
9.6 TOS Boot Sequence
In this section we describe a typical sequence to load a hard disk driver from a bootable hard disk
partition. The actual implementation differs from driver to driver.
During the TOS ROM System initialization an attempt is made to load Root Sector (RS) from the DMA
bus. For each of the eight DMA bus devices the TOS attempts a read operation on the first physical
sector 0.
If the read is successful, and if the sector word checksum is equal to $1234, then the boot loader code
from the Root Sector is executed. Remember that the Root Sector is composed of a boot-loader
program and a partition table. A common name for the boot-loader program part of the Root Sector is
the Initial Program Loader (IPL). The IPL is very small and quite limited. Its main job is usually to find
and start the next program in the chain. For that matter it usually looks at the partition table to see if
any of the entries there has a flag to indicate a bootable partition. If it find one then it usually goes to
the very first byte of that partition (the Boot Sector) and starts the boot loader code that it finds there (If
several partition are bootable the IPL select the first).
The next program in the chain is at the very beginning of the partition in the Boot Sector. This program
is often called the Partition Boot Loader (PBL). The PBL will do its job and then start the next
program: usually the hard disk driver loader. The location of the next program will be different for
various hard disk drivers. During the installation of a hard disk driver (with a hard disk utility) the PBL
will be written with the information necessary to find the driver file location. The boot loader code can
perform a variety of tasks. In some cases it can, for example, load the hard disk driver from the first
track of the disk, which it assumes to be “free” space (that is not allocated to any disk partition), and
executes it. In others cases, it uses a table of embedded disk locations to locate the hard disk driver
loader and execute it.
The last program in the chain is the actual hard disk driver loader. This program loads in memory the
necessary code to handle the disk drives and finally returns to the TOS program to start GEMDOS.
For Atari the boot sequence is: BIOS / TOS IPL PBL HD Driver GEMDOS
In these graphic the RS is shown as a separate section at the very start of the hard drive. It is indeed
separate and not connected in any way to the following partitions. Convention is to reserve a small
section of the drive specifically for the RS to reside on. I’ve shown the PBL as a separate section but it
is actually a part of the partition it is in.
Note that the PPDRIVER hard disk driver uses a slightly different boot sequence. It does not use (and
therefore does not write) a PBL in any of the partitions. Instead the IPL call directly the HD driver
loader code. This code is located in the reserved area at the beginning of the disk (starting at sector
2). This allows an easy selection at boot time of the boot partition. You can therefore switch between
different configurations by selecting a specific partition with the required AUTO, ACC, Desktop
Settings…