[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map
From: |
Peter Maydell |
Subject: |
Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map |
Date: |
Tue, 26 Jul 2022 11:56:59 +0100 |
On Mon, 25 Jul 2022 at 18:02, Liviu Ionescu <ilg@livius.net> wrote:
> > On 25 Jul 2022, at 19:02, Peter Maydell <peter.maydell@linaro.org> wrote:
> > The one where SYS_HEAPINFO produces the bogus result putting the
> > heap at 0x04000000, that you mentioned in the original report with
> > the command line
> >
> > .../qemu-system-arm "--machine" "virt" "--cpu" "cortex-a15"
> > "--nographic" "-d" "unimp,guest_errors" "--semihosting-config"
> > "enable=on,target=native,arg=sample-test,arg=one,arg=two" -s -S
>
> ah, the bogus one... that's a bit more complicated, since it happened in the
> early tests, and I don't remember how I did it, it might be that I tried to
> load my code in flash and my data in ram, but I'm not sure.
>
> try to check the logic and avoid the cases when flash addresses are returned
> for heap, if possible.
I've looked at the code, and done some stepping about in the debugger,
and as far as I can tell it should never be possible for the heap
to be returned as being in flash memory: the flash device MemoryRegions
are created with 'mr->ram' false, and the code in common_semi_find_bases()
ignores regions where mr->ram is false.
Clearly something is going wrong with your test binary, but it's
not the straightforward "we weren't ignoring the flash memory blocks"
that I thought it was, and so without a reproducible test case I
can't really do anything more with this :-(
If you're able to figure out what your original failing binary
setup was and repro the problem again, please send me the executable.
thanks
-- PMM