blob: 93df2a137936d711ea200a0fac76ed518d2bf839 [file] [log] [blame]
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __SECURE_PARTITION_H__
8#define __SECURE_PARTITION_H__
9
10#include <bl_common.h>
11#include <types.h>
12#include <utils_def.h>
13
14/* Linker symbols */
15extern uintptr_t __SP_IMAGE_XLAT_TABLES_START__;
16extern uintptr_t __SP_IMAGE_XLAT_TABLES_END__;
17
18/* Definitions */
19#define SP_IMAGE_XLAT_TABLES_START \
20 (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_START__)
21#define SP_IMAGE_XLAT_TABLES_END \
22 (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_END__)
23#define SP_IMAGE_XLAT_TABLES_SIZE \
24 (SP_IMAGE_XLAT_TABLES_END - SP_IMAGE_XLAT_TABLES_START)
25
26/*
27 * Flags used by the secure_partition_mp_info structure to describe the
28 * characteristics of a cpu. Only a single flag is defined at the moment to
29 * indicate the primary cpu.
30 */
31#define MP_INFO_FLAG_PRIMARY_CPU U(0x00000001)
32
33/*
34 * This structure is used to provide information required to initialise a S-EL0
35 * partition.
36 */
37typedef struct secure_partition_mp_info {
Sughosh Ganu8539aa32017-12-11 19:03:19 +053038 uint64_t mpidr;
39 uint32_t linear_id;
40 uint32_t flags;
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010041} secure_partition_mp_info_t;
42
43typedef struct secure_partition_boot_info {
44 param_header_t h;
Sughosh Ganu8539aa32017-12-11 19:03:19 +053045 uint64_t sp_mem_base;
46 uint64_t sp_mem_limit;
47 uint64_t sp_image_base;
48 uint64_t sp_stack_base;
49 uint64_t sp_heap_base;
50 uint64_t sp_ns_comm_buf_base;
51 uint64_t sp_shared_buf_base;
52 uint64_t sp_image_size;
53 uint64_t sp_pcpu_stack_size;
54 uint64_t sp_heap_size;
55 uint64_t sp_ns_comm_buf_size;
56 uint64_t sp_shared_buf_size;
57 uint32_t num_sp_mem_regions;
58 uint32_t num_cpus;
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010059 secure_partition_mp_info_t *mp_info;
60} secure_partition_boot_info_t;
61
62/* Setup function for secure partitions context. */
63
64void secure_partition_setup(void);
65
66#endif /* __SECURE_PARTITION_H__ */