[go: up one dir, main page]

CN112765021A - Debugging and checking method, device, equipment and storage medium of boot program - Google Patents

Debugging and checking method, device, equipment and storage medium of boot program Download PDF

Info

Publication number
CN112765021A
CN112765021A CN202110057755.5A CN202110057755A CN112765021A CN 112765021 A CN112765021 A CN 112765021A CN 202110057755 A CN202110057755 A CN 202110057755A CN 112765021 A CN112765021 A CN 112765021A
Authority
CN
China
Prior art keywords
program
abnormal
boot program
debugging
control instruction
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.)
Withdrawn
Application number
CN202110057755.5A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110057755.5A priority Critical patent/CN112765021A/en
Publication of CN112765021A publication Critical patent/CN112765021A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3644Debugging of software by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3648Debugging of software using additional hardware
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/366Debugging of software using diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种引导程序的调试检验方法,包括:获取引导程序,并将引导程序输入至预设仿真验证平台;利用预设仿真验证平台的处理器运行引导程序;当预设仿真验证平台出现运行异常时,根据处理器中的PC指针寄存器逐级分析引导程序的每一条控制指令的执行情况,确定出异常控制指令;根据异常控制指令确定出引导程序的异常定位。本方法能够在对引导程序进行调试检验时,能够更精准地对引导程序进行异常定位,进而提高对引导程序进行debug的便捷度。本申请还公开了一种引导程序的调试检验装置、设备及计算机可读存储介质,均具有上述有益效果。

Figure 202110057755

The present application discloses a method for debugging and verifying a bootstrap program, including: acquiring a bootstrap program, and inputting the bootstrap program into a preset simulation verification platform; running the bootstrap program by using a processor of the preset simulation verification platform; When an abnormal operation occurs, the execution of each control instruction of the boot program is analyzed step by step according to the PC pointer register in the processor, and the abnormal control instruction is determined; the abnormal location of the boot program is determined according to the abnormal control instruction. The method can more accurately locate the abnormality of the bootstrap program when debugging and inspect the bootstrap program, thereby improving the convenience of debugging the bootstrap program. The present application also discloses a boot program debugging and checking device, device and computer-readable storage medium, all of which have the above beneficial effects.

Figure 202110057755

Description

