aboutsummaryrefslogtreecommitdiff
path: root/spm/cactus_mm/cactus_mm_tests_misc.c
blob: 1d4d18a52dd7b0b49587fb8261c252d26b3752a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <assert.h>
#include <debug.h>
#include <errno.h>
#include <sp_helpers.h>
#include <spm_svc.h>
#include <stdint.h>

#include "cactus_mm.h"
#include "cactus_mm_tests.h"

/*
 * Miscellaneous SPM tests.
 */
void misc_tests(void)
{
	int32_t ret;

	const char *test_sect_desc = "miscellaneous";

	announce_test_section_start(test_sect_desc);

	const char *test_version = "SPM version check";

	announce_test_start(test_version);
	svc_args svc_values = { SPM_VERSION_AARCH32 };
	ret = sp_svc(&svc_values);
	INFO("Version = 0x%x (%u.%u)\n", ret,
	     (ret >> 16) & 0x7FFF, ret & 0xFFFF);
	expect(ret, SPM_VERSION_COMPILED);
	announce_test_end(test_version);

	announce_test_section_end(test_sect_desc);
}