summaryrefslogtreecommitdiffstats
path: root/plat/nxp/common/setup/include/bl31_data.h
blob: dd20d43a14916ab62a51908871bd7a21cd56dbcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright 2018-2020 NXP
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */

#ifndef BL31_DATA_H
#define	BL31_DATA_H

#define SECURE_DATA_BASE     NXP_OCRAM_ADDR
#define SECURE_DATA_SIZE     NXP_OCRAM_SIZE
#define SECURE_DATA_TOP      (SECURE_DATA_BASE + SECURE_DATA_SIZE)
#define SMC_REGION_SIZE      0x80
#define SMC_GLBL_BASE        (SECURE_DATA_TOP - SMC_REGION_SIZE)
#define BC_PSCI_DATA_SIZE    0xC0
#define BC_PSCI_BASE         (SMC_GLBL_BASE - BC_PSCI_DATA_SIZE)
#define SECONDARY_TOP        BC_PSCI_BASE

#define SEC_PSCI_DATA_SIZE   0xC0
#define SEC_REGION_SIZE      SEC_PSCI_DATA_SIZE

/* SMC global data */
#define BOOTLOC_OFFSET       0x0
#define BOOT_SVCS_OSET       0x8

/* offset to prefetch disable mask */
#define PREFETCH_DIS_OFFSET  0x10
/* must reference last smc global entry */
#define LAST_SMC_GLBL_OFFSET 0x18

#define SMC_TASK_OFFSET      0xC
#define TSK_START_OFFSET     0x0
#define TSK_DONE_OFFSET      0x4
#define TSK_CORE_OFFSET      0x8
#define SMC_TASK1_BASE       (SMC_GLBL_BASE + 32)
#define SMC_TASK2_BASE       (SMC_TASK1_BASE + SMC_TASK_OFFSET)
#define SMC_TASK3_BASE       (SMC_TASK2_BASE + SMC_TASK_OFFSET)
#define SMC_TASK4_BASE       (SMC_TASK3_BASE + SMC_TASK_OFFSET)

/* psci data area offsets */
#define CORE_STATE_DATA    0x0
#define SPSR_EL3_DATA      0x8
#define CNTXT_ID_DATA      0x10
#define START_ADDR_DATA    0x18
#define LINK_REG_DATA      0x20
#define GICC_CTLR_DATA     0x28
#define ABORT_FLAG_DATA    0x30
#define SCTLR_DATA         0x38
#define CPUECTLR_DATA      0x40
#define AUX_01_DATA        0x48  /* usage defined per SoC */
#define AUX_02_DATA        0x50  /* usage defined per SoC */
#define AUX_03_DATA        0x58  /* usage defined per SoC */
#define AUX_04_DATA        0x60  /* usage defined per SoC */
#define AUX_05_DATA        0x68  /* usage defined per SoC */
#define AUX_06_DATA        0x70  /* usage defined per SoC */
#define AUX_07_DATA        0x78  /* usage defined per SoC */
#define SCR_EL3_DATA       0x80
#define HCR_EL2_DATA       0x88

#endif /* BL31_DATA_H */