blob: 0510f80ece0bf4166bf5f343159216dba2ab42ca [file] [log] [blame]
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01001/*
Antonio Nino Diazcbccdbf2019-01-21 11:53:29 +00002 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef SECURE_PARTITION_H
8#define SECURE_PARTITION_H
Antonio Nino Diazc41f2062017-10-24 10:07:35 +01009
Antonio Nino Diazcbccdbf2019-01-21 11:53:29 +000010#if SPM_MM
Antonio Nino Diazd6cf9a22018-10-30 11:52:45 +000011
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010012#include <stdint.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000013
14#include <lib/utils_def.h>
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010015
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010016/*
17 * Flags used by the secure_partition_mp_info structure to describe the
18 * characteristics of a cpu. Only a single flag is defined at the moment to
19 * indicate the primary cpu.
20 */
21#define MP_INFO_FLAG_PRIMARY_CPU U(0x00000001)
22
23/*
24 * This structure is used to provide information required to initialise a S-EL0
25 * partition.
26 */
27typedef struct secure_partition_mp_info {
Sughosh Ganu8539aa32017-12-11 19:03:19 +053028 uint64_t mpidr;
29 uint32_t linear_id;
30 uint32_t flags;
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010031} secure_partition_mp_info_t;
32
33typedef struct secure_partition_boot_info {
34 param_header_t h;
Sughosh Ganu8539aa32017-12-11 19:03:19 +053035 uint64_t sp_mem_base;
36 uint64_t sp_mem_limit;
37 uint64_t sp_image_base;
38 uint64_t sp_stack_base;
39 uint64_t sp_heap_base;
40 uint64_t sp_ns_comm_buf_base;
41 uint64_t sp_shared_buf_base;
42 uint64_t sp_image_size;
43 uint64_t sp_pcpu_stack_size;
44 uint64_t sp_heap_size;
45 uint64_t sp_ns_comm_buf_size;
46 uint64_t sp_shared_buf_size;
47 uint32_t num_sp_mem_regions;
48 uint32_t num_cpus;
Antonio Nino Diazc41f2062017-10-24 10:07:35 +010049 secure_partition_mp_info_t *mp_info;
50} secure_partition_boot_info_t;
51
Antonio Nino Diazcbccdbf2019-01-21 11:53:29 +000052#endif /* SPM_MM */
Antonio Nino Diazd6cf9a22018-10-30 11:52:45 +000053
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000054#endif /* SECURE_PARTITION_H */