Cisco

From LinuxMIPS

Jump to: navigation, search

Contents

Cisco Systems Routers

Cisco Systems manufactures several routers with MIPS processors. Most of these routers are relatively modern, and sometimes are still prohibitively expensive on eBay or even via alternative channels of purchase. However, as many of these routers get decomissioned, they do appear on eBay at reasonable prices. A popular model with Linux/MIPS developers is the Cisco 3600-series.

History

Cisco has a very bland history when it comes to the class of CPUs in their hardware, often known for their (ab)use of m68k CPUs for their routers, as well as x86 CPUs for their firewalling and VPN solutions.

Cisco later switched to MIPS-based solutions from a variety of vendors, most notably IDT, PMC-Sierra and Broadcom, as well as some higher-end models being based on PowerPC processors.

Models

Model NumberCPUCPU ClockspeedControllerSlot/Bus
1100IBM PowerPC 405GP200Mhz-Mini-PCI
1200IBM PowerPC 405GP200Mhz-Mini-PCI
1300IBM PowerPC 405GP200Mhz-Mini-PCI
1600Motorola QUICC 6836033MHz-WIC
1720Motorola PowerQUICC MPC86040MHz-WIC
1750Motorola PowerQUICC MPC86040MHz-WIC
1841RM5261A-256H250MHzMarvell GT96103ANM (PCI)
2500Motorola 680EC3020MHz--
2600Motorola PowerQUICC MPC86040MHz-NM (PCI)
2610Motorola PowerQUICC MPC860?-NM (PCI)
2610XMMotorola PowerQUICC MPC860?-NM (PCI)
2611Motorola PowerQUICC MPC860?-NM (PCI)
2611XMMotorola PowerQUICC MPC860?-NM (PCI)
2620Motorola PowerQUICC MPC860?-NM (PCI)
2620XMMotorola PowerQUICC MPC860?-NM (PCI)
2621Motorola PowerQUICC MPC860?-NM (PCI)
2621XMMotorola PowerQUICC MPC860?-NM (PCI)
2650Motorola PowerQUICC MPC860?-NM (PCI)
2650XMMotorola PowerQUICC MPC860?-NM (PCI)
2651Motorola PowerQUICC MPC860?-NM (PCI)
2651XMMotorola PowerQUICC MPC860?-NM (PCI)
2691RM7061A160MHz?NM (PCI)
2801RM5261A250MHzMarvell MV96103AAIM, HWIC, PVDM
2811RM5261A350MHzMarvell MV96340NM (PCI), AIM, HWIC, PVDM
2821RM7065C466MHzMarvell MV96340NM (PCI)
2851RM7065C-466T466MHzMarvell MV96340NM (PCI)
3620IDT R460080MHzGalileoNM (PCI)
3631RM7061a240MHz?NM/WIC
3640IDT R4600100MHzGalileoNM (PCI)
366xRM5271225MHzGalileoNM (PCI)
3725RM5200240MHz?NM (PCI)
3745RM5200350MHz?NM (PCI)
3825BCM1125H500MHzAMD1813NM (PCI)
3845BCM1250??NM (PCI)
4000Motorola 6803040MHz?NP ?
4500MR4700100MHz?NP ?
4700MR4700133MHz?NP ?
AS5300R4700150MHz??
AS5350RM7000250MHz??
AS5350XMBCM-1250750MHz??
AS5400RM7000250MHz??
AS5400HPXRM7000390MHz??
AS5400XMBCM-1250750MHz??
7000Motorola 6804025MHz??
7010Motorola 6804025MHz?Cbus
7120RM5271225MHz?PA ?
7140RM7000262MHz?PA ?
7200 NPE100R4700150MHz?PA ?
7200 NPE150R4700150MHz?PA ?
7200 NPE175RM5270200MHz?PA ?
7200 NPE200R5000200MHz?PA ?
7200 NPE225RM5271225MHz?PA ?
7200 NPE300RM7000262MHz?PA ?
7200 NPE400RM7000350MHz?PA ?
7200 NSE-1RM7000263MHz?PA ?
7200 NPE-G1BCM-1250800MHz?PA ?
7200 NPE-G2PowerPC 74481.67GHz?PA ?
7500 RSP1/2R4600100MHz?CyBus
7500 RSP4R5000200MHz?CyBus
7500 RSP8RM7000250MHz?CyBus
VIP4-50RM7000???
VIP4-80RM7000???
12000 GRPR5000200MHz??
12000 PRP-1PowerPC 7450667MHz??
12000 PRP-2PowerPC 74551GHz??

