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