noxos (docs): defined basic memory syscalls

This commit is contained in:
antifallobst 2023-04-20 17:19:59 +02:00
parent 818279be46
commit 3f353f7bf2
1 changed files with 12 additions and 3 deletions

View File

@ -36,8 +36,9 @@ The following calls should be implemented to some degree in noxos 1.0.
## Memory ## Memory
| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | | ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status |
|-----|------|-------------|------|------|------|------|--------|--------| |--------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|------|------|-------|------|--------|--------|
| | | | | | | | | | | 0x0201 | nx_mmap | Maps _n_ 4KB pages to address _addr_. You can provide a bitmap of flags with the _flags_ argument. Which flags can be is described below. | addr | n | flags | | status | N/A |
| 0x0202 | nx_munmap | Unmaps _n_ 4KB pages at address _addr_. | addr | n | | | status | N/A |
## Processes ## Processes
| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | | ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status |
@ -73,3 +74,11 @@ If another process calls them, they will just return without doing anything.
|-----|---------------|--------------------------------------------|-----------|--------| |-----|---------------|--------------------------------------------|-----------|--------|
| 0 | `permissions` | Who has what permission to access the file | uint16_t | N/A | | 0 | `permissions` | Who has what permission to access the file | uint16_t | N/A |
| 1 | `size` | The files size in bytes | uint64_t | N/A | | 1 | `size` | The files size in bytes | uint64_t | N/A |
### Memory mapping flags
| Bit | Name | Description |
|-----|-----------|-------------------------------------------|
| 0 | `write` | Enables write access to the mapped pages. |
| 1 | `no_exec` | Prevents execution of the mapped pages. |