mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
libbase/crt0-picorv32: Ensure BSS is cleared on boot.
This commit is contained in:
parent
f69bd877b9
commit
77389d27b5
1 changed files with 8 additions and 0 deletions
|
@ -180,6 +180,14 @@ _crt0:
|
|||
la t1, _irq_mask
|
||||
sw t0, 0(t1)
|
||||
|
||||
/* Clear BSS */
|
||||
la t0, _fbss
|
||||
la t1, _ebss
|
||||
2:
|
||||
sw zero, 0(t0)
|
||||
addi t0, t0, 4
|
||||
bltu t0, t1, 2b
|
||||
|
||||
/* set main stack */
|
||||
la sp, _fstack
|
||||
|
||||
|
|
Loading…
Reference in a new issue