[Cryptech Tech] Interactive mem tool?

Павел Шатов meisterpaul1 at yandex.ru
Thu Apr 30 20:01:49 UTC 2015


On 30.04.2015 10:28, Joachim Strömbergson wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> 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?

I think, you can use devmem2. Bunnie's configure.sh uses it to do some 
magic pokes, so you should already have a copy of it in your system.

xxx at novena-board-pavel:~/Novena/utils# ./devmem2 0x08000000 w
/dev/mem opened.
Memory mapped at address 0xb6fc2000.
Value at address 0x8000000 (0xb6fc2000): 0x50565431

You can use |grep and |cut to format output as needed.

EIM address space starts at 0x08000000. You can only access 32-bit 
values at 32-bit aligned addresses. The second parameter must be 'w' and 
addresses must end in either 0x0, 0x4, 0x8 or 0xC because of that.

--
With best regards,
Pavel Shatov


More information about the Tech mailing list