-
Notifications
You must be signed in to change notification settings - Fork 135
Support for Microchip PolarFire SoC (MPFS250) #647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7acaf16 to
f2810fb
Compare
4a9fd1c to
e4bc41b
Compare
6a7be50 to
1606e3d
Compare
1606e3d to
4b542f5
Compare
2d0db79 to
b027fa4
Compare
9b945e7 to
c124aa1
Compare
c124aa1 to
77ebc8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive support for the Microchip PolarFire SoC (MPFS250T) platform and refactors GPT (GUID Partition Table) code for cross-platform reusability.
Key Changes:
- New RISC-V 64-bit platform support for PolarFire SoC with complete HAL, boot logic, and device tree
- Refactored GPT code from x86-specific to generic, reusable implementation with disk abstraction layer
- Updated build system and CI for the new target
Reviewed changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| hal/mpfs250.* | New HAL implementation for MPFS250 including register definitions, hardware abstraction, UART, and SD/MMC drivers |
| hal/mpfs.* | Device tree source/binary and HSS payload configuration for PolarFire SoC |
| src/boot_riscv64* | RISC-V 64-bit boot logic and assembly startup code |
| src/vector_riscv64.S | RISC-V 64-bit interrupt vector table implementation |
| src/gpt.c, include/gpt.h | Generic GPT parsing functions extracted from x86-specific code |
| src/disk.c, include/disk.h | New disk abstraction layer for GPT partition handling |
| src/update_disk.c | Updated to use generic GPT/disk interface, added FIT image and ELF loading support |
| test-app/app_mpfs250.c | Test application for the new platform |
| test-app/RISCV64-mpfs250.ld | Linker script for test applications |
| docs/Targets.md | Comprehensive documentation for building, flashing, and debugging |
| config/examples/polarfire_mpfs250.config | Example build configuration |
| .github/workflows/test-configs.yml | CI integration for automated testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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)
rv64imac) with five-core CPU cluster (1× E51 monitor core + 4× U54 application cores)hal/mpfs250.c- Hardware abstraction layer implementation (UART and uSD)hal/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 configurationhal/mpfs250.its- Example FIT image templatesrc/boot_riscv64.c- RISC-V 64-bit boot logicsrc/boot_riscv64_start.S- Assembly startup codesrc/vector_riscv64.S- Interrupt vector tabletest-app/app_mpfs250.cwith linker scriptconfig/examples/polarfire_mpfs250.config2. GPT Refactoring for Cross-Platform Use
Refactored the x86-specific GPT code into a generic, reusable implementation:
src/gpt.c+include/gpt.h- Platform-independent GPT parsinginclude/disk.h- Common disk interface definitionssrc/x86/gpt.c→src/gpt.c(now contains generic GPT functions) andsrc/disk.c(now contains generic MBR/GPT handling functions)update_disk.c: Updated to work with the generic GPT interface for non-x86 targets3. Build & CI Updates
test-configs.ymlworkflow for automated build testingarch.mkwith RISCV64 architecture support and MPFS250 target rulesTesting
Documentation
Added comprehensive documentation in
docs/Targets.mdcovering:Future Work (documented)