memory dump

Martin Stein martin.stein at ...1...
Sat Dec 5 09:35:24 CET 2015

Hi Abhay,

Am 03.12.2015 um 16:44 schrieb Abhay Amala:
> I could put the RAM data into a file using the following snippet and get
> a file with size 268.4 MB. But when i tried to make some kind memory
> analysis on the file, i get something which is different from what i
> expect.

What is the inconsistency you're observing and what analysis methods do
you use - can you go in more detail?

> Is this snippet the right one to do memory imaging? thanks in
> advance for answers.
>          size_t size = Vm_base::ram()->size(); 
>          void* addr = (void*)Vm_base::ram()->local();
>          FILE *fd = fopen("memdump.dd", "w+b");
>          if(fd != NULL)
>                  fwrite(addr, 1, size, fd);            

Unfortunately, I'm not very used to libc file handling. However, from
what I know, this looks good. You could check whether it's correct by
executing it in a Linux (using a properly prepared RAM region).

Regarding your cache-flush SMC: Have you added a certain register value,
say r0=1234 that identifies the cache-flush SMC at the tz_vmm side? Are
you sure to do a flush of all entries of all non-secure ARM data-cache


More information about the users mailing list