/** * rsi_attestation_token_init - Initialise the operation to retrieve an * attestation token. * * @challenge: The challenge data to be used in the attestation token * generation. * @size: Size of the challenge data in bytes. * * Initialises the attestation token generation and returns an upper bound * on the attestation token size that can be used to allocate an adequate * buffer. The caller is expected to subsequently call * rsi_attestation_token_continue() to retrieve the attestation token data on * the same CPU. * * Returns: * On success, returns the upper limit of the attestation report size. * Otherwise, -EINVAL
*/ staticinlinelong
rsi_attestation_token_init(const u8 *challenge, unsignedlong size)
{ struct arm_smccc_1_2_regs regs = { 0 };
/* The challenge must be at least 32bytes and at most 64bytes */ if (!challenge || size < 32 || size > 64) return -EINVAL;
/** * rsi_attestation_token_continue - Continue the operation to retrieve an * attestation token. * * @granule: {I}PA of the Granule to which the token will be written. * @offset: Offset within Granule to start of buffer in bytes. * @size: The size of the buffer. * @len: The number of bytes written to the buffer. * * Retrieves up to a RSI_GRANULE_SIZE worth of token data per call. The caller * is expected to call rsi_attestation_token_init() before calling this * function to retrieve the attestation token. * * Return: * * %RSI_SUCCESS - Attestation token retrieved successfully. * * %RSI_INCOMPLETE - Token generation is not complete. * * %RSI_ERROR_INPUT - A parameter was not valid. * * %RSI_ERROR_STATE - Attestation not in progress.
*/ staticinlineunsignedlong rsi_attestation_token_continue(phys_addr_t granule, unsignedlong offset, unsignedlong size, unsignedlong *len)
{ struct arm_smccc_res res;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.