1Microchip PolarFire SoC Icicle Kit (``microchip-icicle-kit``)
2=============================================================
3
4Microchip PolarFire SoC Icicle Kit integrates a PolarFire SoC, with one
5SiFive's E51 plus four U54 cores and many on-chip peripherals and an FPGA.
6
7For more details about Microchip PolarFire SoC, please see:
8https://www.microsemi.com/product-directory/soc-fpgas/5498-polarfire-soc-fpga
9
10The Icicle Kit board information can be found here:
11https://www.microsemi.com/existing-parts/parts/152514
12
13Supported devices
14-----------------
15
16The ``microchip-icicle-kit`` machine supports the following devices:
17
18 * 1 E51 core
19 * 4 U54 cores
20 * Core Level Interruptor (CLINT)
21 * Platform-Level Interrupt Controller (PLIC)
22 * L2 Loosely Integrated Memory (L2-LIM)
23 * DDR memory controller
24 * 5 MMUARTs
25 * 1 DMA controller
26 * 2 GEM Ethernet controllers
27 * 1 SDHC storage controller
28
29Boot options
30------------
31
32The ``microchip-icicle-kit`` machine can start using the standard -bios
33functionality for loading its BIOS image, aka Hart Software Services (HSS_).
34HSS loads the second stage bootloader U-Boot from an SD card. It does not
35support direct kernel loading via the -kernel option. One has to load kernel
36from U-Boot.
37
38The memory is set to 1537 MiB by default which is the minimum required high
39memory size by HSS. A sanity check on ram size is performed in the machine
40init routine to prompt user to increase the RAM size to > 1537 MiB when less
41than 1537 MiB ram is detected.
42
43Boot the machine
44----------------
45
46HSS 2020.12 release is tested at the time of writing. To build an HSS image
47that can be booted by the ``microchip-icicle-kit`` machine, type the following
48in the HSS source tree:
49
50.. code-block:: bash
51
52  $ export CROSS_COMPILE=riscv64-linux-
53  $ cp boards/mpfs-icicle-kit-es/def_config .config
54  $ make BOARD=mpfs-icicle-kit-es
55
56Download the official SD card image released by Microchip and prepare it for
57QEMU usage:
58
59.. code-block:: bash
60
61  $ wget ftp://ftpsoc.microsemi.com/outgoing/core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic.gz
62  $ gunzip core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic.gz
63  $ qemu-img resize core-image-minimal-dev-icicle-kit-es-sd-20201009141623.rootfs.wic 4G
64
65Then we can boot the machine by:
66
67.. code-block:: bash
68
69  $ qemu-system-riscv64 -M microchip-icicle-kit -smp 5 \
70      -bios path/to/hss.bin -sd path/to/sdcard.img \
71      -nic user,model=cadence_gem \
72      -nic tap,ifname=tap,model=cadence_gem,script=no \
73      -display none -serial stdio \
74      -chardev socket,id=serial1,path=serial1.sock,server=on,wait=on \
75      -serial chardev:serial1
76
77With above command line, current terminal session will be used for the first
78serial port. Open another terminal window, and use `minicom` to connect the
79second serial port.
80
81.. code-block:: bash
82
83  $ minicom -D unix\#serial1.sock
84
85HSS output is on the first serial port (stdio) and U-Boot outputs on the
86second serial port. U-Boot will automatically load the Linux kernel from
87the SD card image.
88
89.. _HSS: https://github.com/polarfire-soc/hart-software-services
90