Showing changes from revision #3 to #4:
Added | Removed | Changed
Bits | Meaning when set |
---|---|
0-7 | 0 (reason code) |
8 | Physical page number provided |
9 | Logical address provided |
10 | Physical address provided |
11 | Return physical page number (if bit 8 clear) |
12 | Return logical address (if bit 9 clear) |
13 | Return physical address (if bit 10 clear) |
14-15 | Cacheability control: 1 |
0,1 = No change | |
2 = Disable cacheing on all specified pages | |
3 = Enable cacheing on all specified pages | |
16-31 | Reserved, must be clear |
These flags are specific to OS_Memory 0.
1 Cacheability control
As of RISC OS 5.25, using OS_Memory 0 to alter the cacheability of “shared” pages of memory is deprecated.
In this context, “shared” is being used to refer to any page which your software does not have exclusive access to. E.g. if you allocate a block of memory from the RMA, there’s a good chance that the pages at the start and end of that block will contain other blocks which have been allocated by other programs. Therefore those pages are “shared”, and there is no way for you or the OS to predict how or when the other programs will access those other allocations (they could be accessed from foreground code after OS_Memory has disabled caching, or they could be accessed from IRQ or FIQ handlers during the OS_Memory operation).
There are several reasons for this deprecation:
The primary user of the “disable caching” / “enable caching” functionality was DMA drivers, for which OS_Memory 19 has been introduced to act as a replacement.