Repository navigation
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
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
aa85c8e to
b71229c
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #980
Scan targets checked: none
Unchanged since last review (not re-run): 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
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: Lite
b71229c to
ab73deb
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
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: 1 of 1 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: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The repeated benchmark initialization corrupts the static memory pool, and Athena self-test failures leave the device registered while allowing tests and benchmarks to continue.
2 open issues
What changed in this PR
Extends the MPFS250 test application to exercise the Athena F5200 through bare-metal wolfCrypt tests and benchmarks, using wolfSSL PR 12055.
Changes:
- Adds Athena initialization, self-tests, engine-call reporting, and benchmarks at multiple buffer sizes.
- Adds watchdog servicing, trap diagnostics, and HAL-based benchmark timing.
- Updates algorithm settings, alignment, memory sizing, and build documentation.
| File | Description |
|---|---|
test-app/wolfcrypt_support.c |
Uses HAL clock definitions for benchmark timing. |
test-app/vector_riscv.S |
Routes machine-timer interrupts to a handler. |
test-app/startup_riscv.c |
Adds M-mode fault diagnostics and a default timer handler. |
test-app/RISCV64-mpfs250.ld |
Makes the application stack size configurable. |
test-app/Makefile |
Links Athena support and selects test/benchmark stack sizes. |
test-app/app_mpfs250.c |
Initializes Athena, runs sized benchmarks, reports calls, and services watchdogs. |
include/user_settings.h |
Configures alignment, algorithms, entropy, static pools, and assembler guards. |
hal/mpfs250.h |
Exposes timer registers and the MTIME enable function. |
hal/mpfs250.c |
Makes MTIME initialization available to M-mode applications. |
docs/Targets.md |
Updates the Athena capability summary. |
docs/PolarFire.md |
Documents build steps, memory requirements, and measured offload performance. |
Review effort: Balanced
ab73deb to
282a924
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The enlarged NOLOAD allocations and interrupt/watchdog changes require link-map and board validation to confirm physical scratchpad bounds, bootloader-stack separation, and watchdog timing across supported Libero configurations.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
282a924 to
c1180f6
Compare


Description
With
MPFS_ATHENA=1the 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. It needs wolfSSL PR 12055 inlib/wolfssl.test-app/app_mpfs250.c,test-app/Makefile: registration and self-test, the benchmark once per call size inMPFS_BENCH_SIZES, and the engine call count at the end, since a passing test proves nothing about offload on its own. A failed bring-up or self-test prints the failing test and halts, as the bootloader's own self-check does.include/user_settings.h:WOLFSSL_USE_ALIGNforARCH_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.include/user_settings.h, Athena builds: the test and benchmark build also turns on SHA-224, AES key wrap and CMAC and seeds wolfCrypt's DRBG from the engine's NRBG, so every algorithm the wolfSSL port offloads is exercised. The bootloader keeps only its image hash and cipher offloads, with the rest of the port opted out.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 aWOLFCRYPT_TESTorWOLFCRYPT_BENCHMARKbuild, 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 withWOLFBOOT_L2SCRATCH_SIZE=512k. Against wolfSSL PR 12055 the test and benchmark builds exercise every family it offloads on the board, RSA and P-521 withWOLFBOOT_ENABLE_PK_RSA2048andWOLFBOOT_ENABLE_PK_ECC521added; the bootloader-only Athena build is build-checked.