RTOS GPIO Access Control via Virtual Device Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing memory protection units in electronic devices, such as MPUs and MMUs, face limitations in flexibility and freedom of access control due to hardware constraints like boundary limitations and limited number of access rights, leading to potential overlap of access rights for GPIO registers and inability to meet all process requests.
Innovation Solution
Implementing an access control method where the RTOS sets access rights for GPIO registers and devices, allowing processes to operate through APIs that manage access rights dynamically, avoiding direct access requests and enabling exclusive or bit-level operations to enhance freedom of access control without hardware limitations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a memory protection unit (MPU) is used to protect access to device registers, then access security is improved, but flexibility and freedom of access control deteriorate due to hardware constraints like boundary limitations and limited number of access rights
Solution Approach 1:
The patent segments the access control functionality by dividing it into two parts: the hardware MPU that provides basic protection, and a software access control management unit that provides flexible control. The GPIO device is segmented into multiple virtual devices, each with its own access rights. This segmentation allows the system to maintain both the security guarantees of hardware protection and the flexibility of software-based access management.
Solution Approach 2:
The patent introduces an intermediary access control management unit (software layer) that sits between the processes and the hardware MPU. This intermediary translates high-level access requests into MPU-compatible access rights, effectively mediating between the flexible software control requirements and the rigid hardware constraints. The virtual device concept acts as an intermediary abstraction that reconciles the conflicting requirements.
2Manufacturing precision
If access rights are strictly allocated to specific processes for GPIO devices, then access control precision is improved, but the ability to meet all process requests deteriorates due to limited number of access rights in the MPU
Solution Approach 1:
The patent creates virtual copies of the GPIO device, where each virtual device represents a specific access rights configuration. Instead of having a single GPIO device with limited access rights, the system creates multiple virtual GPIO devices (e.g., GPIO_A, GPIO_B, GPIO_C) that are logical copies with different access permissions. This copying approach allows multiple processes to have simultaneous access with different rights without requiring additional physical hardware resources.
Solution Approach 2:
The patent adds a virtualization dimension to the access control model. By introducing the concept of virtual devices as an additional layer of abstraction, the system transforms the limited one-to-one mapping between processes and access rights into a many-to-many relationship. This dimensional change from physical to virtual space enables the system to accommodate more process requests than the hardware would normally support.
3Reliability
If the MPU enforces strict access rights, then access protection is improved, but ease of operation deteriorates due to access violations and inability to perform bit-level operations
Solution Approach 1:
The patent introduces dynamic access control where access rights are not fixed but can be changed based on operational needs. The access control management unit can dynamically allocate and modify access rights for different processes and virtual devices. This dynamic approach allows the system to maintain strict protection when needed while providing flexibility for bit-level operations and other specialized access patterns when required.
Solution Approach 2:
The patent implements preliminary action by pre-configuring multiple virtual devices with different access rights patterns before operations begin. Common access scenarios are pre-established as virtual devices, so when processes need to operate GPIOs, they can use the pre-configured virtual devices that already have the appropriate access rights, avoiding the need for complex runtime access right modifications and reducing access violations.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
An electronic device includes a memory protection unit configured to protect an access to a register of a device arranged in an address space. An operating system sets an access right to the register by using the memory protection unit. A process requests the operating system to operate the device when the process operates the device, and the operating system makes an access to the corresponding register in accordance with the request for the operation to operate the device.