* [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT - Bypass PAMU in case of secure boot
@ 2014-09-17 10:35 Ruchika Gupta
2014-09-25 15:32 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Ruchika Gupta @ 2014-09-17 10:35 UTC (permalink / raw)
To: u-boot
By default, PAMU's (IOMMU) are enabled in case of secure boot.
Disable/bypass them , once the control reached the bootloader.
For non-secure boot, PAMU's are already bypassed in the default
SoC configuration
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
CC: York Sun <yorksun@freescale.com>
---
arch/powerpc/cpu/mpc85xx/cpu_init.c | 6 +++++-
arch/powerpc/include/asm/immap_85xx.h | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 21c3194..15a7771 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -424,7 +424,7 @@ ulong cpu_init_f(void)
{
ulong flag = 0;
extern void m8560_cpm_reset (void);
-#ifdef CONFIG_SYS_DCSRBAR_PHYS
+#if defined(CONFIG_SYS_DCSRBAR_PHYS) || defined(CONFIG_SECURE_BOOT)
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
#endif
#if defined(CONFIG_SECURE_BOOT)
@@ -456,6 +456,10 @@ ulong cpu_init_f(void)
#if defined(CONFIG_SYS_CPC_REINIT_F)
disable_cpc_sram();
#endif
+
+ /* Put PAMU in bypass mode */
+ out_be32(&gur->pamubypenr, FSL_CORENET_PAMU_BYPASS);
+
#endif
#ifdef CONFIG_CPM2
diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h
index 88c1e08..0264523 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -1912,6 +1912,7 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)
u8 res24[64];
u32 pblsr; /* Preboot loader status */
u32 pamubypenr; /* PAMU bypass enable */
+#define FSL_CORENET_PAMU_BYPASS 0xffff0000
u32 dmacr1; /* DMA control */
u8 res25[4];
u32 gensr1; /* General status */
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT - Bypass PAMU in case of secure boot
2014-09-17 10:35 [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT - Bypass PAMU in case of secure boot Ruchika Gupta
@ 2014-09-25 15:32 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2014-09-25 15:32 UTC (permalink / raw)
To: u-boot
On 09/17/2014 03:35 AM, Ruchika Gupta wrote:
> By default, PAMU's (IOMMU) are enabled in case of secure boot.
> Disable/bypass them , once the control reached the bootloader.
>
> For non-secure boot, PAMU's are already bypassed in the default
> SoC configuration
>
> Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
> CC: York Sun <yorksun@freescale.com>
> ---
> arch/powerpc/cpu/mpc85xx/cpu_init.c | 6 +++++-
> arch/powerpc/include/asm/immap_85xx.h | 1 +
> 2 files changed, 6 insertions(+), 1 deletion(-)
Ruchika,
This patch broken these boards
BSC9132QDS_SDCARD_DDRCLK133_SECURE BSC9132QDS_SDCARD_DDRCLK100_SECURE
BSC9132QDS_NAND_DDRCLK133_SECURE P1010RDB-PA_36BIT_SPIFLASH_SECBOOT
P1010RDB-PA_SPIFLASH_SECBOOT P1010RDB-PB_36BIT_NOR_SECBOOT
BSC9132QDS_NOR_DDRCLK100_SECURE P1010RDB-PB_NAND_SECBOOT
BSC9132QDS_SPIFLASH_DDRCLK100_SECURE P1010RDB-PA_36BIT_NOR_SECBOOT
P1010RDB-PB_36BIT_NAND_SECBOOT BSC9132QDS_NAND_DDRCLK100_SECURE
P1010RDB-PB_NOR_SECBOOT BSC9132QDS_NOR_DDRCLK133_SECURE P1010RDB-PA_NAND_SECBOOT
BSC9132QDS_SPIFLASH_DDRCLK133_SECURE P1010RDB-PA_NOR_SECBOOT
P1010RDB-PA_36BIT_NAND_SECBOOT
Please check.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-25 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 10:35 [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT - Bypass PAMU in case of secure boot Ruchika Gupta
2014-09-25 15:32 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox