| /* |
| * Copyright (c) 2018, Arm Limited. All rights reserved. |
| * |
| * SPDX-License-Identifier: BSD-3-Clause |
| */ |
| |
| /* |
| * This header file contains definitions related to the Trusted Firmware-A |
| * Test Secure-EL1 Payload (TSP). |
| */ |
| |
| #ifndef __TSP_H__ |
| #define __TSP_H__ |
| |
| #include <psci.h> |
| #include <uuid.h> |
| |
| static const uuid_t tsp_uuid = { |
| 0x5b3056a0, 0x3291, 0x427b, 0x98, 0x11, |
| { 0x71, 0x68, 0xca, 0x50, 0xf3, 0xfa } |
| }; |
| |
| /* |
| * Identifiers for various TSP services. Corresponding function IDs (whether |
| * fast or standard) are generated by macros defined below |
| */ |
| #define TSP_ADD 0x2000 |
| #define TSP_SUB 0x2001 |
| #define TSP_MUL 0x2002 |
| #define TSP_DIV 0x2003 |
| #define TSP_HANDLE_SEL1_INTR_AND_RETURN 0x2004 |
| |
| /* |
| * Identify a TSP service from function ID filtering the last 16 bits from the |
| * SMC function ID |
| */ |
| #define TSP_BARE_FID(fid) ((fid) & 0xffff) |
| /* |
| * Generate function IDs for TSP services to be used in SMC calls, by |
| * appropriately setting bit 31 to differentiate standard and fast SMC calls |
| */ |
| #define TSP_STD_FID(fid) ((TSP_BARE_FID(fid) | 0x72000000)) |
| #define TSP_FAST_FID(fid) ((TSP_BARE_FID(fid) | 0x72000000) | (1u << 31)) |
| |
| /* SMC function ID to request a previously preempted std smc */ |
| #define TSP_FID_RESUME TSP_STD_FID(0x3000) |
| /* |
| * SMC function ID to request abortion of a previously preempted std smc. A |
| * fast SMC is used so that the TSP abort handler does not have to be |
| * reentrant. |
| */ |
| #define TSP_FID_ABORT TSP_FAST_FID(0x3001) |
| |
| #define TSP_SMC_PREEMPTED -2 |
| |
| /* |
| * Total number of function IDs implemented for services offered to NS clients. |
| * The function IDs are defined above |
| */ |
| #define TSP_NUM_FID 0x5 |
| |
| /* TSP implementation revision numbers */ |
| #define TSP_REVISION_MAJOR 0x0 |
| #define TSP_REVISION_MINOR 0x1 |
| |
| /* TSP is multiprocessor capable so does not require migration */ |
| #define TSP_MIGRATE_INFO PSCI_TOS_NOT_PRESENT_MP |
| |
| #endif /* __TSP_H__ */ |