TW575805B - Tracking and debugging method of BIOS - Google Patents

Tracking and debugging method of BIOS Download PDF

Info

Publication number
TW575805B
TW575805B TW89127656A TW89127656A TW575805B TW 575805 B TW575805 B TW 575805B TW 89127656 A TW89127656 A TW 89127656A TW 89127656 A TW89127656 A TW 89127656A TW 575805 B TW575805 B TW 575805B
Authority
TW
Taiwan
Prior art keywords
error
test
bios
value
hardware
Prior art date
Application number
TW89127656A
Other languages
Chinese (zh)
Inventor
Sung-Bo Chen
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to TW89127656A priority Critical patent/TW575805B/en
Application granted granted Critical
Publication of TW575805B publication Critical patent/TW575805B/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

575805575805

【發明之應用領域】 本發明係有關一種BIOS之 為BIOS 在P0ST(Power On Self 測試出錯之硬體或原因的除錯 的測試作業而設計的一種除錯 【發明背景】 追縱除錯方法,係為一種專 Test)階段,正確找出造成 方法,也就是為BIOS出廠前 方法。 POSKPower On Self Test,開機自我測試)屬於基本 輸出入系統(Baslc lnput Output System ,簡稱BI0S) 的一部份,電腦電源一開啟會先執行p〇ST程式對硬體進行 測試或初始化程序,在確認硬體設備都處於正常 後,才會載入作業系統。POST程式係由一連串的副程序心 (sub-routine)所組成,每個sub — r〇utlneT能包含數個硬 體測試或初始化的動作;在P〇ST階段依序執行每個 sub-routme的同時,會將該sub —r〇utine的代碼輸出至一 特定I/O位址之Debug port,當P〇ST測試因某個動作的執 行發生錯誤而停止時,即可藉由讀取Debug ρ〇Γΐ;的值來得 知是哪一個sub- routine產生錯誤。 即使技術人員知道在POST測試的過程中,錯誤是發生 在那一個sub-routine,但卻仍然無法正確的判斷是那X一 個硬體發生故卩早,因為在一個sub-routine之中可能合忙 4寸疋的分類或某特定的步驟設計’對多個硬體裝置做測1 及初始化,所以即使知道錯誤是發生在此一 sub-rout ine,仍然無法確定是由那個硬體的錯誤所導 致。[Application Field of the Invention] The present invention relates to a BIOS designed for debugging a BIOS test operation of hardware or causes for errors in the POST (Power On Self test). [Background of the Invention] Tracing and debugging methods, It is a special Test) stage, to find out the correct method, that is, the method before the BIOS leaves the factory. POSKPower On Self Test is part of the basic input / output system (Baslc lnput Output System, referred to as BI0S). When the computer power is turned on, it will first execute the p〇ST program to test or initialize the hardware. The operating system will not load until the hardware devices are normal. The POST program is composed of a series of sub-routines. Each sub-routine can contain several hardware testing or initialization actions; each sub-routme is executed sequentially in the POST stage. At the same time, the code of the sub-routine will be output to the Debug port of a specific I / O address. When the POST test stops due to an error in the execution of an action, you can read Debug ρ 〇Γΐ; to know which subroutine caused the error. Even if the technicians know that during the POST test, the error occurred in that sub-routine, but they still can't correctly judge that the X hardware happened early, because it may be busy in a sub-routine The classification of 4 inch 疋 or a specific step design 'test and initialize multiple hardware devices, so even if you know that the error occurred in this sub-rout ine, you still ca n’t determine which hardware error caused it. .

