aboutsummaryrefslogtreecommitdiff
path: root/spm/cactus/cactus_tests_misc.c
blob: 39eb75222aaeae9a0c8e47df716ef61586ee4ce5 (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
40
41
/*
 * Copyright (c) 2018, 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 <sprt_client.h>
#include <sprt_svc.h>
#include <stdint.h>

#include "cactus.h"
#include "cactus_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_sprt = "SPRT version check";

	announce_test_start(test_version_sprt);
	ret = sprt_version();
	INFO("Version = 0x%x (%u.%u)\n", ret,
	     (ret >> SPRT_VERSION_MAJOR_SHIFT) & SPRT_VERSION_MAJOR_MASK,
	     ret & SPRT_VERSION_MINOR_MASK);
	expect(ret, SPRT_VERSION_COMPILED);
	announce_test_end(test_version_sprt);

	announce_test_section_end(test_sect_desc);
}