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 | * |
Sandrine Bailleux | cab5e36 | 2019-01-07 09:53:50 +0100 | [diff] [blame] | 27 | * 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 Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 29 | */ |
| 30 | unsigned int is_trusted_os_present(uuid_t *tos_uuid); |
| 31 | |
| 32 | #endif /* __TRUSTED_OS_H__ */ |