Compared to previous versions of RISC OS, RISC OS 5 has extended support for specifying the cache policy of memory regions. The cache police is specified through a combination of bits 4-5 and bits 12-14 of the page access flags.
Bit 4 (the nonbufferable bit) and bit 5 (the noncacheable bit) specify the basic cache policy that’s used. The policy number specified in bits 12-14 then modify this policy, as described in the tables below. Each policy also has a fallback policy listed; the kernel will automatically try successive fallback policies until a supported policy is found.
Policy | Meaning | Fallback policy |
---|---|---|
0 | OS decides policy (Writeback if available, or write alloc for areas mapped by HAL) | - |
1 | Writethrough cacheable, read allocate. | NCB policy 2 (merging write buffer) |
2 | Writeback cacheable, read allocate. | CB policy 1 (writethrough) |
3 | Writeback cacheable, write allocate. | CB policy 2 (writeback cacheable, read allocate) |
4 | Alternative D-cache (XScale/StrongARM mini D-cache) | CB policy 0 (default policy) |
5-7 | Reserved | - |
Policy | Meaning | Fallback policy |
---|---|---|
0 | OS decides buffer policy (currently, merging by default) | - |
1 | Non-merging write buffer. | NCNB |
2 | Merging write buffer. | NCB policy 1 (Non-merging write buffer) |
3-7 | Reserved | - |
Policy | Meaning | Fallback policy |
---|---|---|
0 | OS decides cache policy (currently, writethrough by default) | - |
1 | Writethrough cache, non-buffered. | NCNB |
2 | Writeback cache, non-buffered. | CNB policy 1 (Writethrough cache, non-buffered) |
3-7 | Reserved | - |
Policy | Meaning | Fallback policy |
---|---|---|
0 | Default policy | - |
1-7 | Reserved | - |