A file switching method of a basic Input/Output System (bios) file is disclosed. Upon a received read instruction, a timer for a predetermined timing is initiated, and a first data page having a requested data is read from a first bios file. An error correction check on the first data page is performed to check if any error in the first data page. If an error is occurred in the error correction check, repeating the step “reading the first data page”. If number of times of the repeating step exceeds a predetermined number, or if the predetermined timing is expired, a second data page having the requested data is read from a second bios file according to the read instruction.
|
1. A file switching method of basic Input/Output System (bios) files, comprising:
receiving a read instruction, wherein the read instruction comprises a byte relative address, a data block relative address and a data page relative address are calculated according to the byte relative address;
initiating a timer for a predetermined timing according to the read instruction;
reading a first data page having a requested data from a first bios file according to the read instruction;
performing an error correction check on the first data page;
repeating the step of reading the first data page if an error is occurred in the error correction check and counting a number of times of the repeating step;
switching to a second bios file, if the number of times of the repeating step exceeds a predetermined number, or if the predetermined timing is expired; and
reading a second data page having the requested data from the second bios file according to the read instruction.
5. A controller supporting switching of bios files, comprising:
a timer, initiating timing for a predetermined timing and generating a time signal according to receiving of a read instruction;
an error correction check module, performing error correction check on a data page from a first bios file;
a counter, coupled to the error correction check module, generating a count signal according to the number of times the data page is re-read if an error is occurred in the error correction check;
a trigger module, receiving the time signal from the timer and the count signal from the counter, and generating a switching signal if the predetermined timing is time out or if the count signal exceeds a maximal re-reading count; and
an address computation module, generating a read address according to a byte relative address and the switching signal, wherein the address computation module computes corresponding data block relative address and data page relative address according to the byte relative address.
2. The file switching method of
searching the first bios file according to a file pointer pointing to a start address of the first bios file; and
adjusting the file pointer to a start address of the second bios file, if the number of times of the repeating step exceeds a predetermined number, or if the predetermined timing is expired.
3. The file switching method of
4. The file switching method of
6. The controller of
7. The controller of
8. The controller of
9. The controller of
|
1. Field of the Invention
The invention relates to Basic Input Output System (BIOS) in computer systems, and in particular, to an automatic switching method of multiple BIOS system files in a computer system and device thereof.
2. Description of the Related Art
A BIOS (Basic Input Output System) or a ROM-BIOS (read-only memory basic input output system), is a firmware permanently programmed in a computer for a computer system initialization and operation. The BIOS could provide the lowest level and most direct hardware control for the computer. Specifically, basic input output system serves to provide system testing and initialization upon computer booting.
In the startup process of a computer system, Power On Self Test (POST) is initially performed to check if all components are present and functioning properly. After that, system initialization is performed, including reconstructing of broken vectors, setting registers, and performing initialization and tests on external devices. An important part of the startup process is the BIOS file, comprising primarily parameters for hardware devices. During a computer power-up, the parameters in the BIOS file are read out and compared with actual hardware devices. If the parameters in the BIOS file match with the actual hardware devices, the computer starts booting process of an operation system. Otherwise, the startup process of the computer system is stopped.
However, if the storage media storing the BIOS file or the signal interconnection is not working, for example, EEPROM chip 16 is damaged, or the interconnecting wires between the EEPROM chip 16 and south bridge chip 14 are not working, during the startup process, the computer continually tries to read BIOS file 18 without carrying on the startup process, or issuing an error signal. Under this condition, despite the presence of a backup BIOS file in the computer system, the computer cannot switch automatically to the backup BIOS file to read information and will remain disabled.
Thus it is crucial for a computer system with multiple BIOS files to be able to switch automatically to another BIOS file, when the storage media storing the present BIOS files is damaged.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
According to an embodiment of the invention, a file switching method of a Basic Input/Output System (BIOS) file is disclosed. Upon a received read instruction, a timer for a predetermined timing is initiated, and a first data page having a requested data is read from a first BIOS file. An error correction check on the first data page is performed to check if any error in the first data page. If an error is occurred in the error correction check, repeating the step “reading the first data page”. If number of times of the repeating step exceeds a predetermined number, or if the predetermined timing is expired, a second data page having the requested data is read from a second BIOS file according to the read instruction.
According to another embodiment of the invention, a controller capable of supporting switching of BIOS files is provided. The controller comprises a timer, an error correction check module, a counter, a trigger module, and an address computation module. The timer times a predetermined timing and generates a time signal according to receiving of a read instruction. The error correction check module performs error correction check on a data page from a first BIOS file. The counter is coupled to the error correction check module, generates a count signal according to the number of times the data page is re-read if an error is occurred in the error correction check. The trigger module receives the time signal from the timer and the count signal from the counter, and generates a switching signal if the predetermined timing is time out or if the count signal exceeds a maximal re-reading count. The address computation module generates a read address according to a byte relative address and the switching signal.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
It should be noted that the BIOS controller 25 may located on a south bridge chip, BIOS files BIOS1 to BIOS4 may be stored on an identical storage medium, or different mediums. Storage medium 26 may be an NAND flash memory, or other non-volatile storage mediums.
To further understand the mechanism that the BIOS controller 25 uses to control file switching between BIOS1 to BIOS4 files, an internal structure of the BIOS file BIOS1 in storage medium 26 is illustrated as an example. Please refer to
Further, the BIOS controller 25 in
The BIOS controller 25 also comprises timer 254. The BIOS controller 25 releases a timing start signal to timer 254 upon receiving the read instruction issued by the CPU 10. The timer 254 is started according to the timing start signal from the BIOS controller 25, and outputs a time signal. The BIOS controller 25 further comprises trigger module 258 receiving the count signal issued by the counter 252 and the time signal issued by the timer 254. If the time signal from timer 254 exceeds a predetermined timing, or the count signal from counter 252 exceeds a maximal re-read count, the trigger module 258 generates a switch signal to perform BIOS file switching.
Specifically, the trigger module 258 comprises comparator 253, comparator 255, and OR gate 256. The timer 254 outputs the time signal as an input to comparator 255, another input terminal of comparator 255 receives predetermined timing M. The predetermined timing M is configured during system initialization. The comparator 255 performs comparison on the time signal and the predetermined timing M whenever the time signal from timer 254 changes, to determine whether the time signal reaches the predetermined timing M. Once the time signal of timer 254 reaches the predetermined timing M, the comparator 255 outputs a “HIGH” level signal to indicate a need for switching BIOS files. Similarly, counter 252 outputs the count signal as an input of comparator 253 in trigger module 258, another input terminal of comparator 253 receives maximal re-read count N. the maximal re-read count N is configured during system initialization. The comparator 253 performs comparison on the count signal and maximal re-read count N whenever the count signal from the counter 252 changes, to determine whether the count signal reaches the maximal re-read count N. Once the count signal of counter 252 reaches the maximal re-read count N, the comparator 253 outputs a “HIGH” level signal to indicate a need for switching BIOS files. OR gate 256 receives the output signals from the comparator 253 and the comparator 255 to generate the switching signal.
The BIOS controller 25 in the embodiment further comprises address computation module 257. The Address computation module 257 is coupled to the OR gate 256 in trigger module 258 for adjusting the file pointer to a start address of another BIOS file upon receiving the switching signal.
It is noted that the read instruction issued by the CPU 10 is typically a request to read a portion of specific data in the BIOS file. Thus, the read instruction comprises the byte relative address to instruct the BIOS controller 25 to read the data at the relative address in the BIOS file. However, according to the internal structure of the BIOS file in
Regardless of storing multiple BIOS files in an identical storage medium (
Firstly, in Step S51 the system is initialized, for example, setting the predetermined timing M of the timer 254 and maximal re-read count N of the counter 252. Next in Step S52, the BIOS controller 25 receives a read instruction issued by the CPU 10. In Step S53, the BIOS controller 25 reads a data page from first BIOS file according to the read instruction. In detail, the BIOS controller 25 calculates corresponding data block relative address and data page relative address according to a byte relative address of the BIOS file in the read instruction, and reads the corresponding data page from the BIOS file according to a file pointer, the data block relative address and the data page relative address. In Step S54, the BIOS controller 25 performs ECC check on the read data page to determine the validity of the data. If no error has occurred in the ECC check, the BIOS controller 25 outputs the data page, and returns the corresponding data from the data page according to the byte relative address of the BIOS file to the CPU 10 (Step S55). If error has occurred in the ECC check, in Step S56, the counter 252 increments the count value by 1 to indicate re-read times of the data page. If the re-read count does not exceed the maximal re-read count N, the BIOS controller 25 re-issues an instruction to re-read the data page in Step S57. Conversely, if the re-read count exceeds a maximal re-read count N, then the BIOS controller 25 conducts BIOS file switching, i.e. the BIOS controller 25 adjusts the file pointer to a start address of a second BIOS file (Step S59). Next, the process returns back to Step S51 to proceed with system initialization, repeat sequential steps to perform read operation from the second BIOS file.
In addition, when receiving the read instruction, the timer 254 in BIOS controller 25 starts timing in Step S58. If the timing value of the timer 254 exceeds the predetermined timing M, i.e. the operating time exceeds the predetermined timing M, the process then enters Step S59. In Step S59, the BIOS controller 25 adjusts the file pointer to the start address of the second BIOS file. The timing procedure of timer 254 (Step S58) and the reading data page steps (Steps S53˜S57) are concurrent. Further, if the data page having required data is read out successfully by Steps S53˜S55, the timer 254 will be reset to 0. According to the multiple BIOS files automatic switching method disclosed in the invention, in the initialization process of a computer system, if the storage media of the read BIOS file or the signal connection is broken, the computer system can switch to a functional BIOS file automatically to prevent the computer system from idling with no response. In the embodiments, when the controller receives a read instruction, it detects operating time and data page re-read times to prevent system idling. People skilled in the art can recognize that the time value of timer 254 and the count value of counter 252 should be set to 0 in a reset step, which could be prior to Step S52 or next to Step S55 and Step S59.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Li, Xin-Xi, Wu, Shang-Zhi, Huang, Xin-Ping
Patent | Priority | Assignee | Title |
8060737, | Apr 17 2009 | VIDEOLABS, INC | Method and apparatus for preventing BIOS from failing to enter boot program |
8286053, | Feb 14 2006 | Fujitsu Limited | Method and apparatus for reading data |
9367392, | Aug 01 2014 | Winbond Electronics Corporation | NAND flash memory having internal ECC processing and method of operation thereof |
9442798, | Jul 31 2014 | Winbond Electronics Corporation | NAND flash memory having an enhanced buffer read capability and method of operation thereof |
9535709, | Jul 01 2015 | HONGFUJIN PRECISION ELECTRONICS TIANJIN CO ,LTD | Booting system for motherboard |
Patent | Priority | Assignee | Title |
4888691, | Mar 09 1988 | Bankers Trust Company | Method for disk I/O transfer |
6421792, | Dec 03 1998 | Lenovo PC International | Data processing system and method for automatic recovery from an unsuccessful boot |
6584559, | Jan 28 2000 | AVAYA Inc | Firmware download scheme for high-availability systems |
6651188, | Jun 29 2001 | Intel Corporation | Automatic replacement of corrupted BIOS image |
20020099974, | |||
20040158702, | |||
20070174704, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Aug 15 2007 | LI, XIN-XI | Via Technologies, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 019952 | /0731 | |
Aug 15 2007 | WU, SHANG-ZHI | Via Technologies, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 019952 | /0731 | |
Aug 15 2007 | HUANG, XIN-PING | Via Technologies, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 019952 | /0731 | |
Oct 12 2007 | VIA Technologies, Inc. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Mar 26 2014 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Apr 12 2018 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Apr 08 2022 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Oct 26 2013 | 4 years fee payment window open |
Apr 26 2014 | 6 months grace period start (w surcharge) |
Oct 26 2014 | patent expiry (for year 4) |
Oct 26 2016 | 2 years to revive unintentionally abandoned end. (for year 4) |
Oct 26 2017 | 8 years fee payment window open |
Apr 26 2018 | 6 months grace period start (w surcharge) |
Oct 26 2018 | patent expiry (for year 8) |
Oct 26 2020 | 2 years to revive unintentionally abandoned end. (for year 8) |
Oct 26 2021 | 12 years fee payment window open |
Apr 26 2022 | 6 months grace period start (w surcharge) |
Oct 26 2022 | patent expiry (for year 12) |
Oct 26 2024 | 2 years to revive unintentionally abandoned end. (for year 12) |