riscv: Fix clear bss loop in the start-up code
authorRick Chen <rick@andestech.com>
Thu, 14 Nov 2019 05:52:27 +0000 (13:52 +0800)
committerAndes <uboot@andestech.com>
Tue, 10 Dec 2019 00:23:10 +0000 (08:23 +0800)
commit444c46413fb691c7abbb2bec3ed498ab08fa36f8
tree6649bffbc1673264e11cd66d362c74e53508a289
parent31dae22faa65534cb71631f6c74cbdcf4930a339
riscv: Fix clear bss loop in the start-up code

For RV64, it will use sd instruction to clear t0
register, and the increament will be 8 bytes. So
if the difference between__bss_strat and __bss_end
was not 8 bytes aligned, the clear bss loop will
overflow and acks like system hang.

Signed-off-by: Rick Chen <rick@andestech.com>
Cc: KC Lin <kclin@andestech.com>
Cc: Alan Kao <alankao@andestech.com>
arch/riscv/cpu/start.S
arch/riscv/cpu/u-boot-spl.lds
arch/riscv/cpu/u-boot.lds