|
A host processor (usually a PC) write the whole of an application file to the host link. The bootloader on each processor (initially the root processor) receive data on its boot link and respond as follows:
1.
|
The first word coming down the boot link is examined:
|
| • | If the first word has the value CC00000216 the bootloader reads in the next word which is the type code for this processor as derived from the type given the configuration file. The bootloader compares this code against the actual type of its processor. A two-word response is then written to the boot link: |
|
| • | If the types are not compatible, the bootloader send a failure response by writing the value AA00000016 followed by the processor's actual type code. |
|
|
| • | If the types are compatible, the bootloader sends a success response: the value AA00000316 followed by the processor's actual type code. Both of the two input words are then discarded. The processor is marked as CHECKING. |
|
|
|
| • | If the first word has the value CC00000416 the bootloader reads in the next word and discards both input words. The processor is marked as NOT_CHECKING. CC00000416 is the value put in the application file by the configurer when checking is enabled; it is changed to CC00000216 by the host loader to activate checking. This is done to allow user-written host code to load applications without having to worry about load checking. |
|
|
| • | If the first word has neither value, the bootloader takes no specific action, and the first word is passed on to the next step in loading. The processor is marked as NOT_CHECKING. |
|
|
2.
|
The following sequence of words makes up the information the bootloader uses to load the code and data needed by its processor. After loading this, control is passed to the Diamond kernel which then starts its own loader.
|
3.
|
The Diamond loader now interprets the rest of the incoming data as a sequence of commands, each with optional data. Commands are either for this processor or are to be passed down a link to other processors. There are three commands of particular interest here:
|
|
CMD_BOOT
|
This command simply sends its data down a selected link, just like the host sent the application file to the root. The receiving processor deals with it in exactly the same way as the root processed the data it received. This boot data not start with the CC00000X16 values described above.
|
|
CMD_CHECK
|
This command is used to check that a processor about to be loaded is present and has the correct type. It is ignored unless the processor is marked as CHECKING. It sends a pair of words (described above) down the selected link and observes the response. Loading continues if a success response is received. If an error is detected (no response within a short time or a failure response), the rest of the input from the boot link is absorbed and an appropriate failure response is written to the boot link.
|
|
CMD_GO
|
This is always the final command sent to a processor. If the processor is marked as CHECKING, a success response is written to the boot link. All of the tasks on the processor are then started and the Diamond loader stops. Note that CMD_GO commands have been sent to all processors booted through the current one before that processor receives its own CMD_GO.
|
|