1
0
Fork 0
forked from AbleOS/ableos

Spec typification

This commit is contained in:
able 2024-05-05 05:08:42 -05:00
parent 5fc2e2a6be
commit d7efa8ca20
2 changed files with 34 additions and 35 deletions

View file

@ -3,18 +3,18 @@ The logging service uses the first byte in the message to identify the request t
## Current Log Impl ## Current Log Impl
<!-- This is a hack but should be noted --> <!-- This is a hack but should be noted -->
[..] -> string [STR] -> string
[+1] -> Log Level. Refer to the log level table. [U8] -> Log Level. Refer to the log level table.
## Log ## Log
[0] -> Log a message. [U8] -> Log a message.
[1] -> Log Level. [U8] -> Log Level.
[2..10] -> Path length [U64] -> Path length
[11..] -> Path String [STR] -> Path String
[..u64] -> Line number [U64] -> Line number
[..u64] -> column number [U64] -> column number
[..u64] -> Log String length [U64] -> Log String length
[..] -> Log String [STR] -> Log String
## Log Level Table ## Log Level Table

View file

@ -2,39 +2,39 @@
The memory service uses the first byte in the message to identify the request type. The memory service uses the first byte in the message to identify the request type.
## Allocate (12 bytes) ## Allocate (12 bytes)
[0] -> 0 [U8] -> 0
[1] -> Page count [U8] -> Page count
<!-- Currently this does not allocate here, check r1 for a ptr to alloc to --> <!-- Currently this does not allocate here, check r1 for a ptr to alloc to -->
[2..10] -> ptr to alloc at [U64] -> ptr to alloc at
## Deallocate (12 bytes) ## Deallocate (12 bytes)
<!-- Currently this does not deallocate --> <!-- Currently this does not deallocate -->
[0] -> 1 [U8] -> 1
[1] -> Page count [U8] -> Page count
[2..10] -> ptr to dealloc from [U64] -> ptr to dealloc from
## Map Device Into Memory ## Map Device Into Memory
Typically only used for simple drivers such as vga. Typically only used for simple drivers such as vga.
<!-- Unimp --> <!-- Unimp -->
[0] -> 2 [U8] -> 2
[1] -> Page count [U8] -> Page count
[2..10] -> HostID [U64] -> HostID
[11..19] -> DeviceID [U64] -> DeviceID
## Unmap Device From Memory ## Unmap Device From Memory
<!-- Unimp --> <!-- Unimp -->
[0] -> 3 [U8] -> 3
[1] -> Page count [U8] -> Page count
[2..10] -> HostID [U64] -> HostID
[11..19] -> DeviceID [U64] -> DeviceID
## Set Memory Quota ## Set Memory Quota
<!-- unimp --> <!-- unimp -->
[0] -> 4 [U8] -> 4
[1..9] -> HostID [U64] -> HostID
[10..18] -> ProcessID [U64] -> ProcessID
[19] -> Refer to the Memory Quota Table [U8] -> Refer to the Memory Quota Table
[20..28] -> Memory quota. In pages of memory. Multiply by 4096 to get the total byte count. [U64] -> Memory quota. In pages of memory. Multiply by 4096 to get the total byte count.
### Memory Quota Table ### Memory Quota Table
0 -> No quota. 0 -> No quota.
@ -44,15 +44,14 @@ Typically only used for simple drivers such as vga.
## Set Buffer Quota ## Set Buffer Quota
<!-- unimp --> <!-- unimp -->
[0] -> 4 [U8] -> 4
[1..9] -> HostID [U64] -> HostID
[10..18] -> BufferID [U64] -> BufferID
[19] -> Refer to the Buffer Quota Table [U8] -> Refer to the Buffer Quota Table
[20..28] -> Buffer quota. In pages of memory. Multiply by 4096 to get the total byte count. [U64] -> Buffer quota. In pages of memory. Multiply by 4096 to get the total byte count.
### Buffer Quota Table ### Buffer Quota Table
<!-- Because of the abusability of buffers there is no Kill Quota --> <!-- Because of the abusability of buffers there is no Kill Quota -->
0 -> No quota 0 -> No quota
1 -> Soft quota. Notify supervisor of quota violation Buffer Message 1 -> Soft quota. Notify supervisor of quota violation Buffer Message
2 -> Hard quota. Return an error message to the process that sent the message. 2 -> Hard quota. Return an error message to the process that sent the message.