All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC
@ 2017-08-29 13:42 Suresh Gupta
  2017-09-13  2:25 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Suresh Gupta @ 2017-08-29 13:42 UTC (permalink / raw)
  To: u-boot

For QSPI and IFC addresses execution shouldn't be allowed
when u-boot running from DDR. Revise the MMU final table
to enforce execute-never bits.

Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
---
 arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
index c4e5ecc..3d564d6 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
@@ -199,7 +199,8 @@ static struct mm_region final_map[] = {
 	},
 	{ CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1,
 	  CONFIG_SYS_FSL_QSPI_SIZE1,
-	  PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE
+	  PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+	  PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
 	},
 	{ CONFIG_SYS_FSL_QSPI_BASE2, CONFIG_SYS_FSL_QSPI_BASE2,
 	  CONFIG_SYS_FSL_QSPI_SIZE2,
@@ -208,7 +209,8 @@ static struct mm_region final_map[] = {
 	},
 	{ CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2,
 	  CONFIG_SYS_FSL_IFC_SIZE2,
-	  PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE
+	  PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+	  PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
 	},
 	{ CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE,
 	  CONFIG_SYS_FSL_DCSR_SIZE,
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC
  2017-08-29 13:42 [U-Boot] [PATCH] armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC Suresh Gupta
@ 2017-09-13  2:25 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2017-09-13  2:25 UTC (permalink / raw)
  To: u-boot

On 08/29/2017 06:42 AM, Suresh Gupta wrote:
> For QSPI and IFC addresses execution shouldn't be allowed
> when u-boot running from DDR. Revise the MMU final table
> to enforce execute-never bits.
> 
> Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
> ---

Applied to fsl-qoriq master. Thanks.

York

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-13  2:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 13:42 [U-Boot] [PATCH] armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC Suresh Gupta
2017-09-13  2:25 ` York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.