Debugging and checking method, device, equipment and storage medium of boot program
Technical Field
The present invention relates to the field of program inspection, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for debugging and inspecting a boot program.
Background
The BMC (Baseboard Management Controller) is an essential part in a server architecture, and mainly implements control, monitoring, and the like of a server. Generally, in a server architecture, a BMC belongs to an independent System presented in a form of a Chip, and the BMC is essentially an SoC (System on Chip) Chip and is composed of a processor, a System bus and a plurality of hardware peripherals; and operating an independent embedded Linux operating system on the BMC to operate each hardware peripheral to complete the function of the BMC. Bootloader (boot loader/bootstrap program) refers to a program for booting an operating system, and after the BIOS is booted, the Bootloader takes over initializing hardware devices and creating mapping of a memory space, so as to prepare a correct software and hardware environment for an operating system kernel.
Since the boot program involves software and hardware peripherals of the BMC, debugging and checking are a big difficulty in the development process. In the prior art, usually, at a stage of prototype verification of an FPGA (Field Programmable Gate Array) developed by a chip, a compiled boot program is imported into an FPGA board for debugging, and a common method is to add debugging information in the boot program and observe and know an operating state of the boot program through serial port printing. The method has the advantages of high speed and easy understanding of the running state of the bootstrap program, but when the bootstrap program is wrong or abnormal, only the position of the corresponding hardware peripheral equipment when the bootstrap program is abnormal can be determined, so that debug of the bootstrap program is difficult.
Therefore, how to perform exception positioning on the boot program more accurately when performing debugging and checking on the boot program, so as to improve convenience of debugged on the boot program is a technical problem that needs to be solved by those skilled in the art at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method for debugging and inspecting a boot program, which can more accurately locate an exception of the boot program when performing debugging and inspection on the boot program, so as to improve the convenience of debugged the boot program; another object of the present invention is to provide a device, an apparatus and a computer-readable storage medium for debugging and verifying a boot program, all of which have the above advantages.
In order to solve the above technical problem, the present invention provides a method for debugging and checking a boot program, comprising:
acquiring a bootstrap program, and inputting the bootstrap program to a preset simulation verification platform;
running the bootstrap program by utilizing a processor of the preset simulation verification platform;
when the preset simulation verification platform runs abnormally, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction;
and determining the abnormal positioning of the bootstrap program according to the abnormal control instruction.
Preferably, the process of running the boot program by using the processor of the preset emulation verification platform specifically includes:
and running the bootstrap program by utilizing the processor of the preset emulation verification platform, and executing operations of character printing, MMU (memory management unit) closing, L1/L2 Cache, temporary variable creation, front-end initialization, U-Boot migration and back-end initialization.
Preferably, after the determining the abnormal location of the boot program according to the abnormal control instruction, the method further includes:
and debugged debugging is carried out on the bootstrap program according to the abnormal positioning, the obtained bootstrap program is entered after debug debugging, and the bootstrap program is input into a processor of a preset simulation verification platform.
Preferably, further comprising:
and when the debug debugging still has the abnormal positioning after reaching the preset times, verifying the program codes in the hardware peripherals related to the abnormal positioning in the preset simulation verification platform.
Preferably, after the determining the abnormal location of the boot program according to the abnormal control instruction, the method further includes:
and acquiring a solution corresponding to the abnormal positioning from a preset fault scheme information base.
Preferably, after the determining the abnormal location of the boot program according to the abnormal control instruction, the method further includes:
and sending out corresponding prompt information according to the abnormal positioning.
Preferably, after the determining the abnormal location of the boot program according to the abnormal control instruction, the method further includes:
and recording the abnormal positioning and the corresponding detection time to a log.
In order to solve the above technical problem, the present invention further provides a debugging and checking apparatus for a boot program, including:
the input module is used for acquiring a bootstrap program and inputting the bootstrap program to a preset simulation verification platform;
the running module is used for running the bootstrap program by utilizing the processor of the preset simulation verification platform;
the determining module is used for analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor when the preset simulation verification platform has abnormal operation, and determining an abnormal control instruction;
and the positioning module is used for determining the abnormal positioning of the bootstrap program according to the abnormal control instruction.
In order to solve the above technical problem, the present invention further provides a debugging and checking device for a boot program, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the debugging and checking methods of the bootstrap program when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of any one of the above debugging and checking methods for a boot program.
The invention provides a debugging and checking method of a bootstrap program, which runs the bootstrap program through a processor of a preset simulation verification platform; when the operation of the preset simulation verification platform is abnormal, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction; determining the abnormal positioning of the bootstrap program according to the abnormal control instruction; therefore, compared with the situation that the position of the corresponding hardware peripheral is only located when the bootstrap program is abnormal in the prior art, the method can further determine the abnormal control instruction and determine the abnormal location of the bootstrap program according to the abnormal control instruction, so that the method can more accurately locate the abnormal location of the bootstrap program, and the convenience of debugged of the bootstrap program is improved.
In order to solve the technical problem, the invention also provides a debugging and checking device, equipment and a computer readable storage medium of the bootstrap program, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for debugging and checking a boot program according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a predetermined simulation verification platform according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for debugging and verifying a boot program according to an embodiment of the present invention;
fig. 4 is a structural diagram of a debugging and checking apparatus of a boot program according to an embodiment of the present invention;
fig. 5 is a structural diagram of a debugging checking apparatus of a boot program according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the embodiment of the invention is to provide a debugging and inspecting method of a bootstrap program, which can more accurately locate the abnormity of the bootstrap program when the debugging and inspecting are carried out on the bootstrap program, thereby improving the convenience of debugged of the bootstrap program; another core of the present invention is to provide a device, an apparatus and a computer-readable storage medium for debugging and verifying a boot program, all of which have the above advantages.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a method for debugging and verifying a boot program according to an embodiment of the present invention. As shown in fig. 1, a method for debugging and verifying a boot program includes:
s10: and acquiring a bootstrap program, and inputting the bootstrap program to a preset simulation verification platform.
Specifically, in actual operation, a simulation verification platform is set in advance based on an SoC architecture, and the preset simulation verification platform is composed of a processor, a system bus and a plurality of hardware peripherals; the pre-designed simulation verification platform can run in general simulation tool software, including IES, VCS (compiled Verilog simulator), etc. It should be noted that, currently, the most mainstream Boot loader is a U-Boot program, which is open-source and covers various processor architectures, and has been developed into a program system with a standard flow; therefore, the present embodiment mainly uses the U-Boot program as the Boot program for explanation.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a predetermined simulation verification platform according to an embodiment of the present invention; the preset simulation verification platform interconnects all modules through a bus, and mainly comprises:
AXI (Advanced eXtensible Interface, a bus protocol standard) system bus: a bus following the AXI protocol for connecting some high-speed devices such as an arm (advanced RISC machine) processor and a DDR (Double Data Rate); APB (Advanced Peripheral Bus, a Bus protocol standard) system Bus: a bus following APB protocol for connecting Uart and other low-speed devices;
an ARM processor: the system is used for running a U-Boot program;
DDR: DDR is used in the running process of a U-Boot program of the memory;
flash controller/Flash model: the initial storage position of the U-Boot program;
SRAM (static random-access memory): a small segment of storage space is used for reading and writing some variables when the U-Boot program is initially started;
uart (Universal Asynchronous Receiver/Transmitter )/Uart model: the method is used for monitoring the printing output of the U-Boot program in the running process or inputting a command into the U-Boot program.
SD (secure digital) controller/SD model: verifying an SD driver of the U-Boot program;
MAC (Medium/Media Access Control): verifying an MAC initialization program of the U-Boot program;
MMU (Memory Management Unit) and L1/L2 Cache (primary/secondary Cache of CPU): and a plurality of modules in the ARM processor architecture are operated by the running phase of the U-Boot program.
Therefore, the preset simulation verification platform provided by the embodiment of the invention has a simple structure, is easy to realize, is compatible with a system simulation verification environment in chip development, can determine specific abnormal positioning when debugging and verifying the bootstrap program, and is favorable for debugging and checking the bootstrap program.
In actual operation, after the U-Boot program is compiled, the U-Boot program is compiled: generating a binary U-Boot image file by using a general compiling technology; since the U-Boot program in the binary format cannot be directly input to the preset emulation verification platform, the binary U-Boot program needs to be further converted into a format that can be identified by a Flash model in the preset emulation verification platform through a preset conversion script; and inputting the U-Boot program subjected to format conversion into a Flash model of a preset simulation verification platform as an incentive form of simulation.
S20: running a bootstrap program by utilizing a processor of a preset simulation verification platform;
s30: when the operation of the preset simulation verification platform is abnormal, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction;
s40: and determining the abnormal positioning of the bootstrap program according to the abnormal control instruction.
Specifically, after a bootstrap program is input into a preset simulation verification platform, simulation starts, an ARM processor obtains a U-Boot program from a Flash model, the U-Boot program located in the Flash model passes through a Flash controller and reaches the ARM processor through an AXI system bus, and the ARM processor analyzes and executes the U-Boot program.
In the process of running the bootstrap program by using the processor, when the preset simulation verification platform has abnormal running, for example, when the execution of some peripheral hardware in the preset simulation verification platform is abnormal, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction; and finally, determining the abnormal location of the bootstrap program corresponding to the abnormal control instruction by using the corresponding relation between the control instruction and the program code in the bootstrap program. Therefore, the method can position the execution condition corresponding to each control instruction according to the running condition of the bootstrap program.
The debugging and testing method of the bootstrap program provided by the embodiment of the invention runs the bootstrap program through a processor of a preset simulation verification platform; when the operation of the preset simulation verification platform is abnormal, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction; determining the abnormal positioning of the bootstrap program according to the abnormal control instruction; therefore, compared with the situation that the position of the corresponding hardware peripheral is only located when the bootstrap program is abnormal in the prior art, the method can further determine the abnormal control instruction and determine the abnormal location of the bootstrap program according to the abnormal control instruction, so that the method can more accurately locate the abnormal location of the bootstrap program, and the convenience of debugged of the bootstrap program is improved.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, specifically, fig. 3 is a flowchart of another debugging and checking method for a Boot program according to an embodiment of the present invention, and this embodiment explains the case where a U-Boot program is used as a Boot program.
In this embodiment, the process of running the boot program by using the processor of the preset emulation verification platform specifically includes:
and running a bootstrap program by utilizing a processor of the preset emulation verification platform, and executing operations of character printing, MMU (memory management unit) closing and L1/L2 Cache, temporary variable creation, front-end initialization, U-Boot migration and back-end initialization.
In actual operation, when the processor runs the U-Boot program, the processor executes some operations according to the control of the U-Boot program so as to realize the check of the U-Boot program.
Specifically, in order to verify whether the environment of the whole system controlled by the U-Boot program is normal or not, a section of test printing code is added to the initial part of the U-Boot program, an ARM processor determines a character printing instruction according to the test printing code in the U-Boot program, character data are sent to a Uart module through an AXI system bus-APB system bus and then captured by the Uart module, the captured character data are consistent with the U-Boot program, the environment and the channel controlled by the U-Boot program are basically normal, a preset simulation verification platform runs normally and enters the next process, and otherwise the simulation verification platform is regarded as abnormal.
The ARM processor closes an MMU and an L1/L2 Cache according to a U-Boot program, and the program is a general program in the U-Boot program; after the MMU and the L1/L2 Cache are closed, the ARM processor cannot pass through the two modules when accessing other hardware peripherals; and accordingly, whether the preset simulation verification platform normally operates is determined.
When the U-Boot program is executed, temporary readable and writable variables are generated, the temporary variables are created in the SRAM, and the ARM processor accesses the SRAM through the AXI system bus and determines whether the preset simulation verification platform operates normally or not according to the temporary readable and writable variables.
The front-end initialization is a general program of a U-Boot program, relates to a series of driving programs, comprises DDR initialization, Flash initialization and Uart initialization, and is also a part which is easy to make errors during U-Boot development.
When the U-Boot is migrated, the ARM processor sends a control instruction, the U-Boot program which is initially positioned in the Flash model is migrated into the DDR through the AXI system bus and is continuously executed, and whether the preset simulation verification platform normally operates or not is judged according to the execution condition.
The last stage of the U-Boot program operation is back-end initialization, the U-Boot program is already operated in DDR at this time, and the back-end initialization also relates to a series of driving programs including SD initialization and MAC initialization; when the back end is initialized, the ARM processor can access the SD and the MAC through the AXI/APB system bus, and whether the preset simulation verification platform normally operates is judged according to the execution condition.
Specifically, when the preset simulation verification platform is determined to have abnormal operation, analyzing the execution condition of each control instruction of the bootstrap program step by step according to a PC pointer register in the processor to determine an abnormal control instruction; and determining the abnormal positioning of the bootstrap program according to the abnormal control instruction.
For example, when the back-end is initialized, if the SD initialization is found to be abnormal, a PC pointer register in the ARM processor can be called, the execution condition of the control instruction of each U-Boot program is analyzed step by step, the states of all signals in several modules such as the ARM processor, the AXI system bus, the SD controller, and the SD model are checked in real time, an abnormal control instruction is determined according to the abnormal state, and then the abnormal positioning of the bootstrap program is determined according to the abnormal control instruction.
As a preferred embodiment, after determining the abnormal location of the boot program according to the abnormal control instruction, the method further includes:
and debugged debugging is carried out on the bootstrap program according to the abnormal positioning, the bootstrap program is obtained after debug debugging, and the bootstrap program is input into a processor of a preset simulation verification platform.
In this embodiment, after it is determined that the preset emulation verification platform is abnormal in operation and the abnormal location of the boot program is determined according to the abnormal control instruction, debug the boot program according to the abnormal location, and after debug the boot program, the boot program is updated, so that it is necessary to perform compiling and format conversion operations on the boot program again, and input the boot program into the preset emulation verification platform for emulation operation, so as to perform debugging and verification again.
As a preferred embodiment, the present embodiment further comprises:
and when the abnormal positioning still exists after debug debugging reaches the preset times, verifying the program codes in the hardware peripherals related to the abnormal positioning in the preset simulation verification platform.
It should be noted that, if, in the actual operation, the debug debugging is repeatedly performed this time for the preset number of times, and the abnormal location still exists after the boot program is executed in the emulation, it indicates that there may be a problem in the hardware peripheral in the preset emulation verification platform at present, so that the program code in the hardware peripheral related to the abnormal location in the preset emulation verification platform may be further verified, that is, the internal signal in the hardware peripheral is analyzed.
Therefore, the method not only can debug and detect the abnormal condition of the bootstrap program, but also can determine the abnormal condition of the hardware peripheral.
On the basis of the foregoing embodiment, the present embodiment further describes and optimizes the technical solution, and specifically, after determining the exception location of the boot program according to the exception control instruction, the present embodiment further includes:
and acquiring a solution corresponding to the abnormal positioning from a preset fault scheme information base.
It should be noted that, in this embodiment, a corresponding solution is set in advance according to different abnormal positioning, and a fault solution information base is determined; after the current abnormal positioning is determined, a solution corresponding to the current abnormal positioning is obtained from a preset fault scheme information base; so that the user can conveniently acquire the solution to debug the bootstrap program according to the solution, and the use experience of the user is further improved.
On the basis of the foregoing embodiment, the present embodiment further describes and optimizes the technical solution, and specifically, after determining the exception location of the boot program according to the exception control instruction, the present embodiment further includes:
and sending out corresponding prompt information according to the abnormal positioning.
Specifically, in this embodiment, after the abnormal location of the boot program is determined according to the abnormal control instruction, the prompting device is further triggered to send out corresponding prompting information according to the abnormal location. It should be noted that the prompting device may specifically be a buzzer and/or an indicator light and/or a display, and the prompting device may be triggered to send out corresponding prompting information, such as a buzzer sound, a flashing light, a display text or an image, and the like, so as to intuitively prompt the user that the abnormal location has been determined, and in actual operation, the prompting device may send out corresponding types of prompting information according to different abnormal locations, so as to determine the abnormal situation according to the type of the prompting information, and thereby the use experience of the user may be further improved.
On the basis of the foregoing embodiment, the present embodiment further describes and optimizes the technical solution, and specifically, after determining the exception location of the boot program according to the exception control instruction, the present embodiment further includes:
and recording the abnormal positioning and the corresponding detection time to a log.
Specifically, in this embodiment, after determining the abnormal location of the boot program according to the abnormal control instruction, the detection time for determining the abnormal location of the boot program is obtained, and then the information of the abnormal location and the corresponding detection time are recorded in the log.
It should be noted that, in actual operation, a specific recording manner may be recorded in a form of text, an excel table, or a database table, which is not limited in this embodiment and is selected according to actual requirements. More specifically, the recording and storing may be performed in a Memory bank, a hard disk, a TF (Trans-flash Card) Card, an sd (secure Digital Memory Card) Card, or the like, and the selection is specifically performed according to actual requirements, which is not limited in this embodiment.
In this embodiment, the abnormal location and the corresponding detection time are further recorded in the log, so that the user can conveniently check the condition of debugging and checking the boot program, and the use experience of the user is further improved.
The above detailed description is given for the embodiments of the method for debugging and verifying a boot program according to the present invention, and the present invention further provides a device, an apparatus, and a computer-readable storage medium for debugging and verifying a boot program corresponding to the method.
Fig. 4 is a structural diagram of a debugging verification apparatus for a boot program according to an embodiment of the present invention, and as shown in fig. 4, the debugging verification apparatus for a boot program includes:
the input module 41 is used for acquiring a bootstrap program and inputting the bootstrap program to a preset simulation verification platform;
the running module 42 is used for running a bootstrap program by utilizing a processor of a preset simulation verification platform;
the determining module 43 is configured to, when the preset emulation verification platform is abnormal in operation, analyze an execution condition of each control instruction of the bootstrap step by step according to a PC pointer register in the processor, and determine an abnormal control instruction;
and the positioning module 44 is used for determining the abnormal positioning of the bootstrap program according to the abnormal control instruction.
The debugging and checking device of the bootstrap program provided by the embodiment of the invention has the beneficial effects of the debugging and checking method of the bootstrap program.
As a preferred embodiment, another debugging verification apparatus for a boot program further includes:
and the debugging module is used for debugging the debug of the bootstrap program according to the abnormal positioning and calling the input module.
As a preferred embodiment, another debugging verification apparatus for a boot program further includes:
and the verification module is used for verifying the program codes in the hardware peripherals related to the abnormal positioning in the preset simulation verification platform when the abnormal positioning still exists after debug debugging reaches the preset times.
As a preferred embodiment, another debugging verification apparatus for a boot program further includes:
and the execution module is used for acquiring a solution corresponding to the abnormal positioning from a preset fault scheme information base.
As a preferred embodiment, another debugging verification apparatus for a boot program further includes:
and the prompt module is used for sending out corresponding prompt information according to the abnormal positioning.
As a preferred embodiment, another debugging verification apparatus for a boot program further includes:
and the recording module is used for recording the abnormal positioning and the corresponding detection time to the log.
Fig. 5 is a structural diagram of a debugging verification device of a boot program according to an embodiment of the present invention, and as shown in fig. 5, the debugging verification device of the boot program includes:
a memory 51 for storing a computer program;
the processor 52 is used for implementing the steps of the debugging checking method of the boot program when executing the computer program.
The debugging and checking device of the bootstrap program provided by the embodiment of the invention has the beneficial effects of the debugging and checking method of the bootstrap program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the debugging and checking method for the boot program.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effects of the debugging and checking method of the bootstrap program.
The method, apparatus, device and computer readable storage medium for debugging and verifying the boot program provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are set forth only to help understand the method and its core ideas of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1.一种引导程序的调试检验方法,其特征在于,包括:1. a method for debugging and checking a bootstrap program, characterized in that, comprising: 获取引导程序,并将所述引导程序输入至预设仿真验证平台;Obtaining a bootstrap program, and inputting the bootstrap program to a preset simulation verification platform; 利用所述预设仿真验证平台的处理器运行所述引导程序;Use the processor of the preset simulation verification platform to run the boot program; 当所述预设仿真验证平台出现运行异常时,根据所述处理器中的PC指针寄存器逐级分析引导程序的每一条控制指令的执行情况,确定出异常控制指令;When an abnormal operation occurs in the preset simulation verification platform, the execution of each control instruction of the boot program is analyzed step by step according to the PC pointer register in the processor, and an abnormal control instruction is determined; 根据所述异常控制指令确定出所述引导程序的异常定位。The abnormal location of the boot program is determined according to the abnormal control instruction. 2.根据权利要求1所述的方法,其特征在于,所述利用所述预设仿真验证平台的处理器运行所述引导程序的过程,具体包括:2. The method according to claim 1, wherein the process of using the processor of the preset simulation verification platform to run the boot program specifically includes: 利用所述预设仿真验证平台的所述处理器运行所述引导程序,执行打印字符、关闭MMU和L1/L2 Cache、创建临时变量、前端初始化、U-Boot迁移以及后端初始化操作。The processor of the preset simulation verification platform runs the boot program, and executes operations of printing characters, closing MMU and L1/L2 cache, creating temporary variables, front-end initialization, U-Boot migration, and back-end initialization. 3.根据权利要求2所述的方法,其特征在于,在所述根据所述异常控制指令确定出所述引导程序的异常定位之后,进一步包括:3 . The method according to claim 2 , wherein after the abnormal location of the boot program is determined according to the abnormal control instruction, the method further comprises: 3 . 根据所述异常定位对所述引导程序进行debug调试,并在debug调试之后进入所述获取引导程序,并将所述引导程序输入至预设仿真验证平台的处理器中的步骤。Debugging the bootstrap program according to the abnormal location, and entering the steps of obtaining the bootstrap program after the debug debugging, and inputting the bootstrap program into the processor of the preset simulation verification platform. 4.根据权利要求3所述的方法,其特征在于,进一步包括:4. The method of claim 3, further comprising: 在debug调试达到预设次数之后仍存在异常定位时,对所述预设仿真验证平台中与所述异常定位相关的硬件外设中的程序代码进行验证。When the abnormal location still exists after the debug debugging reaches a preset number of times, the program code in the hardware peripheral related to the abnormal location in the preset simulation verification platform is verified. 5.根据权利要求1所述的方法,其特征在于,在所述根据所述异常控制指令确定出所述引导程序的异常定位之后,进一步包括:5 . The method according to claim 1 , wherein after the abnormal location of the boot program is determined according to the abnormal control instruction, the method further comprises: 6 . 从预设的故障方案信息库中获取与所述异常定位对应的解决方案。The solution corresponding to the abnormal location is obtained from the preset fault solution information database. 6.根据权利要求1所述的方法,其特征在于,在所述根据所述异常控制指令确定出所述引导程序的异常定位之后,进一步包括:6 . The method according to claim 1 , wherein after the abnormal location of the boot program is determined according to the abnormal control instruction, the method further comprises: 6 . 根据所述异常定位发出对应的提示信息。According to the abnormal location, corresponding prompt information is sent out. 7.根据权利要求1至6任一项所述的方法,其特征在于,在所述根据所述异常控制指令确定出所述引导程序的异常定位之后,进一步包括:7. The method according to any one of claims 1 to 6, wherein after the abnormal location of the boot program is determined according to the abnormal control instruction, the method further comprises: 将所述异常定位以及对应的检测时间记录至日志。The abnormal location and the corresponding detection time are recorded in a log. 8.一种引导程序的调试检验装置,其特征在于,包括:8. A device for debugging and checking a boot program, comprising: 输入模块,用于获取引导程序,并将所述引导程序输入至预设仿真验证平台;an input module for obtaining a bootstrap program and inputting the bootstrap program to a preset simulation verification platform; 运行模块,用于利用所述预设仿真验证平台的处理器运行所述引导程序;an operation module, configured to use the processor of the preset simulation verification platform to run the bootstrap program; 确定模块,用于当所述预设仿真验证平台出现运行异常时,根据所述处理器中的PC指针寄存器逐级分析引导程序的每一条控制指令的执行情况,确定出异常控制指令;A determination module, configured to analyze the execution situation of each control instruction of the boot program step by step according to the PC pointer register in the processor, and determine the abnormal control instruction when the preset simulation verification platform has an abnormal operation; 定位模块,用于根据所述异常控制指令确定出所述引导程序的异常定位。The positioning module is configured to determine the abnormal positioning of the boot program according to the abnormal control instruction. 9.一种引导程序的调试检验设备,其特征在于,包括:9. A device for debugging and checking a boot program, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至7任一项所述的引导程序的调试检验方法的步骤。The processor is configured to implement the steps of the debugging and checking method of the boot program according to any one of claims 1 to 7 when executing the computer program. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的引导程序的调试检验方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the booting according to any one of claims 1 to 7 is implemented The steps of the debugging test method of the program.
CN202110057755.5A 2021-01-15 2021-01-15 Debugging and checking method, device, equipment and storage medium of boot program Withdrawn CN112765021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110057755.5A CN112765021A (en) 2021-01-15 2021-01-15 Debugging and checking method, device, equipment and storage medium of boot program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110057755.5A CN112765021A (en) 2021-01-15 2021-01-15 Debugging and checking method, device, equipment and storage medium of boot program

