xref: /openbmc/qemu/docs/system/target-mips.rst (revision 65a117da)
1.. _MIPS-System-emulator:
2
3MIPS System emulator
4--------------------
5
6Four executables cover simulation of 32 and 64-bit MIPS systems in both
7endian options, ``qemu-system-mips``, ``qemu-system-mipsel``
8``qemu-system-mips64`` and ``qemu-system-mips64el``. Five different
9machine types are emulated:
10
11-  A generic ISA PC-like machine \"mips\"
12
13-  The MIPS Malta prototype board \"malta\"
14
15-  An ACER Pica \"pica61\". This machine needs the 64-bit emulator.
16
17-  MIPS emulator pseudo board \"mipssim\"
18
19-  A MIPS Magnum R4000 machine \"magnum\". This machine needs the
20   64-bit emulator.
21
22The generic emulation is supported by Debian 'Etch' and is able to
23install Debian into a virtual disk image. The following devices are
24emulated:
25
26-  A range of MIPS CPUs, default is the 24Kf
27
28-  PC style serial port
29
30-  PC style IDE disk
31
32-  NE2000 network card
33
34The Malta emulation supports the following devices:
35
36-  Core board with MIPS 24Kf CPU and Galileo system controller
37
38-  PIIX4 PCI/USB/SMbus controller
39
40-  The Multi-I/O chip's serial device
41
42-  PCI network cards (PCnet32 and others)
43
44-  Malta FPGA serial device
45
46-  Cirrus (default) or any other PCI VGA graphics card
47
48The Boston board emulation supports the following devices:
49
50-  Xilinx FPGA, which includes a PCIe root port and an UART
51
52-  Intel EG20T PCH connects the I/O peripherals, but only the SATA bus
53   is emulated
54
55The ACER Pica emulation supports:
56
57-  MIPS R4000 CPU
58
59-  PC-style IRQ and DMA controllers
60
61-  PC Keyboard
62
63-  IDE controller
64
65The MIPS Magnum R4000 emulation supports:
66
67-  MIPS R4000 CPU
68
69-  PC-style IRQ controller
70
71-  PC Keyboard
72
73-  SCSI controller
74
75-  G364 framebuffer
76
77The Fuloong 2E emulation supports:
78
79-  Loongson 2E CPU
80
81-  Bonito64 system controller as North Bridge
82
83-  VT82C686 chipset as South Bridge
84
85-  RTL8139D as a network card chipset
86
87The mipssim pseudo board emulation provides an environment similar to
88what the proprietary MIPS emulator uses for running Linux. It supports:
89
90-  A range of MIPS CPUs, default is the 24Kf
91
92-  PC style serial port
93
94-  MIPSnet network emulation
95
96.. include:: cpu-models-mips.rst.inc
97
98.. _nanoMIPS-System-emulator:
99
100nanoMIPS System emulator
101~~~~~~~~~~~~~~~~~~~~~~~~
102
103Executable ``qemu-system-mipsel`` also covers simulation of 32-bit
104nanoMIPS system in little endian mode:
105
106-  nanoMIPS I7200 CPU
107
108Example of ``qemu-system-mipsel`` usage for nanoMIPS is shown below:
109
110Download ``<disk_image_file>`` from
111https://mipsdistros.mips.com/LinuxDistro/nanomips/buildroot/index.html.
112
113Download ``<kernel_image_file>`` from
114https://mipsdistros.mips.com/LinuxDistro/nanomips/kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/index.html.
115
116Start system emulation of Malta board with nanoMIPS I7200 CPU::
117
118   qemu-system-mipsel -cpu I7200 -kernel <kernel_image_file> \
119       -M malta -serial stdio -m <memory_size> -hda <disk_image_file> \
120       -append "mem=256m@0x0 rw console=ttyS0 vga=cirrus vesa=0x111 root=/dev/sda"
121