Execution flow protection in microcontrollers
AssigneeNXP B.V.
InventorHugues de Perthuis
Life of this patent
Estimating the term…
Abstract
An execution flow protection module (30) for a microcontroller (10) with a memory (24) and a microprocessor (20) is described. The module (30) is configured to monitor the memory (24) access of the microcontroller (10) to identify instructions fetched by the microcontroller (10) from the memory (24) for execution by the microprocessor (20). The module (30) comprises an instruction decoder unit (32) for determining a program counter value associated with the execution flow of the instructions fetched by the microcontroller (10); a program counter predictor unit (34) for predicting the program counter value of the next fetched instruction; and an interrupt module (40) for responding if the next instruction fetched by the microcontroller does not match the predicted program counter value.
Claims15
An execution flow protection module for a microcontroller with a memory and a microprocessor, said module configured to monitor the memory access of the microcontroller to identify instructions fetched by the microcontroller from the memory for execution by the microprocessor, said module comprising:
- an instruction decoder unit for determining a program counter value associated with the execution flow of the instructions fetched by the microcontroller;
- a program counter predictor unit for predicting the next program counter value of a next instruction to be fetched;
- and
- an interrupt module for responding if the next instruction fetched by the microcontroller does not match the predicted next program counter value.
A method for ensuring the integrity of execution flow in a microcontroller with a memory and a microprocessor, said method comprising the steps of:
- determining the instructions fetched by the microprocessor from the memory;
- analyzing the expected execution flow of the instructions fetched;
- obtaining a value associated with the current instruction;
- modifying the value according to the expected execution flow;
- obtaining an updated value associated with the next instruction;
- comparing the modified value to the updated value;
- and
- generating a response if the modified value does not match the updated value.
Dependencies are inferred from the claim text.