diff options
author | Ruari Phipps <ruari.phipps@arm.com> | 2020-07-17 16:41:34 +0100 |
---|---|---|
committer | Ruari Phipps <ruari.phipps@arm.com> | 2020-08-19 11:06:21 +0000 |
commit | d75596a2462f4dc9f707e71995576e5ffbb01a65 (patch) | |
tree | 4755bfe082a4761e501fe2f8f1287b237166b0aa /spm | |
parent | 93119e3f5c91e6d79b6c917de41091880a2dc2d7 (diff) | |
download | tf-a-tests-d75596a2462f4dc9f707e71995576e5ffbb01a65.tar.gz |
Cactus: Add third partion to ffa tests
Add the third partition to the ffa_partition_info_get test to test
that a partition can successfully get information about the third cactus
partition
Signed-off-by: Ruari Phipps <ruari.phipps@arm.com>
Change-Id: Ib8c69f16e217f9631be005c7759753d05704afd2
Diffstat (limited to 'spm')
-rw-r--r-- | spm/cactus/cactus_def.h | 4 | ||||
-rw-r--r-- | spm/cactus/cactus_ffa_tests.c | 11 | ||||
-rw-r--r-- | spm/common/sp_helpers.h | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/spm/cactus/cactus_def.h b/spm/cactus/cactus_def.h index 0d3df2e4e..5a4a5dd6d 100644 --- a/spm/cactus/cactus_def.h +++ b/spm/cactus/cactus_def.h @@ -24,7 +24,7 @@ * RX/TX buffer used by VM's in SPM for memory sharing * Each VM allocated 2 pages, one for RX and one for TX buffer. */ -#define CACTUS_RX_BASE ULL(0x7200000) +#define CACTUS_RX_BASE ULL(0x7300000) #define CACTUS_TX_BASE CACTUS_RX_BASE + PAGE_SIZE #define CACTUS_RX_TX_SIZE PAGE_SIZE * 2 @@ -41,5 +41,7 @@ */ #define PRIMARY_UUID {0xb4b5671e, 0x4a904fe1, 0xb81ffb13, 0xdae1dacb} #define SECONDARY_UUID {0xd1582309, 0xf02347b9, 0x827c4464, 0xf5578fc8} +#define TERTIARY_UUID {0x79b55c73, 0x1d8c44b9, 0x859361e1, 0x770ad8d2} + #endif /* CACTUS_DEF_H */ diff --git a/spm/cactus/cactus_ffa_tests.c b/spm/cactus/cactus_ffa_tests.c index 25c20b004..085923a85 100644 --- a/spm/cactus/cactus_ffa_tests.c +++ b/spm/cactus/cactus_ffa_tests.c @@ -16,6 +16,7 @@ static const uint32_t primary_uuid[4] = PRIMARY_UUID; static const uint32_t secondary_uuid[4] = SECONDARY_UUID; +static const uint32_t tertiary_uuid[4] = TERTIARY_UUID; static const uint32_t null_uuid[4] = {0}; struct feature_test { @@ -116,15 +117,21 @@ static void ffa_partition_info_get_test(struct mailbox_buffers *mb) const char *test_partition_info = "FFA Partition info interface"; const char *test_primary = "Get primary partition info"; const char *test_secondary = "Get secondary partition info"; + const char *test_tertiary = "Get tertiary partition info"; const char *test_all = "Get all partitions info"; const struct ffa_partition_info expected_info[] = { {.id = SPM_VM_ID_FIRST, .exec_context = 8, .properties = 0}, /* Primary partition info */ - {.id = 2, .exec_context = 2, .properties = 0} /* Secondary partition info */ + {.id = SPM_VM_ID_SECOND, .exec_context = 2, .properties = 0}, /* Secondary partition info */ + {.id = SPM_VM_ID_THIRD, .exec_context = 2, .properties = 0} /* Tertiary partition info */ }; announce_test_section_start(test_partition_info); + announce_test_start(test_tertiary); + ffa_partition_info_helper(mb, tertiary_uuid, &expected_info[2], 1); + announce_test_end(test_tertiary); + announce_test_start(test_secondary); ffa_partition_info_helper(mb, secondary_uuid, &expected_info[1], 1); announce_test_end(test_secondary); @@ -134,7 +141,7 @@ static void ffa_partition_info_get_test(struct mailbox_buffers *mb) announce_test_end(test_primary); announce_test_start(test_all); - ffa_partition_info_helper(mb, null_uuid, expected_info, 2); + ffa_partition_info_helper(mb, null_uuid, expected_info, 3); announce_test_end(test_all); ffa_partition_info_wrong_test(); diff --git a/spm/common/sp_helpers.h b/spm/common/sp_helpers.h index 2b9cc2ed2..7096daf52 100644 --- a/spm/common/sp_helpers.h +++ b/spm/common/sp_helpers.h @@ -12,6 +12,8 @@ #include <ffa_helpers.h> #define SPM_VM_ID_FIRST (1) +#define SPM_VM_ID_SECOND (2) +#define SPM_VM_ID_THIRD (3) #define SPM_VM_GET_COUNT (0xFF01) #define SPM_VCPU_GET_COUNT (0xFF02) |