Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | /* |
| 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 | * |
| 27 | * If a Trusted OS is detected then this function returns 1 |
| 28 | * and populates 'tos_uuid' with the UUID of the detected Trusted OS. |
| 29 | * Otherwise, this function returns 0 and the value pointed by 'tos_uuid' |
| 30 | * should be ignored. |
| 31 | */ |
| 32 | unsigned int is_trusted_os_present(uuid_t *tos_uuid); |
| 33 | |
| 34 | #endif /* __TRUSTED_OS_H__ */ |