aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-26 19:15:08 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-26 19:15:08 +0100
commit31806d249fe6e57efee0531bb082f836e5b35a3d (patch)
tree267921cc1017b485e3ca8e4140297f8c58410333
parentd9ac897bd8aa7a8b6471bca1eb8a2bd314fdb133 (diff)
downloadrpi-MMU-example-31806d249fe6e57efee0531bb082f836e5b35a3d.tar.gz
rpi-MMU-example-31806d249fe6e57efee0531bb082f836e5b35a3d.zip
remove halt loop (not really needed + we want to get rid of pieces of code copy-pasted from wiki osdev)
-rw-r--r--boot.S11
1 files changed, 5 insertions, 6 deletions
diff --git a/boot.S b/boot.S
index ae56387..be858ee 100644
--- a/boot.S
+++ b/boot.S
@@ -13,8 +13,12 @@ _boot:
mrc p15, 0, r5, c0, c0, 5
and r5, r5, #3
cmp r5, #0
- bne halt
+ beq proceed
+ // this is a kind of blef - races can theoretically still occur
+ // when the main core overwrites this part of memory
+ wfe
+proceed:
// go to system mode
cps #0b11111
isb
@@ -27,8 +31,3 @@ _boot:
// Call kernel_main
ldr r3, =kernel_main
bx r3
-
- // halt
-halt:
- wfe
- b halt