diff options
author | vetch <vetch97@gmail.com> | 2020-01-02 17:54:31 +0100 |
---|---|---|
committer | vetch <vetch97@gmail.com> | 2020-01-02 17:54:31 +0100 |
commit | ab7b754bb32022336527c1a2d5d710b95a589d0e (patch) | |
tree | 19f508f06c72efcbdd2cfad46949ed6f1ae45a3c /boot.S | |
parent | 5e1e6796109c892c4300c3da17c35e7874a40107 (diff) | |
parent | 6bf5a3b8c6e8a5d1cb3fb4880a5d9688ab094c62 (diff) | |
download | rpi-MMU-example-ab7b754bb32022336527c1a2d5d710b95a589d0e.tar.gz rpi-MMU-example-ab7b754bb32022336527c1a2d5d710b95a589d0e.zip |
Merge branch 'bob' of https://repo.or.cz/RPi-MMU-example into alice
# Conflicts:
# .gitignore
# PL0_test.ld
# demo_functionality.c
# interrupt_vector.S
# interrupts.c
# kernel.c
# memory.h
Diffstat (limited to 'boot.S')
-rw-r--r-- | boot.S | 58 |
1 files changed, 0 insertions, 58 deletions
@@ -1,58 +0,0 @@ -// armv7 mode - -// To keep this in the first portion of the binary. -.section ".text.boot" - -//.org 0x8000 - -// Make _start global. -.globl _start - -// 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 -_start: - // Shut off extra cores - mrc p15, 0, r5, c0, c0, 5 - and r5, r5, #3 - cmp r5, #0 - bne halt - - // go to system mode - cps #0b11111 - isb - - // Setup the stack. - // It shall be directly below our kernel image - ldr r5, =__start - mov sp, r5 - - // Clear out bss. - ldr r4, =__bss_start - ldr r9, =__bss_end - mov r5, #0 - mov r6, #0 - mov r7, #0 - mov r8, #0 - b 2f - -1: - // store multiple at r4. - stmia r4!, {r5-r8} - - // If we are still below bss_end, loop. -2: - cmp r4, r9 - blo 1b - - // Call kernel_main - ldr r3, =kernel_main - bx r3 - - // halt -halt: - wfe - b halt |