nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
tfm_ioctl_api.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
12#ifndef TFM_IOCTL_API_H__
13#define TFM_IOCTL_API_H__
14
21#include <limits.h>
22#include <stdint.h>
23#include <tfm_platform_api.h>
24#include <hal/nrf_gpio.h>
25
26/* Include core IOCTL services */
27#include <tfm_ioctl_core_api.h>
28
29#include <autoconf.h>
30
31#if CONFIG_FW_INFO
32#include <fw_info_bare.h>
33#endif
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39
40/* Board specific IOCTL services can be added here */
42 TFM_PLATFORM_IOCTL_FW_INFO = TFM_PLATFORM_IOCTL_CORE_LAST,
44};
45
46#if CONFIG_FW_INFO
47
50struct tfm_fw_info_args_t {
51 void *fw_address;
52 struct fw_info *info;
53};
54
57struct tfm_fw_info_out_t {
58 uint32_t result;
59};
60
70int tfm_platform_firmware_info(uint32_t fw_address, struct fw_info *info);
71
82int tfm_platform_s0_active(uint32_t s0_address, uint32_t s1_address,
83 bool *s0_active);
84
85#endif /* CONFIG_FW_INFO */
86
92};
93
96 uint32_t r0;
97 uint32_t r1;
98 uint32_t r2;
99 uint32_t r3;
100 uint32_t r12;
101 uint32_t lr;
102 uint32_t pc;
103 uint32_t xpsr;
104};
105
108 uint32_t r4;
109 uint32_t r5;
110 uint32_t r6;
111 uint32_t r7;
112 uint32_t r8;
113 uint32_t r9;
114 uint32_t r10;
115 uint32_t r11;
116};
117
120 uint32_t msp;
121 uint32_t psp;
122 uint32_t exc_return;
123 uint32_t control;
124 uint32_t cfsr;
125 uint32_t hfsr;
126 uint32_t sfsr;
127 uint32_t bfar;
128 uint32_t mmfar;
129 uint32_t sfar;
130 uint32_t spu_events;
131 uint32_t vectactive;
132};
133
136 bool valid;
140};
141
144
149};
150
154 uint32_t result;
155};
156
167
168
169#ifdef __cplusplus
170}
171#endif
172
177#endif /* TFM_IOCTL_API_H__ */
tfm_platform_ioctl_reqest_types_t
Definition: tfm_ioctl_api.h:41
@ TFM_PLATFORM_IOCTL_FW_INFO
Definition: tfm_ioctl_api.h:42
@ TFM_PLATFORM_IOCTL_NS_FAULT
Definition: tfm_ioctl_api.h:43
int tfm_platform_ns_fault_set_handler(struct tfm_ns_fault_service_handler_context *context, tfm_ns_fault_service_handler_callback callback)
tfm_spu_events
Bitmask of SPU events.
Definition: tfm_ioctl_api.h:88
@ TFM_SPU_EVENT_FLASHACCERR
Definition: tfm_ioctl_api.h:90
@ TFM_SPU_EVENT_PERIPHACCERR
Definition: tfm_ioctl_api.h:91
@ TFM_SPU_EVENT_RAMACCERR
Definition: tfm_ioctl_api.h:89
void(* tfm_ns_fault_service_handler_callback)(void)
Non-secure fault service callback type.
Definition: tfm_ioctl_api.h:143
Definition: fw_info_bare.h:125
struct tfm_ns_fault_service_handler_context * context
Definition: tfm_ioctl_api.h:147
tfm_ns_fault_service_handler_callback callback
Definition: tfm_ioctl_api.h:148
Non-secure fault service arguments.
Definition: tfm_ioctl_api.h:146
uint32_t lr
Definition: tfm_ioctl_api.h:101
uint32_t r3
Definition: tfm_ioctl_api.h:99
uint32_t r2
Definition: tfm_ioctl_api.h:98
uint32_t r0
Definition: tfm_ioctl_api.h:96
uint32_t xpsr
Definition: tfm_ioctl_api.h:103
uint32_t pc
Definition: tfm_ioctl_api.h:102
uint32_t r1
Definition: tfm_ioctl_api.h:97
uint32_t r12
Definition: tfm_ioctl_api.h:100
Copy of exception frame on stack.
Definition: tfm_ioctl_api.h:95
uint32_t r4
Definition: tfm_ioctl_api.h:108
uint32_t r6
Definition: tfm_ioctl_api.h:110
uint32_t r8
Definition: tfm_ioctl_api.h:112
uint32_t r9
Definition: tfm_ioctl_api.h:113
uint32_t r7
Definition: tfm_ioctl_api.h:111
uint32_t r10
Definition: tfm_ioctl_api.h:114
uint32_t r5
Definition: tfm_ioctl_api.h:109
uint32_t r11
Definition: tfm_ioctl_api.h:115
Copy of callee saved registers.
Definition: tfm_ioctl_api.h:107
uint32_t vectactive
Definition: tfm_ioctl_api.h:131
uint32_t psp
Definition: tfm_ioctl_api.h:121
uint32_t sfar
Definition: tfm_ioctl_api.h:129
uint32_t sfsr
Definition: tfm_ioctl_api.h:126
uint32_t cfsr
Definition: tfm_ioctl_api.h:124
uint32_t hfsr
Definition: tfm_ioctl_api.h:125
uint32_t spu_events
Definition: tfm_ioctl_api.h:130
uint32_t bfar
Definition: tfm_ioctl_api.h:127
uint32_t exc_return
Definition: tfm_ioctl_api.h:122
uint32_t msp
Definition: tfm_ioctl_api.h:120
uint32_t mmfar
Definition: tfm_ioctl_api.h:128
uint32_t control
Definition: tfm_ioctl_api.h:123
Additional fault status information.
Definition: tfm_ioctl_api.h:119
struct tfm_ns_fault_service_handler_context_frame frame
Definition: tfm_ioctl_api.h:138
bool valid
Definition: tfm_ioctl_api.h:136
struct tfm_ns_fault_service_handler_context_registers registers
Definition: tfm_ioctl_api.h:137
struct tfm_ns_fault_service_handler_context_status status
Definition: tfm_ioctl_api.h:139
Non-secure fault service callback context argument.
Definition: tfm_ioctl_api.h:135
uint32_t result
Definition: tfm_ioctl_api.h:154
Output list for each nonsecure_fault platform service.
Definition: tfm_ioctl_api.h:153