CN113886165B - Verification method, device and equipment for firmware diagnosis function and readable medium - Google Patents
Verification method, device and equipment for firmware diagnosis function and readable medium Download PDFInfo
- Publication number
- CN113886165B CN113886165B CN202111116013.1A CN202111116013A CN113886165B CN 113886165 B CN113886165 B CN 113886165B CN 202111116013 A CN202111116013 A CN 202111116013A CN 113886165 B CN113886165 B CN 113886165B
- Authority
- CN
- China
- Prior art keywords
- error
- data
- module
- function
- injected
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000003745 diagnosis Methods 0.000 title claims abstract description 49
- 238000012795 verification Methods 0.000 title claims abstract description 25
- 230000006870 function Effects 0.000 claims description 97
- 238000002347 injection Methods 0.000 claims description 33
- 239000007924 injection Substances 0.000 claims description 33
- 230000008569 process Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002159 abnormal effect Effects 0.000 claims description 4
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 claims 4
- 238000012545 processing Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 238000012360 testing method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005856 abnormality Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000007849 functional defect Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a verification method of firmware diagnosis function, comprising the following steps: triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not; if the BIOS menu is started, starting a writing function of the machine checking module; acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component; sending the diagnosis data to a BMC and reporting an OS (baseboard management controller) to judge whether an error component in the diagnosis data is consistent with the corresponding error source or not; and if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal. The invention also discloses a verification device of the firmware diagnosis function, computer equipment and a readable storage medium.
Description
Technical Field
The present invention relates to the field of computer servers, and in particular, to a method, an apparatus, a device, and a readable medium for verifying a firmware diagnostic function.
Background
With the development of the internet age in recent years, the demand for mass data processing capability is rapidly increasing, so that higher demands are put on servers, and as the original power of the server industry, the application of advanced technology plays a decisive role for purchasing users. Today, network technology, virtualization technology and distributed application are rapidly developed, and indexes of availability, reliability and serviceability required by a server are higher and higher. The normal operation of financial and telecommunication services is highly dependent on the continuous and stable operation of an information system, and high requirements are also put on the availability of a server, so that the availability of the server system is required to reach 99.99%.
Once the fault occurs in the operation stage of the server, the fault is required to be timely reported to the out-of-band monitoring management system and the operating system is informed of the fault processing service by a method for timely collecting, analyzing and diagnosing the fault, and a user can timely acquire the health state of the current server hardware through fault log information. For the components that have been alerted, the customer can shut down to replace the failed component at a convenient time.
In the prior art, a general server based on an Intel chip only supports tool simulation of memory fault injection and PCIE fault injection, and a submodule of a CPU is PCU, IFU, DFU, UPI, UBOX and the like, and the faults of the modules are not special test tools, the Intel provides AMEI tool fault injection, but the general server is inconvenient to actually use, and a script command is required to be manually input to write error data into Mcbank, and then a command is issued to trigger CMCI or MCE.
Several registers (MC_CTL, MC_STATUS, MC_ADDR, MC_MISC) with 64bit length of MCA need manual group 64bit data, and write data one by one command to the register through intel tool manually, then execute command triggering CMCI or MCE of triggering interrupt to inform OS, test process can only verify OS-preferred process flow of legacy MCA, namely, after MCA error appears, directly process by OS, unable to trigger SMI to verify firmware-preferred process flow.
Disclosure of Invention
Accordingly, an objective of the present invention is to provide a method, apparatus, device and readable medium for verifying a firmware diagnostic function, wherein a possible or previous error scene is simulated by filling an error message into a register in a BIOS, and then BIOS diagnostic code is executed to verify whether the BIOS correctly sends valid data to the BMC and the OS, and whether the BMC and the OS correctly receive signals and process the signals.
Based on the above object, an aspect of the embodiments of the present invention provides a method for verifying a firmware diagnostic function, including the steps of: triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not; if the BIOS menu is started, starting a writing function of the machine checking module; acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component; sending the diagnosis data to a BMC and reporting an OS (baseboard management controller) to judge whether an error component in the diagnosis data is consistent with the corresponding error source or not; and if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal.
In some implementations, turning on the write function of the machine check module includes: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In some embodiments, the method further comprises: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some embodiments, the method further comprises: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly encoded.
In some embodiments, acquiring the data to be error-injected and the corresponding error sources includes: and acquiring the data to be error-injected and the corresponding error source from the database to be error-injected.
In some embodiments, the method further comprises: and if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming that the diagnosis function is abnormal.
In another aspect of the embodiment of the present invention, there is also provided a verification apparatus for firmware diagnostic function, including: the first module is configured to trigger system management interruption in a system management mode and judge whether a BIOS setting menu is started or not; the second module is configured to start the writing function of the machine checking module if the BIOS menu is started; a third module configured to obtain data to be error-injected and a corresponding error source, and execute a diagnostic code based on the data to be error-injected to obtain diagnostic data including an error component; a fourth module, configured to send the diagnostic data to a BMC and report to an OS to determine whether an error component in the diagnostic data is consistent with the corresponding error source; and a fifth module configured to confirm that the diagnostic function is normal if the error component in the diagnostic data matches the corresponding error source.
In some embodiments, the second module is further configured to: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In some embodiments, the second module is further configured to: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some implementations, the third module is further configured to: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly encoded.
In some implementations, the third module is further configured to: and acquiring the data to be error-injected and the corresponding error source from the database to be error-injected.
In some embodiments, the fifth module is further configured to: and if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming that the diagnosis function is abnormal.
In still another aspect of the embodiment of the present invention, there is also provided a computer apparatus, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing steps of a method comprising: triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not; if the BIOS menu is started, starting a writing function of the machine checking module; acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component; sending the diagnosis data to a BMC and reporting an OS (baseboard management controller) to judge whether an error component in the diagnosis data is consistent with the corresponding error source or not; and if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal.
In some implementations, turning on the write function of the machine check module includes: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In some embodiments, the steps of the method further comprise: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some embodiments, the steps of the method further comprise: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly encoded.
In some embodiments, acquiring the data to be error-injected and the corresponding error sources includes: and acquiring the data to be error-injected and the corresponding error source from the database to be error-injected.
In some embodiments, the steps of the method further comprise: and if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming that the diagnosis function is abnormal.
In yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The invention has at least the following beneficial technical effects: the fault scene verification firmware simulating the real MCA error preferentially processes the accuracy of the MCA, solves the problem that the accuracy of the MCA fault processing flow of the firmware cannot be verified because of the MCA fault scene which cannot be simulated, and meanwhile, the invention can be applied to the automation of the test without the help of fault components and fault injection tools, and has the advantages of short test time and comprehensive fault case coverage. The invention can also be used for a firmware reliability fault diagnosis function verification scheme for supporting firmware priority processing of all general-purpose computer system products.
The out-of-band system sets the data of the injection errors according to the predefined data format through the IPMI command, the hardware is pre-designed with the GPIO to support out-of-band triggering SMI interruption, the error injection module is added into the in-band SMI, the fault data is acquired through the IPMI and written into the fault module, so that the MCA error injection process is realized, the error injection process can be completed by only collecting the historical cases and the theoretical data as input data without the aid of a fault component and an error injection tool, and the fault scene can be more comprehensively covered.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of a verification method of firmware diagnostic functions provided by the present invention;
FIG. 2 is a schematic diagram of an embodiment of a verification device for firmware diagnostic functions provided by the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention;
fig. 4 is a schematic diagram of an embodiment of a computer readable storage medium provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
In the prior art, the Intel CPU supports the function of MCA detection report errors, the types of recorded and reported errors are hundreds, how to verify the software processing error flow and whether the fault log record is correct in the development process, the actual development process lacks a real fault scene, the method for simulating the real fault scene is very limited, the aim of verifying MCA error processing is achieved by designing an injection fault data simulation fault scene, and the functional defects cannot occur due to the missing test method, so that the robustness of the product to the fault diagnosis function of the MCA errors is ensured.
Based on the above object, in a first aspect of the embodiment of the present invention, an embodiment of a verification method of a firmware diagnostic function is presented. Fig. 1 is a schematic diagram of an embodiment of a verification method of a firmware diagnostic function provided by the present invention. As shown in fig. 1, the verification method of the firmware diagnostic function according to the embodiment of the present invention includes the following steps:
001. triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not;
002. if the BIOS menu is started, starting a writing function of the machine checking module;
003. acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component;
004. sending the diagnosis data to the BMC and reporting the diagnosis data to the OS to judge whether the error component in the diagnosis data is consistent with the corresponding error source; and
005. if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal.
In this embodiment, the out-of-band system sets the error injection data according to the predefined data format through the IPMI (Intelligent Platform Management Interface ) command, so that the hardware is designed with GPIO (General-purpose input/output) support for out-of-band triggering SMI (system management interrupt) interrupt, the error injection module is added into the in-band SMI, the fault data is acquired through the IPMI and written into the fault module, thereby implementing the MCA (Machine Check Architecture, machine inspection architecture) miss injection procedure, the miss injection procedure can be completed without using fault components and error injection tools, and the fault scene can be covered more fully by collecting the history cases and the theoretical data as input data.
In this embodiment, the method is only suitable for verifying the development result of the server firmware, and after the server is in a post-load state, the function needs to be closed or deleted from the firmware after the function verification has no problem.
In this embodiment, define the setup menu option of BIOS, control functions on or off; the GPIO of the hardware reserved south bridge is connected to the BMC (Baseboard Management Controller, baseboard control manager), the attribute GPI is configured to trigger the SMI interrupt, and the BMC triggers the SMI through IPMI command control; encoding according to the CPU submodule, such as: DCU is 1, IFU is 2, MLC is 3, etc., through BMC setting IPMI command error injection module and corresponding MCBank data of this module, BIOS can obtain error module and MCBank data that set up through IPMI command, wherein, MCBank data can extract the case database that the summary forms from the historical fault case and obtain or speculate the error data that probably takes place the mistake from theory.
When the verification process is executed, an IPMI command error injection module and MCBank data corresponding to the module are set through the BMC and stored in the BMC; since the relevant registers for the debug only support writing values in SMM (System management mode), the debug module is added in the SMI code of the BIOS, and the debug module is ensured to be registered to the processing module of the SMI before the error processing code in the SMI; firstly checking whether a BIOS setup menu option is started; after the MSR is started, checking whether the bit MCA Bank of the MSR supports writing operation or not; if so, setting bit of the MSR corresponding function to start the MCbank writing function; then, acquiring error injection data from the BMC through an IPMI command; after error injection data is acquired, setting Mcbank data of a corresponding sub-module, namely setting MCi_STATUS, MCi_ADDR and MCi_MISC, and setting an SMI error source of an error injection control register to correspond to bank position 1; after the error code is executed, executing an error processing code, checking an SMI error source of the MCbank, reading Mcbank data when the error source is detected, analyzing and diagnosing the data, sending the data with the error component information to the BMC, and triggering the CMCI or the MCA to inform the OS of acquiring the error information; after receiving the information, the BMC diagnoses and records the fault component, and the mcelog of the OS records error information; the tester verifies if the BMC has diagnosed the correct faulty component and if the OS mcelog driver displays the fault information.
In some embodiments of the invention, turning on the write function of the machine check module includes: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In this embodiment, when executing the verification process, the BMC sets the IPMI command error injection module and the MCBank data corresponding to the module to store the error injection module and the MCBank data in the BMC; because the related register for error injection only supports writing a value in SMM, an error injection module is added in the SMI code of the BIOS, and the error injection module is ensured to be registered to a processing module of the SMI before the error processing code is processed in the SMI; firstly checking whether a BIOS setup menu option is started; after the MSR is started, checking whether the bit MCA Bank of the MSR supports writing operation or not; and if so, setting bit of the MSR corresponding function to start the MCbank writing function.
In some embodiments of the invention, the method further comprises: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some embodiments of the invention, the method further comprises: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly injected.
In this embodiment, encoding is performed according to a CPU submodule, for example: DCU is 1, IFU is 2, MLC is 3, etc., through BMC setting IPMI command error injection module and corresponding MCBank data of this module, BIOS can obtain error module and MCBank data that set up through IPMI command, wherein, MCBank data can extract the case database that the summary forms from the historical fault case and obtain or speculate the error data that probably takes place the mistake from theory.
In some embodiments of the present invention, acquiring data to be error-injected and corresponding error sources includes: and acquiring the data to be error-injected and the corresponding error source from the data to be error-injected database.
In some embodiments of the invention, the method further comprises: if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming the diagnosis function abnormality.
In this embodiment, the data with the error component information is finally sent to the BMC, and the CMCI or the MCA is triggered to notify the OS to acquire the error information; after receiving the information, the BMC diagnoses and records the fault component, and the mcelog of the OS records error information; the tester verifies if the BMC has diagnosed the correct faulty component and if the OS mcelog driver displays the fault information.
In the embodiment, the fault scene verification firmware simulating the real MCA error preferentially processes the accuracy of the MCA, so that the accuracy of the MCA fault processing flow of the firmware cannot be verified due to the fact that the MCA fault scene cannot be simulated is solved, meanwhile, the fault part and the fault injection tool are not needed, and the method can be applied to automation of testing, is short in testing time and is comprehensive in fault case coverage. The invention can also be used for a firmware reliability fault diagnosis function verification scheme for supporting firmware priority processing of all general-purpose computer system products.
It should be noted that, the steps in the embodiments of the verification method for a firmware diagnostic function may be intersected, replaced, added and deleted, so that the verification method for a firmware diagnostic function with the reasonable permutation and combination should also belong to the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.
Based on the above object, a second aspect of the embodiment of the present invention proposes a verification device for a firmware diagnostic function. Fig. 2 is a schematic diagram of an embodiment of a verification device for firmware diagnosis function provided by the present invention. As shown in fig. 2, the verification device for a firmware diagnosis function according to an embodiment of the present invention includes the following modules: a first module 011 configured to trigger a system management interrupt in a system management mode, and determine whether a BIOS setup menu is opened; a second module 012 configured to turn on the write function of the machine check module if the BIOS menu is turned on; a third module 013 configured to obtain data to be error-injected and a corresponding error source, and execute a diagnostic code based on the data to be error-injected to obtain diagnostic data comprising an error component; a fourth module 014 configured to send the diagnostic data to the BMC and report to the OS to determine whether the error component in the diagnostic data is consistent with the corresponding error source; and a fifth module 015 configured to confirm that the diagnostic function is normal if the error component in the diagnostic data matches the corresponding error source.
In some embodiments of the invention, the second module 012 is further configured to: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In some embodiments of the invention, the second module 012 is further configured to: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some embodiments of the invention, the third module 013 is further configured to: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly injected.
In some embodiments of the invention, the third module 013 is further configured to: and acquiring the data to be error-injected and the corresponding error source from the data to be error-injected database.
In some embodiments of the invention, the fifth module 015 is further configured to: if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming the diagnosis function abnormality.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, the computer device according to the embodiment of the present invention includes the following means: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 executable on the processor, the instructions when executed by the processor implementing the steps of the method comprising: triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not; if the BIOS menu is started, starting a writing function of the machine checking module; acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component; sending the diagnosis data to the BMC and reporting the diagnosis data to the OS to judge whether the error component in the diagnosis data is consistent with the corresponding error source; and if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal.
In some embodiments of the invention, turning on the write function of the machine check module includes: judging whether the machine checking module supports a writing function or not; if the machine checking module supports the writing function, the writing function of the machine checking module is started.
In some embodiments of the invention, the steps of the method further comprise: if the machine checking module does not support the writing function, an error reporting alarm is sent out.
In some embodiments of the invention, the steps of the method further comprise: and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in the BMC and the database to be wrongly injected.
In some embodiments of the present invention, acquiring data to be error-injected and corresponding error sources includes: and acquiring the data to be error-injected and the corresponding error source from the data to be error-injected database.
In some embodiments of the invention, the steps of the method further comprise: if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming the diagnosis function abnormality.
The invention also provides a computer readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the above method.
Finally, it should be noted that, as will be understood by those skilled in the art, implementing all or part of the above-described methods in the embodiments, the program of the verification method of the firmware diagnostic function may be stored in a computer readable storage medium, and the program may include the steps of the embodiments of the methods when executed. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. 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 disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (D0L), or wireless technology such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, D0L, or wireless technology such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (8)
1. A method for verifying a firmware diagnostic function, comprising the steps of:
triggering system management interruption in a system management mode, and judging whether a BIOS setting menu is started or not;
if the BIOS menu is started, starting a writing function of the machine checking module;
acquiring data to be error-injected and a corresponding error source, and executing a diagnostic code based on the data to be error-injected to obtain diagnostic data containing an error component;
sending the diagnosis data to a BMC and reporting an OS (baseboard management controller) to judge whether an error component in the diagnosis data is consistent with the corresponding error source or not; and
if the error component in the diagnosis data is consistent with the corresponding error source, confirming that the diagnosis function is normal;
setting error injection data according to a predefined data format through an IPMI command by an out-of-band system, adding an error injection module into an in-band SMI, acquiring fault data through the IPMI and writing the fault data into the fault module so as to realize an MCA miss injection process;
and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in a BMC and a database to be error-injected, wherein the step of acquiring the data to be error-injected and the corresponding error source comprises the step of acquiring the data to be error-injected and the corresponding error source from the database to be error-injected.
2. The method of verifying a firmware diagnostic function of claim 1, wherein turning on a write function of a machine check module comprises:
judging whether the machine checking module supports a writing function or not;
if the machine checking module supports the writing function, the writing function of the machine checking module is started.
3. The method for verifying a firmware diagnostic function of claim 2, further comprising:
if the machine checking module does not support the writing function, an error reporting alarm is sent out.
4. The method for verifying a firmware diagnostic function of claim 1, further comprising:
and if the error component in the diagnosis data is inconsistent with the corresponding error source, confirming that the diagnosis function is abnormal.
5. A verification apparatus for firmware diagnostic functions, comprising:
the first module is configured to trigger system management interruption in a system management mode and judge whether a BIOS setting menu is started or not;
the second module is configured to start the writing function of the machine checking module if the BIOS menu is started;
a third module configured to obtain data to be error-injected and a corresponding error source, and execute a diagnostic code based on the data to be error-injected to obtain diagnostic data including an error component;
a fourth module, configured to send the diagnostic data to a BMC and report to an OS to determine whether an error component in the diagnostic data is consistent with the corresponding error source; and
a fifth module configured to confirm that a diagnostic function is normal if an error component in the diagnostic data is consistent with the corresponding error source;
a module that performs the steps of:
setting error injection data according to a predefined data format through an IPMI command by an out-of-band system, adding an error injection module into an in-band SMI, acquiring fault data through the IPMI and writing the fault data into the fault module so as to realize an MCA miss injection process;
and encoding the CPU submodule based on a preset encoding rule, and storing the encoding rule in a BMC and a database to be error-injected, wherein the step of acquiring the data to be error-injected and the corresponding error source comprises the step of acquiring the data to be error-injected and the corresponding error source from the database to be error-injected.
6. The firmware diagnostic function verification apparatus of claim 5, wherein the second module is further configured to:
judging whether the machine checking module supports a writing function or not;
if the machine checking module supports the writing function, the writing function of the machine checking module is started.
7. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-4.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111116013.1A CN113886165B (en) | 2021-09-23 | 2021-09-23 | Verification method, device and equipment for firmware diagnosis function and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111116013.1A CN113886165B (en) | 2021-09-23 | 2021-09-23 | Verification method, device and equipment for firmware diagnosis function and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113886165A CN113886165A (en) | 2022-01-04 |
CN113886165B true CN113886165B (en) | 2023-08-11 |
Family
ID=79010387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111116013.1A Active CN113886165B (en) | 2021-09-23 | 2021-09-23 | Verification method, device and equipment for firmware diagnosis function and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113886165B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102707710A (en) * | 2012-06-01 | 2012-10-03 | 浙江吉利汽车研究院有限公司杭州分公司 | Diagnosis function verification method and system for automobile electronic control unit |
CN102890494A (en) * | 2012-06-19 | 2013-01-23 | 浙江吉利汽车研究院有限公司杭州分公司 | Functional verification method of automobile diagnosis instrument |
-
2021
- 2021-09-23 CN CN202111116013.1A patent/CN113886165B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102707710A (en) * | 2012-06-01 | 2012-10-03 | 浙江吉利汽车研究院有限公司杭州分公司 | Diagnosis function verification method and system for automobile electronic control unit |
CN102890494A (en) * | 2012-06-19 | 2013-01-23 | 浙江吉利汽车研究院有限公司杭州分公司 | Functional verification method of automobile diagnosis instrument |
Also Published As
Publication number | Publication date |
---|---|
CN113886165A (en) | 2022-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10102113B2 (en) | Software test automation systems and methods | |
CN111108481B (en) | Fault analysis method and related equipment | |
CN109254864A (en) | A kind of application failure restorative procedure, device and electronic equipment | |
CN111274154A (en) | Automatic testing method, device, equipment and storage medium | |
CN109543417B (en) | Vulnerability mining method and device based on Qemu platform | |
CN115878430A (en) | PCIE equipment fault monitoring method and device, communication equipment and storage medium | |
CN112463472B (en) | Automatic testing method and device for disk array, electronic equipment and storage medium | |
CN116382968B (en) | Fault detection method and device for external equipment | |
CN113886165B (en) | Verification method, device and equipment for firmware diagnosis function and readable medium | |
CN112114220A (en) | Fault detection method and device | |
CN116225802A (en) | Fault testing method and device and computing equipment | |
CN113094221B (en) | Fault injection method, device, computer equipment and readable storage medium | |
CN114996101A (en) | Hard disk fault positioning method, system and device and readable storage medium | |
CN113852502A (en) | Fault diagnosis method, device and equipment of intelligent network card and readable medium | |
CN115437903A (en) | Interface test method, device, apparatus, storage medium, and program | |
CN110795338B (en) | Front-end and back-end interaction-based automatic testing method and device and electronic equipment | |
CN110781042A (en) | Method, device and medium for detecting UBM (Universal boot Module) backboard based on BMC (baseboard management controller) | |
CN114253846B (en) | Automatic test abnormality positioning method, device, equipment and readable storage medium | |
CN117435507B (en) | Self-adaptive universal backoff test method and system | |
CN114490217B (en) | Fault testing method, device and equipment for ME and BIOS interaction and readable medium | |
US20200409811A1 (en) | Method for locating and repairing intermittent faults in communication structures of an aircraft | |
CN118567922A (en) | Component testing method, device, communication equipment and storage medium | |
CN115548836A (en) | Fault confirmation method and device, excimer laser and electronic equipment | |
CN116453573A (en) | Solid state disk performance test method and device, electronic equipment and readable medium | |
CN117785695A (en) | Error reporting detection method, device, equipment and storage medium based on software integration |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |