Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
824b3e7
hw/riscv: pfsoc: Correct the L2LIM maximum mapped size
lbmeng Jul 23, 2026
3a5af4c
hw/riscv: pfsoc: Map the L2 zero device window
lbmeng Jul 23, 2026
22fdd29
hw/misc: pfsoc: Support PolarFire SoC DDR training with newer version…
lbmeng Jul 23, 2026
a159fd6
hw/misc: pfsoc: Model L2 cache controller registers
lbmeng Jul 23, 2026
88bcc51
hw/riscv: pfsoc: Couple L2CC to L2-LIM
lbmeng Jul 23, 2026
6c57263
tests/qtest: Add PolarFire SoC L2CC coverage
lbmeng Jul 23, 2026
5379b48
hw/sd: sdhci: Migrate the Host Control 2 register
lbmeng Jul 23, 2026
76f634e
hw/sd: sdhci: Accept version 4 enable without UHS-I
lbmeng Jul 23, 2026
0b9f6f0
hw/sd: sdhci: Use version 4 system address for SDMA
lbmeng Jul 23, 2026
3a40489
hw/sd: sdhci: Support version 4 ADMA 64-bit addressing
lbmeng Jul 23, 2026
9762f28
hw/sd: sdhci: Resume version 4 SDMA at buffer boundaries
lbmeng Jul 23, 2026
16d537f
hw/sd: sdhci: Run ADMA independently of MMIO
lbmeng Jul 23, 2026
d795400
hw/sd: sd: Keep high-capacity memory blocks at 512 bytes
lbmeng Jul 23, 2026
56a266e
hw/sd: cadence: Advertise 64-bit system bus support
lbmeng Jul 23, 2026
f52d9c8
hw/misc: pfsoc: Model PolarFire SoC serial number service
lbmeng Jul 23, 2026
b34905e
hw/rtc: Add PolarFire SoC RTC model
lbmeng Jul 23, 2026
38fe626
hw/riscv: pfsoc: Add PolarFire SoC RTC to Icicle Kit
lbmeng Jul 23, 2026
6352a8a
tests/qtest: Add PolarFire SoC RTC coverage
lbmeng Jul 23, 2026
3d45182
hw/misc: pfsoc: Honor PolarFire service notification requests
lbmeng Jul 23, 2026
bc17bae
hw/riscv: pfsoc: Correct PolarFire SoC DDR aliases
lbmeng Jul 23, 2026
b36b8e3
hw/riscv: pfsoc: Fix Icicle Kit RAM size at 2 GiB
lbmeng Jul 23, 2026
18157ce
hw/riscv: pfsoc: Fix Icicle Kit hart count at five
lbmeng Jul 23, 2026
ef3ba37
docs/system/riscv: Document Icicle Kit HSS boot
lbmeng Jul 23, 2026
06715dd
docs/system/riscv: pfsoc: Document CLINT topology for direct Linux boot
lbmeng Jul 23, 2026
d32ba48
tests/functional/riscv64: Add Icicle Kit firmware boot test
lbmeng Jul 23, 2026
766442b
MAINTAINERS: Add PolarFire SoC Icicle Kit maintainer
lbmeng Jul 23, 2026
5ac280b
hw/sd: preserve SDHCI extension migration state
zevorn Sep 2, 2026
68b1e09
tests/qtest: advance virtual clock for K3 ADMA
zevorn Sep 2, 2026
99df6eb
qtest: add xilinx-zynq SDHCI sdma test
Jul 15, 2026
d606e7c
tests/qtest: wait for RTC migration destination
zevorn Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1883,21 +1883,29 @@ F: target/riscv/xlrbr.decode
F: tests/tcg/riscv64/test-crc32.S

