logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

memtool - display and modify memory

Common Options For Subcommands

-b     Use byte wise (8-bit) access

       -w     Use word wise (16-bit) access

       -l     Use long wise (32-bit) access

       -q     Use quad wise (64-bit) access

       -dfilename
              Write to filename.

       -sfilename
              Read from filename.

       -x     Swap bytes at output

Description

       memtool  allows  one  to  read and write regions of files. When applied to /dev/mem (which is the default
       file) the regions represent memory mapped registers.

       There are currently two subcommands: mw to write to memory/a file; and md to read from memory/a file.

       Usually memtool operates on files (regular or  devices)  using  mmap(2).  If  filename  is  of  the  form
       mdio:ethname.id  with  ethname being the name of an ethernet device and id being an MDIO address, the phy
       with address id on the MDIO bus related to the ethernet device ethname is accessed  instead.  To  prevent
       ambiguities when using the mmap access method, use mmap:filename as parameter.

       Note  that  on some machines there are alignment restrictions that forbid for example to read a word from
       an address that is not word aligned. memtool doesn't try to be  smart  here  but  simply  tries  what  is
       requested by the caller.  This might result in all kind of errors which are not considered to be a bug of
       the tool, but either the machine or the caller.

Name

       memtool - display and modify memory

Options

-V     Dump memtool version and exit

Regions

       Memory regions can be specified in two different forms:

       start[+size]

       start-endstart  specifies  the  byte  offset  of  the  region's  beginning, i.e. the first included address.  size
       specifies the size of the region in bytes and defaults to 0x100. Alternatively end specifies  the  offset
       of  the  last  included  address.   Offsets  can be specified in decimal or hexadecimal with a prefix 0x.
       Additionally you can use suffixes G, M, and k, which multiply by 1024^3, 1024^2, and 1024 respectively.

memtool - display and modify memory               December 2015                                       memtool(1)

Synopsis

memtool-Vmemtoolmd [-b|-w|-l|-q] [-x] [-sfilename] regionmemtoolmw [-b|-w|-l|-q] [-dfilename] startdata...

See Also