CS452 - Real-Time Programming - Winter 2013
Lecture 28 - Pathologies
Public Service Annoucements
- No class on Friday, 29 March. Replaced by a class on Monday 8
April.
- Final demos:
- Monday, 8 April and Tuesday, 9 April
- First demo group gets about 20 hours prior to their demos all alone
in the lab
- Final exam
- 26.5 hours in length.
- handed out eletronically at 16.00 on Thursday, 11 April. (With one
exception.)
- three hours of questions about the exam
- Send to me by e-mail.
- I will sanitize and provide answers on the newsgroup
- Any questions about calibration or reservations?
Power On
When you turn on the power or press the reset button, what happens before
you see the RedBoot> prompt?
- Power on asserts the reset input to the CPU
This is not determined by the instruction set architecture (ISA).
- The ISA guarantees only that the CPU will (at some future time) set the
pc to 0x00000000 and start executing instructions.
What happens before that, and what appears at 0x00000000 is determined by
the design of the system surrounding the CPU on the chip.
- Cirrus provides this, not ARM.
- What Cirrus provides is pretty generic: the steps are qualitatively the
same on other SoCs, but the details differ.
There are two pretty hard resets that can occur.
- Turning on the power
- Pressing the reset button
- Power-on, but with memory refresh running continuously.
(Jumping to 0x00000000 is a much softer reset.)
Asserting the reset input of the SoC, asserts the reset output of the
SoC.
- The output reset goes everywhere and resets everything with a power on
reset.
Negating the reset input starts the boot sequence, with the SoC in its
reset state. Ten hardware inputs determine how the SoC boots
- internal/external
- pre-boot source
- watchdog state
- bus width of pre-boot and pre-pre-boot
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
- memory (program and graphics)
- ethernet controller
- USB controller, and
- 16Kbytes of mask-programmed ROM at
0x80090000
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
- MMU flat, but might be different on soft reset
- Caches disabled
- Slow bus clock
- Interrupts disabled
- Little-endian memory system
- No access to MMU registers
- 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.
- DRAM controller(s) not initialized
- Flash controller(s) not initialized
- All I/O devices in reset state. (They receive hardware reset inputs
from the CPU.)
- Memory map in boot mode
Technologic
The following things, which are described in the Technologic
documentation, manual & circuit diagram, are properties of the TS7200
- Boot control bits, set to normal boot, 32-bit bus width, sychronous
boot device, internal, watchdog timer disabled.
- Physical memory map
- In the AHB registers is a 16K block of ROM from
0x80090000
to 0x80093fff
- Initially, it is mapped to the entire memory space at 16K
intervals.
- Chip select, and how addressing occurs.
- Chip select of this block is
0x8009[00XXb]XXX
- Chip select has two parts
- I/O chip select:
0x8XXXXXXX
- AHB chip select:
0xY00XXXXX
- ROM chip select:
0xYYY9[00XXb]XXX
- The first instruction executed is the one that you find at
0x80090000
Pre-pre-boot Sequence
- Jump to
0x80090018.
- We no longer need the boot mode memory map
- Turn on LEDs
- Turn off watchdog timer
- Configure the system (CP15). E.g.,
- no caches, MMU off, interrupts disabled, slow clock
- external raster clock turned on (needed for serial boot)
- Configure static RAM controller
- read sysconfig register to find bus width
- values of external pins on EP9302
- some set by TS-7200; some user settable
- only thing the EP9302 knows about the outside world
- configure six static RAM controllers
- Configure Flash and SDRAM memory controllers
- read sysconfig register to find bus width
These are configured with very conservative parameters
- Clear boot mode `memory map'
- Toggle LEDs
- Switch
- Serial boot on UART1
- Output ">"
- Read 2048 bytes starting with CRUS or SURC to the ethernet
buffer
- Jump to the start of the ethernet buffer
- Boot from ROM outside SoC
- Assert ROM chip selects looking for CRUS
- When found read 2048 bytes from the ROM to ethernet buffer
- Jump to the start of the ethernet buffer
- Boot from flash
- Look for CRUS at possible flash start locations
- When found jump to start location plus
0x4 (account for
CRUS)
- If not found
- load code into ethernet buffer
- flash LEDs forever
- In the first two cases the 2048 bytes contains a memory test followed
by a loader.
Pre-boot Sequence
This code knows all about the EP9302, and all about the TS7200.
- Sets up a stack in the ethernet buffer
- Sets the CPSR to a vanilla state: no interrupts, svc mode
- Copies 260 words of code from flash to the ethernet buffer
- Initializes memory controllers for the memory it has
- Configures GPIO.
- Turns off the watchdog timer
Sets up the appropriate serial port for a monitor
Return to: