riscv-software-src / opensbi

RISC-V Open Source Supervisor Binary Interface
Other
1.02k stars 507 forks source link

Does the stack area and scratch area cover the code area? #267

Open kaichentao opened 2 years ago

kaichentao commented 2 years ago

`lla tp, _fw_end mul a5, s7, s8 add tp, tp, a5 / Keep a copy of tp / add t3, tp, zero / Counter / li t2, 1 / hartid 0 is mandated by ISA / li t1, 0 _scratch_init: /*

avpatel commented 2 years ago

Per-HART stack area covers both sbi_scratch and stack.

The sbi_scratch is at the top and stack decrements from end of sbi_scratch

None of the per-HART stack area cover code.

Regards, Anup