diff --git a/arch/arm/src/sama5/chip/sama5d2x_memorymap.h b/arch/arm/src/sama5/chip/sama5d2x_memorymap.h index 7c42bd97df5..e541cb66052 100644 --- a/arch/arm/src/sama5/chip/sama5d2x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d2x_memorymap.h @@ -726,13 +726,15 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ +#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 +# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION +# define ARMV7A_PGTABLE_MAPPING 1 +# endif # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ diff --git a/arch/arm/src/sama5/chip/sama5d3x_memorymap.h b/arch/arm/src/sama5/chip/sama5d3x_memorymap.h index 288a60dcb51..c27c0fe8db9 100644 --- a/arch/arm/src/sama5/chip/sama5d3x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d3x_memorymap.h @@ -651,13 +651,15 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ +#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 +# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION +# define ARMV7A_PGTABLE_MAPPING 1 +# endif # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ diff --git a/arch/arm/src/sama5/chip/sama5d4x_memorymap.h b/arch/arm/src/sama5/chip/sama5d4x_memorymap.h index a7e5760ccbc..5003f04ae96 100644 --- a/arch/arm/src/sama5/chip/sama5d4x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d4x_memorymap.h @@ -651,13 +651,15 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ +#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 +# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION +# define ARMV7A_PGTABLE_MAPPING 1 +# endif # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */