mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Documentation first draft
This commit is contained in:
parent
bc2e1f80d3
commit
8296688060
7
docs/kaleid/kernel/ke/cpuid.md
Normal file
7
docs/kaleid/kernel/ke/cpuid.md
Normal file
@ -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|
|
||||
|-------|-----------------------|
|
7
docs/kaleid/kernel/ke/idt.md
Normal file
7
docs/kaleid/kernel/ke/idt.md
Normal file
@ -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|
|
||||
|-------|-----------------------|
|
7
docs/kaleid/kernel/ke/log.md
Normal file
7
docs/kaleid/kernel/ke/log.md
Normal file
@ -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|
|
||||
|-------|-----------------------|
|
7
docs/kaleid/kernel/ke/panic.md
Normal file
7
docs/kaleid/kernel/ke/panic.md
Normal file
@ -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|
|
||||
|-------|-----------------------|
|
45
docs/kaleid/kernel/ke/syscalls.md
Normal file
45
docs/kaleid/kernel/ke/syscalls.md
Normal file
@ -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
|
||||
|
7
docs/kaleid/kernel/ke/time.md
Normal file
7
docs/kaleid/kernel/ke/time.md
Normal file
@ -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|
|
||||
|-------|-----------------------|
|
Loading…
Reference in New Issue
Block a user