When I debug MMU in Cortex-A9 MPCore, I always see Domain Access Control Register, but, what does domain means ? up to 16 domains ? Anyone can give me a link to explain this ?
相关问题
- Avoid cmake to add the flags -search_paths_first a
- AOSP Build TARGET_PRODUCT fails
- Perform a horizontal logical/bitwise AND operation
- Can variables inside packed structures be read ato
- Can run ARM/rpi images in Docker on Windows but no
相关文章
- socket() returns 0 in C client server application
- Why are i2c_smbus function not available? (I2C – E
- Problem with time() function in embedded applicati
- avoiding text relocations when mixing c/c++ and as
- Interrupt handling on an SMP ARM system with a GIC
- In linux, how to do system calls through GNU ARM a
- Using NEON multiply accumulate on iOS
- Decoding BLX instruction on ARM/Thumb (IOS)
TL;DR The DACR not only decreases the context switch code path, but can also speed execution after the context switch occurs.
There are several links which explain the specifics of Domain Access Control Register or DACR. For example ARM's Memory access permissions and domains. However, this page and many others don't explain why you might need this feature; especially for people use to embedded applications.
A prior ARM feature (ARM architecture V5) was the PID. The reason for this feature is the same as the DACR and domains. What is an MMU used for?
The DACR (and PID) are only concerned with the first (Privilege separation). On a context switch an OS must manage this separation. With most MMUs (historically on the ARM), there are only two privileges being user and super. In order to accommodate multiple tasks, the super MMU code must alter the MMU table. This is complex as the ARM has a TLB and cache, both of which have virtual addresses and depend on the MMU table.
The DACR (and PID) allow the MMU mappings to change with a single register write. Moreover, the TLB and cache also have domain information (and modified address for PID). This means these entries do not need to be flushed (and repopulated) on a context switch. The domains are advantageous to the PID as multiple access profiles can exist. For instance, shared library code may remain accessible on a context switch while the main task/thread binary is switched out.
Compare work with the DACR versus updating the MMU tables.
This is versus changing a single register. Moreover, you will probably invalidate the entire cache and TLB. With the DACR and a brief context switch, code/data can remain in the cache and MMU page table entries in the TLB. For example, a system with a check email task and a movie player.
The decoding of audio/video is highly CPU and memory intensive. Occasionally, the email client will poll a network server for information. Usually there is nothing. During this brief transition only a small (1-4k) of check email code may be needed; a single TLB entry. Cache is typically 32k+, so much of the audio/video cache and TLB entries can remain valid.
So the DACR not only decreases the context switch code path, but can also speed execution after the context switch occurs.