[Cryptech Tech] Interactive mem tool?

Paul Selkirk paul at psgd.org
Fri May 1 03:58:50 UTC 2015


I hacked that a while ago, while we were thrashing with EIM.

root at quantum-biosys-novena:~# ./mmap
usage: ./mmap r offset length [size]
usage: ./mmap w offset value [size]

root at quantum-biosys-novena:~# ./mmap r 0x08000000 12 4
50565431 20202020 302e3130

This is reading the name and version words for the board:
"PVT1", "    ", "0.10"

The one caveat is that it expects the EIM bus to already be set up.

As Pavel says, devmem2 does a similar thing (probably in a similar way;
I haven't looked at the source), but this lets you read memory ranges.

				paul

On 04/30/2015 03:28 AM, Joachim Strömbergson wrote:
> Aloha!
> 
> One thing I found myself yearning for when working with cryptech and the
> novena is a good old machine code monitor. Not really a full blown one,
> but just be able to dump memory regions and write words.
> 
> The exact purpose would of course be able to talk interactively to the
> cores in the FPGA. For example dump a memory area to see that I get the
> expected core name and version, write to a control register or read from
> a status register.
> 
> It should be fairly easy to implement I think. Esp. if we only want to
> do basically to types of commands:
> 
>> r 0x11223344 - 0x11224455
> 0x11223344: 0x00000000 0x55aa55aa 0x00000000 0xffffffff
> ...
> 
>> w 0x11223344 0xdeadbeef
> 0x11223344: 0xdeadbeef
> 
> That is be able to dump a range (one to whatever num words). And the
> write a single word to a given address. The tool might read back the
> result to show the value after write to the specified address.
> 
> 
> I've searched and asked around for such a tool but so far turned up
> nothing really useful. Have you seen or have such a tool?
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mmap.c
Type: text/x-csrc
Size: 3299 bytes
Desc: not available
URL: <https://lists.cryptech.is/archives/tech/attachments/20150430/c097c4d4/attachment-0001.c>


More information about the Tech mailing list