Showing changes from revision #3 to #4:
Added | Removed | Changed
Entry | |
---|---|
R0 | Area to read |
For area numbers 0-127, set bit 7 in order to read maximum size to R2 |
Exit | |
---|---|
R0 | Pointer to start address of area |
R1 | Current number of bytes in area |
R2 | Maximum size of area (if input R0 outside range 0-127), else preserved |
The purpose of this call is to read the size of an area.
If this SWI is used on an area that has virtual memory active this SWI reads the logical size of the area, otherwise the behaviour is the same as before. In practice this means that this call can be used by the application without worrying whether virtual memory is active.
For doubly-mapped dynamic areas, the start address corresponds to the start of the first copy (i.e. the lowest valid address in the area), unlike OS_DynamicArea 2 and OS_DynamicArea 24 which return the start address of the second copy.
For Sparse Dynamic Areas, the current size is calculated from the number of pages that are currently mapped in. Therefore it is not guaranteed to describe the logical extent of the area.
For Physical Memory Pool DAs, the values in R1 and R2 will correspond to the physical properties of the dynamic area, not the logical properties. Therefore the values are completely unrelated to the base address returned in R0 (and if an area has a maximum logical size of zero, the base address will be zero). If necessary the values will be clamped at 2GB-PageSize in order to try and avoid any issues relating to signed number overflow. To be able to query a PMP without this clamping, or to be able to query the logical size values, OS_DynamicArea 24 should be used.