Marc Bonnici | 8e1a755 | 2021-12-01 17:57:04 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef SPMC_SVC_H |
| 8 | #define SPMC_SVC_H |
| 9 | |
| 10 | #ifndef __ASSEMBLER__ |
| 11 | #include <stdint.h> |
| 12 | |
| 13 | #include <lib/utils_def.h> |
| 14 | #include <services/ffa_svc.h> |
Marc Bonnici | 1c33cc3 | 2021-11-29 17:57:03 +0000 | [diff] [blame] | 15 | #include <services/spm_core_manifest.h> |
Marc Bonnici | 8e1a755 | 2021-12-01 17:57:04 +0000 | [diff] [blame] | 16 | |
| 17 | int spmc_setup(void); |
Marc Bonnici | 1c33cc3 | 2021-11-29 17:57:03 +0000 | [diff] [blame] | 18 | void spmc_populate_attrs(spmc_manifest_attribute_t *spmc_attrs); |
Marc Bonnici | 8e1a755 | 2021-12-01 17:57:04 +0000 | [diff] [blame] | 19 | void *spmc_get_config_addr(void); |
| 20 | |
| 21 | void spmc_set_config_addr(uintptr_t soc_fw_config); |
| 22 | |
| 23 | uint64_t spmc_smc_handler(uint32_t smc_fid, |
| 24 | bool secure_origin, |
| 25 | uint64_t x1, |
| 26 | uint64_t x2, |
| 27 | uint64_t x3, |
| 28 | uint64_t x4, |
| 29 | void *cookie, |
| 30 | void *handle, |
| 31 | uint64_t flags); |
| 32 | |
| 33 | static inline bool is_spmc_at_el3(void) |
| 34 | { |
| 35 | return SPMC_AT_EL3 == 1; |
| 36 | } |
| 37 | |
| 38 | #endif /* __ASSEMBLER__ */ |
| 39 | |
| 40 | #endif /* SPMC_SVC_H */ |