1#include "kernel/kernel.h" /* configures the kernel */ 2 3/* sections */ 4 5#include <machine/vm.h> 6#include "kernel/kernel.h" 7#include <minix/config.h> 8#include <minix/const.h> 9#include <minix/com.h> 10#include <machine/asm.h> 11#include <machine/interrupt.h> 12#include "archconst.h" 13#include "kernel/const.h" 14#include "kernel/proc.h" 15#include "sconst.h" 16#include <machine/multiboot.h> 17#include <machine/cpu.h> 18 19#include "arch_proto.h" /* K_STACK_SIZE */ 20 21.text 22/*===========================================================================*/ 23/* MINIX */ 24/*===========================================================================*/ 25.global MINIX 26MINIX: 27/* this is the entry point for the MINIX kernel */ 28 b multiboot_init 29 30multiboot_init: 31 ldr sp, =load_stack_start /* make usable stack */ 32 mov fp, #0 33 bl _C_LABEL(pre_init) 34 35 /* Kernel is mapped high now and ready to go, with 36 * the boot info pointer returned by pre_init in r0. 37 * Set the highly mapped stack and initialize it. 38 * 39 * Afther that call kmain with r0 still pointing to boot info 40 */ 41 ldr sp, =k_initial_stktop 42 mov r1, #0 43 push {r1} /* Terminate stack */ 44 ldr r2, =_C_LABEL(kmain) /* r0 holds kinfo_t ptr */ 45 bx r2 46 47 /* not reached */ 48hang: 49 b hang 50 51.data 52load_stack: 53 .space 4096 54load_stack_start: 55