This application claims the priority benefit of Taiwan application serial no. 97115578, filed on Apr. 28, 2008. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of specification.
1. Field of the Invention
The present invention relates to a basic input output system (BIOS) of a computer and, more particularly, to a motherboard, a method for recovering the BIOS thereof and a method for booting a computer.
2. Description of the Related Art
BIOS program codes are generally stored in a flash memory. The flash memory storing the BIOS program codes, called BIOS unit herein, is assembled on the motherboard and is electrically connected with a south bridge chip of the motherboard through a bus. During operation, the BIOS program codes may be damaged inadvertently. For example, in the process of updating the BIOS program codes, sudden power failure may lead to the damage of the BIOS program codes, which makes the computer cannot be booted up normally. The users have to send the computer back to the original manufacturer to recover the BIOS program codes. However this increases the reconditioning cost of the original manufacturer.
The present invention provides a motherboard, a method for recovering the BIOS thereof and a method for booting a computer to improve the existing technical.
The method for booting the computer according to the invention includes the steps of executing first program codes of a first boot block of a first BIOS unit, executing second program codes of a second boot block of a second BIOS unit, and executing BIOS main program codes of the second BIOS unit.
The method for recovering the BIOS provided in the invention is adapted to a first BIOS unit and a second BIOS unit. The first BIOS unit includes a first boot block and a backup file. The second BIOS unit includes a second boot block and BIOS main program codes. The method for recovering the BIOS includes the steps of executing the first boot block, executing the second boot block, executing the BIOS main program codes, and overwriting the BIOS main program codes with the backup file when the BIOS main program codes are abnormal.
The motherboard provided in the invention is assembled in the computer system. The motherboard includes a chipset, a first BIOS unit and a second BIOS unit. The first BIOS unit is coupled with the chipset and includes a first boot block. The second BIOS unit is coupled with the chipset and includes a second boot block and BIOS main program codes. When the computer is booted up, the first boot block of the first BIOS unit is executed, and then the second boot block of the second BIOS unit is executed. Afterwards, the BIOS main program codes are executed.
The invention has beneficial effects. In the embodiment of the invention, two storage units are used to store the firmware for booting the computer. If the second BIOS unit is damaged by improper operations, by virtue of the mechanism of the first boot block of the first BIOS unit, users can recover the damaged second BIOS unit through an external flash memory or a floppy drive, or make the backup file of the first BIOS unit recover to the second BIOS unit automatically. According to this, the problem that the computer system cannot be booted up because of damage is avoided.
These and other features and advantages of the present invention will become better understood with regards to the following description, appended claims, and accompanying drawings.
a is a functional block diagram showing two BIOS units according to the first embodiment of the invention;
b is a functional block diagram showing two BIOS units according to a second embodiment of the invention;
The CPU 11, the chipset 12, the first BIOS unit 13 and the second BIOS unit 14 are assembled on the motherboard 10. In the embodiment, the chipset 12 includes a north bridge chip (not shown) and a south bridge chip (not shown). In other embodiments, the chipset 12 also may be integrated in the CPU 11.
The chipset 12 is respectively coupled with the CPU 11, the first BIOS unit 13 and the second BIOS unit 14. The second BIOS unit 14 is also coupled with the first BIOS unit 13.
In the embodiment, the first BIOS unit 13 and the second BIOS unit 14 are electrically connected with the chipset 12 through a transmission bus, respectively. For example, the first BIOS unit 13 is electrically connected with the chipset 12 through a first serial peripheral interface (SPI) bus, wherein the first SPI bus includes a first chip select line (CS1#); the second BIOS unit 14 is electrically connected with the chipset 12 through a second SPI bus, wherein the second SPI bus includes a second chip select line (CS2#). In
a is a functional block diagram showing two BIOS units according to the first embodiment of the invention. The first BIOS unit 13 includes a first boot block 131. The second BIOS unit 14 includes a second boot block 141 and BIOS main program codes 142.
When the computer system is booted up, the program codes of the first boot block 131 and the second boot block 141 are executed first, and they are responsible for the most basic and simplest initialization of the computer hardware. For example, the first boot block 131 is responsible for booting simpler system such as supporting the starting of a floppy drive and showing of graphic cards.
In the embodiment, the first boot block 131 and the second boot block 141 are respectively stored in the first BIOS unit 13 and the second BIOS unit 14. In the embodiment, the first boot block 131 of the first BIOS unit 13 cannot be updated, while the second boot block 141 of the second BIOS unit 14 can be updated. Furthermore, in the embodiment, the first BIOS unit 13 is coupled with the second BIOS unit 14 in series. Namely, after the computer system finishes executing the booting process in the first boot block 131 of the first BIOS unit 13, the computer system executes the second boot block 141 of the second BIOS unit 14.
Thereby when the second boot block 141 is damaged, the computer system can still be booted up through the first boot block 131 to recover the second boot block 141. When the BIOS main program codes 142 are damaged, the computer system can still be booted up through the first boot block 131 to recover the BIOS main program codes 142 by a floppy drive or other external storage devices.
b is a functional block diagram showing two BIOS units according to a second embodiment of the invention. In the embodiment, the first BIOS unit 13 includes a first boot block 131 and first BIOS unit main program codes 132. The second BIOS unit 14 includes a second boot block 141 and second BIOS unit main program codes 142′. When the second BIOS main program codes 142′ are damaged, the computer system can still use the first BIOS main program codes 132 to recover the second BIOS main program codes 142′.
In a preferred embodiment of the invention, the first BIOS unit 13 is a read only memory (ROM) to avoid overwriting or damaging the first boot block 131 or the first BIOS main program codes 132 in the first BIOS unit 13. In other embodiments, the first BIOS unit 13 also may be a non-volatile memory, such as a flash memory. In the preferred embodiment of the invention, the second BIOS unit 14 is a non-volatile memory in which data stored can be rewritten.
When the computer system 1 is booted up, the first program codes of the first boot block 131 in the first BIOS unit 13 are executed (step S201).
Then, the computer system 1 executes the second program codes of the second boot block 141 in the second BIOS unit 14 (step S203). During executing, if the second boot block 141 is not abnormal, the computer system 1 executes BIOS main program codes 142 (step S205) to boot the computer.
When the computer system 1 executes the second boot block 141 of the second BIOS unit 14 or the BIOS main program codes 142, if the computer is down or has errors, the computer system 1 executes a reset instruction to update BIOS main program codes 142 through rebooting.
As shown in
Afterwards, the computer system 1 determines whether the second boot block 141 is abnormal (step S405). If yes, the computer system 1 automatically executes the reset instruction (step S407) to utilize a floppy drive, a CD-ROM drive or other external storage devices to recover the second boot block 141. If no, the computer system 1 executes BIOS main program codes 142 (step S409).
In other embodiments, when the computer system 1 determines that the second boot block 141 is abnormal, the computer system 1 automatically executes the reset instruction to utilize the first boot block 131 to recover the second boot block 141.
In the step S405, the computer system 1 can determine whether the second boot block 141 is abnormal through timing unit. In the embodiment, the timing unit is realized by software means, which has, for example, the program codes written in loop mode.
In other embodiments, the timing unit is realized by hardware as shown in
For example, the computer system 1 can use the timing unit realized by hardware or software to determine whether the program codes of the second boot block 141 are executed within a predetermined time period. When the second boot block 141 is down or fails, the computer system 1 executes a rest instruction. For example, if the predetermined time period is four seconds, when the computer system 1 does not complete executing the second boot block 141 in four seconds, the computer system automatically executes the reset instruction.
In the step S411, the computer system 1 determines whether the BIOS main program codes 142 are abnormal. If the BIOS main program codes 142 are not abnormal to boot the computer, the computer system 1 starts operating system (step S417). If the BIOS main program codes 142 are abnormal, the computer system 1 determines whether the operating frequency of the CPU 11 exceeds a predetermined value (step S413).
Namely, in the step S413, the computer system 1 determines whether the overclocking of the CPU 11 causes the BIOS main program codes 142 to be executed abnormally. If the abnormality is caused by the overclocking, the computer system 1 executes the first reset instruction, and loads a default value of the operating frequency to make the computer system 1 operate normally (step S415).
Certainly, if the abnormality of the BIOS main program codes 142 is not caused by the overclocking, the computer system 1 executes the second reset instruction (return to the step S407) to recover the BIOS main program codes 142 by a floppy drives a CD-ROM drive or other external storage devices.
The first BIOS unit 13 can store a backup file. When the second BIOS unit 14 is down or damaged, the second BIOS unit 14 is recovered automatically by the backup file.
In detail, the first BIOS unit 610 has the backup file 612 such as a backup of the BIOS program codes besides the first boot block 611. Thereby the first BIOS unit 610 and the second BIOS unit 620 can be considered as firmware for booting the computer. When the second BIOS unit 620 is damaged, the first BIOS unit 610 recovers the backup file to the second BIOS unit 620 automatically. When the computer is booted up next time, the second BIOS unit 620 is recovered, and the process of executing the BIOS main program codes 622 remains the same: the first boot block 611 is executed first, and then the second boot block 621 and the BIOS main program codes 622 of the second BIOS unit 620 are executed.
In the step S705, the system determines whether the second boot block 621 is abnormal. If the second boot block 621 is abnormal, the system automatically executes the first reset instruction (step S707).
When the system determines that the second boot block 621 is abnormal after executing the reset instruction, the system automatically retrieves the backup file 612 from the first BIOS unit 610 to overwrite the second boot block 621 (step S709) to make the second boot block 621 execute normally.
If the second boot block 621 is normal, the system executes the BIOS main program codes 622 (step S711). In the step S713, the system determines whether the BIOS main program codes 622 are abnormal. If the BIOS main program codes 622 are normal, the system starts the operating system (step S719). If the BIOS main program codes 622 are abnormal, the system determines whether the operating frequency exceeds the predetermined value.
If the abnormality is caused by the overclocking, the system executes the reset instruction and loads a default value of the operating frequency of the CPU (step S717) to make the system operate normally. However, if the abnormality is not caused by the overclocking, the system also executes the second reset instruction (return to step S707). When the system determines that the second boot block 621 is abnormal, after the system executes the reset instruction, the system automatically retrieves the backup file 612 from the first BIOS unit 610 to overwrite the BIOS main program codes 622 (step S709). Thus, the BIOS main program codes 622 are executed normally.
To sum up, in the embodiment of the invention, when the second BIOS unit is damaged because of some improper operation, the first boot block of the first BIOS unit is used to recover the damaged second BIOS unit by an external storage device such as a flash memory or a floppy drive to automatically recover the backup program codes of the first BIOS unit to the second BIOS unit. Thus, the problem that the system cannot be booted up because of damage is avoided, and maintaining cost decreases.
Although the present invention has been described in considerable detail with reference to certain preferred embodiments thereof, the disclosure is not for limiting the scope of the invention. Persons having ordinary skill in the art may make various modifications and changes without departing from the scope and spirit of the invention. Therefore, the scope of the appended claims should not be limited to the description of the preferred embodiments described above.
Number | Date | Country | Kind |
---|---|---|---|
97115578 | Apr 2008 | TW | national |