STm8000 and STb7100 dual-boot support

By the term "Dual Boot" we mean the support provided by ST Linux to launch applications on the slave coprocessors which are part of multicore STMicroelectronics SoCs. These multicore SoCs include at present the STm8000 (ST40 plus 3 ST220s) and the STb7100 (ST40 plus 2 ST231s).

The ST40 is always considered the master CPU, and it runs Linux. In general,
all the CPUs share all the RAM and ROM (FLASH) resources. Other hardware resources such as device ports, may or may not be accessed by all cores, depending on the particular SoC architecture.

In the early development phase of a project it is generally useful to boot companion processors (coprocessors) through an ST Micro Connect interface. This provides hosted I/O and full debugger support for the companion firmware and is well suited to the early stages of development when frequent changes are being made to the companion firmware. When booting a coprocessor via ST Micro Connect the main concern is merely to ensure that the Linux system image does not take up any portion of memory reserved for the companion firmware.

During the later stages of development, the firmware image is generally stable and needs little debugging. At this point it is more appropriate to load the firmware directly from the Linux kernel running on the main processor by using Dual-Boot support.

Assumptions

Dual-boot operation depends on these assumptions:

  • the ST40 acts as the master CPU and boots first; this implies that it is in charge of performing the basic hardware initialization (setup of clocks, LMI, EMI and other devices);

  • the master CPU runs Linux, and will be told to leave some amount of RAM for slave applications;

  • other CPUs (ST220, ST231) act as slave CPUs, with associated constraints on how the slave applications must be built (see below);

  • space for the master Linux system is always located at the bottom of memory (lowest addresses) whereas additional slaves use the RAM regions at the top of memory (highest addresses);

  • there is a static partitioning of memory between the ST40 and the slave CPUs. Dedicated memory layouts are required for some platforms, and are used in the examples below to make some statements clear.

Limitations

There is a restriction of dual-boot with the STm8000 cpu, in that a selective reset and reload of a single slave CPU is not permitted. Although this is supported by the software it is not supported by the hardware. Hence a slave application cannot be re-started without a reset of the entire SoC and a re-load of the Linux kernel.

Not observing this rule may lead to unpredictable behavior.