Documentation first draft

This commit is contained in:
Adrien Bourmault 2021-03-04 18:05:45 +01:00
parent bc2e1f80d3
commit 8296688060
Signed by: neox
GPG Key ID: 6EB408FE0ACEC664
6 changed files with 80 additions and 0 deletions

View 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|
|-------|-----------------------|

View 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|
|-------|-----------------------|

View 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|
|-------|-----------------------|

View 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|
|-------|-----------------------|

View 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

View 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|
|-------|-----------------------|