CN107133138A - The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method - Google Patents

The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method Download PDF

Info

Publication number
CN107133138A
CN107133138A CN201710308206.4A CN201710308206A CN107133138A CN 107133138 A CN107133138 A CN 107133138A CN 201710308206 A CN201710308206 A CN 201710308206A CN 107133138 A CN107133138 A CN 107133138A
Authority
CN
China
Prior art keywords
file
tool
readmsr
register
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710308206.4A
Other languages
Chinese (zh)
Inventor
韩燕燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710308206.4A priority Critical patent/CN107133138A/en
Publication of CN107133138A publication Critical patent/CN107133138A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法,实现过程为:首先选择编程环境,创建数据包;然后在数据包里创建.dec.dsc.inf.c格式的文件,编写code标签;完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具。本发明的一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法与现有技术相比,适用于读取Intel CPU的Msr寄存器的测试和debug,无需串口设备和控制端机台,节约时间,降低成本,整个实现过程只需在shell下运行即可,无需其他额外设备,简单方便,实用性强。The invention discloses a tool implementation and usage method for reading Intel CPU Msr registers under a shell. The implementation process is as follows: firstly, a programming environment is selected, and a data packet is created; File, write code tags; after completion, compile and generate a tool for reading Intel CPU Msr registers in cmd. Under a kind of shell of the present invention, the tool realization and using method of reading Intel CPU Msr register are compared with prior art, be applicable to the test and debug of reading the Msr register of Intel CPU, do not need serial device and control terminal machine platform, save Save time, reduce cost, the whole implementation process only needs to be run under the shell, no other additional equipment is needed, it is simple, convenient and practical.

Description

一种shell下读取Intel CPU Msr寄存器的工具实现及使用 方法Implementation and use of a tool for reading Intel CPU Msr registers under the shell method

技术领域technical field

本发明涉及计算机服务器技术领域,具体地说是一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法。The invention relates to the technical field of computer servers, in particular to a tool realization and usage method for reading Intel CPU Msr registers under a shell.

背景技术Background technique

服务器如今已经在很多领域得到应用,尤其是互联网领域。服务器BIOS setup下的选项会和Intel CPU Msr寄存器相关联,在测试过程中有些选项需要确定是否与寄存器的参数保持一致,这就需要读取寄存器的数据;另外选项有功能性缺陷时也需要确认寄存器数据进行debug。传统方法是利用串口线和控制端设备导出串口信息,然后查看串口信息获取寄存器数据,这样比较费时费力。Servers are now used in many fields, especially in the Internet field. The options under the server BIOS setup will be associated with the Intel CPU Msr register. During the test, some options need to be determined whether they are consistent with the parameters of the register, which requires reading the data of the register; in addition, when the option has a functional defect, it also needs to be confirmed. Register data for debugging. The traditional method is to use the serial port cable and the control terminal device to export the serial port information, and then check the serial port information to obtain the register data, which is time-consuming and laborious.

基于此,本发明提供一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法。Based on this, the present invention provides a tool realization and usage method for reading the Intel CPU Msr register under the shell.

发明内容Contents of the invention

本发明的技术任务是针对以上不足之处,提供一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法。The technical task of the present invention is to provide a kind of tool realization and using method of reading Intel CPU Msr register under the shell to the above deficiencies.

一种shell下读取Intel CPU Msr寄存器的工具实现方法,其实现过程为:首先选择编程环境,创建数据包;然后在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签;完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具。A tool implementation method for reading Intel CPU Msr registers under a shell, the implementation process is: firstly select a programming environment, create a data package; then create files in .dec, .dsc, .inf, and .c formats in the data package, Write the code label; after completion, compile and generate a tool for reading the Intel CPU Msr register in cmd.

所述创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。The process of creating .dec, .dsc, .inf, and .c format files is as follows: create a data package package file named ReadMsrPkg in the programming environment, open the folder to create Include, ReadMsr folders, and then create ReadMsrPkg.dec, ReadMsrPkg.dsc file, create ReadMsr.c and ReadMsr.inf files in ReadMsr.