575805 五、發明說明(2) 例如現有的技術中,某一電腦系統之POST 01的 s u b - r〇u 11 n e中,需執行下列四個步驟: 1. Out debug port with POST function number 二 01h 2. call POST_01h sub—routine : • Setup HDD controller • Reset HD drivers • Update CPU micro-code •Config and enable L2 cache 【POST程式例一】 而上述P 0 S T程式的s u b - r o u t l n e在開始執行前,將會 輸出 個〇1 h的值’如果糸統當在此一 g u b - r〇u t i n e中,則 無法知道是HDD controller有問題,還是在enabie cache 時有問題。 所以’技術人員必需再花費時間針對該sub —r〇ut ine 中的每個硬體進行細部測試,著實浪費許多時間及人力。 【發明之目的及概述】 本叙月的主要目的就是要提供一種專為BIOS在 P0ST(Power 〇n Self Test)階段,可以正確找出造成測試 出錯之硬體或原因的除錯方法。 本务明的另一目的在提供一種可以正確找出錯誤原 因又不致影響B I 0S在使用時之執行效率的除錯方法。 本t月的方去主要是在測試或初始化之硬體超過/個以上 ,是1 °式步冗長的s u b - r〇u 11 n e中的適當位置,插入一 錯"吳輸出柏令」,用以在任何一個硬體測試或初始化之 ill »·ι ill575805 V. Description of the invention (2) For example, in the prior art, in a computer system of POST 01 sub-r0u 11 ne, the following four steps need to be performed: 1. Out debug port with POST function number II 01h 2 call POST_01h sub-routine: • Setup HDD controller • Reset HD drivers • Update CPU micro-code • Config and enable L2 cache [POST program example 1] Before the sub-routlne of the above P 0 ST program starts, it will Output a value of 〇1 h 'If the system is in this gub-routine, you cannot know whether there is a problem with the HDD controller or a problem with the enabie cache. Therefore, the technician must spend time performing detailed testing on each piece of hardware in the subroutine, which is a real waste of time and labor. [Objective and Summary of the Invention] The main purpose of this month is to provide a debugging method designed for the BIOS in the P0ST (Power On Self Test) stage to correctly find the hardware or cause of the test error. Another purpose of the present invention is to provide a debugging method that can correctly find the cause of an error without affecting the execution efficiency of B I 0S in use. This month's side is mainly in the test or initialization of more than / more than the hardware, is a 1 ° step verbose sub-r〇u 11 ne in the appropriate place, insert a wrong "Wu output Bailing", Ill to test or initialize on any hardware »· ι ill

II 11 575805II 11 575805

575805575805

但是在加上前述的「錯誤輸出指令」之後,p〇sT程 在B I 0S之中所佔的空間勢必超過其原先所設計的大小,= 且這種應用於BIOS的Debug功能對於消費者而古,並不+ 要,而且過長過大的POST程式也會影響BI0S的執行效率 因此、在本發明之主要步驟中使前述「錯誤輸出指 令」致能的步驟,其功能便是用於決定B I 〇s的版本,也就 是透過這個步驟的加入,將可以決定含有p〇ST程式的Bi〇s 是出廠前供技術人員除錯測試的「測試版β〗〇s」,亦或是 正式出廠供消費者使用的「正式版B I 0S」;為了實現此一 功能,本發明係在每一個「錯誤輪出指令」之前加入一個 「條件判斷式」,當此一「條件判斷式」成立時,才會在 進行B I 0 S的P 0 S T測試作業中’對本發明所加入的r錯誤輸 出指令」進行編譯,使其正常的執行,用以在 sub-rout ine中的任一個硬體進行測試或初始化步驟之 後,輸出某特定值到Debug port。 以前述的「P 0 S T程式例一」為例,若依據本發明之方 法實施,則其中P〇S T 0 1的s u b - r 〇 u t i n e將改寫如下: 1. 0ut debug port with POST function number 二 〇 i h 2. call POST_01h sub —routine : • Setup HDD controller • i f #debug enab 1 e < ——插入的「條件判斷式」 out debug port with Elh < ——插入的「錯誤輸 出指令」= • Reset HD driversBut after adding the aforementioned "error output instruction", the space of p0s process in BI 0S is bound to exceed its original designed size, and this Debug function applied to BIOS is old for consumers. It is not necessary, and the POST program that is too long and too large will also affect the execution efficiency of BIOS. Therefore, in the main step of the present invention, the step of enabling the aforementioned "error output instruction" function is used to determine BI 〇 The version of s, that is, through the addition of this step, will determine whether Bi0s containing the p〇ST program is the "beta version β〗 〇s" for technicians to debug and test before leaving the factory, or it is officially shipped for consumption. In order to realize this function, the present invention adds a "conditional judgment formula" before each "error rotation instruction", and only when this "conditional judgment formula" is true, In the P 0 ST test job of BI 0 S, compile the "r error output instruction added by the present invention" to make it execute normally for testing or initialization on any hardware in the sub-rout ine After the step, output a specific value to the Debug port. Taking the aforementioned "P 0 ST program example one" as an example, if implemented according to the method of the present invention, the sub-r 〇utine of P 0ST 0 1 will be rewritten as follows: 1. 0ut debug port with POST function number 20 ih 2. call POST_01h sub —routine: • Setup HDD controller • if #debug enab 1 e < ——conditional judgment inserted out debug port with Elh < ——error output instruction inserted = • Reset HD drivers

575805575805

• i f #debug enable &lt; — 一插入的「條件判斷气 錯誤輪 out debug port with E2h &lt;一〜插入的 出指令」 • Update CPU micro-code • if #debug enable &lt; — out debug port with E3h 出指令」 • Con f i g and enable L2 cache • if #debug enable &lt; — out debug port with E4h 出指令」 【POST程式例二】 而在上述的POST程式例二之中的「Elh」「E 3 h」與「E 4 h」,則是各個「錯誤輸出指令 , debug port的特定值,當然這個特定值並非僅限於2 ^ 子中的值。 ; 插入的 &lt; 條件判斷式 插入的「錯誤輪 -插入的「條I 钛件判斷式 &lt;一〜插入的「 」 °錯誤輪 ~E2h」 輪出至 例 依據本發明所揭露技術手段,位於「錯誤輸出指令」 之前的「條件判斷式」,可以藉由讀取某一個由程式設計 者所指定之特定變數的值來決定此一條件判斷式是否成 立,也可以是指除了某一特定值之外便视為無效的判斷 式。而在上述P 〇 s T程式例二之中的丨丨d e b u g丨,就是〆個又 數,而這個變數的資料格式我們可以定義為,個遞御指令 (fai 1 or true)。所以、技術人員可以透過下遠^皮邏科• if #debug enable &lt; — an inserted "condition judgment gas error round out debug port with E2h &lt; ~~ insert out instruction" • Update CPU micro-code • if #debug enable &lt; — out debug port with E3h “Command” • Con fig and enable L2 cache • if #debug enable &lt; — out debug port with E4h Command ”[POST Program Example 2] In the above POST Program Example 2" Elh "" E 3 h "And" E 4 h "are the specific values of each" error output instruction, debug port, of course, this specific value is not limited to the value in 2 ^ sub. "The inserted" conditional error- " Inserted "Bar I Titanium Judgment Formulas" <1 ~ Inserted "" ° Error Wheel ~ E2h "Turning out to the example According to the technical means disclosed in the present invention, the" Condition Judgment Formula "before the" Error Output Command "can be Determine whether this conditional judgment is valid by reading the value of a specific variable specified by the programmer. It can also refer to a judgment that is considered invalid except for a specific value. In the second example of the above P 0 s T program, 丨 丨 e b u g 丨 is a number and a number, and the data format of this variable can be defined as a recursive instruction (fai 1 or true). Therefore, technical staff can

575805575805

五、發明說明(6) 值的方式使這個條件判斷式成立,進而使得Bl〇s在進行 post測試作業之前,決定是否要將本發明所加入的「^誤 輪出指令」編碼加入POST程式之中。 一但「條件判斷式」的條件成立,本發明所加入的 「錯誤輸出指令」就會被編譯加入P0ST程式之中,也就是 5兒「錯誤輸出指令」將被致能(e n a b 1 e ),用以在 、 sub~rout ine中的任一個硬體進行測試或初始化步驟之 後,輸出某特定值到Debug port。當然、為了提高BI〇s在 出廠前的除錯測試效率,技術人員可以先依一般的測試方 式在「錯決輸出指令」未致能(disable)的情形下對Bi〇s 進行POST測試,假若發現某一個B I 0S發生故障或錯誤時, 再重新透過下達指令的方式使「錯誤輸出指令」致能 (e n a b 1 e )(此時的B I 0 S將變成所謂的「測試版b I 〇 $」),以 便進一步追蹤查出造成B I 0S錯誤的硬體或原因。一旦B I 〇s 通過POST測試出廠,為了不影響BIOS在日後被使用者使用 時的執行效率,技術人員將同樣可以透過下達指令的方式 使「錯誤輸出指令」未致能(d i s a b 1 e )(此時的b I 〇 s將變成 所謂的「正式版B I 0 S」)’因此、在一般消費者使用b i q s 時,本發明在P 0 S T程式之中加入的「錯誤輸出指令」就不 會被編譯加入POST程式,而不影響BIOS的執行效率。 最後請參閱「第1圖」’係為依據本發明之技術設計 完成之POST程式的完整運作流程;首先,技術人員設定致 能變數的值(步驟1 0 )’以決定在P 0 S T測試的過程中是否要 在任一個硬體進行測試或初始化步驟之後,輸出某特定值 I: Μ 1«V. Explanation of the invention (6) The method of the value makes this condition judgment formula true, thereby making BlOS decide whether to add the "^ error rotation out instruction" code added by the present invention to the POST program before performing the post test operation. in. Once the condition of the "conditional judgment formula" is satisfied, the "error output instruction" added by the present invention will be compiled into the P0ST program, that is, the "error output instruction" will be enabled (enab 1 e), It is used to output a specific value to the Debug port after the test or initialization step in any of the hardware in sub ~ routine. Of course, in order to improve the efficiency of BI0s's debugging test before leaving the factory, technicians can first perform a POST test on Bi0s under the condition that the "false output instruction" is disabled according to the general test method. When a fault or error is found in a certain BI 0S, the "error output command" is enabled again by issuing a command (enab 1 e) (At this time, BI 0 S will become the so-called "beta version b I 〇 $" ) To further track down the hardware or cause of the BI 0S error. Once BI 〇s passes the POST test and leaves the factory, in order not to affect the execution efficiency of the BIOS when it is used by users in the future, technicians will also be able to disable the "error output command" by issuing a command (disab 1 e) (this At this time, b I 0s will become the so-called "official version BI 0 S"). Therefore, when the general consumer uses biqs, the "error output instruction" added to the P 0 ST program of the present invention will not be compiled Add POST program without affecting BIOS execution efficiency. Finally, please refer to "Fig. 1" for the complete operation flow of the POST program designed according to the technology of the present invention. First, the technician sets the value of the enabling variable (step 10) to determine the test at P 0 ST Is it necessary to output a specific value I after any hardware test or initialization step: Μ 1 «

IIII

IIIIII

第10頁 575805 五、發明說明(7) 到Debug port。接著依序執行POST程式中的第一個 sub-routine(步驟11) ’直至全部的sub-routine執行完畢 便結束P 0 S T的測試(步驟1 6 )。在每一個s u b - r 〇 u t i n e中同 樣地將先依序執行每一個硬體測試或初始化步驟(步驟 1 2 ),接著在致能變數被設定為”致能”時(步驟1 3 ),輸出 某特定值到Debug port(步驟14),反之當致能變數被設定 為π未致能”時(步驟1 3 ),則繼續進行迴圈直至目前之 sub-routine中的全部硬體進行測試或初始化步驟執行完 畢(步驟1 5 ),然後進入由(步驟1 1 )與(步驟1 6 )所構成的迴 圈,直至全部的sub-routine都執行完畢,便結束post的 測試。 【達成之功效】 1 ·可以正確地找出造成測試出錯之硬體或原因。 2·節省時間及人力。假設一個BIOS的測試因採用此法, 平均可以節省修護時間3 〇分鐘,則每丨〇 〇 〇片總共將可省 下極為可觀的工時。 3·不影響正式版BI〇S的執行效率。由於在編譯BIOS的 P^ST程式碼時,可以藉由下達適當的指令將BIOS編譯成 供測試用之「測試版BIOS」或正式出貨用之「正式版 ϋ ^」’兩者提供不同之用途,不會互相影響,更不合 衫:到正式版B I 0S的執行效率。 曰 以侷^ 1迷者,僅為本發明的較佳實施例而已’並非用 做之^ =明之實施範圍;凡依本發明的申請專利範圍所 、、文化與修飾,皆為本發明的專利範圍所涵蓋。Page 10 575805 V. Description of the invention (7) Go to Debug port. Then, the first sub-routine in the POST program is sequentially executed (step 11) 'until all sub-routines are executed, and the P 0 S T test is ended (step 16). In each sub-routine, each hardware test or initialization step will be executed in sequence (step 12), and then when the enable variable is set to "enable" (step 1 3), output A certain value to the Debug port (step 14), otherwise when the enabling variable is set to π not enabled "(step 13), the loop continues until all the hardware in the current sub-routine is tested or After the initialization step is completed (step 15), then enter the loop formed by (step 11) and (step 16) until all sub-routines have been executed, and the post test is ended. [Achieved effect ] 1 · You can correctly find the hardware or cause of the test error. 2 · Save time and labor. Assuming that a BIOS test uses this method, it can save 30 minutes of repair time on average. The film can save a considerable amount of man-hours in total. 3. Does not affect the execution efficiency of the official version of BIOS. Because when compiling the P ^ ST code of the BIOS, you can compile the BIOS for testing by issuing appropriate instructions. Used "Beta B "IOS" or "Official Version ϋ ^" for official shipments, both provide different uses, will not affect each other, and are more unsuitable: to the implementation efficiency of the official version B I 0S. It is said that the fans are only the preferred embodiments of the present invention, and are not intended to be used ^ = the scope of implementation; all patents, cultures, and modifications according to the scope of the present invention are patents of the invention Covered.

Η 第11頁 575805Η Page 11

第12頁Page 12

Claims (1)

575805 六、申請專利範圍 1. 一種BIOS之追蹤除錯方法,用以在BI〇s的⑼””㈣” On Sel f Test)階段,正確找出造成測試出錯之硬體 或原因的除錯方法,其包括有·· 插入一「錯誤輸出指令」的步驟,係在p〇ST程式 之sub-rout ine中的任一個硬體測試或初始化步驟之 後加入一種「錯誤輸出指令」,用以在進行該硬體測 试或初始化步驟之後輸出某特定值到D e b u g p 〇 r t ;以 及 驟 式 令 使如述「錯誤輸出指令」致能(e n a b 1 e )的步 ‘在遠「錯誤輸出指令」之前加入一條件判斷 用以在條件成立時致能(e nab 1 e )該「錯誤輸出指 ’用以輸出某特定值到Debug port。 2·如申請專利範圍第1項所述BIOS之追蹤除錯方法,其中 該條件判斷式是否成立係由設定一特定變數的值,以 及判斷該特定變數之值所決定。 3·如申請專利範圍第2項戶斤述BIOS之追蹤除錯方法,其中 更包括有一設定該特定變數值的步驟。 4 ·如申請專利範圍第1項戶斤述B I 0S之追蹤除錯方法,其中 該「錯誤輪出指令 係在該條件成立時才被編譯而且 被加入p〇ST程式之中。575805 6. Application Patent Scope 1. A BIOS tracking and debugging method used to correctly find the hardware or cause of the testing error during BI0's "" "㈣" On Sel f Test) phase , Which includes the step of inserting an "error output instruction", which is added to an "error output instruction" after any hardware test or initialization step in the sub-rout ine of the POST program, which is used to perform After the hardware test or initialization step, output a certain value to Debugp 〇rt; and the step-by-step order to enable the "error output instruction" to enable (enab 1 e), add a step before the "error output instruction" Condition judgment is used to enable (e nab 1 e) when the condition is satisfied. The "error output means' used to output a specific value to the Debug port. 2. As described in the first patent application scope, the BIOS debug method, Whether the condition judgment formula is established or not is determined by setting a value of a specific variable and judging the value of the specific variable. 3. According to the second item of the patent application scope, a method for tracking and debugging the BIOS is described. It includes a step of setting the specific variable value. 4 · As in the first scope of the patent application, the BI 0S tracking and debugging method, where the "error rotation instruction is compiled and added to the p 〇ST program.
TW89127656A 2000-12-22 2000-12-22 Tracking and debugging method of BIOS TW575805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW89127656A TW575805B (en) 2000-12-22 2000-12-22 Tracking and debugging method of BIOS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW89127656A TW575805B (en) 2000-12-22 2000-12-22 Tracking and debugging method of BIOS

Publications (1)

Publication Number Publication Date
TW575805B true TW575805B (en) 2004-02-11

Family

ID=32733947

Family Applications (1)

Application Number Title Priority Date Filing Date
TW89127656A TW575805B (en) 2000-12-22 2000-12-22 Tracking and debugging method of BIOS

Country Status (1)

Country Link
TW (1) TW575805B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI582699B (en) * 2016-03-18 2017-05-11 神雲科技股份有限公司 Boot Status Notification Method and Server System Using the Same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI582699B (en) * 2016-03-18 2017-05-11 神雲科技股份有限公司 Boot Status Notification Method and Server System Using the Same

Similar Documents

Publication Publication Date Title
US7533294B2 (en) Functional coverage driven test generation for validation of pipelined processors
Kaivola et al. Replacing testing with formal verification in intel coretm i7 processor execution engine validation
US7945888B2 (en) Model-based hardware exerciser, device, system and method thereof
JP4266226B2 (en) Design verification system and method using checker validated selectively
US20070143093A1 (en) System and method to simulate conditions and drive control-flow in software
WO2003054666A2 (en) System and method for automated test-case generation for software
WO2013007068A1 (en) Automatic test system and method oriented to functions of hardware apparatus
US20080167854A1 (en) System and Method for Incorporating Design Behavior and External Stimulus in Microprocessor Emulation Model Feedback Using a Shared Memory
US10642678B1 (en) PCI/PCIe-non-compliance-vulnerability detection apparatus and method
JP2001222442A (en) Method for testing pipe line and method for generating pipe line test instruction and its storage medium
US7908596B2 (en) Automatic inspection of compiled code
Fadiheh et al. Symbolic quick error detection using symbolic initial state for pre-silicon verification
EP3274838A1 (en) Technologies for application validation in persistent memory systems
CN1936860A (en) Method for realizing supporting of EJTAG detection in instruction grade random detection
WO2020113526A1 (en) Chip verification method and device
US7366951B2 (en) Method and apparatus for test program generation based on an instruction set description of a processor
TW575805B (en) Tracking and debugging method of BIOS
US20210326243A1 (en) Dynamic reordering of test case execution
TW200415461A (en) Program debugging method
US20020169997A1 (en) BIOS debug method
Eklow et al. Simulation based system level fault insertion using co-verification tools
Bertacco Post-silicon debugging for multi-core designs
WO2021247074A1 (en) Resumable instruction generation
Ji et al. Design and implementation of retargetable software debugger based on gdb
Bair et al. Functional verification of the z990 superscalar, multibook microprocessor complex