From d7efa8ca208aa6395932f04369806a3ac8de78f1 Mon Sep 17 00:00:00 2001 From: able Date: Sun, 5 May 2024 05:08:42 -0500 Subject: [PATCH] Spec typification --- sysdata/spec/Logging Service spec.md | 20 ++++++------ sysdata/spec/Memory Service spec.md | 49 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/sysdata/spec/Logging Service spec.md b/sysdata/spec/Logging Service spec.md index a0c1650..9470b77 100644 --- a/sysdata/spec/Logging Service spec.md +++ b/sysdata/spec/Logging Service spec.md @@ -3,18 +3,18 @@ The logging service uses the first byte in the message to identify the request t ## Current Log Impl -[..] -> string -[+1] -> Log Level. Refer to the log level table. +[STR] -> string +[U8] -> Log Level. Refer to the log level table. ## Log -[0] -> Log a message. -[1] -> Log Level. -[2..10] -> Path length -[11..] -> Path String -[..u64] -> Line number -[..u64] -> column number -[..u64] -> Log String length -[..] -> Log String +[U8] -> Log a message. +[U8] -> Log Level. +[U64] -> Path length +[STR] -> Path String +[U64] -> Line number +[U64] -> column number +[U64] -> Log String length +[STR] -> Log String ## Log Level Table diff --git a/sysdata/spec/Memory Service spec.md b/sysdata/spec/Memory Service spec.md index 0d74e3c..509311d 100644 --- a/sysdata/spec/Memory Service spec.md +++ b/sysdata/spec/Memory Service spec.md @@ -2,39 +2,39 @@ The memory service uses the first byte in the message to identify the request type. ## Allocate (12 bytes) -[0] -> 0 -[1] -> Page count +[U8] -> 0 +[U8] -> Page count -[2..10] -> ptr to alloc at +[U64] -> ptr to alloc at ## Deallocate (12 bytes) -[0] -> 1 -[1] -> Page count -[2..10] -> ptr to dealloc from +[U8] -> 1 +[U8] -> Page count +[U64] -> ptr to dealloc from ## Map Device Into Memory Typically only used for simple drivers such as vga. -[0] -> 2 -[1] -> Page count -[2..10] -> HostID -[11..19] -> DeviceID +[U8] -> 2 +[U8] -> Page count +[U64] -> HostID +[U64] -> DeviceID ## Unmap Device From Memory -[0] -> 3 -[1] -> Page count -[2..10] -> HostID -[11..19] -> DeviceID +[U8] -> 3 +[U8] -> Page count +[U64] -> HostID +[U64] -> DeviceID ## Set Memory Quota -[0] -> 4 -[1..9] -> HostID -[10..18] -> ProcessID -[19] -> Refer to the Memory Quota Table -[20..28] -> Memory quota. In pages of memory. Multiply by 4096 to get the total byte count. +[U8] -> 4 +[U64] -> HostID +[U64] -> ProcessID +[U8] -> Refer to the Memory Quota Table +[U64] -> Memory quota. In pages of memory. Multiply by 4096 to get the total byte count. ### Memory Quota Table 0 -> No quota. @@ -44,15 +44,14 @@ Typically only used for simple drivers such as vga. ## Set Buffer Quota -[0] -> 4 -[1..9] -> HostID -[10..18] -> BufferID -[19] -> Refer to the Buffer Quota Table -[20..28] -> Buffer quota. In pages of memory. Multiply by 4096 to get the total byte count. +[U8] -> 4 +[U64] -> HostID +[U64] -> BufferID +[U8] -> Refer to the Buffer Quota Table +[U64] -> Buffer quota. In pages of memory. Multiply by 4096 to get the total byte count. ### Buffer Quota Table 0 -> No quota 1 -> Soft quota. Notify supervisor of quota violation Buffer Message 2 -> Hard quota. Return an error message to the process that sent the message. - \ No newline at end of file