编译生成读取Intel CPU Msr寄存器的工具过程为:The process of compiling and generating the tool to read the Intel CPU Msr register is:

在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c;

在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file;

在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file;

在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file;

完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell.

获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。Obtaining the effective address of the register to be read refers to obtaining the offset of the msr register searched by the user through the above ReadMsr.efi file.

一种shell下读取Intel CPU Msr寄存器的工具使用方法,其实现步骤为:A method for using a tool for reading Intel CPU Msr registers under a shell, the implementation steps of which are as follows:

一、首先选择编程环境,创建数据包,在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签,完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具;1. First select the programming environment, create a data package, create .dec, .dsc, .inf, .c format files in the data package, write code tags, and compile in cmd to generate a tool for reading Intel CPU Msr registers ;

二、将工具存放在移动介质中,进入shell;2. Store the tool in the removable medium and enter the shell;

三、在shell环境下读取移动介质,打开编译生成的读取工具;3. Read the removable media in the shell environment, and open the reading tool generated by compilation;

四、获取要读取的寄存器的有效地址,在shell环境下运行读取工具,输入读取寄存器的有效范围;4. Obtain the effective address of the register to be read, run the read tool in the shell environment, and input the effective range of the read register;

五、通过读取工具完成对寄存器的读取。5. Complete the reading of the register through the reading tool.

所述移动介质采用U盘、移动硬盘、存储卡中的一种。The mobile medium adopts one of a U disk, a mobile hard disk, and a memory card.

步骤一中创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。The process of creating .dec, .dsc, .inf, and .c format files in step 1 is: create a data package package file named ReadMsrPkg in the programming environment, open the folder to create Include, ReadMsr folders, and then create ReadMsrPkg.dec , ReadMsrPkg.dsc file, and create ReadMsr.c and ReadMsr.inf files in ReadMsr.

编译生成读取Intel CPU Msr寄存器的工具过程为:The process of compiling and generating the tool to read the Intel CPU Msr register is:

在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c;

在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file;

在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file;

在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file;

完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell.

获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。Obtaining the effective address of the register to be read refers to obtaining the offset of the msr register searched by the user through the above ReadMsr.efi file.

本发明的一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法和现有技术相比,具有以下有益效果:Under a kind of shell of the present invention, read the tool implementation of Intel CPU Msr register and use method compared with prior art, have following beneficial effect:

本发明的一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法,适用于读取Intel CPU的Msr寄存器的测试和debug,无需串口设备和控制端机台,节约时间,降低成本,整个实现过程只需在shell下运行即可,无需其他额外设备,简单方便,实用性强,适用范围广泛,具有很好的推广应用价值。A kind of tool realization and using method of reading Intel CPU Msr register under a kind of shell of the present invention is applicable to the test and debug of reading the Msr register of Intel CPU, does not need serial device and control end machine, saves time, reduces cost, and the whole The implementation process only needs to be run under the shell, without other additional equipment, simple and convenient, strong practicability, wide application range, and good promotion and application value.

具体实施方式detailed description

下面结合具体实施例对本发明作进一步说明。The present invention will be further described below in conjunction with specific examples.

一种shell下读取Intel CPU Msr寄存器的工具实现及使用方法,运用虚拟化平台搭建虚拟机用来模拟真实的服务器设备,并在虚拟机上运用测试脚本,运行测试脚本,从而完成对某种存储设备进行IO性能测试。A tool implementation and usage method for reading Intel CPU Msr registers under the shell, using a virtualization platform to build a virtual machine to simulate a real server device, and using a test script on the virtual machine to run the test script, thereby completing a certain Perform IO performance tests on storage devices.

一种shell下读取Intel CPU Msr寄存器的工具实现方法,其实现过程为:首先选择编程环境,创建数据包;然后在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签;完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具。A tool implementation method for reading Intel CPU Msr registers under a shell, the implementation process is: firstly select a programming environment, create a data package; then create files in .dec, .dsc, .inf, and .c formats in the data package, Write the code label; after completion, compile and generate a tool for reading the Intel CPU Msr register in cmd.

