Coder Social home page Coder Social logo

system-register-tools's Introduction

NOTE!!
======

Since the tools are going to access real hardware registers and may result in
unexpected behaviors, it is absolutely not allowed to be used in production
environment, but ONLY for TEST and DEBUG.

system-register-tools Build
===========================

		0. install MSR-ARM module
		1. make & make install system-register-tools

Introduction
============

system-register-tools is aiming to access the system registers for arm64
platform. It was designed by SMC (self-modify code) method to read or write
date to registers. We use this tool to replace x86 MSR-tools, and depends on
MSR-ARM module on use.

In addition, we make the usage of system-register-tools similar to MSR-tools.
For engineers familiar with MSR-tools, they can quickly install and use this
tool.

HOW-TO
======

Firstly, the system should make sure have installed the MSR-ARM module.

Next, MSR-ARM module is already installed, install system-register-tools as
follows:

		make && make install

To run this program, like follows:

		rdasr -p0 -r MPIDR_EL1

The log here:

register: MPIDR_EL1
0x80000000

For another core, likes: rdasr -p<core> -r MPIDR_EL1

In addition, writing to registers likes:

		wrasr -p0 -r <register name> <write data>

MSR TEST
========

The script in scripts/ directory is mainly used to start multiple threads to
read registers.

In addition, there is a test for all system registers:

		rdasr -t

The log here:

 0: OSDTRRX_EL1         : UNDEFINED or unreadable!
 1: DBGBVR0_EL1         : 0x0
 2: DBGBCR0_EL1         : 0x1e0
 3: DBGWVR0_EL1         : 0x0
 4: DBGWCR0_EL1         : 0x0
 5: DBGBVR1_EL1         : 0x0
 6: DBGBCR1_EL1         : 0x1e0
 7: DBGWVR1_EL1         : 0x0
 8: DBGWCR1_EL1         : 0x0
 9: MDCCINT_EL1         : 0x0
10: MDSCR_EL1           : 0x1000
11: DBGBVR2_EL1         : 0x0
...
598: ICC_IGRPEN1_EL3     : UNDEFINED or unreadable!
599: TPIDR_EL3           : UNDEFINED or unreadable!
600: SCXTNUM_EL3         : UNDEFINED or unreadable!
601: CNTPS_TVAL_EL1      : UNDEFINED or unreadable!
602: CNTPS_CTL_EL1       : UNDEFINED or unreadable!
603: CNTPS_CVAL_EL1      : UNDEFINED or unreadable!
604: CNTPS_CVAL_EL1      : UNDEFINED or unreadable!

The test ended and no system exception occurred!
Undefined or unreadable registers: 409
Readable registers: 196

Contribution
============

0. Read docs/coding_style.txt in docs/

1. Do NOT use master/dev branch for development directly:

   a. Checkout your branch from dev
   b. Doing something...
   c. Submit ONLY merge request to dev branch
   d. After reviewed by maintainers, the patch(es) will be merged into dev
   e. Only merge dev into master branch when releasing a formal version

Contributors
============

Rongwei Wang, Cao Zou, Zhuo Song

system-register-tools's People

Contributors

alibaba-oss avatar wangrongwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

system-register-tools's Issues

system-register-tool安装与A55寄存器不全问题请教下

你好,非常感谢邮件的答复
目前还有以下两个问题,对我十分重要
问题1:该工具的readme中显示next,MSR-ARM module is already installed,install system-register-tool as follows:make && make install
问怎么安装 system-register-tool ?有要求在哪个路径下吗?安装命令是make && make install ?
问题2:我看该工具registersv8.table显示的寄存器没有完全包含ARM A55的寄存器,如 ERXPFGCTL_EL1 S3_0_C15_C2_1,所以想问下,是否有A55比较全的寄存器文档?还是需要我自己一个一个的加?将寄存器加到哪些文件内?
非常期待你的答复,感谢
J
18951742957

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.