wolfBoot
wolfBoot copied to clipboard
Support for Microchip PolarFire SoC (MPFS250)
Summary
This PR adds full support for the Microchip PolarFire SoC (MPFS250T) secure boot target, along with a refactoring of GPT (GUID Partition Table) code to make it reusable across multiple architectures.
Key Changes
1. New Platform: Microchip PolarFire SoC (MPFS250)
- Architecture: RISC-V 64-bit (
rv64imac) with five-core CPU cluster (1× E51 monitor core + 4× U54 application cores) - New HAL files:
hal/mpfs250.c- Hardware abstraction layer implementationhal/mpfs250.h- Register definitions and hardware interfaceshal/mpfs250.ld- Linker script for the platformhal/mpfs.dts/hal/mpfs.dtb- Device tree source and binaryhal/mpfs.yaml- HSS payload generator configuration
- New boot files:
src/boot_riscv64.c- RISC-V 64-bit boot logicsrc/boot_riscv64_start.S- Assembly startup codesrc/vector_riscv64.S- Interrupt vector table
- Test application:
test-app/app_mpfs250.cwith linker script - Example configuration:
config/examples/polarfire_mpfs250.config
2. GPT Refactoring for Cross-Platform Use
Refactored the x86-specific GPT code into a generic, reusable implementation:
- New generic GPT module:
src/gpt.c+include/gpt.h- Platform-independent GPT parsing - Disk abstraction:
include/disk.h- Common disk interface definitions - Renamed:
src/x86/gpt.c→src/x86/disk.c(now contains x86-specific disk operations) - Enhanced
update_disk.c: Updated to work with the generic GPT interface for non-x86 targets
3. Build & CI Updates
- Added MPFS250 to
test-configs.ymlworkflow for automated build testing - Updated
arch.mkwith RISCV64 architecture support and MPFS250 target rules - Tool Makefile updates for cross-compilation compatibility
Testing
- Build tested with example configuration
- Added to CI build test matrix
Documentation
Added comprehensive documentation in docs/Targets.md covering:
- Feature overview
- Build instructions
- HSS payload generation
- Flashing procedures (eMMC/SD via USB-DMSC, eNVM)
- OpenOCD debugging setup
Future Work (documented)
- Full HSS replacement support using wolfBoot
- eMMC and QSPI NOR flash driver implementations