所述创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。The process of creating .dec, .dsc, .inf, and .c format files is as follows: create a data package package file named ReadMsrPkg in the programming environment, open the folder to create Include, ReadMsr folders, and then create ReadMsrPkg.dec, ReadMsrPkg.dsc file, create ReadMsr.c and ReadMsr.inf files in ReadMsr.

编译生成读取Intel CPU Msr寄存器的工具过程为:The process of compiling and generating the tool to read the Intel CPU Msr register is:

在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c;

在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file;

在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file;

在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file;

完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell.

获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。Obtaining the effective address of the register to be read refers to obtaining the offset of the msr register searched by the user through the above ReadMsr.efi file.

实施例:Example:

EDKⅡ的MyWorkSpace文件夹里创建package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。Create a package file in the MyWorkSpace folder of EDKⅡ and name it ReadMsrPkg, open the folder to create Include and ReadMsr folders, then create ReadMsrPkg.dec and ReadMsrPkg.dsc files, and create ReadMsr.c and ReadMsr.inf files in ReadMsr.

在ReadMsr.c编写读取Intel Msr寄存器的主程序,调用的.h文件都需附加到程序。Write the main program for reading the Intel Msr register in ReadMsr.c, and all the .h files called need to be attached to the program.

在ReadMsr.inf文件中添加上.c文件和调用的.dec文件。Add the .c file and the called .dec file in the ReadMsr.inf file.

在ReadMsrPkg.dec文件中添加上要编译的.inf文件。Add the .inf file to be compiled in the ReadMsrPkg.dec file.

在ReadMsrPkg.dsc文件的定义中加上创建的package。Add the created package to the definition of the ReadMsrPkg.dsc file.

完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后在MyWorkSpace的build的文件里找到创建的ReadMsr.efi文件,即为在shell下读取IntelCPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file in the build file of MyWorkSpace after the compilation is completed, which is a tool for reading the Msr register of IntelCPU under the shell.

一种shell下读取Intel CPU Msr寄存器的工具使用方法,其实现步骤为:A method for using a tool for reading Intel CPU Msr registers under a shell, the implementation steps of which are as follows:

一、首先选择编程环境,创建数据包,在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签,完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具;1. First select the programming environment, create a data package, create .dec, .dsc, .inf, .c format files in the data package, write code tags, and compile in cmd to generate a tool for reading Intel CPU Msr registers ;

二、将工具存放在移动介质中,进入shell;2. Store the tool in the removable medium and enter the shell;

三、在shell环境下读取移动介质,打开编译生成的读取工具;3. Read the removable media in the shell environment, and open the reading tool generated by compilation;

四、获取要读取的寄存器的有效地址,在shell环境下运行读取工具,输入读取寄存器的有效范围;4. Obtain the effective address of the register to be read, run the read tool in the shell environment, and input the effective range of the read register;

五、通过读取工具完成对寄存器的读取。5. Complete the reading of the register through the reading tool.

所述移动介质采用U盘、移动硬盘、存储卡中的一种。The mobile medium adopts one of a U disk, a mobile hard disk, and a memory card.

步骤一中创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。The process of creating .dec, .dsc, .inf, and .c format files in step 1 is: create a data package package file named ReadMsrPkg in the programming environment, open the folder to create Include, ReadMsr folders, and then create ReadMsrPkg.dec , ReadMsrPkg.dsc file, and create ReadMsr.c and ReadMsr.inf files in ReadMsr.

编译生成读取Intel CPU Msr寄存器的工具过程为:The process of compiling and generating the tool to read the Intel CPU Msr register is:

在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c;

在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file;

在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file;

在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file;

完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell.

获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。Obtaining the effective address of the register to be read refers to obtaining the offset of the msr register searched by the user through the above ReadMsr.efi file.

实施例:Example:

本发明利用EDKⅡ的MyWorkSpace编程环境创建自己的package,在package里创建.dec、dsc、.inf、.c格式的文件,编写code,完成后在cmd里编译生成.efi文件,.efi文件就是读取Intel CPU Msr寄存器的工具。The present invention uses the MyWorkSpace programming environment of EDKⅡ to create its own package, create files in .dec, dsc, .inf, and .c formats in the package, write code, and compile and generate .efi files in cmd after completion. The .efi file is read A tool for fetching Intel CPU Msr registers.

将tool放在U盘,进入shell。Put the tool on the U disk and enter the shell.

在Shell下打开U盘:fxX(X:代表0,1,2…)->ls,会看到工具ReadMsr.efi。Open the U disk under Shell: fxX (X: stands for 0,1,2…)->ls, you will see the tool ReadMsr.efi.

根据CPU的spec查找确定自己要读取的寄存器的offset,然后shell下运行该tool。shell下运行ReadMsr.efi -会提示输入的offset的有效范围。Determine the offset of the register you want to read according to the CPU spec search, and then run the tool under the shell. Run ReadMsr.efi under the shell - it will prompt the effective range of the input offset.

运行ReadMsr.efi offset(offset为使用者要查找的msr寄存器的偏移量,必须为有效寄存器)Run ReadMsr.efi offset (offset is the offset of the msr register that the user wants to find, it must be a valid register)

注明:offset必须为有效的寄存器的地址,如果不是有效地址会导致宕机。Note: offset must be the address of a valid register, if it is not a valid address, it will cause a crash.

通过上面具体实施方式,所述技术领域的技术人员可容易的实现本发明。但是应当理解,本发明并不限于上述的具体实施方式。在公开的实施方式的基础上,所述技术领域的技术人员可任意组合不同的技术特征,从而实现不同的技术方案。Through the above specific implementation manners, those skilled in the technical field can easily realize the present invention. However, it should be understood that the present invention is not limited to the specific embodiments described above. On the basis of the disclosed embodiments, those skilled in the art can arbitrarily combine different technical features, so as to realize different technical solutions.

除说明书所述的技术特征外,均为本专业技术人员的已知技术。Except for the technical features described in the instructions, all are known technologies by those skilled in the art.

Claims (9)

