ppc: Remove T1023RBD boards and T1024RDB_SECURE_BOOT
[platform/kernel/u-boot.git] / arch / powerpc / include / asm / fsl_secure_boot.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2010-2011 Freescale Semiconductor, Inc.
4  */
5
6 #ifndef __FSL_SECURE_BOOT_H
7 #define __FSL_SECURE_BOOT_H
8 #include <asm/config_mpc85xx.h>
9
10 #ifdef CONFIG_NXP_ESBC
11 #if defined(CONFIG_FSL_CORENET)
12 #define CONFIG_SYS_PBI_FLASH_BASE               0xc0000000
13 #elif defined(CONFIG_TARGET_BSC9132QDS)
14 #define CONFIG_SYS_PBI_FLASH_BASE               0xc8000000
15 #elif defined(CONFIG_TARGET_C29XPCIE)
16 #define CONFIG_SYS_PBI_FLASH_BASE               0xcc000000
17 #else
18 #define CONFIG_SYS_PBI_FLASH_BASE               0xce000000
19 #endif
20 #define CONFIG_SYS_PBI_FLASH_WINDOW             0xcff80000
21
22 #if defined(CONFIG_TARGET_B4860QDS) || \
23         defined(CONFIG_TARGET_B4420QDS) || \
24         defined(CONFIG_TARGET_T4160QDS) || \
25         defined(CONFIG_TARGET_T4240QDS) || \
26         defined(CONFIG_TARGET_T2080QDS) || \
27         defined(CONFIG_TARGET_T2080RDB) || \
28         defined(CONFIG_TARGET_T1042RDB) || \
29         defined(CONFIG_TARGET_T1042D4RDB) || \
30         defined(CONFIG_TARGET_T1042RDB_PI) || \
31         defined(CONFIG_ARCH_T1024)
32 #ifndef CONFIG_SYS_RAMBOOT
33 #define CONFIG_SYS_CPC_REINIT_F
34 #endif
35 #define CONFIG_KEY_REVOCATION
36 #undef CONFIG_SYS_INIT_L3_ADDR
37 #define CONFIG_SYS_INIT_L3_ADDR                 0xbff00000
38 #endif
39
40 #if defined(CONFIG_RAMBOOT_PBL)
41 #undef CONFIG_SYS_INIT_L3_ADDR
42 #ifdef CONFIG_SYS_INIT_L3_VADDR
43 #define CONFIG_SYS_INIT_L3_ADDR \
44                         (CONFIG_SYS_INIT_L3_VADDR & ~0xFFF00000) | \
45                                         0xbff00000
46 #else
47 #define CONFIG_SYS_INIT_L3_ADDR         0xbff00000
48 #endif
49 #endif
50
51 #if defined(CONFIG_TARGET_C29XPCIE)
52 #define CONFIG_KEY_REVOCATION
53 #endif
54
55 #if defined(CONFIG_ARCH_P3041)  ||      \
56         defined(CONFIG_ARCH_P4080) ||   \
57         defined(CONFIG_ARCH_P5040) ||   \
58         defined(CONFIG_ARCH_P2041)
59         #define CONFIG_FSL_TRUST_ARCH_v1
60 #endif
61
62 #if defined(CONFIG_FSL_CORENET) && !defined(CONFIG_SYS_RAMBOOT)
63 /* The key used for verification of next level images
64  * is picked up from an Extension Table which has
65  * been verified by the ISBC (Internal Secure boot Code)
66  * in boot ROM of the SoC.
67  * The feature is only applicable in case of NOR boot and is
68  * not applicable in case of RAMBOOT (NAND, SD, SPI).
69  */
70 #define CONFIG_FSL_ISBC_KEY_EXT
71 #endif
72 #endif /* #ifdef CONFIG_NXP_ESBC */
73
74 #ifdef CONFIG_CHAIN_OF_TRUST
75 #ifdef CONFIG_SPL_BUILD
76 /*
77  * PPAACT and SPAACT table for PAMU must be placed on DDR after DDR init
78  * due to space crunch on CPC and thus malloc will not work.
79  */
80 #define CONFIG_SPL_PPAACT_ADDR          0x2e000000
81 #define CONFIG_SPL_SPAACT_ADDR          0x2f000000
82 #define CONFIG_SPL_JR0_LIODN_S          454
83 #define CONFIG_SPL_JR0_LIODN_NS         458
84 /*
85  * Define the key hash for U-Boot here if public/private key pair used to
86  * sign U-boot are different from the SRK hash put in the fuse
87  * Example of defining KEY_HASH is
88  * #define CONFIG_SPL_UBOOT_KEY_HASH \
89  *      "41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b"
90  * else leave it defined as NULL
91  */
92
93 #define CONFIG_SPL_UBOOT_KEY_HASH       NULL
94 #endif /* ifdef CONFIG_SPL_BUILD */
95
96 #define CONFIG_FSL_SEC_MON
97
98 #ifndef CONFIG_SPL_BUILD
99 /*
100  * fsl_setenv_chain_of_trust() must be called from
101  * board_late_init()
102  */
103
104 /* If Boot Script is not on NOR and is required to be copied on RAM */
105 #ifdef CONFIG_BOOTSCRIPT_COPY_RAM
106 #define CONFIG_BS_HDR_ADDR_RAM          0x00010000
107 #define CONFIG_BS_HDR_ADDR_DEVICE       0x00800000
108 #define CONFIG_BS_HDR_SIZE              0x00002000
109 #define CONFIG_BS_ADDR_RAM              0x00012000
110 #define CONFIG_BS_ADDR_DEVICE           0x00802000
111 #define CONFIG_BS_SIZE                  0x00001000
112
113 #define CONFIG_BOOTSCRIPT_HDR_ADDR      CONFIG_BS_HDR_ADDR_RAM
114 #else
115
116 /* The bootscript header address is different for B4860 because the NOR
117  * mapping is different on B4 due to reduced NOR size.
118  */
119 #if defined(CONFIG_TARGET_B4860QDS) || defined(CONFIG_TARGET_B4420QDS)
120 #define CONFIG_BOOTSCRIPT_HDR_ADDR      0xecc00000
121 #elif defined(CONFIG_FSL_CORENET)
122 #define CONFIG_BOOTSCRIPT_HDR_ADDR      0xe8e00000
123 #elif defined(CONFIG_TARGET_BSC9132QDS)
124 #define CONFIG_BOOTSCRIPT_HDR_ADDR      0x88020000
125 #elif defined(CONFIG_TARGET_C29XPCIE)
126 #define CONFIG_BOOTSCRIPT_HDR_ADDR      0xec020000
127 #else
128 #define CONFIG_BOOTSCRIPT_HDR_ADDR      0xee020000
129 #endif
130
131 #endif /* #ifdef CONFIG_BOOTSCRIPT_COPY_RAM */
132
133 #include <config_fsl_chain_trust.h>
134 #endif /* #ifndef CONFIG_SPL_BUILD */
135 #endif /* #ifdef CONFIG_CHAIN_OF_TRUST */
136 #endif