Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2017-2018, Intel Corporation
4 * Copyright (C) 2025, Altera Corporation
5 */
6
7#ifndef __STRATIX10_SMC_H
8#define __STRATIX10_SMC_H
9
10#include <linux/arm-smccc.h>
11#include <linux/bitops.h>
12
13/**
14 * This file defines the Secure Monitor Call (SMC) message protocol used for
15 * service layer driver in normal world (EL1) to communicate with secure
16 * monitor software in Secure Monitor Exception Level 3 (EL3).
17 *
18 * This file is shared with secure firmware (FW) which is out of kernel tree.
19 *
20 * An ARM SMC instruction takes a function identifier and up to 6 64-bit
21 * register values as arguments, and can return up to 4 64-bit register
22 * value. The operation of the secure monitor is determined by the parameter
23 * values passed in through registers.
24 *
25 * EL1 and EL3 communicates pointer as physical address rather than the
26 * virtual address.
27 *
28 * Functions specified by ARM SMC Calling convention:
29 *
30 * FAST call executes atomic operations, returns when the requested operation
31 * has completed.
32 * STD call starts a operation which can be preempted by a non-secure
33 * interrupt. The call can return before the requested operation has
34 * completed.
35 *
36 * a0..a7 is used as register names in the descriptions below, on arm32
37 * that translates to r0..r7 and on arm64 to w0..w7.
38 */
39
40/**
41 * @func_num: function ID
42 */
43#define INTEL_SIP_SMC_STD_CALL_VAL(func_num) \
44 ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_64, \
45 ARM_SMCCC_OWNER_SIP, (func_num))
46
47#define INTEL_SIP_SMC_FAST_CALL_VAL(func_num) \
48 ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, \
49 ARM_SMCCC_OWNER_SIP, (func_num))
50
51#define INTEL_SIP_SMC_ASYNC_VAL(func_name) \
52 ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_64, \
53 ARM_SMCCC_OWNER_SIP, (func_name))
54
55/**
56 * Return values in INTEL_SIP_SMC_* call
57 *
58 * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION:
59 * Secure monitor software doesn't recognize the request.
60 *
61 * INTEL_SIP_SMC_STATUS_OK:
62 * Secure monitor software accepts the service client's request.
63 *
64 * INTEL_SIP_SMC_STATUS_BUSY:
65 * Secure monitor software is still processing service client's request.
66 *
67 * INTEL_SIP_SMC_STATUS_REJECTED:
68 * Secure monitor software reject the service client's request.
69 *
70 * INTEL_SIP_SMC_STATUS_ERROR:
71 * There is error during the process of service request.
72 *
73 * INTEL_SIP_SMC_RSU_ERROR:
74 * There is error during the process of remote status update request.
75 */
76#define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION 0xFFFFFFFF
77#define INTEL_SIP_SMC_STATUS_OK 0x0
78#define INTEL_SIP_SMC_STATUS_BUSY 0x1
79#define INTEL_SIP_SMC_STATUS_REJECTED 0x2
80#define INTEL_SIP_SMC_STATUS_ERROR 0x4
81#define INTEL_SIP_SMC_RSU_ERROR 0x7
82
83/**
84 * Request INTEL_SIP_SMC_FPGA_CONFIG_START
85 *
86 * Sync call used by service driver at EL1 to request the FPGA in EL3 to
87 * be prepare to receive a new configuration.
88 *
89 * Call register usage:
90 * a0: INTEL_SIP_SMC_FPGA_CONFIG_START.
91 * a1: flag for full or partial configuration. 0 for full and 1 for partial
92 * configuration.
93 * a2-7: not used.
94 *
95 * Return status:
96 * a0: INTEL_SIP_SMC_STATUS_OK, or INTEL_SIP_SMC_STATUS_ERROR.
97 * a1-3: not used.
98 */
99#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START 1
100#define INTEL_SIP_SMC_FPGA_CONFIG_START \
101 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START)
102
103/**
104 * Request INTEL_SIP_SMC_FPGA_CONFIG_WRITE
105 *
106 * Async call used by service driver at EL1 to provide FPGA configuration data
107 * to secure world.
108 *
109 * Call register usage:
110 * a0: INTEL_SIP_SMC_FPGA_CONFIG_WRITE.
111 * a1: 64bit physical address of the configuration data memory block
112 * a2: Size of configuration data block.
113 * a3-7: not used.
114 *
115 * Return status:
116 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
117 * INTEL_SIP_SMC_STATUS_ERROR.
118 * a1: 64bit physical address of 1st completed memory block if any completed
119 * block, otherwise zero value.
120 * a2: 64bit physical address of 2nd completed memory block if any completed
121 * block, otherwise zero value.
122 * a3: 64bit physical address of 3rd completed memory block if any completed
123 * block, otherwise zero value.
124 */
125#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE 2
126#define INTEL_SIP_SMC_FPGA_CONFIG_WRITE \
127 INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE)
128
129/**
130 * Request INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE
131 *
132 * Sync call used by service driver at EL1 to track the completed write
133 * transactions. This request is called after INTEL_SIP_SMC_FPGA_CONFIG_WRITE
134 * call returns INTEL_SIP_SMC_STATUS_BUSY.
135 *
136 * Call register usage:
137 * a0: INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE.
138 * a1-7: not used.
139 *
140 * Return status:
141 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_BUSY or
142 * INTEL_SIP_SMC_STATUS_ERROR.
143 * a1: 64bit physical address of 1st completed memory block.
144 * a2: 64bit physical address of 2nd completed memory block if
145 * any completed block, otherwise zero value.
146 * a3: 64bit physical address of 3rd completed memory block if
147 * any completed block, otherwise zero value.
148 */
149#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE 3
150#define INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE \
151INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE)
152
153/**
154 * Request INTEL_SIP_SMC_FPGA_CONFIG_ISDONE
155 *
156 * Sync call used by service driver at EL1 to inform secure world that all
157 * data are sent, to check whether or not the secure world had completed
158 * the FPGA configuration process.
159 *
160 * Call register usage:
161 * a0: INTEL_SIP_SMC_FPGA_CONFIG_ISDONE.
162 * a1-7: not used.
163 *
164 * Return status:
165 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
166 * INTEL_SIP_SMC_STATUS_ERROR.
167 * a1-3: not used.
168 */
169#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE 4
170#define INTEL_SIP_SMC_FPGA_CONFIG_ISDONE \
171 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE)
172
173/**
174 * Request INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM
175 *
176 * Sync call used by service driver at EL1 to query the physical address of
177 * memory block reserved by secure monitor software.
178 *
179 * Call register usage:
180 * a0:INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM.
181 * a1-7: not used.
182 *
183 * Return status:
184 * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
185 * a1: start of physical address of reserved memory block.
186 * a2: size of reserved memory block.
187 * a3: not used.
188 */
189#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM 5
190#define INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM \
191 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM)
192
193/**
194 * Request INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK
195 *
196 * For SMC loop-back mode only, used for internal integration, debugging
197 * or troubleshooting.
198 *
199 * Call register usage:
200 * a0: INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK.
201 * a1-7: not used.
202 *
203 * Return status:
204 * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
205 * a1-3: not used.
206 */
207#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK 6
208#define INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK \
209 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK)
210
211/**
212 * Request INTEL_SIP_SMC_REG_READ
213 *
214 * Read a protected register at EL3
215 *
216 * Call register usage:
217 * a0: INTEL_SIP_SMC_REG_READ.
218 * a1: register address.
219 * a2-7: not used.
220 *
221 * Return status:
222 * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
223 * a1: value in the register
224 * a2-3: not used.
225 */
226#define INTEL_SIP_SMC_FUNCID_REG_READ 7
227#define INTEL_SIP_SMC_REG_READ \
228 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_READ)
229
230/**
231 * Request INTEL_SIP_SMC_REG_WRITE
232 *
233 * Write a protected register at EL3
234 *
235 * Call register usage:
236 * a0: INTEL_SIP_SMC_REG_WRITE.
237 * a1: register address
238 * a2: value to program into register.
239 * a3-7: not used.
240 *
241 * Return status:
242 * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
243 * a1-3: not used.
244 */
245#define INTEL_SIP_SMC_FUNCID_REG_WRITE 8
246#define INTEL_SIP_SMC_REG_WRITE \
247 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_WRITE)
248
249/**
250 * Request INTEL_SIP_SMC_FUNCID_REG_UPDATE
251 *
252 * Update one or more bits in a protected register at EL3 using a
253 * read-modify-write operation.
254 *
255 * Call register usage:
256 * a0: INTEL_SIP_SMC_REG_UPDATE.
257 * a1: register address
258 * a2: write Mask.
259 * a3: value to write.
260 * a4-7: not used.
261 *
262 * Return status:
263 * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
264 * a1-3: Not used.
265 */
266#define INTEL_SIP_SMC_FUNCID_REG_UPDATE 9
267#define INTEL_SIP_SMC_REG_UPDATE \
268 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_UPDATE)
269
270/**
271 * Request INTEL_SIP_SMC_RSU_STATUS
272 *
273 * Request remote status update boot log, call is synchronous.
274 *
275 * Call register usage:
276 * a0 INTEL_SIP_SMC_RSU_STATUS
277 * a1-7 not used
278 *
279 * Return status
280 * a0: Current Image
281 * a1: Last Failing Image
282 * a2: Version | State
283 * a3: Error details | Error location
284 *
285 * Or
286 *
287 * a0: INTEL_SIP_SMC_RSU_ERROR
288 */
289#define INTEL_SIP_SMC_FUNCID_RSU_STATUS 11
290#define INTEL_SIP_SMC_RSU_STATUS \
291 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_STATUS)
292
293/**
294 * Request INTEL_SIP_SMC_RSU_UPDATE
295 *
296 * Request to set the offset of the bitstream to boot after reboot, call
297 * is synchronous.
298 *
299 * Call register usage:
300 * a0 INTEL_SIP_SMC_RSU_UPDATE
301 * a1 64bit physical address of the configuration data memory in flash
302 * a2-7 not used
303 *
304 * Return status
305 * a0 INTEL_SIP_SMC_STATUS_OK
306 */
307#define INTEL_SIP_SMC_FUNCID_RSU_UPDATE 12
308#define INTEL_SIP_SMC_RSU_UPDATE \
309 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_UPDATE)
310
311/**
312 * Request INTEL_SIP_SMC_ECC_DBE
313 *
314 * Sync call used by service driver at EL1 to alert EL3 that a Double
315 * Bit ECC error has occurred.
316 *
317 * Call register usage:
318 * a0 INTEL_SIP_SMC_ECC_DBE
319 * a1 SysManager Double Bit Error value
320 * a2-7 not used
321 *
322 * Return status
323 * a0 INTEL_SIP_SMC_STATUS_OK
324 */
325#define INTEL_SIP_SMC_FUNCID_ECC_DBE 13
326#define INTEL_SIP_SMC_ECC_DBE \
327 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_ECC_DBE)
328
329/**
330 * Request INTEL_SIP_SMC_RSU_NOTIFY
331 *
332 * Sync call used by service driver at EL1 to report hard processor
333 * system execution stage to firmware
334 *
335 * Call register usage:
336 * a0 INTEL_SIP_SMC_RSU_NOTIFY
337 * a1 32bit value representing hard processor system execution stage
338 * a2-7 not used
339 *
340 * Return status
341 * a0 INTEL_SIP_SMC_STATUS_OK
342 */
343#define INTEL_SIP_SMC_FUNCID_RSU_NOTIFY 14
344#define INTEL_SIP_SMC_RSU_NOTIFY \
345 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_NOTIFY)
346
347/**
348 * Request INTEL_SIP_SMC_RSU_RETRY_COUNTER
349 *
350 * Sync call used by service driver at EL1 to query RSU retry counter
351 *
352 * Call register usage:
353 * a0 INTEL_SIP_SMC_RSU_RETRY_COUNTER
354 * a1-7 not used
355 *
356 * Return status
357 * a0 INTEL_SIP_SMC_STATUS_OK
358 * a1 the retry counter
359 *
360 * Or
361 *
362 * a0 INTEL_SIP_SMC_RSU_ERROR
363 */
364#define INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER 15
365#define INTEL_SIP_SMC_RSU_RETRY_COUNTER \
366 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER)
367
368/**
369 * Request INTEL_SIP_SMC_RSU_DCMF_VERSION
370 *
371 * Sync call used by service driver at EL1 to query DCMF (Decision
372 * Configuration Management Firmware) version from FW
373 *
374 * Call register usage:
375 * a0 INTEL_SIP_SMC_RSU_DCMF_VERSION
376 * a1-7 not used
377 *
378 * Return status
379 * a0 INTEL_SIP_SMC_STATUS_OK
380 * a1 dcmf1 | dcmf0
381 * a2 dcmf3 | dcmf2
382 *
383 * Or
384 *
385 * a0 INTEL_SIP_SMC_RSU_ERROR
386 */
387#define INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION 16
388#define INTEL_SIP_SMC_RSU_DCMF_VERSION \
389 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION)
390
391/**
392 * Request INTEL_SIP_SMC_RSU_MAX_RETRY
393 *
394 * Sync call used by service driver at EL1 to query max retry value from FW
395 *
396 * Call register usage:
397 * a0 INTEL_SIP_SMC_RSU_MAX_RETRY
398 * a1-7 not used
399 *
400 * Return status
401 * a0 INTEL_SIP_SMC_STATUS_OK
402 * a1 max retry value
403 *
404 * Or
405 * a0 INTEL_SIP_SMC_RSU_ERROR
406 */
407#define INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY 18
408#define INTEL_SIP_SMC_RSU_MAX_RETRY \
409 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY)
410
411/**
412 * Request INTEL_SIP_SMC_RSU_DCMF_STATUS
413 *
414 * Sync call used by service driver at EL1 to query DCMF status from FW
415 *
416 * Call register usage:
417 * a0 INTEL_SIP_SMC_RSU_DCMF_STATUS
418 * a1-7 not used
419 *
420 * Return status
421 * a0 INTEL_SIP_SMC_STATUS_OK
422 * a1 dcmf3 | dcmf2 | dcmf1 | dcmf0
423 *
424 * Or
425 *
426 * a0 INTEL_SIP_SMC_RSU_ERROR
427 */
428#define INTEL_SIP_SMC_FUNCID_RSU_DCMF_STATUS 20
429#define INTEL_SIP_SMC_RSU_DCMF_STATUS \
430 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_DCMF_STATUS)
431
432/**
433 * Request INTEL_SIP_SMC_SERVICE_COMPLETED
434 * Sync call to check if the secure world have completed service request
435 * or not.
436 *
437 * Call register usage:
438 * a0: INTEL_SIP_SMC_SERVICE_COMPLETED
439 * a1: this register is optional. If used, it is the physical address for
440 * secure firmware to put output data
441 * a2: this register is optional. If used, it is the size of output data
442 * a3-a7: not used
443 *
444 * Return status:
445 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_ERROR,
446 * INTEL_SIP_SMC_REJECTED or INTEL_SIP_SMC_STATUS_BUSY
447 * a1: mailbox error if a0 is INTEL_SIP_SMC_STATUS_ERROR
448 * a2: physical address containing the process info
449 * for FCS certificate -- the data contains the certificate status
450 * for FCS cryption -- the data contains the actual data size FW processes
451 * a3: output data size
452 */
453#define INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED 30
454#define INTEL_SIP_SMC_SERVICE_COMPLETED \
455 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED)
456
457/**
458 * Request INTEL_SIP_SMC_FIRMWARE_VERSION
459 *
460 * Sync call used to query the version of running firmware
461 *
462 * Call register usage:
463 * a0 INTEL_SIP_SMC_FIRMWARE_VERSION
464 * a1-a7 not used
465 *
466 * Return status:
467 * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR
468 * a1 running firmware version
469 */
470#define INTEL_SIP_SMC_FUNCID_FIRMWARE_VERSION 31
471#define INTEL_SIP_SMC_FIRMWARE_VERSION \
472 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FIRMWARE_VERSION)
473
474/**
475 * SMC call protocol for Mailbox, starting FUNCID from 60
476 *
477 * Call register usage:
478 * a0 INTEL_SIP_SMC_MBOX_SEND_CMD
479 * a1 mailbox command code
480 * a2 physical address that contain mailbox command data (not include header)
481 * a3 mailbox command data size in word
482 * a4 set to 0 for CASUAL, set to 1 for URGENT
483 * a5 physical address for secure firmware to put response data
484 * (not include header)
485 * a6 maximum size in word of physical address to store response data
486 * a7 not used
487 *
488 * Return status
489 * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_REJECTED or
490 * INTEL_SIP_SMC_STATUS_ERROR
491 * a1 mailbox error code
492 * a2 response data length in word
493 * a3 not used
494 */
495#define INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD 60
496 #define INTEL_SIP_SMC_MBOX_SEND_CMD \
497 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD)
498
499/**
500 * Request INTEL_SIP_SMC_SVC_VERSION
501 *
502 * Sync call used to query the SIP SMC API Version
503 *
504 * Call register usage:
505 * a0 INTEL_SIP_SMC_SVC_VERSION
506 * a1-a7 not used
507 *
508 * Return status:
509 * a0 INTEL_SIP_SMC_STATUS_OK
510 * a1 Major
511 * a2 Minor
512 */
513#define INTEL_SIP_SMC_SVC_FUNCID_VERSION 512
514#define INTEL_SIP_SMC_SVC_VERSION \
515 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_SVC_FUNCID_VERSION)
516
517/**
518 * SMC call protocol for FPGA Crypto Service (FCS)
519 * FUNCID starts from 90
520 */
521
522/**
523 * Request INTEL_SIP_SMC_FCS_RANDOM_NUMBER
524 *
525 * Sync call used to query the random number generated by the firmware
526 *
527 * Call register usage:
528 * a0 INTEL_SIP_SMC_FCS_RANDOM_NUMBER
529 * a1 the physical address for firmware to write generated random data
530 * a2-a7 not used
531 *
532 * Return status:
533 * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FCS_ERROR or
534 * INTEL_SIP_SMC_FCS_REJECTED
535 * a1 mailbox error
536 * a2 the physical address of generated random number
537 * a3 size
538 */
539#define INTEL_SIP_SMC_FUNCID_FCS_RANDOM_NUMBER 90
540#define INTEL_SIP_SMC_FCS_RANDOM_NUMBER \
541 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_RANDOM_NUMBER)
542
543/**
544 * Request INTEL_SIP_SMC_FCS_CRYPTION
545 * Async call for data encryption and HMAC signature generation, or for
546 * data decryption and HMAC verification.
547 *
548 * Call INTEL_SIP_SMC_SERVICE_COMPLETED to get the output encrypted or
549 * decrypted data
550 *
551 * Call register usage:
552 * a0 INTEL_SIP_SMC_FCS_CRYPTION
553 * a1 cryption mode (1 for encryption and 0 for decryption)
554 * a2 physical address which stores to be encrypted or decrypted data
555 * a3 input data size
556 * a4 physical address which will hold the encrypted or decrypted output data
557 * a5 output data size
558 * a6-a7 not used
559 *
560 * Return status:
561 * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_ERROR or
562 * INTEL_SIP_SMC_STATUS_REJECTED
563 * a1-3 not used
564 */
565#define INTEL_SIP_SMC_FUNCID_FCS_CRYPTION 91
566#define INTEL_SIP_SMC_FCS_CRYPTION \
567 INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_CRYPTION)
568
569/**
570 * Request INTEL_SIP_SMC_FCS_SERVICE_REQUEST
571 * Async call for authentication service of HPS software
572 *
573 * Call register usage:
574 * a0 INTEL_SIP_SMC_FCS_SERVICE_REQUEST
575 * a1 the physical address of data block
576 * a2 size of data block
577 * a3-a7 not used
578 *
579 * Return status:
580 * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_ERROR or
581 * INTEL_SIP_SMC_REJECTED
582 * a1-a3 not used
583 */
584#define INTEL_SIP_SMC_FUNCID_FCS_SERVICE_REQUEST 92
585#define INTEL_SIP_SMC_FCS_SERVICE_REQUEST \
586 INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_SERVICE_REQUEST)
587
588/**
589 * Request INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE
590 * Sync call to send a signed certificate
591 *
592 * Call register usage:
593 * a0 INTEL_SIP_SMC_FCS_SEND_CERTIFICATE
594 * a1 the physical address of CERTIFICATE block
595 * a2 size of data block
596 * a3-a7 not used
597 *
598 * Return status:
599 * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_FCS_REJECTED
600 * a1-a3 not used
601 */
602#define INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE 93
603#define INTEL_SIP_SMC_FCS_SEND_CERTIFICATE \
604 INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE)
605
606/**
607 * Request INTEL_SIP_SMC_FCS_GET_PROVISION_DATA
608 * Sync call to dump all the fuses and key hashes
609 *
610 * Call register usage:
611 * a0 INTEL_SIP_SMC_FCS_GET_PROVISION_DATA
612 * a1 the physical address for firmware to write structure of fuse and
613 * key hashes
614 * a2-a7 not used
615 *
616 * Return status:
617 * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FCS_ERROR or
618 * INTEL_SIP_SMC_FCS_REJECTED
619 * a1 mailbox error
620 * a2 physical address for the structure of fuse and key hashes
621 * a3 the size of structure
622 *
623 */
624#define INTEL_SIP_SMC_FUNCID_FCS_GET_PROVISION_DATA 94
625#define INTEL_SIP_SMC_FCS_GET_PROVISION_DATA \
626 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_GET_PROVISION_DATA)
627
628/**
629 * Request INTEL_SIP_SMC_HWMON_READTEMP
630 * Sync call to request temperature
631 *
632 * Call register usage:
633 * a0 Temperature Channel
634 * a1-a7 not used
635 *
636 * Return status
637 * a0 INTEL_SIP_SMC_STATUS_OK
638 * a1 Temperature Value
639 * a2-a3 not used
640 */
641#define INTEL_SIP_SMC_FUNCID_HWMON_READTEMP 32
642#define INTEL_SIP_SMC_HWMON_READTEMP \
643 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_HWMON_READTEMP)
644
645/**
646 * Request INTEL_SIP_SMC_HWMON_READVOLT
647 * Sync call to request voltage
648 *
649 * Call register usage:
650 * a0 Voltage Channel
651 * a1-a7 not used
652 *
653 * Return status
654 * a0 INTEL_SIP_SMC_STATUS_OK
655 * a1 Voltage Value
656 * a2-a3 not used
657 */
658#define INTEL_SIP_SMC_FUNCID_HWMON_READVOLT 33
659#define INTEL_SIP_SMC_HWMON_READVOLT \
660 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_HWMON_READVOLT)
661
662/**
663 * Request INTEL_SIP_SMC_ASYNC_POLL
664 * Async call used by service driver at EL1 to query mailbox response from SDM.
665 *
666 * Call register usage:
667 * a0 INTEL_SIP_SMC_ASYNC_POLL
668 * a1 transaction job id
669 * a2-17 will be used to return the response data
670 *
671 * Return status
672 * a0 INTEL_SIP_SMC_STATUS_OK
673 * a1-17 will contain the response values from mailbox for the previous send
674 * transaction
675 * Or
676 * a0 INTEL_SIP_SMC_STATUS_NO_RESPONSE
677 * a1-17 not used
678 */
679#define INTEL_SIP_SMC_ASYNC_FUNC_ID_POLL (0xC8)
680#define INTEL_SIP_SMC_ASYNC_POLL \
681 INTEL_SIP_SMC_ASYNC_VAL(INTEL_SIP_SMC_ASYNC_FUNC_ID_POLL)
682
683/**
684 * Request INTEL_SIP_SMC_ASYNC_RSU_GET_SPT
685 * Async call to get RSU SPT from SDM.
686 * Call register usage:
687 * a0 INTEL_SIP_SMC_ASYNC_RSU_GET_SPT
688 * a1 transaction job id
689 * a2-a17 not used
690 *
691 * Return status:
692 * a0 INTEL_SIP_SMC_STATUS_OK ,INTEL_SIP_SMC_STATUS_REJECTED
693 * or INTEL_SIP_SMC_STATUS_BUSY
694 * a1-a17 not used
695 */
696#define INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_GET_SPT (0xEA)
697#define INTEL_SIP_SMC_ASYNC_RSU_GET_SPT \
698 INTEL_SIP_SMC_ASYNC_VAL(INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_GET_SPT)
699
700/**
701 * Request INTEL_SIP_SMC_ASYNC_RSU_GET_ERROR_STATUS
702 * Async call to get RSU error status from SDM.
703 * Call register usage:
704 * a0 INTEL_SIP_SMC_ASYNC_RSU_GET_ERROR_STATUS
705 * a1 transaction job id
706 * a2-a17 not used
707 *
708 * Return status:
709 * a0 INTEL_SIP_SMC_STATUS_OK ,INTEL_SIP_SMC_STATUS_REJECTED
710 * or INTEL_SIP_SMC_STATUS_BUSY
711 * a1-a17 not used
712 */
713#define INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_GET_ERROR_STATUS (0xEB)
714#define INTEL_SIP_SMC_ASYNC_RSU_GET_ERROR_STATUS \
715 INTEL_SIP_SMC_ASYNC_VAL(INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_GET_ERROR_STATUS)
716
717/**
718 * Request INTEL_SIP_SMC_ASYNC_RSU_NOTIFY
719 * Async call to send NOTIFY value to SDM.
720 * Call register usage:
721 * a0 INTEL_SIP_SMC_ASYNC_RSU_NOTIFY
722 * a1 transaction job id
723 * a2 notify value
724 * a3-a17 not used
725 *
726 * Return status:
727 * a0 INTEL_SIP_SMC_STATUS_OK ,INTEL_SIP_SMC_STATUS_REJECTED
728 * or INTEL_SIP_SMC_STATUS_BUSY
729 * a1-a17 not used
730 */
731#define INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_NOTIFY (0xEC)
732#define INTEL_SIP_SMC_ASYNC_RSU_NOTIFY \
733 INTEL_SIP_SMC_ASYNC_VAL(INTEL_SIP_SMC_ASYNC_FUNC_ID_RSU_NOTIFY)
734#endif