Publications (1)

Publication Number Publication Date
CN112765021A true CN112765021A (en) 2021-05-07

Family

ID=75702053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110057755.5A Withdrawn CN112765021A (en) 2021-01-15 2021-01-15 Debugging and checking method, device, equipment and storage medium of boot program

Country Status (1)

Country Link
CN (1) CN112765021A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297085A (en) * 2021-05-31 2021-08-24 北京经纬恒润科技股份有限公司 Algorithm verification method and device based on SOC platform
CN114356681A (en) * 2021-12-07 2022-04-15 北京爱芯科技有限公司 Fault processing method and device in chip verification process and electronic equipment
CN119065987A (en) * 2024-11-06 2024-12-03 珠海妙存科技有限公司 Boot verification method and related equipment for eMMC chips

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320783A1 (en) * 2010-06-24 2011-12-29 International Business Machines Corporation Verification using opcode compare
CN108287775A (en) * 2018-03-01 2018-07-17 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of server failure detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320783A1 (en) * 2010-06-24 2011-12-29 International Business Machines Corporation Verification using opcode compare
CN108287775A (en) * 2018-03-01 2018-07-17 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the storage medium of server failure detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JASON416就是我: "Uboot 网卡移植遇到的问题与解决方法", 《HTTPS://BLOG.CSDN.NET/JASON_416/ARTICLE/DETAILS/103797602》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297085A (en) * 2021-05-31 2021-08-24 北京经纬恒润科技股份有限公司 Algorithm verification method and device based on SOC platform
CN113297085B (en) * 2021-05-31 2023-08-08 北京经纬恒润科技股份有限公司 Algorithm verification method and device based on SOC platform
CN114356681A (en) * 2021-12-07 2022-04-15 北京爱芯科技有限公司 Fault processing method and device in chip verification process and electronic equipment
CN119065987A (en) * 2024-11-06 2024-12-03 珠海妙存科技有限公司 Boot verification method and related equipment for eMMC chips

