-
Notifications
You must be signed in to change notification settings - Fork 139
Add MPFS250 QSPI support #677
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
Open
dgarske
wants to merge
2
commits into
wolfSSL:master
Choose a base branch
from
dgarske:polarfire_soc_qspi
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| ARCH?=RISCV64 | ||
| TARGET?=mpfs250 | ||
|
|
||
| # ECC P384 + SHA384 | ||
| SIGN?=ECC384 | ||
| HASH?=SHA384 | ||
| IMAGE_HEADER_SIZE=512 | ||
|
|
||
| # ML-DSA 87 + SHA256 | ||
| #SIGN=ML_DSA | ||
| #HASH=SHA256 | ||
| #ML_DSA_LEVEL=5 | ||
| #IMAGE_SIGNATURE_SIZE=4627 | ||
| #IMAGE_HEADER_SIZE=12288 | ||
|
|
||
| WOLFBOOT_VERSION?=1 | ||
| ARMORED?=0 | ||
| DEBUG?=0 | ||
| DEBUG_SYMBOLS?=1 | ||
| DEBUG_UART?=1 | ||
| VTOR?=1 | ||
|
|
||
| NO_XIP?=1 | ||
|
|
||
| NVM_FLASH_WRITEONCE?=0 | ||
| UART_FLASH?=0 | ||
| V?=0 | ||
| NO_MPU?=1 | ||
| RAM_CODE?=0 | ||
| SPMATH?=1 | ||
| DUALBANK_SWAP?=0 | ||
| PKA?=0 | ||
| ENCRYPT=0 | ||
| WOLFTPM?=0 | ||
| ELF?=1 | ||
| #DEBUG_ELF?=1 | ||
|
|
||
| # Use RISC-V assembly version of ECDSA and SHA | ||
| NO_ASM?=0 | ||
|
|
||
| # QSPI Flash Configuration | ||
| # Using Micron MT25QL01GBBB (128MB, 64KB sectors) | ||
| EXT_FLASH?=1 | ||
| SPI_FLASH?=0 | ||
|
|
||
| # SPI Flash Controller Selection: | ||
| # MPFS_SC_SPI: Use SC QSPI Controller (0x37020100) for fabric-connected flash. | ||
| # Direct register access to System Controller's QSPI instance. | ||
| # DEFAULT: Use MSS QSPI Controller (0x21000000) for external flash | ||
| # on MSS QSPI pins. | ||
| CFLAGS_EXTRA+=-DMPFS_SC_SPI | ||
|
|
||
|
|
||
| # Enable SD card temporarily (wolfBoot still loads from SD, apps from QSPI) | ||
| # For pure QSPI boot, HSS would need to load wolfBoot from QSPI | ||
| DISK_SDCARD?=0 | ||
| DISK_EMMC?=0 | ||
|
|
||
| # DDR Address for wolfBoot to start from | ||
| # Comes from hal/mpfs.yaml | ||
| WOLFBOOT_ORIGIN?=0x80000000 | ||
|
|
||
| # DDR Address where application image will be loaded from flash | ||
| # Used by update_ram.c for non-XIP boot | ||
| # Must be well above wolfBoot's memory region | ||
| WOLFBOOT_LOAD_ADDRESS?=0x8E000000 | ||
|
|
||
| # Flash geometry (64 KB sector) | ||
| WOLFBOOT_SECTOR_SIZE?=0x10000 | ||
|
|
||
| # Partition layout for 128MB QSPI flash | ||
| # HSS Boot Info: 0x00000000 - 0x00000400 (1KB) | ||
| # wolfBoot partition: 0x00000400 - 0x0001FFFF (127KB) | ||
| # Boot partition: 0x00020000 - 0x01FFFFFF (~32MB) | ||
| # Update partition: 0x02000000 - 0x03FFFFFF (32MB) | ||
| # Swap partition: 0x04000000 - 0x0400FFFF (64KB) | ||
| # Remaining: 0x04010000 - 0x07FFFFFF (~64MB available) | ||
| WOLFBOOT_PARTITION_SIZE?=0x1FE0000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x20000 | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x2000000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x4000000 | ||
|
|
||
| # DTS (Device Tree) | ||
| WOLFBOOT_LOAD_DTS_ADDRESS?=0x8A000000 | ||
| WOLFBOOT_DTS_BOOT_ADDRESS?=0x6000000 # DTS at 96MB (after swap) | ||
| WOLFBOOT_DTS_UPDATE_ADDRESS?=0x6010000 # DTS update at 96MB + 64KB | ||
|
|
||
| # Speed up reads from flash by using larger blocks | ||
| CFLAGS_EXTRA+=-DWOLFBOOT_SHA_BLOCK_SIZE=4096 | ||
|
|
||
| # Optional Encryption | ||
| #CUSTOM_ENCRYPT_KEY=1 | ||
| #ENCRYPT=1 | ||
| #ENCRYPT_WITH_AES256=1 | ||
| #OBJS_EXTRA=src/my_custom_encrypt_key.o | ||
|
|
||
| # Optional QSPI debugging | ||
| # Uncomment for verbose QSPI debug output | ||
| #CFLAGS_EXTRA+=-DDEBUG_QSPI | ||
|
|
||
| # Optional QSPI flash test (erase/write/read on update partition) | ||
| # Uncomment to run test during hal_init() | ||
| #CFLAGS_EXTRA+=-DTEST_EXT_FLASH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The PR description mentions a new tooling script
tools/scripts/mpfs_program.sh, but this file is not included in the PR changes and is not referenced in the documentation. If this script is intended to be part of this PR, it should be added. Otherwise, update the PR description to remove this reference.