aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhukar Pappireddy <madhukar.pappireddy@arm.com>2022-01-06 17:43:56 +0100
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2022-01-06 17:43:56 +0100
commit911fa6ba32e6284814845632e62f69b41473d81e (patch)
treeb92cda0f9198cf262a6b69a1894e4e7d868fa0be
parente7d9c4a9fe8e44a8ea53d786a29019c96ff23ec7 (diff)
parent8aa994cc1d314dbfe5332c7aecdeff80c37f886d (diff)
downloadtf-a-tests-911fa6ba32e6284814845632e62f69b41473d81e.tar.gz
Merge "test(ff-a): update partition info to include uuids"
-rw-r--r--include/runtime_services/ffa_endpoints.h3
-rw-r--r--include/runtime_services/ffa_helpers.h8
-rw-r--r--spm/cactus/cactus_tests/cactus_test_ffa.c19
-rw-r--r--tftf/tests/runtime_services/secure_service/spm_common.c18
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_setup_and_discovery.c16
5 files changed, 48 insertions, 16 deletions
diff --git a/include/runtime_services/ffa_endpoints.h b/include/runtime_services/ffa_endpoints.h
index 82e64a48..88055c49 100644
--- a/include/runtime_services/ffa_endpoints.h
+++ b/include/runtime_services/ffa_endpoints.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,6 +13,7 @@
#define PRIMARY_UUID {0x1e67b5b4, 0xe14f904a, 0x13fb1fb8, 0xcbdae1da}
#define SECONDARY_UUID {0x092358d1, 0xb94723f0, 0x64447c82, 0xc88f57f5}
#define TERTIARY_UUID {0x735cb579, 0xb9448c1d, 0xe1619385, 0xd2d80a77}
+#define IVY_UUID {0xd883baea, 0xaf4eafba, 0xfdf74481, 0xa744e5cb}
/* vcpu_count of cactus SPs. */
#define PRIMARY_EXEC_CTX_COUNT PLATFORM_CORE_COUNT
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index 03ac754e..e4929b75 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -57,6 +57,10 @@ struct ffa_uuid {
/** Partition property: partition can receive notifications. */
#define FFA_PARTITION_NOTIFICATION 0x8
+/**
+ * Partition info descriptor as defined in Table 13.34 of the v1.1 BETA0
+ * FF-A Specification
+ */
struct ffa_partition_info {
/** The ID of the VM the information is about */
ffa_id_t id;
@@ -64,6 +68,8 @@ struct ffa_partition_info {
uint16_t exec_context;
/** The Partition's properties, e.g. supported messaging methods */
uint32_t properties;
+ /** The uuid of the partition */
+ struct ffa_uuid uuid;
};
static inline uint32_t ffa_func_id(smc_ret_values val)
diff --git a/spm/cactus/cactus_tests/cactus_test_ffa.c b/spm/cactus/cactus_tests/cactus_test_ffa.c
index 2e47ebc9..bca3984b 100644
--- a/spm/cactus/cactus_tests/cactus_test_ffa.c
+++ b/spm/cactus/cactus_tests/cactus_test_ffa.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -18,12 +18,12 @@
/* FFA version test helpers */
#define FFA_MAJOR 1U
-#define FFA_MINOR 0U
+#define FFA_MINOR 1U
static uint32_t spm_version;
static const struct ffa_uuid sp_uuids[] = {
- {PRIMARY_UUID}, {SECONDARY_UUID}, {TERTIARY_UUID}
+ {PRIMARY_UUID}, {SECONDARY_UUID}, {TERTIARY_UUID}, {IVY_UUID}
};
static const struct ffa_uuid null_uuid = { .uuid = {0} };
@@ -34,7 +34,8 @@ static const struct ffa_partition_info ffa_expected_partition_info[] = {
.exec_context = PRIMARY_EXEC_CTX_COUNT,
.properties = (FFA_PARTITION_DIRECT_REQ_RECV |
FFA_PARTITION_DIRECT_REQ_SEND |
- FFA_PARTITION_NOTIFICATION)
+ FFA_PARTITION_NOTIFICATION),
+ .uuid = sp_uuids[0]
},
/* Secondary partition info */
{
@@ -42,7 +43,8 @@ static const struct ffa_partition_info ffa_expected_partition_info[] = {
.exec_context = SECONDARY_EXEC_CTX_COUNT,
.properties = (FFA_PARTITION_DIRECT_REQ_RECV |
FFA_PARTITION_DIRECT_REQ_SEND |
- FFA_PARTITION_NOTIFICATION)
+ FFA_PARTITION_NOTIFICATION),
+ .uuid = sp_uuids[1]
},
/* Tertiary partition info */
{
@@ -50,13 +52,16 @@ static const struct ffa_partition_info ffa_expected_partition_info[] = {
.exec_context = TERTIARY_EXEC_CTX_COUNT,
.properties = (FFA_PARTITION_DIRECT_REQ_RECV |
FFA_PARTITION_DIRECT_REQ_SEND |
- FFA_PARTITION_NOTIFICATION)
+ FFA_PARTITION_NOTIFICATION),
+ .uuid = sp_uuids[2]
},
/* Ivy partition info */
{
.id = SP_ID(4),
.exec_context = IVY_EXEC_CTX_COUNT,
- .properties = (FFA_PARTITION_DIRECT_REQ_RECV | FFA_PARTITION_DIRECT_REQ_SEND)
+ .properties = (FFA_PARTITION_DIRECT_REQ_RECV |
+ FFA_PARTITION_DIRECT_REQ_SEND),
+ .uuid = sp_uuids[3]
}
};
diff --git a/tftf/tests/runtime_services/secure_service/spm_common.c b/tftf/tests/runtime_services/secure_service/spm_common.c
index ff4cb76a..f6800ceb 100644
--- a/tftf/tests/runtime_services/secure_service/spm_common.c
+++ b/tftf/tests/runtime_services/secure_service/spm_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -559,6 +559,22 @@ bool ffa_partition_info_helper(struct mailbox_buffers *mb,
info[i].properties);
result = false;
}
+ if (info[i].uuid.uuid[0] != expected[i].uuid.uuid[0] ||
+ info[i].uuid.uuid[1] != expected[i].uuid.uuid[1] ||
+ info[i].uuid.uuid[2] != expected[i].uuid.uuid[2] ||
+ info[i].uuid.uuid[3] != expected[i].uuid.uuid[3]) {
+ ERROR("Wrong UUID. Expected %x %x %x %x, "
+ "got %x %x %x %x\n",
+ expected[i].uuid.uuid[0],
+ expected[i].uuid.uuid[1],
+ expected[i].uuid.uuid[2],
+ expected[i].uuid.uuid[3],
+ info[i].uuid.uuid[0],
+ info[i].uuid.uuid[1],
+ info[i].uuid.uuid[2],
+ info[i].uuid.uuid[3]);
+ result = false;
+ }
}
}
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_setup_and_discovery.c b/tftf/tests/runtime_services/secure_service/test_ffa_setup_and_discovery.c
index 383ce02f..58d661eb 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_setup_and_discovery.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_setup_and_discovery.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -19,7 +19,7 @@ static bool should_skip_version_test;
static struct mailbox_buffers mb;
static const struct ffa_uuid sp_uuids[] = {
- {PRIMARY_UUID}, {SECONDARY_UUID}, {TERTIARY_UUID}
+ {PRIMARY_UUID}, {SECONDARY_UUID}, {TERTIARY_UUID}, {IVY_UUID}
};
static const struct ffa_uuid null_uuid = { .uuid = {0} };
@@ -29,27 +29,31 @@ static const struct ffa_partition_info ffa_expected_partition_info[] = {
.id = SP_ID(1),
.exec_context = PRIMARY_EXEC_CTX_COUNT,
.properties = FFA_PARTITION_DIRECT_REQ_RECV |
- FFA_PARTITION_NOTIFICATION
+ FFA_PARTITION_NOTIFICATION,
+ .uuid = sp_uuids[0]
},
/* Secondary partition info */
{
.id = SP_ID(2),
.exec_context = SECONDARY_EXEC_CTX_COUNT,
.properties = FFA_PARTITION_DIRECT_REQ_RECV |
- FFA_PARTITION_NOTIFICATION
+ FFA_PARTITION_NOTIFICATION,
+ .uuid = sp_uuids[1]
},
/* Tertiary partition info */
{
.id = SP_ID(3),
.exec_context = TERTIARY_EXEC_CTX_COUNT,
.properties = FFA_PARTITION_DIRECT_REQ_RECV |
- FFA_PARTITION_NOTIFICATION
+ FFA_PARTITION_NOTIFICATION,
+ .uuid = sp_uuids[2]
},
/* Ivy partition info */
{
.id = SP_ID(4),
.exec_context = IVY_EXEC_CTX_COUNT,
- .properties = FFA_PARTITION_DIRECT_REQ_RECV
+ .properties = FFA_PARTITION_DIRECT_REQ_RECV,
+ .uuid = sp_uuids[3]
}
};