Commit cf952b0f authored by Masahisa Kojima's avatar Masahisa Kojima
Browse files

qemu/qemu_sbsa: spm_mm supports 512 cores



sbsa-ref in QEMU may create up to 512 cores.
This commit prepares the MP information to support 512 cores.
The number of xlat tables for spm_mm is also increased.
Signed-off-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
Change-Id: I2788eaf6d14e188e9b5d1102d359b2899e02df7c
parent 66306814
...@@ -29,20 +29,8 @@ mmap_region_t plat_qemu_secure_partition_mmap[] = { ...@@ -29,20 +29,8 @@ mmap_region_t plat_qemu_secure_partition_mmap[] = {
{0} {0}
}; };
/* /* Boot information passed to a secure partition during initialisation. */
* Boot information passed to a secure partition during initialisation. static spm_mm_mp_info_t sp_mp_info[PLATFORM_CORE_COUNT];
* Linear indices in MP information will be filled at runtime.
*/
static spm_mm_mp_info_t sp_mp_info[] = {
[0] = {0x80000000, 0},
[1] = {0x80000001, 0},
[2] = {0x80000002, 0},
[3] = {0x80000003, 0},
[4] = {0x80000004, 0},
[5] = {0x80000005, 0},
[6] = {0x80000006, 0},
[7] = {0x80000007, 0}
};
spm_mm_boot_info_t plat_qemu_secure_partition_boot_info = { spm_mm_boot_info_t plat_qemu_secure_partition_boot_info = {
.h.type = PARAM_SP_IMAGE_BOOT_INFO, .h.type = PARAM_SP_IMAGE_BOOT_INFO,
...@@ -71,6 +59,25 @@ ehf_pri_desc_t qemu_exceptions[] = { ...@@ -71,6 +59,25 @@ ehf_pri_desc_t qemu_exceptions[] = {
EHF_PRI_DESC(QEMU_PRI_BITS, PLAT_SP_PRI) EHF_PRI_DESC(QEMU_PRI_BITS, PLAT_SP_PRI)
}; };
static void qemu_initialize_mp_info(spm_mm_mp_info_t *mp_info)
{
unsigned int i, j;
spm_mm_mp_info_t *tmp = mp_info;
for (i = 0; i < PLATFORM_CLUSTER_COUNT; i++) {
for (j = 0; j < PLATFORM_MAX_CPUS_PER_CLUSTER; j++) {
tmp->mpidr = (0x80000000 | (i << MPIDR_AFF1_SHIFT)) + j;
/*
* Linear indices and flags will be filled
* in the spm_mm service.
*/
tmp->linear_id = 0;
tmp->flags = 0;
tmp++;
}
}
}
int dt_add_ns_buf_node(uintptr_t *base) int dt_add_ns_buf_node(uintptr_t *base)
{ {
uintptr_t addr; uintptr_t addr;
...@@ -134,5 +141,7 @@ const mmap_region_t *plat_get_secure_partition_mmap(void *cookie) ...@@ -134,5 +141,7 @@ const mmap_region_t *plat_get_secure_partition_mmap(void *cookie)
const spm_mm_boot_info_t * const spm_mm_boot_info_t *
plat_get_secure_partition_boot_info(void *cookie) plat_get_secure_partition_boot_info(void *cookie)
{ {
qemu_initialize_mp_info(sp_mp_info);
return &plat_qemu_secure_partition_boot_info; return &plat_qemu_secure_partition_boot_info;
} }
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
#if SPM_MM && defined(IMAGE_BL31) #if SPM_MM && defined(IMAGE_BL31)
# define PLAT_SP_IMAGE_MMAP_REGIONS 30 # define PLAT_SP_IMAGE_MMAP_REGIONS 30
# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 20 # define PLAT_SP_IMAGE_MAX_XLAT_TABLES 50
#endif #endif
/* /*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment