aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/virt-acpi-build.c
diff options
context:
space:
mode:
authorJason Chien <jason.chien@sifive.com>2024-02-07 16:18:08 +0800
committerAlistair Francis <alistair.francis@wdc.com>2024-03-08 15:37:20 +1000
commit3011c1dd9c807cf41997d13c9244ea4e92237575 (patch)
tree4b812efae1cd41e15b19eaab87fb9efb75af6dc6 /hw/arm/virt-acpi-build.c
parent8f6330a807f2642dc2a3cdf33347aa28a4c00a87 (diff)
target/riscv: Update $ra with current $pc in trans_cm_jalt()
The original implementation sets $pc to the address read from the jump vector table first and links $ra with the address of the next instruction after the updated $pc. After jumping to the updated $pc and executing the next ret instruction, the program jumps to $ra, which is in the same function currently executing, which results in an infinite loop. This commit stores the jump address in a temporary, updates $ra with the current $pc, and copies the temporary to $pc. Signed-off-by: Jason Chien <jason.chien@sifive.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240207081820.28559-1-jason.chien@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/arm/virt-acpi-build.c')
0 files changed, 0 insertions, 0 deletions