Difference between revisions of "GeneveOS Memory Management Functions"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
'''Opcode: 0''' | '''Opcode: 0''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 27: | Line 27: | ||
'''Opcode: 1''' | '''Opcode: 1''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 50: | Line 50: | ||
'''Opcode: 2''' | '''Opcode: 2''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 70: | Line 70: | ||
'''Opcode: 3''' | '''Opcode: 3''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 90: | Line 90: | ||
'''Opcode: 4''' | '''Opcode: 4''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 110: | Line 110: | ||
'''Opcode: 5''' | '''Opcode: 5''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 133: | Line 133: | ||
'''Opcode: 6''' | '''Opcode: 6''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 152: | Line 152: | ||
'''Opcode: 7''' | '''Opcode: 7''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 172: | Line 172: | ||
'''Opcode: 8''' | '''Opcode: 8''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 191: | Line 191: | ||
'''Opcode: 9''' | '''Opcode: 9''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 207: | Line 207: | ||
'''Opcode: 10''' | '''Opcode: 10''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 227: | Line 227: | ||
'''Opcode: 11''' | '''Opcode: 11''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 244: | Line 244: | ||
'''Opcode: 12''' | '''Opcode: 12''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 261: | Line 261: | ||
'''Opcode: 13''' | '''Opcode: 13''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | | ||
Line 281: | Line 281: | ||
'''Opcode: 14''' | '''Opcode: 14''' | ||
{| class=" | {| class="xoparg" | ||
|- | |- | ||
| | | |
Revision as of 14:30, 11 November 2011
Memory management in MDOS is available via XOP 7.
General purpose XOPs
Return number of free pages in system
Opcode: 0
Input | Output | |
---|---|---|
R0 | Opcode (0000) | Error code (always 0) |
R1 | Number of free pages | |
R2 | Number of fast free pages |
Claim pages into local map from free pages
Opcode: 1
Input | Output | |
---|---|---|
R0 | Opcode (0001) | Error code |
R1 | Number of pages | Number of pages actually fetched to complete map as required |
R2 | Local page address | Number of fast pages fetched |
R3 | Speed flag (0 is slow, else fast) |
Return pages into free pool from local map
Opcode: 2
Input | Output | |
---|---|---|
R0 | Opcode (0002) | Error code |
R1 | Number of pages | |
R2 | Local page address |
Map local page at excution page
Opcode: 3
Input | Output | |
---|---|---|
R0 | Opcode (0003) | Error code |
R1 | Local page number | |
R2 | Execution page number |
Get address map
Opcode: 4
Input | Output | |
---|---|---|
R0 | Opcode (0004) | Error code |
R1 | Execution address | Count of pages reported |
R2 | Size of area for map |
Opcode: 5
Input | Output | |
---|---|---|
R0 | Opcode (0005) | Error code |
R1 | Number of pages to declare as shared | |
R2 | Local page address | |
R3 | Type to be assigned to shared pages |
Opcode: 6
Input | Output | |
---|---|---|
R0 | Opcode (0006) | Error code |
R1 | Type |
Also have to check their current execution map
Opcode: 7
Input | Output | |
---|---|---|
R0 | Opcode (0007) | Error code |
R1 | Type | |
R2 | Local page number for start of shared area |
Opcode: 8
Input | Output | |
---|---|---|
R0 | Opcode (0008) | Error code |
R1 | Type | Number of pages in shared group |
Privileged XOPs (only available for operating system)
Release task
Opcode: 9
Input | Output | |
---|---|---|
R0 | Opcode (0009) |
Task header at >8000
Page get
Opcode: 10
Input | Output | |
---|---|---|
R0 | Opcode (000A) | Error code |
R1 | Page number to get (if high byte not 0, get first available) | Pointer to node |
R2 | Speed flag (0 is slow, else fast) | Page number from node |
Add page to free pages in system
Opcode: 11
Input | Output | |
---|---|---|
R0 | Opcode (000B) | Error code (if no free nodes available) |
R1 | Page number | Pointer to node |
Add a node to the list of free nodes
Opcode: 12
Input | Output | |
---|---|---|
R0 | Opcode (000C) | Error code (always 0000) |
R1 | Pointer to node |
Link a node to the specified node
Opcode: 13
Input | Output | |
---|---|---|
R0 | Opcode (000D) | Error code (always 0000) |
R1 | Pointer to node | |
R2 | Pointer to node to link to |
Get address map (system)
Opcode: 14
Input | Output | |
---|---|---|
R0 | Opcode (000E) | Count of valid pages |