[Top][All Lists]

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

Re: Added on-chip ram, but can't load program there..

From: Peter Maydell
Subject: Re: Added on-chip ram, but can't load program there..
Date: Thu, 25 Mar 2021 11:01:26 +0000

On Thu, 25 Mar 2021 at 10:19, <ckim@etri.re.kr> wrote:
> I have added iram (on-chip ram) to our machine (copy of ‘virt’) and intended 
> the program #1 (containing .data, .bss and other read-write data sections) to 
> be loaded on that memory.
> The iram range is from 0x04000000 with size 0x80000 (it’s big enough).
> But the program #1 is not loaded on iram. Using the gdb, when I examine the 
> memory, (using compare-sections, and ‘x’ command) I can see that range 
> (0x04000000 - ) has mismatch from the program start..

You've made the memory visible only to the Secure world. The
usual ELF loader (-kernel, etc) loads the guest image as if it
were being written by the CPU in NonSecure (roughly speaking).
So the ELF loader doesn't see Secure-only RAM.

I don't think there's a way to load a file to secure-only memory,
unless the board code has provided a mechanism for eg putting the
-bios image there, as the virt board does with the first flash device.

(If you didn't mean this memory to be Secure only, put it in the
sysmem MemoryRegion rather than the secure_sysmem MR.)

-- PMM

reply via email to

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