1.一种shell下读取Intel CPU Msr寄存器的工具实现方法,其特征在于,其实现过程为:首先选择编程环境,创建数据包;然后在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签;完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具。1. under a kind of shell, read the tool realization method of Intel CPU Msr register, it is characterized in that, its realization process is: at first select programming environment, create data packet; Create .dec, .dsc, .inf, .c format file, write the code label; after completion, compile in cmd to generate a tool for reading the Intel CPU Msr register. 2.根据权利要求1所述的一种shell下读取Intel CPU Msr寄存器的工具实现方法,其特征在于,所述创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。2. under a kind of shell according to claim 1, read the tool realization method of Intel CPU Msr register, it is characterized in that, the described process of creating .dec, .dsc, .inf, .c format file is: in programming Create a data package package file in the environment named ReadMsrPkg, open the folder to create Include, ReadMsr folders, then create ReadMsrPkg.dec, ReadMsrPkg.dsc files, and create ReadMsr.c, ReadMsr.inf files in ReadMsr. 3.根据权利要求2所述的一种shell下读取Intel CPU Msr寄存器的工具实现方法,其特征在于,编译生成读取Intel CPU Msr寄存器的工具过程为:3. under a kind of shell according to claim 2, read the tool implementation method of Intel CPU Msr register, it is characterized in that, compile and generate and read the tool process of Intel CPU Msr register as: 在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c; 在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file; 在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file; 在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file; 完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell. 4.根据权利要求3所述的一种shell下读取Intel CPU Msr寄存器的工具实现方法,其特征在于,获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。4. the implement method of reading Intel CPU Msr register under a kind of shell according to claim 3 is characterized in that, obtaining the effective address of the register to be read refers to by above-mentioned ReadMsr.efi file, obtains the user to search The offset of the msr register. 5.一种shell下读取Intel CPU Msr寄存器的工具使用方法,其特征在于,其实现步骤为:5. a method for using a tool for reading the Intel CPU Msr register under a shell, characterized in that, its implementation steps are: 一、首先选择编程环境,创建数据包,在数据包里创建.dec、.dsc、.inf、.c格式的文件,编写code标签,完成后在cmd里编译生成读取Intel CPU Msr寄存器的工具;1. First select the programming environment, create a data package, create .dec, .dsc, .inf, .c format files in the data package, write code tags, and compile in cmd to generate a tool for reading Intel CPU Msr registers ; 二、将工具存放在移动介质中,进入shell;2. Store the tool in the removable medium and enter the shell; 三、在shell环境下读取移动介质,打开编译生成的读取工具;3. Read the removable media in the shell environment, and open the reading tool generated by compilation; 四、获取要读取的寄存器的有效地址,在shell环境下运行读取工具,输入读取寄存器的有效范围;4. Obtain the effective address of the register to be read, run the read tool in the shell environment, and input the effective range of the read register; 五、通过读取工具完成对寄存器的读取。5. Complete the reading of the register through the reading tool. 6.根据权利要求5所述的一种shell下读取Intel CPU Msr寄存器的工具使用方法,其特征在于,所述移动介质采用U盘、移动硬盘、存储卡中的一种。6. the tool usage method of reading the Intel CPU Msr register under a kind of shell according to claim 5, is characterized in that, described mobile medium adopts a kind of in U disk, mobile hard disk, memory card. 7.根据权利要求5所述的一种shell下读取Intel CPU Msr寄存器的工具使用方法,其特征在于,步骤一中创建.dec、.dsc、.inf、.c格式文件的过程为:在编程环境中创建数据包package文件命名为ReadMsrPkg,打开文件夹创建Include、ReadMsr文件夹,然后在创建ReadMsrPkg.dec、ReadMsrPkg.dsc文件,在ReadMsr里边建立ReadMsr.c、ReadMsr.inf文件。7. the tool usage method of reading Intel CPU Msr register under a kind of shell according to claim 5, it is characterized in that, the process of creating .dec, .dsc, .inf, .c format files in step 1 is: in Create a data package package file in the programming environment and name it ReadMsrPkg, open the folder to create the Include and ReadMsr folders, then create ReadMsrPkg.dec and ReadMsrPkg.dsc files, and create ReadMsr.c and ReadMsr.inf files in ReadMsr. 8.根据权利要求7所述的一种shell下读取Intel CPU Msr寄存器的工具使用方法,其特征在于,编译生成读取Intel CPU Msr寄存器的工具过程为:8. under a kind of shell according to claim 7, read the tool usage method of Intel CPU Msr register, it is characterized in that, compile and generate and read the tool process of Intel CPU Msr register as: 在ReadMsr.c中编写读取Intel Msr寄存器的主程序;Write the main program to read the Intel Msr register in ReadMsr.c; 在ReadMsr.inf文件中添加上.c文件和调用的.dec文件;Add the .c file and the called .dec file in the ReadMsr.inf file; 在ReadMsrPkg.dec文件中添加上要编译的.inf文件;Add the .inf file to be compiled in the ReadMsrPkg.dec file; 在ReadMsrPkg.dsc文件的定义中加上创建的package;Add the created package to the definition of the ReadMsrPkg.dsc file; 完成之后在运行里输入cmd,进入编译环境,编译.dsc文件,编译完成后找到创建的ReadMsr.efi文件,该文件即为在shell下读取Intel CPU的Msr寄存器的工具。After the completion, enter cmd in the running, enter the compilation environment, compile the .dsc file, and find the created ReadMsr.efi file after the compilation is completed, which is a tool for reading the Msr register of the Intel CPU under the shell. 9.根据权利要求8所述的一种shell下读取Intel CPU Msr寄存器的工具使用方法,其特征在于,获取要读取的寄存器的有效地址是指通过上述ReadMsr.efi文件,获取使用者查找的msr寄存器的偏移量。9. the method for using the tool for reading the Intel CPU Msr register under a kind of shell according to claim 8, is characterized in that, obtaining the effective address of the register to be read refers to obtaining the user's search by the above-mentioned ReadMsr.efi file The offset of the msr register.
CN201710308206.4A 2017-05-04 2017-05-04 The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method Pending CN107133138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710308206.4A CN107133138A (en) 2017-05-04 2017-05-04 The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710308206.4A CN107133138A (en) 2017-05-04 2017-05-04 The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method

