GithubHelp home page GithubHelp logo

pengutronix / memtool Goto Github PK

View Code? Open in Web Editor NEW
23.0 10.0 8.0 370 KB

memtool is a program that allows to access memory mapped registers.

License: GNU General Public License v2.0

Makefile 2.08% M4 4.58% Roff 8.98% C 84.37%
hacktoberfest

memtool's Introduction

memtool

memtool is a program that allows to access memory mapped registers. This is useful to inspect and modify registers from the command line.

By default memtool uses /dev/mem to operate. So to actually work you need to have DEVMEM enabled in the kernel. Note that depending on further kernel configuration you can only access unused io-memory, see the kernel configuration knobs IO_STRICT_DEVMEM and STRICT_DEVMEM. Also note that there might be further restrictions. E.g. on several i.MX ARM SoCs register access is not possible from user mode for certain areas unless configured otherwise.

memtool can also operate on plain files, and access PHY registers (via the ioctls SIOCSMIIREG and SIOCGMIIREG).

Examples

  • Write a 32-bit wide 0 to register at address 0x73f00040

    # memtool mw -l 0x73f00040 0
  • Read the first two registers of the default PHY attached to network device eth0:

    # memtool md -s mdio:eth0. -w 0+4
  • Place a (usually red) dot on the framebuffer:

    # memtool mw -d /dev/fb0 -w 0 0xfc00

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.