Mercurial > hg > Members > innparusu > xv6-rpi
comparison src/entry-clang.S @ 13:f28daf1e47c1
clang-arm
author | mir3636 |
---|---|
date | Fri, 16 Feb 2018 17:44:49 +0900 |
parents | src/entry.S@ad95e7f82f1e |
children |
comparison
equal
deleted
inserted
replaced
12:ad95e7f82f1e | 13:f28daf1e47c1 |
---|---|
1 #include "arm.h" | |
2 #include "memlayout.h" | |
3 | |
4 .text | |
5 .code 32 | |
6 | |
7 .global _start | |
8 | |
9 _start: | |
10 # clear the entry bss section, the svc stack, and kernel page table | |
11 LDR r1, =edata_entry | |
12 LDR r2, =end_entry | |
13 MOV r3, #0x00 | |
14 | |
15 1: | |
16 CMP r1, r2 | |
17 # STMLTIA r1!, {r3} | |
18 STMIALT r1!, {r3} | |
19 BLT 1b | |
20 | |
21 # initialize stack pointers for svc modes | |
22 MSR CPSR_cxsf, #(SVC_MODE|NO_INT) | |
23 LDR sp, =svc_stktop | |
24 | |
25 BL start | |
26 B . | |
27 | |
28 # during startup, kernel stack uses user address, now switch it to kernel addr | |
29 .global jump_stack | |
30 jump_stack: | |
31 MOV r0, sp | |
32 ADD r0, r0, #KERNBASE | |
33 MOV sp, r0 | |
34 MOV pc, lr |