Trace Apparatus Security Mode Branch Return Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing tracing tools face challenges in reconstructing the state of a processing element during instruction stream execution, particularly when temporary changes in security modes occur, as they struggle to detect and record register content retrievals across different security modes, which is crucial for tracing and diagnostic purposes.

Innovation Solution

A data processing apparatus and trace apparatus are configured to store and retrieve register contents from memory storage during security mode changes, generating trace data indicative of branch return operations and register content retrievals, ensuring accurate tracing and diagnostics across multiple security modes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If tracing tools use embedded trace macrocells to reconstruct processing state, then measurement precision is improved, but the ability to detect register content retrievals across security modes deteriorates

Engineering Contradiction:
Improvestate reconstruction accuracyVSAvoidregister retrieval detection capability
Core Design Contradiction:
Measurement precisionVSDifficulty of detecting and measuring

Solution Approach 1:

The trace apparatus is configured to detect branch return operations before the actual register retrieval occurs, generating trace data that anticipates and marks the upcoming register content retrieval event. This preliminary detection allows the tracing system to prepare and record the register retrieval information proactively, resolving the contradiction between state reconstruction accuracy and detection capability across security mode boundaries.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the processing element stores register contents in memory during security mode changes, then security isolation is improved, but device complexity increases

Engineering Contradiction:
Improvesecurity isolationVSAvoidregister management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The processing element automatically performs register content storage in memory when transitioning to a new security mode and automatically retrieves these contents when returning to the original security mode. This self-service mechanism eliminates the need for external complex management systems, maintaining security isolation while avoiding additional device complexity. The system manages its own register state across security boundaries autonomously.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10140476B2Tracing processing activity
Publication Date: 2018.11.27 ARM LTD
  • US10140476B2 patent drawing
  • US10140476B2 patent drawing
  • US10140476B2 patent drawing

AI summary

A data processing apparatus comprises a processing element having associated memory storage and one or more registers, the processing element being configured to perform processing activities in two or more security modes so as to inhibit a processing activity performed in one of the security modes from accessing at least some information associated with a processing activity performed in another of the security modes; in which the processing element is configured, in response to a function call causing a branch from a processing activity in a first security mode to a processing activity in a second security mode, to store the contents of one or more of the registers in the memory storage and, in response to a branch return to the first security mode, to retrieve the register contents from the memory storage; and trace apparatus configured to generate items of trace data indicative of processing activities of the processing element; in which the trace apparatus is configured to detect a branch return operation by the processing element and to generate one or more items of trace data relating to the branch return operation; and in which the trace apparatus is configured to detect the processing element retrieving register contents from the memory storage in response to a branch return to the first security mode and to generate one or more further items of trace data relating to the retrieval of the register contents from the memory storage.