CS452 - Real-Time Programming - Winter 2018

Lecture 29 - Power On.

Public Service Annoucements

  1. Final Demo, Thursday/Friday, 5/6 April.
  2. The exam will start at 09.00, April 22, 2018 and finish at 11.30, 23 April 2018.


What Happens First when you turn on the Power Switch

The Hardware

The hardware is constructed in four layers: the processor (CPU), the System on Chip (SoC), the circuit board (PCB) and connectors, and the outside world. The designer of each layer knows about the layers below it, and expects something from the layers above it.

ARM processor

The CPU is a wire list, containing

In practice the wire list may be a set of masks.

It knows only about itself, which means the CPU architecture, which includes such things as executing the instruction at address zero when the reset input is negated.

It expects

These expectations are provided by the Cirrus SoC.

The Cirrus SoC

The Cirrus SoC is a silicon chip that includes

Implementation means implemented as a set of masks through which various impurities will be deposited to turn pure silicon into transistors and other electronic components. All this stuff is called mask-programmed because it is cast in stone before the first chip is manufactured.

The pre-pre-boot instructions are located on the advanced high-speed bus (AHB) from 0x80090000 to 0x80093fff.

The SoC knows about

The SoC expects

These expectations are provided by the Technologic circuit board.

The Technologic Circuit Board and Case

Turing on the Power

When you turn on the power or press the reset button, what happens before you see the RedBoot> prompt? Turning on the power causes the power controller to

This is not determined by the instruction set architecture (ISA).

Asserting the reset input of the SoC, asserts the reset output of the SoC.

Negating the reset input starts the boot sequence, with the SoC in its reset state. Ten hardware inputs determine how the SoC boots

These inputs allow the designer of the board hosting the SoC to determine enough characteristics of the boot state that it can be used for many applications

TS-7200 is set up for internal pre-boot with source from the flash on the 32-bit AHB

The AHB bus has all the important high-speed components

Initial state

ARM

The following things, which are contolled through the system control co-processor, are determined by the CPU architecture. They must be independent of the stuff added by Cirrus

  1. MMU flat, but might be different on soft reset
  2. Caches disabled
  3. Slow bus clock
  4. Interrupts disabled
  5. Little-endian memory system
  6. No access to MMU registers
  7. Normal exception registers

Cirrus

The following things, which are described in the EP9302 documentation, are properties of hardware Cirrus added. They are independent of how Technologic configured the chip when they designed the TS7200.

  1. DRAM controller(s) not initialized
  2. Flash controller(s) not initialized
  3. All I/O devices in reset state. (They receive hardware reset inputs from the CPU.)
  4. Memory map in boot mode

Technologic

The following things, which are described in the Technologic documentation, manual & circuit diagram, are properties of the TS7200

  1. Boot control bits, set to normal boot, 32-bit bus width, sychronous boot device, internal, watchdog timer disabled.
  2. Physical memory map
  3. In the AHB registers is a 16K block of ROM from 0x80090000 to 0x80093fff

Pre-pre-boot Sequence

  1. Jump to 0x80090018.
  2. Remap memory.
  3. Turn on red LED; turn off green LED
  4. Make the CPU completely vanilla. E.g.,
  5. Turn off watchdog timer
  6. Acquire boot state
  7. Configure the clocks to run from external source (needed for serial boot)
  8. Acquire boot state configuration inputs
  9. Using the memory width given in the boot state register
  10. Toggle LEDs
  11. Switch
  12. In the first two cases the 2048 bytes contains a memory test followed by a loader.

Pre-boot Sequence

This code, provided by Technologic, knows all about the EP9302, and all about the TS7200.

  1. Sets up a stack in the ethernet buffer
  2. Sets the CPSR to a vanilla state: no interrupts, svc mode
  3. Copies 260 words of code from flash to the ethernet buffer
  4. Initializes memory controllers for the memory it has
  5. Configures GPIO.
  6. Turns off the watchdog timer
  7. Sets up the appropriate serial port for a monitor
  8. Code in the ethernet buffer loads RedBoot
  9. Jump to the start of RedBoot


Return to: