Skip to content

Drive the Athena F5200 from the mpfs250 test-app under WOLFCRYPT_TEST and WOLFCRYPT_BENCHMARK - #980

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:mpfs_athena_testapp
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:mpfs_athena_testapp

Conversation

@dgarske

@dgarske dgarske commented Nov 6, 2026

Copy link
Copy Markdown
Member

Description

With MPFS_ATHENA=1 the PolarFire SoC test application brings the engine up itself, so the stock wolfCrypt test and benchmark run against it bare metal, in the M-mode environment wolfBoot uses.

  • test-app/app_mpfs250.c, test-app/Makefile: registration and self-test, the benchmark once per call size in MPFS_BENCH_SIZES, and the engine call count at the end, since a passing test proves nothing about offload on its own.
  • include/user_settings.h: WOLFSSL_USE_ALIGN for ARCH_RISCV64, as the harts trap on a misaligned access with nothing to emulate it; a static pool large enough for the benchmark's buffers; and an __ASSEMBLER__ guard on the two test-app function declarations, which the assembler otherwise reads when wolfSSL's RISC-V assembly includes this header.
  • test-app/startup_riscv.c, test-app/vector_riscv.S, hal/mpfs250.c, hal/mpfs250.h: the M-mode trap handler prints the cause and halts instead of resuming at the fault; a machine-timer interrupt refreshes the five MSS watchdogs, which expire well inside a test run, with the HAL's MTIME enable and CLINT timer registers made available to the app.
  • test-app/wolfcrypt_support.c, test-app/RISCV64-mpfs250.ld, test-app/Makefile: the timebase follows the HAL's live clock (the DDR configuration runs the E51 at the PLL rate), and the stack the benchmark's SP math frames need is substituted into the linker script only for a WOLFCRYPT_TEST or WOLFCRYPT_BENCHMARK build, since the template is shared with the L2 scratchpad configurations that have no room to reserve it.
  • docs/PolarFire.md, docs/Targets.md: how to build and read it, with the measured offload.

Testing

MPFS250TS Video Kit, DDR configuration: wolfcrypt_test() complete and the benchmark at every size, each with and without the engine. The M-mode QSPI configuration runs the benchmark app with WOLFBOOT_L2SCRATCH_SIZE=512k.

@dgarske dgarske self-assigned this Nov 6, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #980

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): docs/PolarFire.md, docs/Targets.md, hal/mpfs250.h, test-app/Makefile, test-app/RISCV64-mpfs250.ld, test-app/vector_riscv.S
Coverage: 5 of 5 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants