First page Back Continue Last page Overview Graphics
LOBOS Implementation
5 major pieces in about 300 lines
- entry for the new system call in arch/i386/kernel/entry.S
- some additions to arch/i386/kernel/head.S to make space for the critical kernel data that will be copied
- a few additional pages at the beginning of the kernel virtual address space, not used in normal kernel operation, hence safe
- the code to read in the new file in kernel/sys.c
- sys_lobos(char* file) looks up the file and calls read_exec()
- the code to switch off interrupts, move the critical data, and switch over to the new page tables, in arch/i386/kernel/process.c
- os_restart(), some assembly requiredג¦
- the code to copy the new kernel to the right place and jump to it, in kernel/sys.c
can be called from userspace, command line
faster than BIOS (a lot of waiting in BIOS is for DOS 1.0 support tasks(