Publications (1)

Publication Number Publication Date
CN107133138A true CN107133138A (en) 2017-09-05

Family

ID=59716262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710308206.4A Pending CN107133138A (en) 2017-05-04 2017-05-04 The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method

Country Status (1)

Country Link
CN (1) CN107133138A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2210800A1 (en) * 1972-12-18 1974-07-12 Shell Int Research
CN103220192A (en) * 2013-05-10 2013-07-24 上海斐讯数据通信技术有限公司 Testing method of switch configuration
CN103809983A (en) * 2014-02-27 2014-05-21 山东超越数控电子有限公司 Method for modifying BIOS SETUP interface
CN106155755A (en) * 2015-06-03 2016-11-23 上海红神信息技术有限公司 Program compiling method and compiler

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2210800A1 (en) * 1972-12-18 1974-07-12 Shell Int Research
CN103220192A (en) * 2013-05-10 2013-07-24 上海斐讯数据通信技术有限公司 Testing method of switch configuration
CN103809983A (en) * 2014-02-27 2014-05-21 山东超越数控电子有限公司 Method for modifying BIOS SETUP interface
CN106155755A (en) * 2015-06-03 2016-11-23 上海红神信息技术有限公司 Program compiling method and compiler

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YOUYUDEXIAOWANGZI: ""编译第一个uefi文件"", 《CSDN博客 HTTPS://BLOG.CSDN.NET/YOUYUDEXIAOWANGZI/ARTICLE/DETAILS/41845969》 *
张琼: ""一种在UEFI BIOS Shell下除错工具的设计与实现"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Similar Documents

Publication Publication Date Title
CN111756575A (en) Performance analysis method and device for storage server, and electronic equipment
CN104182269B (en) Physical memory forensic method for KVM (Kernel-based Virtual Machine)
CN104346274B (en) Program debugger and a kind of adjustment method of program
CN104965750B (en) Rapidio switch logical simulation verification platforms and method based on Python
TW201933110A (en) Method and system for testing firmware of solid-state storage device, and electronic apparatus
CN102623069B (en) Random excitation flash model verification method
CN102866950B (en) A kind of performance test methods of virtual server and testing tool
CN106649092A (en) Test script generation method, web page testing method, device and system
CN102841837B (en) Software and hardware co-verification method based on simulator and system thereof
CN104778419A (en) User privacy data protection method based on dynamic data flow tracking under cloud environment
CN105741883A (en) Test method and device
CN105069227A (en) Method for building function verification platform based on WISHBONE bus design
CN107301127A (en) A kind of method and apparatus of the automatic test based on Robot Framework
CN109960648A (en) Application testing method and device
CN108984421A (en) A kind of information cuing method and device
US20140229923A1 (en) Commit sensitive tests
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
CN106951349A (en) A kind of method and apparatus for carrying out cpu test to domestic server using SPEC CPU
CN106776281A (en) A kind of instruction set simulator verification method based on source code pitching pile
CN119088631A (en) A chip register verification method, device, equipment and medium
CN106021047A (en) Method and apparatus for processing hard disk test data
CN112363875B (en) System defect detection method, device, electronic device and storage medium
TW201241622A (en) System and method for debugging programs
JP5551828B2 (en) Replay architecture execution with probeless trace collection
CN107133138A (en) The instrument that Intel CPU Msr registers are read under a kind of shell is realized and application method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170905

RJ01 Rejection of invention patent application after publication