mirror of
https://github.com/MiSTer-devel/CDi_MiSTer.git
synced 2026-06-14 03:04:32 +00:00
in an attempt to fix memory errors after resets. The error is no longer occuring - .bss segment erase no longer overwrites first word of .noinit - .data segment no longer overwritten by itself Also added an endurance test which scans through the video and tries to encourage this issue
23 lines
351 B
ArmAsm
23 lines
351 B
ArmAsm
.section .init
|
|
.globl _start
|
|
_start:
|
|
# Set up the stack pointer
|
|
la sp, _stack_top
|
|
|
|
# Optionally clear .bss section
|
|
la a0, __bss_start
|
|
la a1, __bss_end
|
|
beq a0, a1, 1f
|
|
0:
|
|
sw zero, 0(a0)
|
|
addi a0, a0, 4
|
|
blt a0, a1, 0b
|
|
1:
|
|
|
|
# Jump to main()
|
|
call main
|
|
|
|
# If main returns, just loop forever
|
|
1:
|
|
j 1b
|