mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-10-01 05:45:38 +00:00
Merge pull request #32 from tillitis/clear-ram
FW: Clear all RAM during start
This commit is contained in:
commit
ff1bf1f326
@ -38,6 +38,14 @@ _start:
|
|||||||
li x30,0
|
li x30,0
|
||||||
li x31,0
|
li x31,0
|
||||||
|
|
||||||
|
/* Clear all RAM */
|
||||||
|
li a0, 0x40000000 // RAM base
|
||||||
|
li a1, 0x40020000 // To end of SRAM
|
||||||
|
clear:
|
||||||
|
sw zero, 0(a0)
|
||||||
|
addi a0, a0, 4
|
||||||
|
blt a0, a1, clear
|
||||||
|
|
||||||
/* init stack to right under where we load app at 0x40010000 */
|
/* init stack to right under where we load app at 0x40010000 */
|
||||||
li sp, 0x4000fff0
|
li sp, 0x4000fff0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user