blob: 294788278c91a4fc22e9d0f788d9210141efb956 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/*
8 * Definitions related to the Trusted OS Service as per the SMC Calling
9 * Convention.
10 */
11
12#ifndef __TRUSTED_OS_H__
13#define __TRUSTED_OS_H__
14
15#include <uuid.h>
16
17/* Trusted OS Function IDs that fall under Trusted OS call range */
18#define SMC_TOS_CALL_COUNT 0xbf00ff00
19#define SMC_TOS_UID 0xbf00ff01
20/* 0xbf00ff02 is reserved */
21#define SMC_TOS_REVISION 0xbf00ff03
22
23/*
24 * Detect whether a Trusted OS is present in the software stack.
25 * This is implemented using the Trusted OS UID SMC call.
26 *
Sandrine Bailleuxcab5e362019-01-07 09:53:50 +010027 * Return 1 if a Trusted OS is detected, else 0. Additionally, the caller may
28 * get the UUID of the Trusted OS if he passes a non-null 'tos_uuid' pointer.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020029 */
30unsigned int is_trusted_os_present(uuid_t *tos_uuid);
31
32#endif /* __TRUSTED_OS_H__ */