blob: a96a1ac5d77eaccc3949be6a9b433956f383c74d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Ruchika Gupta8ca8d822010-12-15 17:02:08 +00002/*
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Ruchika Gupta8ca8d822010-12-15 17:02:08 +00004 */
5
6#ifndef __FSL_SECURE_BOOT_H
7#define __FSL_SECURE_BOOT_H
gaurav rana8b5ea652015-02-27 09:46:17 +05308#include <asm/config_mpc85xx.h>
Ruchika Gupta8ca8d822010-12-15 17:02:08 +00009
Udit Agarwald2dd2f72019-11-07 16:11:39 +000010#ifdef CONFIG_NXP_ESBC
Ruchika Gupta8ca8d822010-12-15 17:02:08 +000011#if defined(CONFIG_FSL_CORENET)
12#define CONFIG_SYS_PBI_FLASH_BASE 0xc0000000
13#else
14#define CONFIG_SYS_PBI_FLASH_BASE 0xce000000
15#endif
16#define CONFIG_SYS_PBI_FLASH_WINDOW 0xcff80000
17
Tom Rinibf1dfd82022-06-17 16:24:34 -040018#if defined(CONFIG_TARGET_T2080QDS) || \
York Suna05baa42016-12-28 08:43:37 -080019 defined(CONFIG_TARGET_T2080RDB) || \
York Sun097aa602016-11-21 11:25:26 -080020 defined(CONFIG_TARGET_T1042RDB) || \
21 defined(CONFIG_TARGET_T1042D4RDB) || \
22 defined(CONFIG_TARGET_T1042RDB_PI) || \
York Sun7d29dd62016-11-18 13:01:34 -080023 defined(CONFIG_ARCH_T1024)
Sumit Gargafaca2a2016-07-14 12:27:52 -040024#ifndef CONFIG_SYS_RAMBOOT
Aneesh Bansal8bcbc272014-03-18 23:40:26 +053025#define CONFIG_SYS_CPC_REINIT_F
Sumit Gargafaca2a2016-07-14 12:27:52 -040026#endif
Aneesh Bansal8bcbc272014-03-18 23:40:26 +053027#undef CONFIG_SYS_INIT_L3_ADDR
28#define CONFIG_SYS_INIT_L3_ADDR 0xbff00000
29#endif
30
Aneesh Bansale0f50152015-06-16 10:36:00 +053031#if defined(CONFIG_RAMBOOT_PBL)
32#undef CONFIG_SYS_INIT_L3_ADDR
Sumit Gargafaca2a2016-07-14 12:27:52 -040033#ifdef CONFIG_SYS_INIT_L3_VADDR
34#define CONFIG_SYS_INIT_L3_ADDR \
35 (CONFIG_SYS_INIT_L3_VADDR & ~0xFFF00000) | \
36 0xbff00000
37#else
38#define CONFIG_SYS_INIT_L3_ADDR 0xbff00000
39#endif
Aneesh Bansale0f50152015-06-16 10:36:00 +053040#endif
41
York Sundf70d062016-11-18 11:20:40 -080042#if defined(CONFIG_ARCH_P3041) || \
York Sun84be8a92016-11-18 11:24:40 -080043 defined(CONFIG_ARCH_P4080) || \
York Suna3c5b662016-11-18 11:39:36 -080044 defined(CONFIG_ARCH_P5040) || \
York Sun5786fca2016-11-18 11:15:21 -080045 defined(CONFIG_ARCH_P2041)
gaurav rana8b5ea652015-02-27 09:46:17 +053046 #define CONFIG_FSL_TRUST_ARCH_v1
47#endif
48
Aneesh Bansald31bb3e2015-07-31 14:10:03 +053049#if defined(CONFIG_FSL_CORENET) && !defined(CONFIG_SYS_RAMBOOT)
gaurav rana8b5ea652015-02-27 09:46:17 +053050/* The key used for verification of next level images
51 * is picked up from an Extension Table which has
52 * been verified by the ISBC (Internal Secure boot Code)
Aneesh Bansald31bb3e2015-07-31 14:10:03 +053053 * in boot ROM of the SoC.
54 * The feature is only applicable in case of NOR boot and is
55 * not applicable in case of RAMBOOT (NAND, SD, SPI).
gaurav rana8b5ea652015-02-27 09:46:17 +053056 */
57#define CONFIG_FSL_ISBC_KEY_EXT
58#endif
Udit Agarwald2dd2f72019-11-07 16:11:39 +000059#endif /* #ifdef CONFIG_NXP_ESBC */
gaurav rana8b5ea652015-02-27 09:46:17 +053060
Aneesh Bansal43104702016-01-22 16:37:24 +053061#ifdef CONFIG_CHAIN_OF_TRUST
Simon Glass3aa66122016-09-12 23:18:23 -060062#ifdef CONFIG_SPL_BUILD
Sumit Gargf6d96cb2016-07-14 12:27:51 -040063/*
64 * PPAACT and SPAACT table for PAMU must be placed on DDR after DDR init
65 * due to space crunch on CPC and thus malloc will not work.
66 */
67#define CONFIG_SPL_PPAACT_ADDR 0x2e000000
68#define CONFIG_SPL_SPAACT_ADDR 0x2f000000
69#define CONFIG_SPL_JR0_LIODN_S 454
70#define CONFIG_SPL_JR0_LIODN_NS 458
Sumit Gargf6d96cb2016-07-14 12:27:51 -040071#endif /* ifdef CONFIG_SPL_BUILD */
72
Sumit Gargf6d96cb2016-07-14 12:27:51 -040073#ifndef CONFIG_SPL_BUILD
Aneesh Bansal43104702016-01-22 16:37:24 +053074#include <config_fsl_chain_trust.h>
Sumit Gargf6d96cb2016-07-14 12:27:51 -040075#endif /* #ifndef CONFIG_SPL_BUILD */
Aneesh Bansal43104702016-01-22 16:37:24 +053076#endif /* #ifdef CONFIG_CHAIN_OF_TRUST */
Po Liud1030092013-08-21 14:20:21 +080077#endif