Skip to main content

Module deprecated

Module deprecated 

Source
Expand description

Legacy raw-pointer-based parameter API (deprecated).

The types in this module use raw *mut TEE_Param pointers and require manual unsafe casts at every call site. New code should use the typed wrappers instead:

Legacy typeReplacement
ParametersUse FromRawParameters with a 4-tuple of typed wrappers (e.g. (ParameterNone, ParameterMemrefInput, ParameterValueOutput, ParameterMemrefOutput))
ParameterUse the concrete types: ParameterValueInput, ParameterValueOutput, ParameterMemrefInput, etc.
ParamValueUse the concrete types: ParameterValueInput, ParameterValueOutput, ParameterValueInout, and the traits: ParameterValueRead and ParameterValueWrite
ParamMemrefUse the concrete types: ParameterMemrefInput, ParameterMemrefOutput, ParameterMemrefInout, and the traits: ParameterMemrefRead and ParameterMemrefWrite

§Example migration

Old (deprecated) code:

ⓘ
fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
    let mut p0 = unsafe { params.0.as_memref()? };
    // extra codes here...
    let data = p0.buffer();
    data.copy_from_slice(&output);
    p0.set_updated_size(output.len());
}

New code:

ⓘ
use optee_utee::prelude::*;

fn invoke_command(cmd_id: u32, params: &mut (ParameterMemrefInout, ...)) -> Result<()> {
    let p0 = &mut params.0;
    // extra codes here...
    p0.write_at(0, output)
}

Structs§

ParamMemref
Lightweight accessor for a memory-reference TEE parameter.
ParamTypes
Deprecated
ParamValue
Deprecated
Parameter
Deprecated
Parameters
Deprecated