MPU Memory Region Partitioning for Embedded Software Isolation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Embedded computer systems face challenges in security and build stability due to the complexity of programming Memory Protection Units (MPUs) to create isolated memory regions, leading many developers to avoid this approach.
Innovation Solution
The method involves partitioning software into a target number of MPU memory regions based on object code, using a process that converts object code to intermediate code, generates a call graph, transforms it into a directed flow graph, partitions it into MPU memory regions, relocates elements, and creates a configuration object file, thereby isolating software components and maintaining stable memory region configurations across updates.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If developers program MPU to create isolated memory regions, then security and build stability are improved, but device complexity and programming difficulty increase
Solution Approach 1:
The patent segments the software into multiple isolated memory regions using the MPU, where each region contains specific software components. This segmentation creates natural boundaries that isolate components from one another, improving security and build stability without requiring developers to manually configure complex memory mappings. The automated partitioning process divides the software based on its structural dependencies, making the complexity management systematic rather than ad-hoc.
Solution Approach 2:
The patent introduces an intermediary tool that automatically analyzes software dependencies and generates MPU configuration. This intermediary process translates high-level software structure into low-level memory partitioning requirements, shielding developers from the complexity of direct MPU programming while still achieving the security and stability benefits of isolated memory regions.
2Ease of operation
If developers avoid programming MPU to simplify development, then ease of operation is improved, but security and build stability deteriorate
Solution Approach 1:
The patent enables self-service automated partitioning where the software's own dependency structure is analyzed to automatically generate appropriate MPU memory regions. The system uses the software's inherent modular structure to drive the partitioning process, eliminating the need for manual MPU configuration while still achieving security isolation. Developers simply compile the software with the automated tooling, and the system handles the rest.
Solution Approach 2:
The patent performs preliminary analysis of software dependencies during the compilation process, before the software runs on the target system. By pre-analyzing the software structure and pre-configuring memory regions accordingly, the system eliminates the need for developers to manually plan and configure MPU regions, making development easier while ensuring proper security isolation is in place.
3Manufacturing precision
If source code is recompiled after every software update to maintain partitioning, then manufacturing precision is improved, but productivity deteriorates
Solution Approach 1:
The patent implements a dynamic partitioning approach where memory region assignments are determined based on the actual software dependencies present in each build, rather than using fixed static partitions. The system analyzes the dependency graph of the current software version and automatically adjusts memory region assignments to match the actual component structure, maintaining partitioning accuracy without requiring full recompilation.
Solution Approach 2:
The patent changes the parameter of partitioning from a static, pre-defined configuration to a dynamic, software-driven configuration. Instead of fixing memory regions in advance, the system allows memory region assignments to be determined by the software's own dependency structure, enabling the partitioning to adapt automatically to software changes without requiring manual intervention or full recompilation.
Data Source
AI summary
The present disclosure advantageously provides a computer-based method for partitioning software for an embedded system with a memory protection unit (MPU). Object code within a plurality of object files is converted to intermediate code. A call graph is generated based on the intermediate code. The call graph is transformed into a directed flow graph, which includes updating the call graph's node weights and directed edge weights. The directed flow graph is partitioned into a target number of MPU memory regions, which includes assigning each element of the object code to one of the MPU memory regions. Each element of the object code is relocated to a new object file that corresponds to the assigned MPU memory region. An MPU configuration object file is created that includes one or more configuration parameters for each MPU memory region.


