~ecs/k

ref: refs/heads/master k/PORTABILITY.md -rw-r--r-- 730 bytes
354b6b99 — Eyal Sawady Initial commit 9 months ago
                                                                                
354b6b99 Eyal Sawady
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Portability

`k` aims to be highly portable, with most of the kernel written in
arch-independent C. However, there are times when this is impossible.

When possible, there should be an abstraction layer, implemented in
assembly, upon which portable C can be written. This abstraction layer
should be as thin as possible while still being easy to implement on all
hardware.

The exception to this rule is the stage-1 bootloader, which is fully
implemented in assembly. The tasks that the stage-1 bootloader performs
are entirely architecture-dependent, and it is usually severely limited
in size.

All architecture-specific code MUST live in `arch/$(uname -m)`. Porting
`k` to a new architecture should take at most a few weeks.