Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2017-2018, Intel Corporation
0004  */
0005 
0006 #ifndef __STRATIX10_SMC_H
0007 #define __STRATIX10_SMC_H
0008 
0009 #include <linux/arm-smccc.h>
0010 #include <linux/bitops.h>
0011 
0012 /**
0013  * This file defines the Secure Monitor Call (SMC) message protocol used for
0014  * service layer driver in normal world (EL1) to communicate with secure
0015  * monitor software in Secure Monitor Exception Level 3 (EL3).
0016  *
0017  * This file is shared with secure firmware (FW) which is out of kernel tree.
0018  *
0019  * An ARM SMC instruction takes a function identifier and up to 6 64-bit
0020  * register values as arguments, and can return up to 4 64-bit register
0021  * value. The operation of the secure monitor is determined by the parameter
0022  * values passed in through registers.
0023  *
0024  * EL1 and EL3 communicates pointer as physical address rather than the
0025  * virtual address.
0026  *
0027  * Functions specified by ARM SMC Calling convention:
0028  *
0029  * FAST call executes atomic operations, returns when the requested operation
0030  * has completed.
0031  * STD call starts a operation which can be preempted by a non-secure
0032  * interrupt. The call can return before the requested operation has
0033  * completed.
0034  *
0035  * a0..a7 is used as register names in the descriptions below, on arm32
0036  * that translates to r0..r7 and on arm64 to w0..w7.
0037  */
0038 
0039 /**
0040  * @func_num: function ID
0041  */
0042 #define INTEL_SIP_SMC_STD_CALL_VAL(func_num) \
0043     ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_64, \
0044     ARM_SMCCC_OWNER_SIP, (func_num))
0045 
0046 #define INTEL_SIP_SMC_FAST_CALL_VAL(func_num) \
0047     ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, \
0048     ARM_SMCCC_OWNER_SIP, (func_num))
0049 
0050 /**
0051  * Return values in INTEL_SIP_SMC_* call
0052  *
0053  * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION:
0054  * Secure monitor software doesn't recognize the request.
0055  *
0056  * INTEL_SIP_SMC_STATUS_OK:
0057  * Secure monitor software accepts the service client's request.
0058  *
0059  * INTEL_SIP_SMC_STATUS_BUSY:
0060  * Secure monitor software is still processing service client's request.
0061  *
0062  * INTEL_SIP_SMC_STATUS_REJECTED:
0063  * Secure monitor software reject the service client's request.
0064  *
0065  * INTEL_SIP_SMC_STATUS_ERROR:
0066  * There is error during the process of service request.
0067  *
0068  * INTEL_SIP_SMC_RSU_ERROR:
0069  * There is error during the process of remote status update request.
0070  */
0071 #define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION       0xFFFFFFFF
0072 #define INTEL_SIP_SMC_STATUS_OK             0x0
0073 #define INTEL_SIP_SMC_STATUS_BUSY           0x1
0074 #define INTEL_SIP_SMC_STATUS_REJECTED           0x2
0075 #define INTEL_SIP_SMC_STATUS_ERROR          0x4
0076 #define INTEL_SIP_SMC_RSU_ERROR             0x7
0077 
0078 /**
0079  * Request INTEL_SIP_SMC_FPGA_CONFIG_START
0080  *
0081  * Sync call used by service driver at EL1 to request the FPGA in EL3 to
0082  * be prepare to receive a new configuration.
0083  *
0084  * Call register usage:
0085  * a0: INTEL_SIP_SMC_FPGA_CONFIG_START.
0086  * a1: flag for full or partial configuration. 0 for full and 1 for partial
0087  * configuration.
0088  * a2-7: not used.
0089  *
0090  * Return status:
0091  * a0: INTEL_SIP_SMC_STATUS_OK, or INTEL_SIP_SMC_STATUS_ERROR.
0092  * a1-3: not used.
0093  */
0094 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START 1
0095 #define INTEL_SIP_SMC_FPGA_CONFIG_START \
0096     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START)
0097 
0098 /**
0099  * Request INTEL_SIP_SMC_FPGA_CONFIG_WRITE
0100  *
0101  * Async call used by service driver at EL1 to provide FPGA configuration data
0102  * to secure world.
0103  *
0104  * Call register usage:
0105  * a0: INTEL_SIP_SMC_FPGA_CONFIG_WRITE.
0106  * a1: 64bit physical address of the configuration data memory block
0107  * a2: Size of configuration data block.
0108  * a3-7: not used.
0109  *
0110  * Return status:
0111  * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
0112  * INTEL_SIP_SMC_STATUS_ERROR.
0113  * a1: 64bit physical address of 1st completed memory block if any completed
0114  * block, otherwise zero value.
0115  * a2: 64bit physical address of 2nd completed memory block if any completed
0116  * block, otherwise zero value.
0117  * a3: 64bit physical address of 3rd completed memory block if any completed
0118  * block, otherwise zero value.
0119  */
0120 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE 2
0121 #define INTEL_SIP_SMC_FPGA_CONFIG_WRITE \
0122     INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE)
0123 
0124 /**
0125  * Request INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE
0126  *
0127  * Sync call used by service driver at EL1 to track the completed write
0128  * transactions. This request is called after INTEL_SIP_SMC_FPGA_CONFIG_WRITE
0129  * call returns INTEL_SIP_SMC_STATUS_BUSY.
0130  *
0131  * Call register usage:
0132  * a0: INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE.
0133  * a1-7: not used.
0134  *
0135  * Return status:
0136  * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_BUSY or
0137  * INTEL_SIP_SMC_STATUS_ERROR.
0138  * a1: 64bit physical address of 1st completed memory block.
0139  * a2: 64bit physical address of 2nd completed memory block if
0140  * any completed block, otherwise zero value.
0141  * a3: 64bit physical address of 3rd completed memory block if
0142  * any completed block, otherwise zero value.
0143  */
0144 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE 3
0145 #define INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE \
0146 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE)
0147 
0148 /**
0149  * Request INTEL_SIP_SMC_FPGA_CONFIG_ISDONE
0150  *
0151  * Sync call used by service driver at EL1 to inform secure world that all
0152  * data are sent, to check whether or not the secure world had completed
0153  * the FPGA configuration process.
0154  *
0155  * Call register usage:
0156  * a0: INTEL_SIP_SMC_FPGA_CONFIG_ISDONE.
0157  * a1-7: not used.
0158  *
0159  * Return status:
0160  * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
0161  * INTEL_SIP_SMC_STATUS_ERROR.
0162  * a1-3: not used.
0163  */
0164 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE 4
0165 #define INTEL_SIP_SMC_FPGA_CONFIG_ISDONE \
0166     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE)
0167 
0168 /**
0169  * Request INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM
0170  *
0171  * Sync call used by service driver at EL1 to query the physical address of
0172  * memory block reserved by secure monitor software.
0173  *
0174  * Call register usage:
0175  * a0:INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM.
0176  * a1-7: not used.
0177  *
0178  * Return status:
0179  * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
0180  * a1: start of physical address of reserved memory block.
0181  * a2: size of reserved memory block.
0182  * a3: not used.
0183  */
0184 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM 5
0185 #define INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM \
0186     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM)
0187 
0188 /**
0189  * Request INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK
0190  *
0191  * For SMC loop-back mode only, used for internal integration, debugging
0192  * or troubleshooting.
0193  *
0194  * Call register usage:
0195  * a0: INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK.
0196  * a1-7: not used.
0197  *
0198  * Return status:
0199  * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
0200  * a1-3: not used.
0201  */
0202 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK 6
0203 #define INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK \
0204     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK)
0205 
0206 /**
0207  * Request INTEL_SIP_SMC_REG_READ
0208  *
0209  * Read a protected register at EL3
0210  *
0211  * Call register usage:
0212  * a0: INTEL_SIP_SMC_REG_READ.
0213  * a1: register address.
0214  * a2-7: not used.
0215  *
0216  * Return status:
0217  * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
0218  * a1: value in the register
0219  * a2-3: not used.
0220  */
0221 #define INTEL_SIP_SMC_FUNCID_REG_READ 7
0222 #define INTEL_SIP_SMC_REG_READ \
0223     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_READ)
0224 
0225 /**
0226  * Request INTEL_SIP_SMC_REG_WRITE
0227  *
0228  * Write a protected register at EL3
0229  *
0230  * Call register usage:
0231  * a0: INTEL_SIP_SMC_REG_WRITE.
0232  * a1: register address
0233  * a2: value to program into register.
0234  * a3-7: not used.
0235  *
0236  * Return status:
0237  * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
0238  * a1-3: not used.
0239  */
0240 #define INTEL_SIP_SMC_FUNCID_REG_WRITE 8
0241 #define INTEL_SIP_SMC_REG_WRITE \
0242     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_WRITE)
0243 
0244 /**
0245  * Request INTEL_SIP_SMC_FUNCID_REG_UPDATE
0246  *
0247  * Update one or more bits in a protected register at EL3 using a
0248  * read-modify-write operation.
0249  *
0250  * Call register usage:
0251  * a0: INTEL_SIP_SMC_REG_UPDATE.
0252  * a1: register address
0253  * a2: write Mask.
0254  * a3: value to write.
0255  * a4-7: not used.
0256  *
0257  * Return status:
0258  * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_REG_ERROR.
0259  * a1-3: Not used.
0260  */
0261 #define INTEL_SIP_SMC_FUNCID_REG_UPDATE 9
0262 #define INTEL_SIP_SMC_REG_UPDATE \
0263     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_UPDATE)
0264 
0265 /**
0266  * Request INTEL_SIP_SMC_RSU_STATUS
0267  *
0268  * Request remote status update boot log, call is synchronous.
0269  *
0270  * Call register usage:
0271  * a0 INTEL_SIP_SMC_RSU_STATUS
0272  * a1-7 not used
0273  *
0274  * Return status
0275  * a0: Current Image
0276  * a1: Last Failing Image
0277  * a2: Version | State
0278  * a3: Error details | Error location
0279  *
0280  * Or
0281  *
0282  * a0: INTEL_SIP_SMC_RSU_ERROR
0283  */
0284 #define INTEL_SIP_SMC_FUNCID_RSU_STATUS 11
0285 #define INTEL_SIP_SMC_RSU_STATUS \
0286     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_STATUS)
0287 
0288 /**
0289  * Request INTEL_SIP_SMC_RSU_UPDATE
0290  *
0291  * Request to set the offset of the bitstream to boot after reboot, call
0292  * is synchronous.
0293  *
0294  * Call register usage:
0295  * a0 INTEL_SIP_SMC_RSU_UPDATE
0296  * a1 64bit physical address of the configuration data memory in flash
0297  * a2-7 not used
0298  *
0299  * Return status
0300  * a0 INTEL_SIP_SMC_STATUS_OK
0301  */
0302 #define INTEL_SIP_SMC_FUNCID_RSU_UPDATE 12
0303 #define INTEL_SIP_SMC_RSU_UPDATE \
0304     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_UPDATE)
0305 
0306 /**
0307  * Request INTEL_SIP_SMC_ECC_DBE
0308  *
0309  * Sync call used by service driver at EL1 to alert EL3 that a Double
0310  * Bit ECC error has occurred.
0311  *
0312  * Call register usage:
0313  * a0 INTEL_SIP_SMC_ECC_DBE
0314  * a1 SysManager Double Bit Error value
0315  * a2-7 not used
0316  *
0317  * Return status
0318  * a0 INTEL_SIP_SMC_STATUS_OK
0319  */
0320 #define INTEL_SIP_SMC_FUNCID_ECC_DBE 13
0321 #define INTEL_SIP_SMC_ECC_DBE \
0322     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_ECC_DBE)
0323 
0324 /**
0325  * Request INTEL_SIP_SMC_RSU_NOTIFY
0326  *
0327  * Sync call used by service driver at EL1 to report hard processor
0328  * system execution stage to firmware
0329  *
0330  * Call register usage:
0331  * a0 INTEL_SIP_SMC_RSU_NOTIFY
0332  * a1 32bit value representing hard processor system execution stage
0333  * a2-7 not used
0334  *
0335  * Return status
0336  * a0 INTEL_SIP_SMC_STATUS_OK
0337  */
0338 #define INTEL_SIP_SMC_FUNCID_RSU_NOTIFY 14
0339 #define INTEL_SIP_SMC_RSU_NOTIFY \
0340     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_NOTIFY)
0341 
0342 /**
0343  * Request INTEL_SIP_SMC_RSU_RETRY_COUNTER
0344  *
0345  * Sync call used by service driver at EL1 to query RSU retry counter
0346  *
0347  * Call register usage:
0348  * a0 INTEL_SIP_SMC_RSU_RETRY_COUNTER
0349  * a1-7 not used
0350  *
0351  * Return status
0352  * a0 INTEL_SIP_SMC_STATUS_OK
0353  * a1 the retry counter
0354  *
0355  * Or
0356  *
0357  * a0 INTEL_SIP_SMC_RSU_ERROR
0358  */
0359 #define INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER 15
0360 #define INTEL_SIP_SMC_RSU_RETRY_COUNTER \
0361     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER)
0362 
0363 /**
0364  * Request INTEL_SIP_SMC_RSU_DCMF_VERSION
0365  *
0366  * Sync call used by service driver at EL1 to query DCMF (Decision
0367  * Configuration Management Firmware) version from FW
0368  *
0369  * Call register usage:
0370  * a0 INTEL_SIP_SMC_RSU_DCMF_VERSION
0371  * a1-7 not used
0372  *
0373  * Return status
0374  * a0 INTEL_SIP_SMC_STATUS_OK
0375  * a1 dcmf1 | dcmf0
0376  * a2 dcmf3 | dcmf2
0377  *
0378  * Or
0379  *
0380  * a0 INTEL_SIP_SMC_RSU_ERROR
0381  */
0382 #define INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION 16
0383 #define INTEL_SIP_SMC_RSU_DCMF_VERSION \
0384     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION)
0385 
0386 /**
0387  * Request INTEL_SIP_SMC_RSU_MAX_RETRY
0388  *
0389  * Sync call used by service driver at EL1 to query max retry value from FW
0390  *
0391  * Call register usage:
0392  * a0 INTEL_SIP_SMC_RSU_MAX_RETRY
0393  * a1-7 not used
0394  *
0395  * Return status
0396  * a0 INTEL_SIP_SMC_STATUS_OK
0397  * a1 max retry value
0398  *
0399  * Or
0400  * a0 INTEL_SIP_SMC_RSU_ERROR
0401  */
0402 #define INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY 18
0403 #define INTEL_SIP_SMC_RSU_MAX_RETRY \
0404     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY)
0405 
0406 /**
0407  * Request INTEL_SIP_SMC_RSU_DCMF_STATUS
0408  *
0409  * Sync call used by service driver at EL1 to query DCMF status from FW
0410  *
0411  * Call register usage:
0412  * a0 INTEL_SIP_SMC_RSU_DCMF_STATUS
0413  * a1-7 not used
0414  *
0415  * Return status
0416  * a0 INTEL_SIP_SMC_STATUS_OK
0417  * a1 dcmf3 | dcmf2 | dcmf1 | dcmf0
0418  *
0419  * Or
0420  *
0421  * a0 INTEL_SIP_SMC_RSU_ERROR
0422  */
0423 #define INTEL_SIP_SMC_FUNCID_RSU_DCMF_STATUS 20
0424 #define INTEL_SIP_SMC_RSU_DCMF_STATUS \
0425     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_DCMF_STATUS)
0426 
0427 /**
0428  * Request INTEL_SIP_SMC_SERVICE_COMPLETED
0429  * Sync call to check if the secure world have completed service request
0430  * or not.
0431  *
0432  * Call register usage:
0433  * a0: INTEL_SIP_SMC_SERVICE_COMPLETED
0434  * a1: this register is optional. If used, it is the physical address for
0435  *     secure firmware to put output data
0436  * a2: this register is optional. If used, it is the size of output data
0437  * a3-a7: not used
0438  *
0439  * Return status:
0440  * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_ERROR,
0441  *     INTEL_SIP_SMC_REJECTED or INTEL_SIP_SMC_STATUS_BUSY
0442  * a1: mailbox error if a0 is INTEL_SIP_SMC_STATUS_ERROR
0443  * a2: physical address containing the process info
0444  *     for FCS certificate -- the data contains the certificate status
0445  *     for FCS cryption -- the data contains the actual data size FW processes
0446  * a3: output data size
0447  */
0448 #define INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED 30
0449 #define INTEL_SIP_SMC_SERVICE_COMPLETED \
0450     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED)
0451 
0452 /**
0453  * Request INTEL_SIP_SMC_FIRMWARE_VERSION
0454  *
0455  * Sync call used to query the version of running firmware
0456  *
0457  * Call register usage:
0458  * a0 INTEL_SIP_SMC_FIRMWARE_VERSION
0459  * a1-a7 not used
0460  *
0461  * Return status:
0462  * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR
0463  * a1 running firmware version
0464  */
0465 #define INTEL_SIP_SMC_FUNCID_FIRMWARE_VERSION 31
0466 #define INTEL_SIP_SMC_FIRMWARE_VERSION \
0467         INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FIRMWARE_VERSION)
0468 
0469 /**
0470  * Request INTEL_SIP_SMC_SVC_VERSION
0471  *
0472  * Sync call used to query the SIP SMC API Version
0473  *
0474  * Call register usage:
0475  * a0 INTEL_SIP_SMC_SVC_VERSION
0476  * a1-a7 not used
0477  *
0478  * Return status:
0479  * a0 INTEL_SIP_SMC_STATUS_OK
0480  * a1 Major
0481  * a2 Minor
0482  */
0483 #define INTEL_SIP_SMC_SVC_FUNCID_VERSION 512
0484 #define INTEL_SIP_SMC_SVC_VERSION \
0485     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_SVC_FUNCID_VERSION)
0486 
0487 /**
0488  * SMC call protocol for FPGA Crypto Service (FCS)
0489  * FUNCID starts from 90
0490  */
0491 
0492 /**
0493  * Request INTEL_SIP_SMC_FCS_RANDOM_NUMBER
0494  *
0495  * Sync call used to query the random number generated by the firmware
0496  *
0497  * Call register usage:
0498  * a0 INTEL_SIP_SMC_FCS_RANDOM_NUMBER
0499  * a1 the physical address for firmware to write generated random data
0500  * a2-a7 not used
0501  *
0502  * Return status:
0503  * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FCS_ERROR or
0504  *      INTEL_SIP_SMC_FCS_REJECTED
0505  * a1 mailbox error
0506  * a2 the physical address of generated random number
0507  * a3 size
0508  */
0509 #define INTEL_SIP_SMC_FUNCID_FCS_RANDOM_NUMBER 90
0510 #define INTEL_SIP_SMC_FCS_RANDOM_NUMBER \
0511     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_RANDOM_NUMBER)
0512 
0513 /**
0514  * Request INTEL_SIP_SMC_FCS_CRYPTION
0515  * Async call for data encryption and HMAC signature generation, or for
0516  * data decryption and HMAC verification.
0517  *
0518  * Call INTEL_SIP_SMC_SERVICE_COMPLETED to get the output encrypted or
0519  * decrypted data
0520  *
0521  * Call register usage:
0522  * a0 INTEL_SIP_SMC_FCS_CRYPTION
0523  * a1 cryption mode (1 for encryption and 0 for decryption)
0524  * a2 physical address which stores to be encrypted or decrypted data
0525  * a3 input data size
0526  * a4 physical address which will hold the encrypted or decrypted output data
0527  * a5 output data size
0528  * a6-a7 not used
0529  *
0530  * Return status:
0531  * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_ERROR or
0532  *      INTEL_SIP_SMC_STATUS_REJECTED
0533  * a1-3 not used
0534  */
0535 #define INTEL_SIP_SMC_FUNCID_FCS_CRYPTION 91
0536 #define INTEL_SIP_SMC_FCS_CRYPTION \
0537     INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_CRYPTION)
0538 
0539 /**
0540  * Request INTEL_SIP_SMC_FCS_SERVICE_REQUEST
0541  * Async call for authentication service of HPS software
0542  *
0543  * Call register usage:
0544  * a0 INTEL_SIP_SMC_FCS_SERVICE_REQUEST
0545  * a1 the physical address of data block
0546  * a2 size of data block
0547  * a3-a7 not used
0548  *
0549  * Return status:
0550  * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_ERROR or
0551  *      INTEL_SIP_SMC_REJECTED
0552  * a1-a3 not used
0553  */
0554 #define INTEL_SIP_SMC_FUNCID_FCS_SERVICE_REQUEST 92
0555 #define INTEL_SIP_SMC_FCS_SERVICE_REQUEST \
0556     INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_SERVICE_REQUEST)
0557 
0558 /**
0559  * Request INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE
0560  * Sync call to send a signed certificate
0561  *
0562  * Call register usage:
0563  * a0 INTEL_SIP_SMC_FCS_SEND_CERTIFICATE
0564  * a1 the physical address of CERTIFICATE block
0565  * a2 size of data block
0566  * a3-a7 not used
0567  *
0568  * Return status:
0569  * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_FCS_REJECTED
0570  * a1-a3 not used
0571  */
0572 #define INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE 93
0573 #define INTEL_SIP_SMC_FCS_SEND_CERTIFICATE \
0574     INTEL_SIP_SMC_STD_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_SEND_CERTIFICATE)
0575 
0576 /**
0577  * Request INTEL_SIP_SMC_FCS_GET_PROVISION_DATA
0578  * Sync call to dump all the fuses and key hashes
0579  *
0580  * Call register usage:
0581  * a0 INTEL_SIP_SMC_FCS_GET_PROVISION_DATA
0582  * a1 the physical address for firmware to write structure of fuse and
0583  *    key hashes
0584  * a2-a7 not used
0585  *
0586  * Return status:
0587  * a0 INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FCS_ERROR or
0588  *      INTEL_SIP_SMC_FCS_REJECTED
0589  * a1 mailbox error
0590  * a2 physical address for the structure of fuse and key hashes
0591  * a3 the size of structure
0592  *
0593  */
0594 #define INTEL_SIP_SMC_FUNCID_FCS_GET_PROVISION_DATA 94
0595 #define INTEL_SIP_SMC_FCS_GET_PROVISION_DATA \
0596     INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FCS_GET_PROVISION_DATA)
0597 
0598 #endif