RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Dynamic Area Flags

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_DynamicArea
» OS_DynamicArea 0
» Flags
Bit Meaning
0-3 Access privileges to be given to each page in the area (same format as for OS_ReadMemMapEntries)
4 Set if area is not bufferable by chips (see notes)
5 Set if area is not cacheable by chips (see notes)
6 If set, area is doubly mapped (reserved), otherwise area is singly mapped
7 0 =>area may be dragged by the user in Task Manager window (has red bar)
1 =>area may not be dragged by the user in Task Manager window (has green bar)
8 0 =>area does not require specific physical pages (ie R1 is undefined on entry to the PreGrow? and PostGrow? handlers)
1 =>area may require specific physical pages (ie R1 points at a page block on entry to the PreGrow? and PostGrow? handlers)
9 1 =>area is Shrinkable 1
10 1 =>area is Sparse 1
11 1 =>area is bound? to client application 1
12-14 Cache policy 2
15-30 Reserved (must be zero)
31 Virtual memory is active for dynamic area

1 Only available on RISC OS 3.80 onwards.

2 Only available on RISC OS 5.

Notes

If bit 31 is set when the area is created then virtual memory is activated immediately. Note that no error is produced if it is not possible to start virtual memory for the new dynamic area

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.

Cache policies

The values of bits 4 and 5 alter the interpretation of the RISC OS 5 cache policy bits. The tables below also list a fallback policy for each entry; if the chosen policy isn’t available, the kernel will automatically try successive fallback policies until a supported policy is found.

CB (cacheable + bufferable) policies
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 -
NCB (non-cacheable + bufferable) policies
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 -
CNB (cacheable + non-bufferable) policies
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 -
NCNB (non-cacheable, non-bufferable) policies
Policy Meaning Fallback policy
0 Default policy None
1-7 Reserved -

See also

  • Dynamic Area PostGrow?
  • Dynamic Area PreGrow?
  • OS_DynamicArea
  • Memory Map Page Access
  • Shrinkable Dynamic Areas
  • Sparse Dynamic Areas
Revised on July 14, 2011 14:46:45 by Jeffrey Lee (213) (195.72.173.130)
Edit | Back in time (2 revisions) | See changes | History | Views: Print | Source | Linked from: Kernel notes, OS_DynamicArea 0, OS_DynamicArea 2

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys