[go: up one dir, main page]

CN100367226C - A method for realizing component detection by using firmware of intelligent equipment - Google Patents

A method for realizing component detection by using firmware of intelligent equipment Download PDF

Info

Publication number
CN100367226C
CN100367226C CNB2005100797880A CN200510079788A CN100367226C CN 100367226 C CN100367226 C CN 100367226C CN B2005100797880 A CNB2005100797880 A CN B2005100797880A CN 200510079788 A CN200510079788 A CN 200510079788A CN 100367226 C CN100367226 C CN 100367226C
Authority
CN
China
Prior art keywords
test
program module
test program
firmware
post
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.)
Expired - Lifetime
Application number
CNB2005100797880A
Other languages
Chinese (zh)
Other versions
CN1889051A (en
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CNB2005100797880A priority Critical patent/CN100367226C/en
Publication of CN1889051A publication Critical patent/CN1889051A/en
Application granted granted Critical
Publication of CN100367226C publication Critical patent/CN100367226C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本发明公开了一种利用智能设备的固件实现部件检测的方法,该方法在智能设备中预先设置测试程序模块,在固件上电自检POST过程中的指定位置设置所述测试程序模块对应的调用接口,该方法进一步包括:智能设备开机启动后运行POST过程,当运行到所述调用接口的位置时,暂时中断POST过程,启动该调用接口,利用该调用接口调用对应的测试程序模块对所述设备的部件进行测试,输出测试结果;该测试程序模块进行的测试结束后,再继续运行所中断的POST过程。本发明可以实现在智能设备的POST过程中,即可对部件进行较POST自检更深、更广的故障检测。

The invention discloses a method for realizing component detection by using the firmware of an intelligent device. In the method, a test program module is preset in the intelligent device, and a call corresponding to the test program module is set at a designated position in the firmware power-on self-test POST process. interface, the method further includes: running the POST process after the smart device is turned on, and temporarily interrupting the POST process when running to the position of the calling interface, starting the calling interface, and using the calling interface to call the corresponding test program module to the described The components of the equipment are tested, and the test results are output; after the test performed by the test program module is completed, the interrupted POST process is continued. The present invention can realize deeper and wider fault detection for components than POST self-inspection during the POST process of the smart device.

Description

A kind of firmware of smart machine that utilizes is realized the method that parts detect
Technical field
The present invention relates to the fault detect or the monitoring technique of smart machine, relate in particular to a kind of firmware of smart machine that utilizes and realize the method that parts detect.
Background technology
Current, the application of smart machine such as personal electric computing machine, palm PC, intellectual computing device more and more widely, and is wherein particularly outstanding with the personal electric computer application.But the parts in these smart machines all have the probability of inefficacy, bring great negative effect therefore for production, the operation and maintenance of smart machine.
In order to detect the parts operate as normal whether in the smart machine, existing technical scheme mainly contains two kinds:
The power-on self-test of prior art one, smart machine (POST) scheme.
The process of current smart machine by POST carried out initialization to self system, comprises the easy detection to parts in the initialized process, and POST enters normal mode of operation by back restart operation system.The module that realizes the POST process is contained in the firmware (FIRMWARE) of smart machine, and this firmware is also referred to as " firmware ", is a kind of program that is solidificated in the smart machine, is used to control the hardware system of smart machine, is that smart machine is soft, the interface between the hardware.This firmware generally is stored in the nonvolatile memory, in ROM (read-only memory) (ROM), even there are not under the situation of external power source supply its data also can not lose at smart machine.In microcomputer, described firmware is basic input/output (BIOS, BasicInput/Output System).
Because the existing POST process of various smart machines is substantially all similar, is that example is carried out simple declaration to existing P OST scheme so this sentences computer BIOS.The POST flow process of computer BIOS is in the prior art: each equipment in the computing machine is all provided a detection of code, be called start self-detection of code (POST CODE), when certain parts to computing machine detect, at first that it is corresponding POST CODE writes the diagnostic port of 80H address, when these parts are normal, then detect and pass through, the output normal information, then give the POST CODE of another parts, these parts are tested.If the test to certain parts is not passed through, then this POST CODE can remain at place, described 80H address, testing process also can be ended, and reports to the police according to predetermined, the alarm song corresponding with POST CODE, and which unit failure the slip-stick artist can tell according to chimes of doom.
On this basis, a kind of computer diagnostic card has also appearred in the prior art, this diagnostic card utilizes the hardware circuit of himself to read the POST CODE in the 80H address among the BIOS, and through decoder for decoding, by digital LED light POST CODE correspondence is shown at last, its principle is consistent with above-mentioned POST scheme.So just can judge the duty of computing machine, and need not only rely on chimes of doom dull on the computer motherboard to come rough decision means fault by 16 carry system codes that show on the diagnostic card.
But there is following shortcoming in above-mentioned prior art one:
1, because the self-checking function in the existing POST process is simpler, can only detect a certain parts fault whether in the equipment, but can not detect the type and the scope of this fault furtherly, therefore all not enough on the degree of depth that detects, range, the failure message of output is incomplete, and deficiency is so that the slip-stick artist judges detailed fault type.
2, described diagnostic card just embodies according to the output of content on different output devices of POST process, promptly on diagnostic card, detect content with digital LED light output, rather than by mainboard warning output detection content, therefore still be subjected to the restriction of POST self-diagnosis ability, not enough on the degree of depth that detects and range; And when detecting, must open computer cabinet and could insert diagnostic card, inconvenient in the operation.
3, the information exported of POST process not only comprises normal information, failure message, and more have more information in addition in other purpose, and for example: interim mark information that adds of slip-stick artist or the like, these information mix output, very mixed and disorderly, can't judge failure message easily.
The trace routine of prior art two, operation special use in the operating system of smart machine detects the parts of smart machine.But the shortcoming of this technology is: need smart machine at first to enter operating system, yet under most of situation, when some parts of smart machine were undesired, smart machine can't enter operating system, therefore under most unit failure situations, this scheme at all can't application implementation.
Summary of the invention
In view of this, fundamental purpose of the present invention provides a kind of firmware of smart machine that utilizes and realizes the method that parts detect, and is implemented in the POST process of smart machine, can carry out the fault detect darker, wider than the POST self check to parts.
To achieve these goals, technical scheme of the present invention mainly comprises:
A kind of firmware of smart machine that utilizes is realized the method that parts detect, and this method comprises:
Set in advance the test procedure module in smart machine, the assigned address in firmware power-on self-test POST process is provided with the calling interface of described test procedure module correspondence, and this method further comprises:
Operation POST process behind the smart machine starting up, when running to the position of described calling interface, temporarily interrupt the POST process, start this calling interface, utilize this calling interface to call corresponding test procedure module the parts of described equipment are tested, output test result; After the end of test (EOT) that this test procedure module is carried out, continue the POST process that operation is interrupted again.
Preferably, described test procedure module is embedded to be arranged in the described firmware, perhaps is arranged in the outer memory device of described firmware.
Preferably, described assigned address in the POST process is provided with the calling interface of described test procedure module correspondence, is: test the calling interface that the assigned address of necessary POST after the stage is provided with this test procedure module in described test procedure module.
Preferably, in the process that the test procedure module is tested, described calling interface keeps communicating by letter of described firmware and test procedure module, from firmware, obtain the needed initial parameter of test and send the test procedure module to according to the test needs, perhaps the test result with the test procedure module sends firmware to, and is exported by firmware.
Preferably, be provided with the trigger condition that is used to call corresponding test procedure module in the described calling interface; This method further comprises:
After starting described calling interface, this calling interface judges at first whether the trigger condition that self is provided with is effective, if effectively, then call the test procedure module of this calling interface correspondence again and test; If trigger condition is invalid, then continue the POST process that operation is interrupted.
The concrete grammar that trigger condition is set in described calling interface is: general-purpose interface GPI is set in calling interface, represent respectively that with two kinds of varying level states of this GPI trigger condition is effective and trigger condition is invalid, two kinds of varying level states of this GPI are set by external switch.
In addition, in described calling interface, be provided with trigger condition concrete grammar can also for: be provided with in calling interface with specifying and import the corresponding diagnostic marker of button, this diagnostic marker is corresponding with the trigger condition of test procedure module; Utilize two kinds of different conditions of this diagnostic marker to represent that respectively trigger condition is effective or trigger condition is invalid, and by judging that specifying the input button whether to be activated changes the state of this diagnostic marker.
Preferably, described calling interface calls corresponding test procedure module and is: call the test procedure module by hook HOOK mode.
Preferably, in described POST process,, then export testing result with the hummer or the sound horn of smart machine if before the standard output device module of described smart machine has successful initialization, do not called the test procedure module; If after described standard output device module success initialization, called the test procedure module, with the standard way of output output testing result of standard output device.
Described smart machine is a computing machine, and described firmware is the basic input-output system BIOS of computing machine.
Because method of the present invention is carried out in the process of POST with regard to calling test procedure at BIOS the parts of smart machine is detected, and does not depend on operating system, therefore before operating system is not activated, parts is carried out fault detect.Simultaneously, the test procedure and the computing machine itself that utilize the present invention to develop are combined closely, even computing machine has the part parts damages, this test procedure still can use.This than the testing software that under operating system, carries out remarkable advantages is arranged: because many times, computing machine can't move the environment that enters operating system owing to unit failure at all, can't implement so carry out the method for test procedure in this case in operating system.
Because test procedure of the present invention is independent of outside the POST program among the BIOS, the user can develop according to the actual needs flexibly has test procedure darker, wider test function, export more perfect failure message, make the slip-stick artist judge detailed fault type, therefore can remedy existing too simple, the shallow drawback of POST process measuring ability.
Because test result of the present invention adopts the mode of standardized sound or screen display to export, and makes the slip-stick artist be easy to pick out failure message, is user-friendly to.
Use the test procedure of method provided by the invention exploitation, simple to operate, be difficult for losing, the test result that does not rely on soft, hardware environment, the acquisition of other outside is expressed simple and is not had the sorrow of information transmission distortion.
The present invention can adopt simple user interface and the report of standardized test result, professional report can be operated and provide in domestic consumer, can be so that the professional needn't be on the scene, by communication tool just accurately failure judgement place or approximate range, thereby guides user is fixed a breakdown, or obtain effective information, make and doing some preparations before the maintenance when participating in the cintest, such as: parts that need to prepare replacing.
The present invention can be provided with the state of test procedure trigger condition flexibly, does not call for the test procedure that does not need under some situation to carry out, and can improve the work efficiency of equipment.
Description of drawings
Fig. 1 is the process flow diagram of the method for the invention;
Fig. 2 is the synoptic diagram that concerns of the embodiment of the invention described robot calculator bios program module and test procedure module;
Fig. 3 A is the position view of the described calling interface of the embodiment of the invention in the POST flow process;
Fig. 3 B is the described particular flow sheet that calls test procedure in the POST process of the embodiment of the invention;
Fig. 4 is the described particular flow sheet that calls a plurality of test procedures in the POST process of the embodiment of the invention;
Fig. 5 is the process flow diagram of test procedure internal work;
Fig. 6 is the process flow diagram of described first application example;
Fig. 7 is the GPI input control chart of described second application example.
Embodiment
With specific embodiment the present invention is elaborated with reference to the accompanying drawings.
Fig. 1 is the process flow diagram of the method for the invention.Referring to Fig. 1, method of the present invention mainly comprises:
Step 101, set in advance the test procedure module in smart machine, the assigned address in firmware power-on self-test POST process is provided with the calling interface of described test procedure module correspondence.Described test procedure module can be embedded in the described firmware, perhaps is arranged in the outer memory device of described firmware.
Operation POST process behind step 102, the smart machine starting up, when running to the position of described calling interface, temporarily interrupt the POST process, start this calling interface, utilize this calling interface to call corresponding test procedure module the parts of described equipment are tested, output test result.
On concrete method of calling, can adopt in the POST program, to add hook (HOOK) function, the positional information of test procedure module is arranged in this HOOK function, utilize this HOOK function to corresponding call by location test procedure module.
After the end of test (EOT) that step 103, this test procedure module are carried out, continue the POST process that operation is interrupted again.
Following examples are to realize that in the BIOS of robot calculator fault detect is that the present invention will be described for example.
In robot calculator, be provided for the test procedure module of test computer parts in advance, the particular content of this test procedure module depends on the demand of user to test function point, and the user can freely design at different objects and the existing program language of occasion demand utilization.
Fig. 2 is the synoptic diagram that concerns of present embodiment described robot calculator bios program module and test procedure module.As shown in Figure 2, present embodiment adds a calling interface module 22 in advance in BIOS, and the trigger condition of test procedure module is set in this interface module 22, this calling interface module 22 is used for being activated operation at the assigned address that former bios program module 21 is carried out the POST process, whether effectively determine whether calling test procedure module 23 according to described trigger condition, and when test procedure module 23 is called operation, calling interface module 22 is transmission information between bios program module 21 and test procedure module 23, from bios program module 21, obtain the needed initial parameter of test and send test procedure module 23 to according to the test needs, perhaps the test result with test procedure module 23 sends bios program module 21 to, and by 21 outputs of bios program module.Certainly, also can directly export for test result by test procedure module 23.
Be that example illustrates the position of described calling interface in the POST process so that a test procedure module to be set in computing machine below.Fig. 3 A is the position view of the described calling interface of present embodiment in the POST flow process.Referring to Fig. 3 A, itself can be divided into a plurality of stages the POST process, and each stage is finished certain initialization or self-checking function, after all stages all finish, starts the operating system, by operating system control computer system.Before calling the test procedure module, need finish the operation necessary POST stage of this test procedure module, for example: the program of test procedure module for the hard disk function is tested, its execution must POST finish detect and the initialization hard disk controller after, system has had the test process that just can carry out after the function of access hard disk hard disk at this moment; Again for example: the program of test memory (RAM) must detect and (comprise in the initialization of Memory Controller Hub detecting whether have internal memory to exist and big or small) carried out in initialization after finishing at Memory Controller (Memory Controller), otherwise, CPU may just not be far from being yet and test internal storage access.
Therefore the calling interface of this test procedure module correspondence need be arranged on the necessary POST of this test procedure module of operation after the stage, carries out the subsequent P OST stage after end of test (EOT) again.If described test procedure module does not have the essential POST stage, then its corresponding calling interface can be arranged on the optional position in the POST process.
Fig. 3 B is the described particular flow sheet that calls test procedure in the POST process of present embodiment.Shown in Fig. 3 B, this flow process comprises:
After step 301, computing machine power on and start shooting, the operation test procedure necessary POST stage of module.
Step 302, start calling interface, judge whether the trigger condition of test procedure module wherein is effective, if effectively, then execution in step 303 at assigned address; Otherwise, execution in step 304.
Step 303, call corresponding test procedure module and test, execution in step 304 after the end of test (EOT).
Step 304, carry out the subsequent P OST stage, start the operating system after finishing in all stages of POST.
Described test procedure module can have a plurality of, for each test procedure module corresponding calling interface is arranged all in the calling interface module, and this calling interface can be arranged on the assigned address in the POST process of BIOS according to the needs of test procedure.
If in computing machine, be provided with a plurality of test procedure modules, suppose that number is n, n is the integer greater than 1.Each test procedure module all has its corresponding calling interface and corresponding trigger condition respectively.According to the operation test procedure necessary POST stage, the calling interface of this test procedure module correspondence is arranged on assigned address in the POST process, this assigned address is at the necessary POST of operation test procedure after the stage.
The described particular flow sheet that in the POST process, calls a plurality of test procedures of Fig. 4 present embodiment.Referring to Fig. 4, in the process of carrying out POST, start calling interface successively, judge the wherein state of trigger condition, that is: start calling interface 1 after finishing in the POST stage 1, judge the trigger condition of test procedure 1, if effectively, then call test procedure 1 and test, and after test finishes, move the POST stage 2, otherwise directly move the POST stage 2; After the POST stage 2, start calling interface 2, judge the trigger condition of test procedure 2, effectively then call test procedure 2, in the operation POST stage 3 after the end of test (EOT), invalidly then directly move the POST stage 3; The rest may be inferred, after whole POST process finishes, starts the operating system.
Fig. 5 is the process flow diagram of test procedure internal work.Referring to Fig. 5,, comprising in test procedure inside:
Step 501, the main flow of at first carrying out test procedure are tested the parts of computing machine.
Step 502, judge whether test result mistake occurs, if then execution in step 503, otherwise, process ends.
Step 503, with standardized form warning error, and the error code of outputting standardization.In the step 503, can be by the output device of test procedure module self notice computing machine, for example loudspeaker and hummer are reported to the police and are notified display device, display for example, the error code of outputting standardization; Also warning message and standardized error code can be returned to the bios program module by the calling interface module, report to the police and the output error code by the corresponding output device of bios program module notice computing machine.If do not test out mistake, also correct test result can be exported by computer output equipment.
Described test result is with the form output of sound or screen display.In the early stage of computing machine POST process, its standard output device module (generally being display card and display) is not because of having to report test result in the mode of hummer or sound horn in inoperable period of initialization.As the computing machine POST in the period in later stage that the initialization of computer standard output device finishes and enters normal operating conditions, then the choice criteria output device outputs test result in the mode that character shows.
Test result of the present invention is all with standardized form output.Except the report of natural language mode, must report the test result code simultaneously, this code is represented a kind of test result uniquely, has avoided the distortion in the information transmission.Normalized form comprises the standardization of voice signal and the standardization of character output.
Below be two concrete application examples of the method for the invention:
First application example:
Because many times the computer user can run into the fault of computing machine " start does not have apparent ", promptly press the power knob on the computer cabinet, under the normal condition, computing machine should be carried out the POST process of BIOS, on display screen, show LOGO of manufacturer or self check information, but after start occurring sometimes, display does not have the fault of demonstration.Generally, except above-mentioned information, the computing machine user provides and has not come more valuable information.
Utilize method of the present invention, can add a test procedure module in BIOS, the function of this test procedure module just makes hummer or the loudspeaker on the mainboard send the short sound of very brief high frequency.Because this test procedure do not have the essential POST preparatory stage, so the calling interface of this test procedure module is arranged on the computing machine CPU that powers on and begins the execution command place, and is effective with the state default setting of the trigger condition of this test procedure.
Fig. 6 is the process flow diagram of this application example.Referring to Fig. 6, comprising: after step 601, computer booting power on, call this test procedure when CPU begins to execute instruction to drive the hummer sounding at once; Step 602, call test procedure and finish the POST process that BIOS is carried out in the back; Step 603, POST process start the operating system after finishing.
For the computing machine user, if the start back is heard this prompt tone at once, represent that then CPU starts working, main chip such as CPU, north bridge chips, South Bridge chip on power supply in the main frame and the mainboard, even SUPER IO chip all is normal substantially.At this moment, got rid of the possibility that there are fault in power supply, mainboard, these several parts of CPU in the computing machine.Can further check as other parts such as display card and displays.
If this prompt tone is not heard in start, then represent not work of CPU, this moment, the possibility of fault had: power fail, preserve FLASH rom chip fault, South Bridge chip damages, north bridge chips damage, the hummer of bios program and data or loudspeaker itself break down, the CPU damage.Above fault seems a lot, but the actual machine element that relates to has only three: power supply, mainboard and CPU.Result according to actual count sees that the probability that in fact back five kinds of faults occur is very little, and the probability that especially back four kinds of faults occur is littler, so most problems all concentrates on " power fail ".
Like this, the computer maintenance personnel just can get rid of several big possible trouble units by " whether very brief buzzer is arranged " as long as please the user carry out the operation of opening computing machine in all parts, dwindle to have scope of failure.
Second application example:
In BIOS, embed memory test program module, CMOS test procedure module and hard disk test program module in this example.The flow process of this example can suppose that the n among Fig. 4 is 3 referring to Fig. 4, wherein first, second in memory test program module, CMOS test procedure module and the hard disk test program module difference corresponding diagram 4 and the 3rd test procedure module.The computing machine start that powers on, after carrying out the POST stage 1, suspend the POST process, start the calling interface 1 of memory test program module correspondence, judge the state value of trigger condition 1 wherein,, then call the memory test program of carrying out if this trigger condition 1 is effective, and the output device of test result information by computing machine exported with standardized form, output device can be hummer, loudspeaker, display etc.; For example the test result of hummer is as shown in table 1:
Table 1
In the table 1, the buzzer of article one does not repeat; The second buzzer repeats to send, and be 4s interval time; Article three, buzzer also repeats to send, and be 4s interval time.Described buzzer sends for the loudspeaker by computer system.
After executing the memory test program, return the POST flow process, after executing the POST stage 2, start the calling interface 2 of CMOS test procedure module correspondence, read the state of trigger condition 2 wherein, if the state of trigger condition 2 is an effective value, then call and carry out the CMOS test procedure, the CMOS test procedure is exported by the output device of computing machine test result with standardized form, for example can export by display, its output information comprises standardized coding and information, and for example its output information is referring to table 2:
Coding Information (English) Information (Chinese) Describe
4152 CMOS Battery Low CMOS battery electric quantity deficiency please be changed the CMOS battery. CMOS battery electric quantity deficiency means that needs upgrade the CMOS battery.When deliberately discharging to CMOS, the user also can point out this information.
4253 CMOS Checksum Bad A CMOS Checksum mistake! CMOS Checksum mistake.Can solve by load default mode in SETUP.
Table 2
After the CMOS trace routine is carried out, turn back to the POST flow process, after executing the POST stage 3, start the calling interface 3 of hard disk test program correspondence, judge the state of trigger condition 3 wherein, if trigger condition 3 is effective, then call this hard disk test program 3 of execution, this hard disk trace routine is used for the hard disk of computing machine is detected, and the output device of test result by computing machine exported with standardized form, for example also can export by display, its output information comprises standardized coding and information, and for example its output information is referring to table 3:
Coding Information (English) Information (Chinese) Describe
2111 Hard Disk Error Can not normally detect hard disk; BIOS can not normally detect with configuration ID E/ATAPI equipment in the POST process.
2112 S.M.A.R.T Testing Failed. Hard disk S.M.A.R.T detects failure, asks Backup Data and changes hard disk. When appearring in ATAPI equipment, the S.M.A.R.T test errors points out this information.This mistake generally occurs and need change hard disk again.
2113 Read Hard Disk Error Read the hard disk failure BIOS makes mistakes when reading hard disk boot sector data, and promptly INT 13h calls and makes mistakes.
Table 3
After executing hard disk test program 3, turn back to the POST main flow again, after executing all POST flow processs, BIOS starts the operating system, and gives operating system with the control of computing machine.
Below the set-up mode of described trigger condition is described:
The method of the invention can be an effective status with the trigger condition state default setting in described all calling interfaces in advance, all calls automatically in the POST process and carries out described all test procedures; Because some parts break down and do not influence the running of total system in the computing machine, so the user also can independently set, not operating part or all test event, be about to described trigger condition and be made as disarmed state in advance, input signal by computer entry device changes its state, makes the user whether carry out certain test procedure by input device controls BIOS.
Like this, by the test procedure module that in smart machine, embeds, the operator of computing machine can be as required to all parts of computing machine or selectively the part parts are carried out all tests in the cards.When computing machine breaks down, the place of can pinpointing the problems accurately and easily, thus lay a good foundation for fixing a breakdown smoothly.
When the computing machine normal operation, the major part in this part program can not be called, and only in needs, makes computing machine enter diagnostic mode by computing machine user active operation, calls test procedure and realizes fault diagnosis.The mode that realizes this mode switch has a variety of modes, such as by Keyboard Control, by general-purpose interface (GPI) control, or the like.
For example, behind computer booting, in the POST process, press the hot key of lower keyboard, then system cuts diagnostic mode, and the trigger condition corresponding with this hot key becomes effectively, carries out corresponding test procedure, except that the output of original BIOS in the POST process, the test result report of output test procedure.
Again for example, the switch that is installed on the cabinet is set, this switch is by the state of certain trigger condition of the corresponding control of GPI, therefore can select all or part of test event, start then, computing machine moves the effective test procedure of trigger condition in the POST process, output test result simultaneously.
For the Keyboard Control mode, need in POST, could use after the initialization procedure end for keyboard, its concrete implementation process can for: in bios program, set up a diagnostic mode sign (FLAG), this FLAG is corresponding with keyboard hot key and corresponding with the trigger condition of all test procedure, if this FLAG is " very ", then Dui Ying trigger condition is effective.Under default situations, FLAG is " non-true " state, if in computing machine POST process, press described keyboard hot key, then bios program then is made as " very " with this FLAG sign, start diagnostic mode this moment, in subsequent P OST flow process, call execution corresponding testing program module and test.
For the GPI control mode, its concrete implementation process can for: on hardware, can adopt microswitch to be arranged on the computer cabinet, the input of the corresponding GPI of each microswitch.GPI is a kind of input pin of freely being selected for use by the Hardware Engineer that generally uses in the present age computer, can inquire about the state that register corresponding in the chipset obtains the outside incoming level of GPI by computer software.It is example that the GPI that provides among the product I CH4 of Intel Company is provided herein, has used five GPI of GPI0~GPI4 wherein.
Fig. 7 should import control chart with the GPI of example.As shown in Figure 7, designed 5 GPI inputs herein, be used for control computer and whether move test procedure 0~4.Set when GPI is input as high level, the trigger condition of corresponding test procedure is effectively herein, otherwise the trigger condition of corresponding test procedure is invalid, can skip corresponding test procedure and will not carry out in computing machine POST process.Software realization aspect can judge whether trigger condition is effective by reading the GPI incoming level respectively, determines whether move corresponding test procedure with this.
Product manual with reference to the ICH4 of Intel Company, as can be seen, writing down a base address among the register BUS0:DEV1F:FUNC0:REG58 in PCI Configuration Space, is one group of I/O address of skew by visit with this address, can read the state of GPI.The value of supposing this register is 00001181H, and then the base address is 1180h.Read the numerical value of a byte among the I/O port one 180h+0Ch=118Ch, can learn the level input state of GPI0~GPI7.The corresponding GPI0 of Bit0, the corresponding GPI1 of Bit1 ... the rest may be inferred.
With K0 control test procedure 0 is example, supposes that the program false code in the register decision block in the chipset is as follows:
Read a byte among the I/O port one 18Ch, will be worth to compose and give integer i;
i<-i.AND.01h;
ifi>0
Call test procedure 0;
else
Never calling test procedure continues to carry out;
endif
So just realized selecting the purpose of execution test procedure with the micro switch on the cabinet.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with the people of this technology in the disclosed technical scope of the present invention; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.

Claims (10)

1.一种利用智能设备的固件实现部件检测的方法,其特征在于,1. A method utilizing the firmware of an intelligent device to realize component detection, characterized in that, 在智能设备中预先设置测试程序模块,在固件上电自检POST过程中的指定位置设置所述测试程序模块对应的调用接口,该方法进一步包括:The test program module is pre-set in the smart device, and the corresponding call interface of the test program module is set at a designated position in the firmware power-on self-test POST process, and the method further includes: 智能设备开机启动后运行POST过程,当运行到所述调用接口的位置时,暂时中断POST过程,启动该调用接口,利用该调用接口调用对应的测试程序模块对所述设备的部件进行测试,输出测试结果;该测试程序模块进行的测试结束后,再继续运行所中断的POST过程。After the smart device starts up, it runs the POST process. When it runs to the position of the call interface, temporarily interrupts the POST process, starts the call interface, uses the call interface to call the corresponding test program module to test the components of the device, and outputs Test result; after the test performed by the test program module is completed, the interrupted POST process will continue to run. 2.根据权利要求1所述的方法,其特征在于,所述测试程序模块内嵌设置在所述固件中,或者设置在所述固件外的存储设备中。2. The method according to claim 1, wherein the test program module is embedded in the firmware, or is set in a storage device outside the firmware. 3.根据权利要求1所述的方法,其特征在于,所述的在POST过程中的指定位置设置所述测试程序模块对应的调用接口,是:在所述测试程序模块进行测试所必需的POST阶段之后的指定位置设置该测试程序模块的调用接口。3. The method according to claim 1, characterized in that, setting the call interface corresponding to the test program module at the specified position in the POST process is: a necessary POST for testing in the test program module The specified position after the stage sets the call interface of the test program module. 4.根据权利要求1所述的方法,其特征在于,在测试程序模块进行测试的过程中,所述调用接口保持所述固件与测试程序模块的通信,根据测试需要从固件中获取测试所需要的原始参数并传送给测试程序模块,或者将测试程序模块的测试结果传送给固件,并由固件输出。4. method according to claim 1, is characterized in that, in the process that test program module is tested, described calling interface keeps the communication of described firmware and test program module, obtains the needed test from firmware according to test needs The original parameters of the test program module are transmitted to the test program module, or the test result of the test program module is transmitted to the firmware and output by the firmware. 5.根据权利要求1所述的方法,其特征在于,所述调用接口中设置有用于调用对应测试程序模块的触发条件;该方法进一步包括:5. The method according to claim 1, wherein the triggering condition for calling the corresponding test program module is set in the calling interface; the method further comprises: 当启动所述调用接口后,该调用接口首先判定自身设置的触发条件是否有效,如果有效,则再调用该调用接口对应的测试程序模块进行测试;如果触发条件无效,则继续运行所中断的POST过程。After starting the call interface, the call interface first determines whether the trigger condition set by itself is valid, and if valid, then calls the test program module corresponding to the call interface to test; if the trigger condition is invalid, continue to run the interrupted POST process. 6.根据权利要求5所述的方法,其特征在于,在所述调用接口中设置触发条件的具体方法为:在调用接口中设置通用接口GPI,用该GPI的两种不同电平状态分别表示触发条件有效和触发条件无效,通过外部开关设置该GPI的两种不同电平状态。6. The method according to claim 5, characterized in that, the specific method for setting the trigger condition in the calling interface is: setting the general interface GPI in the calling interface, representing respectively with two different level states of the GPI The trigger condition is valid and the trigger condition is invalid, and the two different level states of the GPI are set through an external switch. 7.根据权利要求5所述的方法,其特征在于,在所述调用接口中设置触发条件的具体方法为:在调用接口中设置与指定输入按键对应的诊断标识,该诊断标识与测试程序模块的触发条件对应;利用该诊断标识的两种不同状态分别表示触发条件有效或触发条件无效,并通过判断指定输入按键是否被激活来改变该诊断标识的状态。7. The method according to claim 5, characterized in that, the specific method for setting the trigger condition in the calling interface is: setting the diagnostic identification corresponding to the specified input button in the calling interface, and the diagnostic identification is related to the test program module Corresponding to the trigger condition; use the two different states of the diagnostic flag to indicate that the trigger condition is valid or invalid, and change the state of the diagnostic flag by judging whether the specified input button is activated. 8.根据权利要求1所述的方法,其特征在于,所述的调用接口调用对应的测试程序模块是:通过钩HOOK方式调用测试程序模块的。8. The method according to claim 1, characterized in that, calling the corresponding test program module by the calling interface is: calling the test program module in a HOOK manner. 9.根据权利要求1所述的方法,其特征在于,在所述POST过程中,如果在所述智能设备的标准输出设备模块没有成功初始化之前调用了测试程序模块,则以智能设备的蜂鸣器或喇叭发声输出检测结果;如果在所述标准输出设备模块成功初始化之后调用了测试程序模块,以标准输出设备的标准输出方式输出检测结果。9. The method according to claim 1, wherein, in the POST process, if the test program module is called before the standard output device module of the smart device is not successfully initialized, the buzzer of the smart device output the detection result by sounding the device or the horn; if the test program module is called after the standard output device module is successfully initialized, the detection result is output in the standard output mode of the standard output device. 10.根据权利要求1至9任一项所述的方法,其特征在于,所述的智能设备为计算机,所述的固件为计算机的基本输入输出系统BIOS。10. The method according to any one of claims 1 to 9, wherein the smart device is a computer, and the firmware is a BIOS of the computer.
CNB2005100797880A 2005-06-28 2005-06-28 A method for realizing component detection by using firmware of intelligent equipment Expired - Lifetime CN100367226C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100797880A CN100367226C (en) 2005-06-28 2005-06-28 A method for realizing component detection by using firmware of intelligent equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100797880A CN100367226C (en) 2005-06-28 2005-06-28 A method for realizing component detection by using firmware of intelligent equipment

Publications (2)

Publication Number Publication Date
CN1889051A CN1889051A (en) 2007-01-03
CN100367226C true CN100367226C (en) 2008-02-06

Family

ID=37578330

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100797880A Expired - Lifetime CN100367226C (en) 2005-06-28 2005-06-28 A method for realizing component detection by using firmware of intelligent equipment

Country Status (1)

Country Link
CN (1) CN100367226C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI368843B (en) 2008-06-05 2012-07-21 Wistron Corp Method for automatically simulating manual testing after powering on of computer, detection system, and external storage device
CN101604279B (en) * 2008-06-11 2013-06-19 纬创资通股份有限公司 Method, detection system and external storage device for automatically simulating manual detection after computer is turned on
CN101826046B (en) * 2009-03-06 2011-12-14 纬创资通股份有限公司 Computer startup debugging method
CN104615512A (en) * 2013-11-05 2015-05-13 英业达科技有限公司 System and method for executing target program executed by PNST (Power On Self Test) by Interrupt
CN107193703A (en) * 2017-06-30 2017-09-22 山东超越数控电子有限公司 A kind of method and device of judgement BIOS POST process device functions
CN110795364B (en) * 2019-10-31 2023-06-02 四川效率源信息安全技术股份有限公司 Method for accessing hard disk in IDE mode
CN116779126A (en) * 2022-03-11 2023-09-19 广州星际悦动股份有限公司 Detection methods for personal care equipment, personal care equipment, terminals and media

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169997A1 (en) * 2001-02-01 2002-11-14 Song-Bor Chen BIOS debug method
CN1427338A (en) * 2001-12-17 2003-07-02 英业达股份有限公司 System start-up self-checking device and method
CN1506821A (en) * 2002-12-11 2004-06-23 联想(北京)有限公司 Detection and display method and device for computer self-test information
US20040267708A1 (en) * 2003-06-18 2004-12-30 Rothman Michael A Device information collection and error detection in a pre-boot environment of a computer system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169997A1 (en) * 2001-02-01 2002-11-14 Song-Bor Chen BIOS debug method
CN1427338A (en) * 2001-12-17 2003-07-02 英业达股份有限公司 System start-up self-checking device and method
CN1506821A (en) * 2002-12-11 2004-06-23 联想(北京)有限公司 Detection and display method and device for computer self-test information
US20040267708A1 (en) * 2003-06-18 2004-12-30 Rothman Michael A Device information collection and error detection in a pre-boot environment of a computer system

Also Published As

Publication number Publication date
CN1889051A (en) 2007-01-03

Similar Documents

Publication Publication Date Title
US6625742B1 (en) Computer diagnostic having an LED to provide direct visual feedback as to the status of the standby power supply when power button is actuated
CN100472460C (en) Method and device for detecting and displaying computer self-inspection information
US6731206B2 (en) Failure announcing voice system
US7496793B2 (en) Error reporting method and system
US20040078609A1 (en) Electronic apparatus having improved diagnostic interface
US7882395B2 (en) Debug device for embedded systems and method thereof
US20110029816A1 (en) Personal computer diagnostic test before executing operating system
CN113986635B (en) BIOS testing method, system, storage medium and device
CN100367226C (en) A method for realizing component detection by using firmware of intelligent equipment
US7213159B2 (en) Method for testing and verifying power management features of computer system
US7827540B2 (en) Method for program debugging
KR20050098514A (en) Booting-system and booting-method for initializing peripherals
US8635502B2 (en) Debug card and method for diagnosing faults
CN101482841B (en) Debugging apparatus and method for embedded system
CN1145104C (en) Method for detecting and processing unexpected stop of computer system
CN101826046B (en) Computer startup debugging method
US20120259591A1 (en) Keyboard testing method
CN100524245C (en) Method for monitoring input/output port data
CN110955566B (en) Error detecting method
TWI391816B (en) Computer debug method
CN111077401B (en) Keyboard testing method, device and storage medium
CN112835758A (en) A method and terminal device for self-starting and running of test software
CN112711494A (en) Downtime fault positioning method and device
CN101183326A (en) Debugging system and method applied to basic input and output system
CN114026539A (en) Storing POST codes in electronic tags

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20080206

CX01 Expiry of patent term