aboutsummaryrefslogtreecommitdiff
path: root/boot.S
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-28 21:54:42 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-28 21:54:42 +0100
commit700f4c412d42c9b9811269045c0e363a0331bba9 (patch)
tree260feed1ca657843d993c1ae73e93f25a17cede1 /boot.S
parent80c9af17330ac442a4c3d6d55b4041cbe923e9b4 (diff)
downloadrpi-MMU-example-700f4c412d42c9b9811269045c0e363a0331bba9.tar.gz
rpi-MMU-example-700f4c412d42c9b9811269045c0e363a0331bba9.zip
split kernel into 2 stages; second stage gets copied to 0x0 and runs from there
Diffstat (limited to 'boot.S')
-rw-r--r--boot.S27
1 files changed, 0 insertions, 27 deletions
diff --git a/boot.S b/boot.S
deleted file mode 100644
index 593ed11..0000000
--- a/boot.S
+++ /dev/null
@@ -1,27 +0,0 @@
-// armv7 mode
-
-// Entry point for the kernel.
-// r15 -> should begin execution at 0x8000.
-// r0 -> 0x00000000
-// r1 -> 0x00000C42
-// r2 -> 0x00000100 - start of ATAGS
-// preserve these registers as argument for kernel_main
-
-.global _boot // make entry point label global
-_boot:
- // Only let the first core execute
- mrc p15, 0, r3, c0, c0, 5
- and r3, r3, #3
- cmp r3, #0
- beq proceed
- // this is a kind of blef - races can theoretically still occur
- // when the main core overwrites this part of memory
- wfe
-
-proceed:
- // Initialize the stack (_stack_top is defined in linker.ld)
- ldr sp, =_stack_top
-
- // Call kernel_main
- ldr r3, =kernel_main
- bx r3