> On 08 Jun 2015, at 22:08, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On 8 June 2015 at 19:48, Liviu Ionescu <i...@livius.net> wrote: >>> On 08 Jun 2015, at 21:36, Peter Maydell <peter.mayd...@linaro.org> wrote: >>> >>> OK, so the problem diagnosis is right. I'm playing around with >>> a patch which postpones PC/SP load until we start execution. >> >> but is this really necessary? >> >> the configuration at the moment cpu_reset is called is perfectly >> stable, all memory regions are defined, the image was loaded, etc. > > No, the image hasn't been loaded into RAM yet, that's why > the ldl_phys codepath doesn't work.
aha, in this case the problem is the two step load, not the reset itself, or even more accurate, it is a problem of making the reset calls in the proper order. > In particular, data is > only copied into guest ram in the rom_reset() function, which > may be and in practice is called after the arm_cpu_reset() > function. would it be possible to explicitly call rom_reset before arm_cpu_reset? > What does it do if the reset vector isn't readable (ie > reading it faults)? I don't know, but for devices with internal flash it would be highly unlikely to fault, the memory is always there. regards, Liviu