]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/loongarch/virt: Get physical entry address with elf file
authorBibo Mao <maobibo@loongson.cn>
Fri, 25 Apr 2025 02:05:04 +0000 (10:05 +0800)
committerBibo Mao <maobibo@loongson.cn>
Tue, 6 May 2025 01:17:32 +0000 (09:17 +0800)
commit73047c825e25a18127dddb89eff0c0bf97a26aed
treebc090cae5be1a8017ce94a315dead4ad875301ae
parenta41a74ca5323f4d30ac7eb48ec1d54a09fae5baa
hw/loongarch/virt: Get physical entry address with elf file

With load_elf() api, image load low address and high address is converted
to physical address if parameter translate_fn is provided. However
executing entry address is still virtual address. Here convert entry
address into physical address, since MMU is disabled when system power on,
the first PC instruction should be physical address.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Song Gao <gaosong@loongson.cn>
hw/loongarch/boot.c
tests/tcg/loongarch64/system/kernel.ld