I was able to boot the linux example for the polarfire in renode given here:
I want to use a newer version of hss than is provided in that example so I built hss myself and swapped it for the hss image they provide. It boots but fails to boot the mmc:
[0.76000] Attempting to select SDCARD ... Failed
[0.268800] Attempting to select eMMC ... Failed
[0.331200] HSS_MMCInit() returned 0
I don’t actually care about the mmc, I just need to get into u-boot at which point I plan to use use tftp boot. The options in make menuconfig look like I can insert the u-boot payload into hss rather than using the mmc so I tried that. I enabled CONFIG_SERVICE_BOOT_USE_PAYLOAD. And I built u-boot and made it into a payload like they describe here:
https://docs.sel4.systems/Hardware/polarfire.html
I put the resulting file in boards/mpfs-icicle-kit-es/payload.bin
When I then try to build hss I get an error about overflowing the dtim:
# make BOARD=mpfs-icicle-kit-es
INFO: Linux detected
mpfs-icicle-kit-es selected
INFO: NOTICE: enabling -flto (which means stack protection is disabled)
INFO: Expected mpfsBootmodeProgrammer.jar version v3.6 but found
INFO: This version of the HSS relies on SoftConsole v2021.3 or later
LD hss-l2scratch.elf
/usr/lib/riscv64-unknown-elf/bin/ld: Default/hss-l2scratch.elf section `.data.payload' will not fit in region `dtim'
/usr/lib/riscv64-unknown-elf/bin/ld: region `dtim' overflowed by 510336 bytes
/usr/lib/riscv64-unknown-elf/bin/ld: /tmp/ccE932hA.ltrans0.ltrans.o: in function `.L0 ':
/sel4/hart-software-services/init/hss_boot_init.c:370: undefined reference to `copyBootImageToDDR_'
collect2: error: ld returned 1 exit status
Is there a setting I need to change to allow for the size of the palyload? I don’t see it. Here is my config file:
$ cat .config
#
# Board/Design Configuration Options
#
#
# Icicle-Kit Design Configuration Options
#
CONFIG_SOC_FPGA_DESIGN_XML="boards/mpfs-icicle-kit-es/soc_fpga_design/xml/ICICLE_MSS_mss_cfg.xml"
# end of Icicle-Kit Design Configuration Options
# end of Board/Design Configuration Options
#
# Services
#
CONFIG_SERVICE_BEU=y
CONFIG_SERVICE_BOOT=y
#
# Boot Service
#
CONFIG_SERVICE_BOOT_USE_PAYLOAD=y
# CONFIG_SERVICE_BOOT_CUSTOM_FLOW is not set
CONFIG_SERVICE_BOOT_DDR_TARGET_ADDR=0x103FC00000
CONFIG_SERVICE_BOOT_MMC_USE_GPT=y
# end of Boot Service
CONFIG_SERVICE_DDR=y
CONFIG_SERVICE_GOTO=y
CONFIG_SERVICE_IPI_POLL=y
CONFIG_SERVICE_MMC=y
#
# MMC
#
#
# MMC Mode
#
CONFIG_SERVICE_MMC_MODE_EMMC=y
CONFIG_SERVICE_MMC_MODE_SDCARD=y
# end of MMC Mode
#
# MMC Voltage
#
CONFIG_SERVICE_MMC_BUS_VOLTAGE_1V8=y
# end of MMC Voltage
#
# SDIO Control
#
CONFIG_SERVICE_MMC_FABRIC_SD_EMMC_DEMUX_SELECT_PRESENT=y
CONFIG_SERVICE_MMC_FABRIC_SD_EMMC_DEMUX_SELECT_ADDRESS=0x4fffff00
# end of SDIO Control
CONFIG_SERVICE_MMC_SPIN_TIMEOUT=y
# CONFIG_SERVICE_MMC_SPIN_TIMEOUT_ASSERT is not set
CONFIG_SERVICE_MMC_SPIN_TIMEOUT_MAX_SPINS=1000000
# end of MMC
CONFIG_SERVICE_OPENSBI=y
CONFIG_SERVICE_OPENSBI_IHC=y
CONFIG_SERVICE_OPENSBI_RPROC=y
# CONFIG_SERVICE_POWERMODE is not set
# CONFIG_SERVICE_QSPI is not set
CONFIG_SERVICE_SCRUB=y
#
# RAM Scrubbing Service
#
CONFIG_SERVICE_SCRUB_MAX_SIZE_PER_LOOP_ITER=4096
CONFIG_SERVICE_SCRUB_RUN_EVERY_X_SUPERLOOPS=256
# CONFIG_SERVICE_SCRUB_CACHED_DDR is not set
# end of RAM Scrubbing Service
CONFIG_SERVICE_SGDMA=y
# CONFIG_SERVICE_SPI is not set
CONFIG_SERVICE_TINYCLI=y
#
# Tiny Command Line Interface
#
CONFIG_SERVICE_TINYCLI_TIMEOUT=1
CONFIG_SERVICE_TINYCLI_REGISTER=y
# CONFIG_SERVICE_TINYCLI_MONITOR is not set
# CONFIG_SERVICE_TINYCLI_ENABLE_PREBOOT_TIMEOUT is not set
# end of Tiny Command Line Interface
# CONFIG_SERVICE_UART is not set
CONFIG_SERVICE_USBDMSC=y
#
# USB Device Mass Storage Class
#
CONFIG_SERVICE_USBDMSC_REGISTER=y
# CONFIG_SERVICE_USBDMSC_ENABLE_MAX_SESSION_TIMEOUT is not set
# end of USB Device Mass Storage Class
CONFIG_SERVICE_WDOG=y
#
# Watchdog Service
#
# CONFIG_SERVICE_WDOG_DEBUG is not set
CONFIG_SERVICE_WDOG_DEBUG_TIMEOUT_SEC=240
CONFIG_SERVICE_WDOG_ENABLE_E51=y
# end of Watchdog Service
# CONFIG_SERVICE_YMODEM is not set
# end of Services
#
# General Configuration Options
#
#
# Miscellaneous
#
CONFIG_USE_PCIE=y
CONFIG_OPENSBI=y
CONFIG_USE_IHC=y
#
# Tamper
#
# CONFIG_USE_TAMPER is not set
# end of Tamper
CONFIG_ALLOW_COLDREBOOT=y
#
# Cold Reboot
#
CONFIG_ALLOW_COLDREBOOT_ALWAYS=y
# CONFIG_ALLOW_COLDREBOOT_ON_OPENSBI_FAULT is not set
# end of Cold Reboot
# end of Miscellaneous
#
# OpenSBI
#
# CONFIG_PROVIDE_DTB is not set
# end of OpenSBI
#
# Memory Options
#
CONFIG_SKIP_DDR=y
# CONFIG_USE_PDMA is not set
# CONFIG_INITIALIZE_MEMORIES is not set
# end of Memory Options
# end of General Configuration Options
#
# Build Options
#
CONFIG_COLOR_OUTPUT=y
CONFIG_USE_LOGO=y
#
# Logo
#
CONFIG_LOGO_INVERT_COLORS=y
# end of Logo
# CONFIG_CC_STACKPROTECTOR_STRONG is not set
# CONFIG_CC_DUMP_STACKSIZE is not set
# CONFIG_LD_RELAX is not set
CONFIG_CC_USE_MAKEDEP=y
CONFIG_CC_USE_GNU_BUILD_ID=y
CONFIG_CC_HAS_INTTYPES=y
CONFIG_DISPLAY_TOOL_VERSIONS=y
# CONFIG_LOG_FUNCTION_NAMES is not set
# end of Build Options
#
# Compression
#
CONFIG_COMPRESSION=y
CONFIG_COMPRESSION_MINIZ=y
# end of Compression
#
# Crypto
#
# CONFIG_CRYPTO_SIGNING is not set
# end of Crypto
#
# Debug Options
#
CONFIG_DEBUG_LOG_STATE_TRANSITIONS=y
CONFIG_DEBUG_LOOP_TIMES=y
CONFIG_DEBUG_LOOP_TIMES_THRESHOLD=2500000
# CONFIG_DEBUG_IPI_STATS is not set
# CONFIG_DEBUG_CHUNK_DOWNLOADS is not set
# CONFIG_DEBUG_MSCGEN_IPI is not set
# CONFIG_DEBUG_PROFILING_SUPPORT is not set
CONFIG_DEBUG_PERF_CTRS=y
CONFIG_DEBUG_PERF_CTRS_NUM=16
# CONFIG_DEBUG_RESET_REASON is not set
# end of Debug Options
#
# SSMB Options
#
# CONFIG_HSS_USE_IHC is not set
CONFIG_IPI_MAX_NUM_QUEUE_MESSAGES=8
# CONFIG_IPI_FIXED_BASE is not set
# end of SSMB Options