ChorusOS 4.0 Porting Guide

Initializing a ChorusOS System

There are three stages to initializing a ChorusOS operating system:

Power-up Initialization

When the board is powered up or reset, the processor starts executing code at a fixed address. This code sets up the minimum hardware environment required by the system loader. The initialization code is stored in non-volatile physical memory.

Loading the System Image

The last action of the power-up initialization code is to hand control to the initial loader, which loads the system image into physical memory and jumps to the image entry point.

If the system image is already stored in non-volatile memory on the board, the initial loader is not required, and the initialization code terminates by jumping to the entry point of the system image.

Firmware

Most development boards are provided with a standard firmware power-up initialization code and loader in PROM. This firmware is able to download a system image from a local device or from the network.

Sun Embedded Workshop provides tools to build the ChorusOS system image in the format required by the firmware loaders supported.

ChorusOS Boot Monitor

The Boot Monitor is the initial loader provided with ChorusOS for use with the ChorusOS operating system. It is able to download the system image from the network.

The Boot Monitor is implemented as an aplication on top of a minimal ChorusOS configuration.

Initializing the ChorusOS Kernel and OS

ChorusOS boots from the system image. The system image contains binary executable files of the bootstrap program, debug agent, microkernel, drivers, OS servers and possibly applications. It can also contain a set of data files such as networking configuration files.

System image files are organized in one or more memory banks. Each memory bank can be formatted as a file system volume (for example, FAT12) and exported through the microkernel API as a memory device. Thus a system image file can be viewed as a file in a file system volume on a memory device.

The ChorusOS operating system is initialized in two stages:

  1. Kernel initialization

  2. OS service initialization

Kernel Initialization

The kernel is the minimal ChorusOS operating system comprising the microkernel and the built-in drivers.

The bootstrap program starts the microkernel. The microkernel then starts the built-in drivers.

OS Initialization

The OS is implemented on top of the kernel as a set of actors that provide services such as file systems and networking protocols.

The kernel starts the OS services by creating the initial subset of OS actors from the system image binary files. The OS can then activate additional system services by loading actors from files located on the system image memory, or local or remote devices.