[Top][All Lists]

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

Re: [PATCH] target/rx/cpu: Use address_space_ldl() to read reset vector

From: Peter Maydell
Subject: Re: [PATCH] target/rx/cpu: Use address_space_ldl() to read reset vector address
Date: Mon, 16 Mar 2020 09:47:48 +0000

On Sun, 15 Mar 2020 at 13:49, Philippe Mathieu-Daudé <address@hidden> wrote:
> From: Philippe Mathieu-Daudé <address@hidden>
> The RX code flash is not a Masked ROM but a EEPROM (electrically
> erasable programmable flash memory).
> When implementing the flash hardware, the rom_ptr() returns NULL
> and the reset vector is not set.
> Instead, use the address_space ld/st API to fetch the reset vector
> address from the code flash.
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> Based-on: <address@hidden>
> Same issue might occurs in Cortex-M arm_cpu_reset()

rom_ptr() does not mean "I'm trying to get this from ROM",
it means "I'm trying to get this from a user-supplied ELF
file or similar which hasn't been loaded into guest memory
yet". (This is a workaround for a reset ordering issue where
CPU reset happens before rom_reset() runs.)

Removing the usage of rom_ptr() altogether here doesn't
look right -- have you tested the case where the initial
reset vector contents are provided via -kernel or
-device loader,... ?

-- PMM

reply via email to

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