Method for automatically duplicating a BIOS

A method for automatically duplicating a BIOS, wherein in a variable memory, other than the general used space for storing system BIOS, a further space is programmed for storing the program code of a backup BIOS, when the loading of a system BIOS fails, the system will try to load the duplicate BIOS in order to prevent that the BIOS is malfunctioned by mistake of the user. Therefore, the maintenance cost is reduced and the system may be operated normally.

FIELD OF THE INVENTION

The present invention relates to a method for automatically duplicating a BIOS in order to prevent that the BIOS is malfunctioned by mistake of the user. Therefore, the maintenance cost is reduced and the system may be operated normally.

BACKGROUND OF THE INVENTION

In a general computer, a BIOS (BASIC INPUT OUPOT SYSTEM) is an set of instructions stored in a read only memory (ROM), which serves to instruct the communication between the hardware of a computer, the operating system, the application program and the peripheral devices. Since in the early computer, a read only memory is employed, since it is nonvolatile, a user can not modify and update the contents of a BIOS. However, nowadays, variable memories (such as FLADH ROM MEMOTY, EEPROM, FIRMWARE HUB) are widely used, after a computer is actuated, the BIOS is loaded into the variable memory and then it is performed. Thus, the BIOS can be updated and then the new edition of the BIOS is retained. But it is probably that the BIOS is updated by mistakes. Therefore, as the computer is re-actuated, the computer will not be operated normally. In general, a disk is sent to the buyer as he (or she buys a mother board). The disk is the updating disk of BIOS for updating the BIOS as it is abnormal. However, most of the user does not fully understand this function so to search other seller for maintaining the computer This is not only time-consuming, but also is costly both for the buyer and seller.

SUMMARY OF THE INVENTION

Accordingly, the primary object of the present invention is to provide a method for automatically duplicating a BIOS, wherein in a variable memory, other than the general used space for storing system BIOS, a further space is programmed for storing the program code of a backup BIOS, when the loading of a system BIOS fails, the system will try to load the duplicate BIOS in order to prevent that the BIOS is malfunctioned by mistake of the user. Therefore, the maintenance cost is reduced and the system may be operated normally.

According to the aforementioned description, when the system BIOS is loaded normally, the space for storing BIOS program code will store the system BIOS program code, or original code of a BIOS of other edition as a backup BIOS. After a computer is actuated, at first, the system BIOS is loaded. If it is failed, the backup BIOS is tried to be loaded so that even a computer is destroyed, it still may be operated.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

As shown in FIG. 1 , a schematic view of the variable memory is illustrated. In the present invention, a variable memory 10 (such as FLASH ROM MEMORY, EEPROM, FIRMWARE HUB) serves as an element for storing BIOS. The variable memory is divided into a plurality of blocks. Each block is programmed for storing program codes of different functions (for example, ESCD, BMI, BOOT BLOCK), and two spaces are left as BLOCK 1 and BLOCK 2 (in this embodiment, they may have a size of 64K, 128K, or 256K dependent on the specification of hardware or software). The space of BLOCK 2 has been stored in the system BIOS as the mother board is fabricated, another BLOCK 1 serves as a spare space for storing a copy of BIOS.

As shown in FIG. 2 , the block flow diagram of the present invention is illustrated. Then the computer is actuated first time, the system BIOS stored in the BLOCK 2 (referring as SOURCE 1 ) is firstly loaded the program codes itself into BLOCK 1 (referring as SOURCE 2 ) as a backup copy. Then when the computer is reactuated, by the setting of a program, the SOURCE 1 will not duplicate BIOS so as to maintain the completeness of the program code of SOURCE 2 .

After the computer is actuated, the program code of SOURCE 1 is loaded (step 20 ), then the process determines whether the loading of SOURCE 1 is successful. If yes, then the process is operated normally, the related interface in the system is actuated and the system parameter is set (step 22 ), and then the control right is transferred to the operating system (step 23 ), thus the actuation of a computer is completed. If no, the program code of SOURCE 2 is tried to be loaded (step 24 ).If yes, the aforementioned processes are performed again, and then the operating system is actuated (steps 22 and 23 ), and then the process determines whether the loading of SOURCE 2 is successful (step 25 ). If no, the system function is shut down (step 26 ), then the failure of loading BIOS is displayed for informing the user.

In order that the aforementioned function is normally operated, in the present invention, an application program is provided in the operating system for updating and maintaining the SOURCE 1 and SOURCE 2 . As shown in FIG. 3 , during the process of using an application program to update and maintain the BIOS, the new edition BIOS will be firstly stored in the BLOCK 2 (referring as SOURCE 1 ). After updating, the first actuation of the computer is re-actuated. Similarly, the program code of SOURCE 1 is copied to BLOCK 1 as the program code of SOURCE 2 (as shown in FIG. 4 ). Therefore, according to the aforementioned steps, when the loading operation is normal, the computer will derive stronger functions according to the new edition BIOS. When SOURCE 1 fails, the backup SOURCE 2 program code still serves to maintain the normality of starting up. Thus, a user has another protection.

In summary, by the automatic duplicating BIOS method of the present invention, the problem that the original BIOS is modified carelessly so that the computer can not be started up is solved. Therefore, the user may save much cost in maintenance. And, the service of the solder after sold is reduced.