Microchip PolarFire SoC Icicle Kit
M: Bin Meng <bin.meng@processmission.com>
M: Conor Dooley <conor@kernel.org>
M: Sebastian Huber <sebastian.huber@embedded-brains.de>
L: qemu-riscv@nongnu.org
S: Odd Fixes
S: Supported
F: docs/system/riscv/microchip-icicle-kit.rst
F: hw/riscv/microchip_pfsoc.c
F: hw/char/mchp_pfsoc_mmuart.c
F: hw/misc/mchp_pfsoc_dmc.c
F: hw/misc/mchp_pfsoc_ioscb.c
F: hw/misc/mchp_pfsoc_l2cc.c
F: hw/misc/mchp_pfsoc_sysreg.c
F: hw/rtc/mchp_pfsoc_rtc.c
F: include/hw/riscv/microchip_pfsoc.h
F: include/hw/char/mchp_pfsoc_mmuart.h
F: include/hw/misc/mchp_pfsoc_dmc.h
F: include/hw/misc/mchp_pfsoc_ioscb.h
F: include/hw/misc/mchp_pfsoc_l2cc.h
F: include/hw/misc/mchp_pfsoc_sysreg.h
F: include/hw/rtc/mchp_pfsoc_rtc.h
F: tests/functional/riscv64/test_microchip_icicle_kit.py
F: tests/qtest/mchp_pfsoc_l2cc_test.c
F: tests/qtest/mchp_pfsoc_rtc_test.c

Shakti C class SoC
L: qemu-riscv@nongnu.org
Expand Down
129 changes: 119 additions & 10 deletions docs/system/riscv/microchip-icicle-kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ The ``microchip-icicle-kit`` machine supports the following devices:
* 4 U54 cores
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* L2 Loosely Integrated Memory (L2-LIM)
* Loosely Integrated Memory (L2-LIM)
* L2 cache controller (L2CC)
* DDR memory controller
* System controller and system services mailbox
* 5 MMUARTs
* 1 DMA controller
* 2 GEM Ethernet controllers
* 1 SDHC storage controller
* 1 Real-Time Clock

The memory is set to 1537 MiB by default. A sanity check on RAM size is
performed in the machine init routine to prompt user to increase the RAM size
to > 1537 MiB when less than 1537 MiB RAM is detected.
The machine has a fixed 2 GiB of RAM. Other memory sizes are rejected.
The machine always exposes all five harts. Other CPU counts are rejected.

Boot options
------------
Expand Down Expand Up @@ -63,7 +65,28 @@ should meet the following requirements:
option.

* It should contain a node for the CLINT device with a compatible string
"riscv,clint0".
"riscv,clint0" or "sifive,clint0". Its ``interrupts-extended`` property
must describe the M-mode software interrupt (3) and timer interrupt (7) for
every hart, including the E51 hart 0.

For example, the five-hart Icicle Kit CLINT node can be described as:

.. code-block:: none

clint: clint@2000000 {
compatible = "sifive,fu540-c000-clint", "sifive,clint0";
reg = <0x0 0x2000000 0x0 0xc000>;
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
<&cpu1_intc 3>, <&cpu1_intc 7>,
<&cpu2_intc 3>, <&cpu2_intc 7>,
<&cpu3_intc 3>, <&cpu3_intc 7>,
<&cpu4_intc 3>, <&cpu4_intc 7>;
};

Do not replace the hart 0 interrupt numbers with ``0xffffffff`` when the same
DTB is used to initialize the generic OpenSBI platform. OpenSBI derives the
first hart and the number of CLINT register slots from these interrupt tuples;
masking hart 0 would shift the per-hart MSIP and MTIMECMP register mappings.

When ``-bios`` is not specified or set to ``default``, the OpenSBI
``fw_dynamic`` BIOS image for the ``generic`` platform is used to boot an
Expand Down Expand Up @@ -102,10 +125,96 @@ CAVEATS:
Running HSS
-----------

The machine ``microchip-icicle-kit`` used to run the Hart Software Services
(HSS_), however, the HSS development progressed and the QEMU machine
implementation lacks behind. Currently, running the HSS no longer works.
There is missing support in the clock and memory controller devices. In
particular, reading from the SD card does not work.
The ``microchip-icicle-kit`` machine can boot the Hart Software Services
(HSS_), which then loads an HSS payload containing U-Boot from an SD card.
The following flow was tested with HSS v2024.06 and Buildroot 2026.05.

