eCos Reference Manual
Prev | Chapter 5. Installation and Testing | Next

# MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Malta Board

## Overview

RedBoot supports both front facing serial ports and the built in ethernet port for communication and downloads. The default serial port settings are 38400,8,N,1. RedBoot runs from and supports flash management for the system flash region.

The following RedBoot configurations are supported:

Configuration | Mode | Description | File
--- | --- | --- | ---
ROM | [ROM] | RedBoot running from the board's flash boot sector. | redboot_ROM.ecm
RAM | [RAM] | RedBoot running from RAM with RedBoot in the flash boot sector. | redboot_RAM.ecm

## Initial Installation

RedBoot is installed using the code download facility built into the Malta board. See the Malta User manual for details, and also the Malta download format in the Section called Malta download format.

### Quick download instructions

Here are quick start instructions for downloading the prebuilt RedBoot image.

1. Locate the prebuilt files in the bin directory: `deleteall.fl` and `redboot_ROM.fl`.

2. Make sure switch S5-1 is ON. Reset the board and verify that the LED display reads `Flash DL`.

3. Make sure your parallel port is connected to the 1284 port Of the Atlas board.

4. Send the `deleteall.fl` file to the parallel port to erase previous images:

       $ cat deleteall.fl >/dev/lp0

   When this is complete, the LED display should read `Deleted`.

5. Send the RedBoot image to the board:

       $ cat redboot_ROM.fl >/dev/lp0

   When this is complete, the LED display should show the last address programmed. This will be something like: `1fc17000`.

6. Change switch S5-1 to OFF and reset the board. The LED display should read `RedBoot`.

7. Run the RedBoot fis init and fconfig commands to initialize the flash. See the Section called Flash Image System (FIS) in Chapter 2 and the Section called Persistent State Flash-based Configuration and Control in Chapter 2 for details.

### Malta download format

In order to download RedBoot to the Malta board, it must be converted to the Malta download format.

The Atlas/Malta Developer's Kit CD contains an srecconv.pl utility which requires Perl. This utility is part of the `yamon/yamon-src-02.00.tar.gz` tarball on the Dev Kit CD. The path in the expanded tarball is `yamon/bin/tools`. To use srecconv to convert the S-record file:

    $ cp redboot_ROM.srec redboot_ROM.rec
    $ srecconv.pl -ES L -A 29 redboot_ROM

The resulting file is named `redboot_ROM.fl`.

## Additional commands

The exec command which allows the loading and execution of Linux kernels, is supported for this architecture (see the Section called Executing Programs from RedBoot in Chapter 2). The exec parameters used for MIPS boards are:

-b `<addr>`

  Location to store command line and environment passed to kernel

-w `<time>`

  Wait time in seconds before starting kernel

-c `"params"`

  Parameters passed to kernel

`<addr>`

  Kernel entry point, defaulting to the entry point of the last image loaded

Linux kernels on MIPS platforms expect the entry point to be called with arguments in the registers equivalent to a C call with prototype:

    void Linux(int argc, char **argv, char **envp);

RedBoot will place the appropriate data at the offset specified by the `-b` parameter, or by default at address 0x80080000, and will set the arguments accordingly when calling into the kernel.

The default entry point, if no image with explicit entry point has been loaded and none is specified, is 0x80000750.

## Interrupts

RedBoot uses an interrupt vector table which is located at address 0x80000200. Entries in this table are pointers to functions with this protoype:

    int irq_handler( unsigned vector, unsigned data )

On the malta board, the vector argument is one of 22 interrupts defined in `hal/mips/malta/`VERSION`/include/plf_intr.h`:

    #define CYGNUM_HAL_INTERRUPT_SOUTH_BRIDGE_INTR   0
    #define CYGNUM_HAL_INTERRUPT_SOUTH_BRIDGE_SMI    1
    #define CYGNUM_HAL_INTERRUPT_CBUS_UART           2
    #define CYGNUM_HAL_INTERRUPT_COREHI              3
    #define CYGNUM_HAL_INTERRUPT_CORELO              4
    #define CYGNUM_HAL_INTERRUPT_COMPARE             5
    #define CYGNUM_HAL_INTERRUPT_TIMER               6
    #define CYGNUM_HAL_INTERRUPT_KEYBOARD            7
    #define CYGNUM_HAL_INTERRUPT_CASCADE             8
    #define CYGNUM_HAL_INTERRUPT_TTY1                9
    #define CYGNUM_HAL_INTERRUPT_TTY0               10
    #define CYGNUM_HAL_INTERRUPT_11                 11
    #define CYGNUM_HAL_INTERRUPT_FLOPPY             12
    #define CYGNUM_HAL_INTERRUPT_PARALLEL           13
    #define CYGNUM_HAL_INTERRUPT_REAL_TIME_CLOCK    14
    #define CYGNUM_HAL_INTERRUPT_I2C                15
    #define CYGNUM_HAL_INTERRUPT_PCI_AB             16
    #define CYGNUM_HAL_INTERRUPT_PCI_CD             17
    #define CYGNUM_HAL_INTERRUPT_MOUSE              18
    #define CYGNUM_HAL_INTERRUPT_19                 19
    #define CYGNUM_HAL_INTERRUPT_IDE_PRIMARY        20
    #define CYGNUM_HAL_INTERRUPT_IDE_SECONDARY      21

The data passed to the ISR is pulled from a data table (`hal_interrupt_data`) which immediately follows the interrupt vector table. With 22 interrupts, the data table starts at address 0x80000258.

An application may create a normal C function with the above prototype to be an ISR. Just poke its address into the table at the correct index and enable the interrupt at its source. The return value of the ISR is ignored by RedBoot.

## Memory Maps

Memory Maps RedBoot sets up the following memory map on the Malta board.

> NOTE: The virtual memory maps in this section use a C and B column to indicate whether or not the region is cached (C) or buffered (B).

    Physical Address Range  C B  Description
    ----------------------- - -  -----------
    0x80000000 - 0x81ffffff Y Y  SDRAM
    0x9e000000 - 0x9e3fffff Y N  System flash (cached)
    0x9fc00000 - 0x9fffffff Y N  System flash (mirrored)
    0xa8000000 - 0xb7ffffff N N  PCI Memory Space
    0xb4000000 - 0xb40fffff N N  Galileo System Controller
    0xb8000000 - 0xb80fffff N N  Southbridge / ISA
    0xb8100000 - 0xbbdfffff N N  PCI I/O Space
    0xbe000000 - 0xbe3fffff N N  System flash (noncached)
    0xbf000000 - 0xbfffffff N N  Board logic FPGA

## Rebuilding RedBoot

These shell variables provide the platform-specific information needed for building RedBoot according to the procedure described in Chapter 3:

    export TARGET=malta_mips32_4kc
    export ARCH_DIR=mips
    export PLATFORM_DIR=malta

The names of configuration files are listed above with the description of the associated modes.

Prev | Home | Next
MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board | Up | MIPS/RM7000 PMC-Sierra Ocelot