[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting

From: Julia Suvorova
Subject: Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix PC overwriting
Date: Wed, 16 Jan 2019 22:05:58 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 16.01.2019 0:51, Alistair Francis wrote:
On Tue, Jan 15, 2019 at 7:04 AM Julia Suvorova via Qemu-devel
<address@hidden> wrote:

If the memory is set using a file, and PC is specified on the command
line, it will be overwritten with the value 'entry'. This is not only
illogical, but also incorrect, because the load_ * functions do not take
into account the specifics of the ARM-M PC.

How does this come up?
I see that the value of entry will force overwrite the PC addr, but
doesn't force_raw fix that? Is there a common use case of loading an
ELF/uimage but having to manually specify a start address?

generic_loader_reset() is called after arm_cpu_reset() and damages PC
(it is wrong to call arm_cpu_set_pc() with entry to set ARM PC reset
value). Therefore, I tried to configure PC manually and ran into this

By the way, I do not know the right way to fix the original issue. Try
to replace generic_loader_reset() with the device reset function or
change the reset order or transfer PC reset value setting to a separate
function and associate it with cpu. What do you think about it?

Best regards, Julia Suvorova.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]