Stack Pointer Boundary Address Monitor for PMP Detection Failures

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing Physical Memory Protection (PMP) mechanism fails to detect when a stack pointer moves significantly and crosses the entire guard region, leading to detection failures.

Innovation Solution

An address monitor device and method that include a boundary address register, a stack pointer register, and a comparator to monitor the boundary address of a stack and compare it with the stack pointer to determine if an interrupt command should be outputted.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the PMP mechanism uses a guard region to detect stack pointer violations, then the detection capability is improved for small movements, but the detection reliability deteriorates when the stack pointer moves large distances and crosses the entire guard region

Engineering Contradiction:
Improvedetection capabilityVSAvoiddetection reliability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The guard region is divided into multiple segments with each having its own boundary address register. Instead of a single guard region, the stack boundary is divided into multiple smaller regions, each monitored independently. This segmentation ensures that even large stack pointer movements are detected by triggering multiple boundary checks, resolving the contradiction between detection precision and reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The boundary address register is configured to monitor the boundary address in advance before the stack pointer can cross it. By preliminarily setting up the boundary address and using the comparator to check against this pre-established boundary, the system detects violations before they occur, improving both detection capability and reliability for large movements.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If the stack pointer moves large distances, then the stack usage efficiency is improved, but the detection reliability of the PMP mechanism deteriorates

Engineering Contradiction:
Improvestack usage efficiencyVSAvoiddetection reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

By segmenting the guard region into multiple smaller regions with individual boundary address registers, the system allows larger stack pointer movements while maintaining detection reliability. Each segment can be independently monitored, enabling efficient stack usage patterns that would otherwise cause detection failures in a single large guard region.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250173276A1Address monitor device and address monitor method
Publication Date: 2025.05.29 REALTEK SEMICON CORP
  • US20250173276A1 patent drawing
  • US20250173276A1 patent drawing
  • US20250173276A1 patent drawing

AI summary

An address monitor device includes a boundary address register, a stack pointer register, and a comparator. The boundary address register is configured to monitor a boundary address of a stack based on a usage state of a stack pointer. The stack pointer register is configured to obtain a usage address of the stack at present based on the usage state of the stack pointer. The comparator is configured to compare the stack pointer and the boundary address for determining whether to output an interrupt command.