Similar Documents

Publication Publication Date Title
CN110704304B (en) Application program testing method and device, storage medium and server
CN117422026B (en) RISC-V architecture-based processor verification system
RU2473115C2 (en) Method for automatic generation of scenario for validation of functional software installed on-board aircraft, and apparatus for implementing said method
US20100153924A1 (en) Method and System for Performing Software Verification
CN113377586B (en) Automatic detection method and device for server and storage medium
Potyra et al. Evaluating fault-tolerant system designs using FAUmachine
RU2451990C2 (en) Method for processing volume of information used during debugging phase of operational system software onboard aircraft and device for realising said method
CN112765021A (en) Debugging and checking method, device, equipment and storage medium of boot program
CN113220514B (en) Solid state disk testing method and device, readable storage medium and electronic equipment
CN112286750A (en) GPIO (general purpose input/output) verification method and device, electronic equipment and medium
US7243059B2 (en) Simulation of hardware based on smart buffer objects
US20200074040A1 (en) Hierarchical expression coverage clustering for design verification
CN111400997A (en) Processor core verification method, system and medium based on synchronous execution
TWI793774B (en) Method and apparatus and computer program product for debugging solid state disk devices
CN115185638B (en) A method and computing device for obtaining the call stack when simulating the running of an application.
US20040025081A1 (en) System and method for collecting code coverage information before file system is available
CN119167841A (en) Simulation logic system design method, electronic device and storage medium
CN113342649B (en) Methods, media and equipment for unit testing based on real target machines
CN115756994A (en) Firmware testing method, system, electronic device and readable storage medium
CN110321171B (en) Startup detection device, system and method
CN115563930A (en) Automatic verification method and device based on storage model, terminal and storage medium
CN110096888B (en) A method and system for speeding up verification and analysis of SMM security risks
CN114265786A (en) Automated testing method, apparatus, computer equipment and readable storage medium
US12271669B1 (en) Executing instruction sequences generated from software interactions as part of formal verification of a design under test
CN119990002B (en) Point-to-point path verification method and device, electronic equipment and medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210507

WW01 Invention patent application withdrawn after publication