Debug Exception Masking for Critical Code Protection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging data processing systems, particularly operating systems, poses a risk of generating exceptions that can cause software malfunctions, as external debuggers may inadvertently interrupt critical code, leading to system malfunctions and security issues.

Innovation Solution

A data processing apparatus with a debug exception mask value that inhibits debug exceptions during execution of critical code, allowing exceptions only when safe to do so, and resetting the mask upon completion to prevent interruptions that could cause malfunctions, while allowing exceptions at higher hierarchical levels where they are controlled.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If debug operations are allowed during execution of critical code, then debugging capability is improved, but system reliability deteriorates due to risk of software malfunctions

Engineering Contradiction:
Improvedebugging capabilityVSAvoidsystem reliability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system performs preliminary action by setting the debug exception mask value to the first value before executing critical code, and resetting it after critical code completion. This preliminary masking prevents debug exceptions from being taken during critical code execution, thereby maintaining system reliability while still allowing debugging capability when safe.

Inventive Principle:
Principle #10Preliminary action

2Stability of the object's composition

If debug exceptions are inhibited during critical code execution, then system stability is improved, but debugging effectiveness worsens

Engineering Contradiction:
Improvesystem stabilityVSAvoiddebugging effectiveness
Core Design Contradiction:
Stability of the object's compositionVSEase of operation

Solution Approach 1:

The system applies local quality by selectively masking debug exceptions only during specific critical code execution periods rather than globally. The debug exception mask value is set to the first value locally during critical code execution and reset otherwise, allowing debugging effectiveness to be maintained in non-critical regions while ensuring system stability during critical operations.

Inventive Principle:
Principle #3Local quality

3Reliability

If a debug exception mask value is implemented, then protection against synchronous exceptions is improved, but device complexity increases

Engineering Contradiction:
Improveprotection against synchronous exceptionsVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system implements protection through parameter changes by utilizing a debug exception mask value that can be set to different values (first value to mask, second value to unmask). This simple parameter change mechanism provides effective protection against synchronous exceptions during critical code execution without introducing complex hardware or software structures, thereby minimizing device complexity while improving reliability.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP2668578B1Controlling generation of debug exceptions
Publication Date: 2017.12.06 ARM LTD
  • EP2668578B1 patent drawingFigure 1~2
  • EP2668578B1 patent drawingFigure 3a~3b
  • EP2668578B1 patent drawingFigure 4

AI summary

A data processing apparatus comprising: data processing circuitry for performing data processing operations in response to execution of program instructions and debug circuitry for performing operations. The data processing apparatus comprising a data store for storing a current debug exception mask value. The data processing circuitry being configured to set the current debug exception mask value to a first value in said data store in response to executing critical code and on termination of execution of said critical code to reset the current debug exception mask value to not store said first value; wherein said data processing circuitry is configured in response to receipt of a control signal received from said debug circuitry indicating a debug exception is to be taken to allow said exception to be taken if said current debug exception mask value is not set to said first value and not to allow said exception to be taken if said current debug exception mask value is set to said first value.