e47183725dd6b27f68c6b563aa4b0c605f3277a3
- Make the secondary entry point be logically separate function, though declared in the same file. - Add a trick where the kernel base + 4 is the secondary entry point. Not really useful except makes it easy to compute the offset elsewhere. - Changed the entry point to arm64_reset and move _start to the linker script, which is what most other arches do. - While was in the linker script, make sure the text segment is aligned on MAXPAGESIZE, though doesn't make any real difference currently. - Generally clean up the assembly in start.S with newer macros from Fuchsia, and avoid using ldr X, =value as much as possible. - Fix and make sure arm64 can build and run with WITH_SMP set to false. Add a new no-smp project to test this. Note this will likely break systems where all of the cpus enter the kernel simultaneously, which we can fix if that becomes an issue. Secondary code now completely assumes the cpu number is passed in x0. This can be emulated with platform specific trampoline code if it needs to that then just directs into the the secondary entry point, instead of trying to make the arch code have to deal with all cases.
The Little Kernel Embedded Operating System
The LK kernel is an SMP-aware kernel designed for small systems ported to a variety of platforms and cpu architectures.
It is used in a variety of open source and closed source projects, notably the bootloader for a lot of Android phones of various make.
See https://github.com/littlekernel/lk for the latest version.
For comprehensive documentation, see Index.
High Level Features
- Fully-reentrant multi-threaded preemptive kernel
- Portable to many 32 and 64 bit architectures
- Support for wide variety of embedded and larger platforms
- Powerful modular build system
- Large number of utility components selectable at build time
Supported architectures
- ARM32
- Cortex-M class cores (armv6m - armv8m)
- ARMv7+ Cortex-A class cores
- ARM64
- ARMv8 and ARMv9 cores
- RISC-V 32 and 64bit bit in machine and supervisor mode
- x86-32 and x86-64
- Motorola 68000
- Microblaze
- MIPS
- OpenRISC 1000
- VAX (experimental)
Languages
C
80.6%
C++
10.8%
Assembly
3.6%
Makefile
3.4%
Python
1%
Other
0.6%