armcm_reset: Introduce Kconfig FLASH_BOOT_ADDRESS value

Specify the arm architecture flash bootup address for each chip type
in Kconfig using a new FLASH_BOOT_ADDRESS setting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2022-11-03 12:41:28 -04:00
parent 11dd273b34
commit 42e9adcfc9
8 changed files with 26 additions and 6 deletions

View File

@@ -17,10 +17,10 @@
static void
canboot_reset(uint64_t req_signature)
{
if (!(CONFIG_FLASH_START & 0x00FFFFFF))
if (CONFIG_FLASH_START == CONFIG_FLASH_BOOT_ADDRESS)
// No bootloader
return;
uint32_t *bl_vectors = (uint32_t *)(CONFIG_FLASH_START & 0xFF000000);
uint32_t *bl_vectors = (uint32_t *)CONFIG_FLASH_BOOT_ADDRESS;
uint64_t *boot_sig = (uint64_t *)(bl_vectors[1] - 9);
uint64_t *req_sig = (uint64_t *)bl_vectors[0];
if (boot_sig == (void *)ALIGN((size_t)boot_sig, 8) &&