Configure HSS for the ``mpfs-icicle-kit-es`` board using its default
configuration. QEMU provides the software-visible registers and deterministic
status consumed by the HSS v2024.06 DDR initialization and training flow;
it does not model the electrical properties of DDR training. HSS requires
the RISC-V bare-metal toolchain supplied by Microchip SoftConsole to be
available in ``PATH``. Build the tested HSS version with:

.. code-block:: bash

$ git clone https://github.com/polarfire-soc/hart-software-services.git
$ cd hart-software-services
$ git checkout v2024.06
$ make BOARD=mpfs-icicle-kit-es defconfig
$ make -j$(nproc) BOARD=mpfs-icicle-kit-es

The HSS build creates both the raw wrapper and an eNVM programming image. QEMU
needs the complete eNVM image, including the 256-byte boot header added by the
Microchip boot mode programmer. Convert the generated Intel HEX file to a raw
binary image, for example:

.. code-block:: bash

$ riscv64-unknown-elf-objcopy -I ihex -O binary \
build/hss-envm-wrapper.mpfs-icicle-kit-es.hex build/hss.bin

Do not pass ``build/hss-envm-wrapper.bin`` directly to QEMU. That file starts
at eNVM offset 0x100 and does not contain the boot header with the image size
and per-hart reset vectors.

Build the SD card image with the tested Buildroot version:

.. code-block:: bash

$ git clone https://gitlab.com/buildroot.org/buildroot.git
$ cd buildroot
$ git checkout 2026.05
$ make microchip_mpfs_icicle_defconfig
$ make

This produces ``output/images/sdcard.img`` with three GPT partitions:

* An HSS ``payload.bin`` containing U-Boot.
* A FAT partition containing ``boot.scr`` and the kernel FIT image.
* An ext4 Linux root filesystem.

The QEMU SD card model requires a power-of-two image size. Make a sparse
4 GiB working copy and relocate its backup GPT to the new end of the image:

.. code-block:: bash

$ cp --reflink=auto output/images/sdcard.img sdcard.img
$ truncate -s 4G sdcard.img
$ sgdisk -e sdcard.img
$ sgdisk -v sdcard.img

The Icicle Kit firmware device tree in the FIT image describes 2 GiB of RAM,
matching the machine's fixed RAM size. The command below keeps ``-m 2G``
explicit. Attach the image as an SD card and route both board serial ports:

.. code-block:: bash

$ qemu-system-riscv64 \
-M microchip-icicle-kit -smp 5 -m 2G \
-bios path/to/hss/build/hss.bin \
-drive if=sd,file=path/to/sdcard.img,format=raw \
-display none \
-serial file:hss.log \
-serial stdio \
-no-reboot

HSS writes to MMUART0, which the command records in ``hss.log``. U-Boot and
Linux use MMUART1, which remains connected to the terminal. A successful
boot proceeds through HSS payload loading, U-Boot, the Linux kernel, and the
login prompt from the root filesystem on the third partition.

Known limitations
-----------------

* The tested HSS v2024.06 flow contains 2 separate multi-hart startup races
issues which is still not fixed as of the latest v2026.04 release. A boot
may therefore stall at the very beginning or after successful DDR training
during the OpenSBI/U-Boot handoff.
* The SD card model requires the raw image size to be a power of two. Keep
the backup GPT header at the end when resizing the image.
* The machine does not generate an Icicle Kit device tree. Firmware boot must
provide one in its payload or FIT image; direct kernel boot must use
``-dtb`` as described above.

.. _HSS: https://github.com/polarfire-soc/hart-software-services
3 changes: 3 additions & 0 deletions hw/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ config MCHP_PFSOC_DMC
config MCHP_PFSOC_IOSCB
bool

config MCHP_PFSOC_L2CC
bool

config MCHP_PFSOC_SYSREG
bool

Expand Down
Loading
Loading