diff --git a/docs/kaleid/kernel/ke/cpuid.md b/docs/kaleid/kernel/ke/cpuid.md new file mode 100644 index 0000000..544c61f --- /dev/null +++ b/docs/kaleid/kernel/ke/cpuid.md @@ -0,0 +1,7 @@ +# OS on Kaleid Documentation +## CPU identification in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------| diff --git a/docs/kaleid/kernel/ke/idt.md b/docs/kaleid/kernel/ke/idt.md new file mode 100644 index 0000000..e9ca5c0 --- /dev/null +++ b/docs/kaleid/kernel/ke/idt.md @@ -0,0 +1,7 @@ +# OS on Kaleid Documentation +## Interrupts in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------| diff --git a/docs/kaleid/kernel/ke/log.md b/docs/kaleid/kernel/ke/log.md new file mode 100644 index 0000000..042b6cc --- /dev/null +++ b/docs/kaleid/kernel/ke/log.md @@ -0,0 +1,7 @@ +# OS on Kaleid Documentation +## Log functions in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------| diff --git a/docs/kaleid/kernel/ke/panic.md b/docs/kaleid/kernel/ke/panic.md new file mode 100644 index 0000000..5f50bea --- /dev/null +++ b/docs/kaleid/kernel/ke/panic.md @@ -0,0 +1,7 @@ +# OS on Kaleid Documentation +## Panic and asserts in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------| diff --git a/docs/kaleid/kernel/ke/syscalls.md b/docs/kaleid/kernel/ke/syscalls.md new file mode 100644 index 0000000..1b84587 --- /dev/null +++ b/docs/kaleid/kernel/ke/syscalls.md @@ -0,0 +1,45 @@ +# OS on Kaleid Documentation +## System calls in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------| + +### System call ABI + +System calls take arguments and return values from/by classical System V ABI +registers + +#### Arguments + +rdi : system call code +rsi : first argument +rdx : second argument +r10 : third argument + +#### Return value + +rax : an error_t value + +### System call vector + +In OS/K, system calls are triggered by an userspace program using a software +interrupt vector 0x80. +In assembly language that means using `int 0x80` + +That vector is directly registered in the IDT : it *does not* use the ISR +inscription function (`error_t KeRegisterISR(void (*isr)(ISRFrame_t *regs), uchar +isrNo)`), thus a device driver can't replace the syscall handler. + +#### Pre-handler + +When int 0x80 is triggered, following the IDT, the pre-handler `syscallPreHandler` +takes control. The role of that pre-handler is mainly context-switching related +before the actual system call takes place. + +#### Syscall handler + +`error_t _KeSyscallHandler(ulong code, ISRFrame_t *regs)` is called by the +pre-handler and actually get parameters + diff --git a/docs/kaleid/kernel/ke/time.md b/docs/kaleid/kernel/ke/time.md new file mode 100644 index 0000000..c3b7c37 --- /dev/null +++ b/docs/kaleid/kernel/ke/time.md @@ -0,0 +1,7 @@ +# OS on Kaleid Documentation +## Time in Kaleid kernel + +Copyright © 2018-2021 The OS/K Team + +| ![FDL Logo](https://www.os-k.eu/FDLLOGO.png) | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License| +|-------|-----------------------|