Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | 7, and all flags bits reserved |
R1 | Pointer to table to be filled in |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
The purpose of this call is to read the physical memory arrangement table, into the block pointed to by R1.
The table is organised with one entry for each page of physical memory, where each entry is 4 bits. Each byte thus contains two entries, the lower-order 4 bits relating to the address before the higher-order bits (ie little endian).
Each nibble indicates:
Bit | Meaning |
---|---|
0-2 | Type of memory: |
0 not present | |
1 DRAM | |
2 VRAM | |
3 ROM | |
4 I/O | |
5-7 undefined | |
3 | 0=page available for allocation, 1=not available |
To read the size of the table, use OS_Memory 6.
If a RAM page is not available for allocation, this means it’s allocated for something that cannot be replaced with a different RAM page (eg OS’ page tables or screen memory).
For a dynamic area with particular physical address requirements (eg contiguous physical RAM), issue this call inside the DA’s PreGrow handler and then choose which pages to ask for based on the result. If you make this call before creating the area, the page availability may then change.
This entry based on RISC OS 3.6 PRM