Page MenuHomePhabricator

flash_area_get_sectors(...) doesn't support external flash
Open, Needs TriagePublic

Description

Currently, the implementation of flash_area_get_sectors(...) in bl2/ext/mcuboot/flash_map_legacy.c relies on FLASH_AREA_IMAGE_SECTOR_SIZE to return uniform sector map. For internal flash, that's fine because FLASH_AREA_IMAGE_SECTOR_SIZE is just the erase unit of internal flash defined by targets. But for external flash, it cannot apply.

The implementation should check the corresponding flash driver through DRV_FLASH_AREA(...) to get the correct sector size instead of the fixed LASH_AREA_IMAGE_SECTOR_SIZE.

Event Timeline

ccli8 created this task.Nov 17 2021, 10:10 AM