mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-17 10:31:31 +00:00
The translation tables allocated for the Secure Partition do not need
to be treated as a special case. They can be put amongst the other
tables mapping BL31's general purpose memory. They will be mapped with
the same attributes as them, which is fine.
The explicit alignment constraint in BL31's linker script to pad the
last page of memory allocated to the Secure Partition's translation
tables is useless too, as page tables are per se pages, thus their
end address is naturally aligned on a page-boundary.
In fact, this patch does not change the existing behaviour. Since
patch 22282bb68a ("SPM: Move all SP-related info to SP context
struct"), the secure_partition.c file has been renamed into sp_xlat.c
but the linker script has not been properly updated. As a result, the
SP translation tables are not specifically put at the start of the
xlat_table linker section, the __SP_IMAGE_XLAT_TABLES_START__/_END__
symbols have the same value, the size of the resulting mmap_region
covering these xlat tables is 0 and so it is ignored.
Change-Id: I4cf0a4cc090298811cca53fc9cee74df0f2b1512
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef __SECURE_PARTITION_H__
|
|
#define __SECURE_PARTITION_H__
|
|
|
|
#include <types.h>
|
|
#include <utils_def.h>
|
|
|
|
/*
|
|
* Flags used by the secure_partition_mp_info structure to describe the
|
|
* characteristics of a cpu. Only a single flag is defined at the moment to
|
|
* indicate the primary cpu.
|
|
*/
|
|
#define MP_INFO_FLAG_PRIMARY_CPU U(0x00000001)
|
|
|
|
/*
|
|
* This structure is used to provide information required to initialise a S-EL0
|
|
* partition.
|
|
*/
|
|
typedef struct secure_partition_mp_info {
|
|
uint64_t mpidr;
|
|
uint32_t linear_id;
|
|
uint32_t flags;
|
|
} secure_partition_mp_info_t;
|
|
|
|
typedef struct secure_partition_boot_info {
|
|
param_header_t h;
|
|
uint64_t sp_mem_base;
|
|
uint64_t sp_mem_limit;
|
|
uint64_t sp_image_base;
|
|
uint64_t sp_stack_base;
|
|
uint64_t sp_heap_base;
|
|
uint64_t sp_ns_comm_buf_base;
|
|
uint64_t sp_shared_buf_base;
|
|
uint64_t sp_image_size;
|
|
uint64_t sp_pcpu_stack_size;
|
|
uint64_t sp_heap_size;
|
|
uint64_t sp_ns_comm_buf_size;
|
|
uint64_t sp_shared_buf_size;
|
|
uint32_t num_sp_mem_regions;
|
|
uint32_t num_cpus;
|
|
secure_partition_mp_info_t *mp_info;
|
|
} secure_partition_boot_info_t;
|
|
|
|
#endif /* __SECURE_PARTITION_H__ */
|