h6. [[OS SWI Calls]] h6(. » [[OS_ReadMemMapEntries]] h6((. » [[Memory Map Request Block]] h6(((. » Memory Page Access Flags h2. Memory Page Access Flags The page access flags used below are used by the [[OS_DynamicArea]], [[OS_Memory]], and the [[OS_SetMemMapEntries]] group of SWIs. However, when using calls to modify the access of pages, be aware that not all APIs support all types of flags. Specifying an unsupported flag can lead to malfunction. Also note that this page only lists the flags supported by RISC OS 5 and its predecessors; for information on RISC OS 4 and 6, please see ROL's documentation. * For [[OS_DynamicArea]], see [[Dynamic Area Flags]] for the full list of flags that are available for dynamic areas. * For the [[OS_SetMemMapEntries]] group of SWIs, consult the table below to determine which flags are supported. * For [[OS_Memory]], consult the details of the individual reason code to determine which flags are supported. table(bordered). |_<^{width:4em}. Bit |_<^. Meaning |_<^. OS version |_<^. Notes | |<^. 0-3 |<^. [[Memory Map Page Access|Access privileges]] to be given to each page in the area |<^. Arthur | |<^. 4 |<^. Set if area is not bufferable by chips |<^. 3.50 |<^. [1] | |<^. 5 |<^. Set if area is not cacheable by chips |<^. 3.50 |<^. [1] | |<^. 6 |<^. If set, area is doubly mapped (reserved, OS use only), otherwise area is singly mapped |<^. 3.50 |<^. [2] | |<^. 7 |<^. Page has been reserved |<^. 5.27 |<^. [3] | |<^. 8-11 |<^. Reserved (must be zero) | |<^. 12-14 |<^. [[Memory Cache Policies|Cache policy]] |<^. 5.00 | |<^. 15-31 |<^. Reserved (must be zero) | h4. Notes Prior to RISC OS 5.00, [[OS_ReadMemMapEntries]] and [[OS_FindMemMapEntries]] would return all of the flags for a given page, but [[OS_SetMemMapEntries]] would only pay attention to the bottom two bits and clear the rest to zero. With RISC OS 5.00 this behaviour was fixed so that the full set of flags are used. fn1. Advice on bits 4 & 5 Setting flags such that r4 bit 4 is 1 and bit 5 is 0 (area is cacheable but not bufferable) has different meanings depending on the operating system version. On RISC OS 5 it selects a non-merging write-through or write-back cache policy. On other operating system versions it is unsupported and must not be used. fn2. Doubly mapped regions Using [[OS_SetMemMapEntries]] to set a page as doubly mapped is not supported and will result in the page tables being incorrectly modified. fn3. Reserved pages This flag is read-only via [[OS_SetMemMapEntries]]. The only API which can modify its state is [[OS_Memory 23]]. See the OS_Memory 23 documentation for more details on the behaviour of reserved pages. h4. See also * [[Dynamic Area Flags]] * [[Memory Map Request Block]] * [[Memory Cache Policies]] * [[OS_FindMemMapEntries]] * [[OS_ReadMemMapEntries]] * [[OS_SetMemMapEntries]] * [[OS_DynamicArea]] * [[OS_Memory]]