The Boot ROM

The Cisco Boot ROM firmware contains startup diagnostic code (ROM monitor, or ROMmon) as well as the boot loader for the Cisco Internetworking Operating System, or IOS for short.

During early boot, the code in the boot ROM performs a Power-on Self Test (POST) and, if all tests are passed, boot into IOS from the flash.

The Boot ROM CLI

In order to gain access to the monitor in the Boot ROM, send a break sequence to the device early on in the boot process. This can be done with a C-a f (Ctrl+a f) in Minicom, for example.

Recently boot ROMs have had an undocumented priv command. This command then can be used to gain access to several additional commands, including a debugger, disassembler and additional hardware tests. To use this command, a secret password is required, known only to Cisco representatives. However, in recent times this has been cracked and the password for many models of Cisco routers can be calculated using the tool at http://ers.pp.ru/cisco/priv.html.

Environment variables

Boot ROM maintains certain system configuration parameters in environment variables. For example, the $MONRC can contain a starup command sequence, $PS1 contains the command prompt, and so forth. As well, the BootROM supports basic command aliasing. Both the environment variables and the alias table are stored in NVRAM so that their values persist, even when power is off.

The Boot ROM API

The Boot ROM API provides some simple APIs for IOS (for example, putchar and version information commands). Unlike many other firmwares in the world of MIPS, the syscall opcode is used to call these firmware APIs. Note that register a0 must contain the syscall number.

A sample "Hello, world!" program can be found here.

Binary Format

IOS executables are shipped in a raw binary format (known as a .bin file to many). For MIPS-based devices, this is just conventional MIPS Big-Endian ELF, however Cisco does play a dirty trick in using a non-standard e_machine value in the ELF header. This seems to be based on the router model. For example, the Cisco 3600 routers have an e_machine value of 0x1e.

In order to alter the e_machine value, a recent version of objcopy can be used with the switch --alt-machine-code 0x1e (in this example for a Cisco 3600 series machine).

As well, there are limitations placed on the binary format due to the behaviour of the software in the Boot ROM. Boot ROM cannot load multiple ELF program headers. Thus, to work around this problem, toolchains must be built with --target=mips-elf.

Finally, all symbol tables must be removed.

Boot sequence

The Boot ROM can load and execute a block of executable code (such as IOS) from various internal locations: the internal FLASH module(s), a PCMCIA Linear Flash card and (unofficially) TFTP. More recent models also support PCMCIA IDE, CompactFlash and USB flash. Also the Boot ROM supports compressed images (.gz) with embedded helper and text files that contain a command sequence (like a shell script). Nowadays -mz- IOS distributions are compressed with ZIP and have a built-in ELF ZIP decompressor "piggybacked" on top, since ZIP provides better compression.

To boot from the PCMCIA ATA or CompactFlash the media should be formatted on the CISCO router with format disk0: command. This command creates a FAT structure with second bootloader (MONLIB) resides in the hidden FAT area. More inforamtion may be found in the ATA Monlib Enhancements article.

Cisco 3600

CISCO 3640
CISCO 3640
The Cisco 3600-series were entry-level edge routers built on the IDT R4700 MIPS CPUs. The system controller is a Galileo GT-64010.

The Cisco 3600-series routers were designed with limited expandability in mind. As such, the Cisco 3620 has two expansion slots; the 3640 has four (as is reflected in the size of the units). These expansion modules sit on the NM expansion bus, which is essentially a modified PCI 2.1 bus with some proprietary extensions relating to EEPROM identication and what Cisco calls OIR, or Online Insertion and Removal.

Deeper technical information on the Cisco 3600-series can be found at http://www.cisco.com/warp/public/63/36xx-arch.pdf.

Current Status

Presently Linux does not boot on the Cisco 3600 series in any usable form. However, a PROM library has been established and most PROM calls of importance have been reverse engineered. As well, efforts to make Linux run on the 3600 seriers are well underway and could very well be bootable soon.

External Links

Personal tools