1.. zephyr:board:: qemu_malta
2
3Overview
4********
5
6This board configuration will use QEMU to emulate the MIPS Malta platform.
7
8This configuration provides support for an MIPS 4Kc/24Kc CPU cores and these devices:
9
10* CP0 Interrupt Controller
11* CP0 Core Timer
12* NS16550 UART
13
14
15.. note::
16   This board configuration makes no claims about its suitability for use
17   with an actual MIPS Malta hardware system, or any other hardware system.
18
19Hardware
20********
21
22Supported Features
23==================
24
25The following hardware features are supported:
26
27+----------------+------------+----------------------+
28| Interface      | Controller | Driver/Component     |
29+================+============+======================+
30| CP0 IntC       | on-chip    | interrupt controller |
31+----------------+------------+----------------------+
32| CP0 Core Timer | on-chip    | system clock         |
33+----------------+------------+----------------------+
34| NS16550        | FPGA       | serial port          |
35| UART           |            |                      |
36+----------------+------------+----------------------+
37
38The kernel currently does not support other hardware features on this platform.
39
40Devices
41========
42System Clock
43------------
44
45Qemu CP0 timer uses a clock frequency of 200 MHz,
46see target/mips/cp0_timer.c in Qemu source tree for details.
47
48Serial Port
49-----------
50
51This board configuration uses a single serial communication channel
52with the FPGA UART2.
53
54Programming and Debugging
55*************************
56
57.. zephyr:board-supported-runners::
58
59Use this configuration to run basic Zephyr applications and kernel tests in the QEMU
60emulated environment, for example, with the :zephyr:code-sample:`synchronization` sample:
61
62.. zephyr-app-commands::
63   :zephyr-app: samples/synchronization
64   :host-os: unix
65   :board: qemu_malta
66   :goals: run
67
68This will build an image with the synchronization sample app, boot it using
69QEMU, and display the following console output:
70
71.. code-block:: console
72
73        *** Booting Zephyr OS build v2.7.99-1627-g9bea7790d620  ***
74        thread_a: Hello World from cpu 0 on qemu_malta!
75        thread_b: Hello World from cpu 0 on qemu_malta!
76        thread_a: Hello World from cpu 0 on qemu_malta!
77        thread_b: Hello World from cpu 0 on qemu_malta!
78        thread_a: Hello World from cpu 0 on qemu_malta!
79        thread_b: Hello World from cpu 0 on qemu_malta!
80        thread_a: Hello World from cpu 0 on qemu_malta!
81        thread_b: Hello World from cpu 0 on qemu_malta!
82        thread_a: Hello World from cpu 0 on qemu_malta!
83        thread_b: Hello World from cpu 0 on qemu_malta!
84
85
86Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.
87
88
89Big-Endian
90==========
91
92Use this configuration to run :zephyr:code-sample:`synchronization` sample in big-endian mode:
93
94.. zephyr-app-commands::
95   :zephyr-app: samples/synchronization
96   :host-os: unix
97   :board: qemu_malta/qemu_malta/be
98   :goals: run
99
100
101References
102**********
103
104https://www.qemu.org/
105https://www.linux-mips.org/wiki/MIPS_Malta
106