Skip to content

Commit f7b6056

Browse files
dgarskedanielinux
authored andcommitted
Added some useful comments
1 parent 7511e2e commit f7b6056

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

config/examples/polarfire_mpfs250.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ WOLFBOOT_SECTOR_SIZE?=0x1000
1414
#IMAGE_SIGNATURE_SIZE=4627
1515
#IMAGE_HEADER_SIZE=12288
1616
#WOLFBOOT_SECTOR_SIZE?=0x4000
17+
#
18+
# IMPORTANT: When using ML-DSA, the sign tool requires IMAGE_HEADER_SIZE to be
19+
# set as an environment variable, even if defined above. Example:
20+
# IMAGE_HEADER_SIZE=12288 ML_DSA_LEVEL=5 ./tools/keytools/sign --ml_dsa ...
21+
# The WOLFBOOT_SECTOR_SIZE must be >= IMAGE_HEADER_SIZE (e.g., 16KB >= 12KB).
1722

1823
WOLFBOOT_VERSION?=1
1924
ARMORED?=0

hal/mpfs250.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,20 +290,26 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
290290
}
291291

292292
#ifdef EXT_FLASH
293-
/* External flash support */
293+
/* External flash support
294+
*
295+
* Note: These are intentional stubs. PolarFire SoC MPFS250 uses eMMC/SD card
296+
* for firmware storage and updates, not external SPI/QSPI flash. The EXT_FLASH
297+
* define may be set in some configurations, but actual storage operations are
298+
* handled by the SDHCI driver and disk partition layer.
299+
*/
294300
void ext_flash_lock(void)
295301
{
296-
/* TODO: Lock external flash */
302+
/* Stub: not used - eMMC/SD controller handles access control */
297303
}
298304

299305
void ext_flash_unlock(void)
300306
{
301-
/* TODO: Unlock external flash */
307+
/* Stub: not used - eMMC/SD controller handles access control */
302308
}
303309

304310
int ext_flash_write(uintptr_t address, const uint8_t *data, int len)
305311
{
306-
/* TODO: Write to external flash */
312+
/* Stub: not used - updates written via SDHCI/GPT partitions */
307313
(void)address;
308314
(void)data;
309315
(void)len;
@@ -312,7 +318,7 @@ int ext_flash_write(uintptr_t address, const uint8_t *data, int len)
312318

313319
int ext_flash_read(uintptr_t address, uint8_t *data, int len)
314320
{
315-
/* TODO: Read from external flash */
321+
/* Stub: not used - firmware loaded via SDHCI/GPT partitions */
316322
(void)address;
317323
(void)data;
318324
(void)len;
@@ -321,7 +327,7 @@ int ext_flash_read(uintptr_t address, uint8_t *data, int len)
321327

322328
int ext_flash_erase(uintptr_t address, int len)
323329
{
324-
/* TODO: Erase external flash sectors */
330+
/* Stub: not used - eMMC/SD uses block-level operations */
325331
(void)address;
326332
(void)len;
327333
return 0;

0 commit comments

Comments
 (0)