1 #include "kernel/kernel.h" /* configures the kernel */
5 #include <machine/vm.h>
6 #include "kernel/kernel.h"
7 #include <minix/config.h>
8 #include <minix/const.h>
10 #include <machine/asm.h>
11 #include <machine/interrupt.h>
12 #include "archconst.h"
14 #include <machine/multiboot.h>
16 #include "arch_proto.h" /* K_STACK_SIZE */
19 #include "kernel/smp.h"
22 /* Selected 386 tss offsets. */
25 IMPORT(copr_not_available_handler)
29 IMPORT(switch_to_user)
30 IMPORT(multiboot_init)
33 /*===========================================================================*/
35 /*===========================================================================*/
38 /* this is the entry point for the MINIX kernel */
41 /* Multiboot header here*/
45 #define MULTIBOOT_FLAGS (MULTIBOOT_HEADER_WANT_MEMORY | MULTIBOOT_HEADER_MODS_ALIGNED)
48 .long MULTIBOOT_HEADER_MAGIC
52 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_FLAGS)
60 .long MULTIBOOT_VIDEO_MODE_EGA
62 .long MULTIBOOT_CONSOLE_COLS
64 .long MULTIBOOT_CONSOLE_LINES
69 mov $load_stack_start, %esp /* make usable stack */
71 push $0 /* set flags to known good state */
72 popf /* esp, clear nested task and int enable */
75 push %ebx /* multiboot information struct */
76 push %eax /* multiboot magic number */
77 call _C_LABEL(pre_init)
79 /* Kernel is mapped high now and ready to go, with
80 * the boot info pointer returnd in %eax. Set the
81 * highly mapped stack, initialize it, push the boot
82 * info pointer and jump to the highly mapped kernel.
84 mov $k_initial_stktop, %esp
85 push $0 /* Terminate stack */