diff options
Diffstat (limited to 'src/start.s')
-rw-r--r-- | src/start.s | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/start.s b/src/start.s index b142397..f6598ce 100644 --- a/src/start.s +++ b/src/start.s | |||
@@ -10,12 +10,20 @@ _start: | |||
10 | b halt | 10 | b halt |
11 | 11 | ||
12 | // Helper function to clear x1 bytes starting at the x0 memory address. | 12 | // Helper function to clear x1 bytes starting at the x0 memory address. |
13 | .globl memzero | ||
13 | memzero: | 14 | memzero: |
14 | str xzr, [x0], #8 | 15 | str xzr, [x0], #8 |
15 | subs x1, x1, #8 | 16 | subs x1, x1, #8 |
16 | b.gt memzero | 17 | b.gt memzero |
17 | ret | 18 | ret |
18 | 19 | ||
20 | // Helper function wait for N cycles before returning. | ||
21 | .globl delay | ||
22 | delay: | ||
23 | subs x0, x0, #1 | ||
24 | bne delay | ||
25 | ret | ||
26 | |||
19 | master: | 27 | master: |
20 | // Clear bss. | 28 | // Clear bss. |
21 | ldr x0, =__bss_start | 29 | ldr x0, =__bss_start |