arm_gic_cpu_state bridge
API Reference Manual  /  4 Model-to-Model Interfaces  / 

arm_trustzone

Description
This interface is implemented by ARM processors that supports the arm ARM TrustZone feature. The get_security_mode function returns the current state of the processor, whereas mem_op_security_mode extracts the mode of a memory operation in progress.

The get_security_mode functions corresponds to the expression (cpsr.mode != Monitor && scr.ns) ? Arm_Trustzone_Non_Secure : Arm_Trustzone_Secure. The mem_op_security_mode function always returns Arm_Trustzone_Non_Secure when the processor is in non-secure mode, in secure mode it returns the ns bit in the first-level page table entry for the actual area being accessed.

typedef enum {
        Arm_Trustzone_Secure = 0,
        Arm_Trustzone_Non_Secure = 1
} arm_trustzone_mode_t;

SIM_INTERFACE(arm_trustzone) {
        arm_trustzone_mode_t (*get_security_mode)(conf_object_t *NOTNULL obj);
        arm_trustzone_mode_t (*mem_op_security_mode)(
                conf_object_t *NOTNULL obj,
                generic_transaction_t *NOTNULL memop);
};

#define ARM_TRUSTZONE_INTERFACE "arm_trustzone"

Execution Context
Cell Context for all methods.

arm_gic_cpu_state bridge