Abstract:
A control chip for a boot procedure comprises a first boot program and a second boot program. Under normal conditions, the first boot program is executed to power-on a system. Under abnormal conditions, for example, when the first boot program needs to be updated or has been corrupted by a previous firmware update procedure, the second boot program is executed to update the first boot program.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to a control chip for a computer boot procedure, and more particularly to a keyboard control chip (KBC) with a first boot program and a second boot program and related method.  
         [0003]     2. Description of the Related Art  
         [0004]     Keyboard control chips for notebook computers, and some desktop computers, are used for controlling the keyboard and for booting the computing device by way of a coded boot program. When manufacturing the computer system, it may sometimes be necessary to update or repair the boot program; the only solution for this is to replace the entire keyboard control chip with an updated keyboard control chip, which increases manufacturing costs and complexity.  
         [0005]     To solve the above problem, a prior art technique utilizes a hardware switch on the motherboard to control hardware pins (such as KBC GPIO pins) of the keyboard control chip to control a boot area. However, as more and more functions are added into keyboard control chips, less and less hardware pins are available. Additionally, this technique leads to increases in material costs and a shortage of hardware pins.  
       SUMMARY OF THE INVENTION  
       [0006]     An object of the present invention is to provide a control chip for a boot procedure that comprises a first boot program and a second boot program, the second boot program executable under anomalous conditions.  
         [0007]     Another object of the present invention is to provide a control chip for a boot procedure that is able to execute a anomalous-condition boot procedure.  
         [0008]     To achieve these objects, the control chip of the present invention includes: a processor, a timer, a plurality of GPIO pins, at least one programmable memory, wherein the programmable memory has a first firmware, the first firmware coded with a first boot program executable under normal conditions, and the at least one programmable memory further comprising a second firmware, the second firmware coded with a second boot program executable under an anomalous condition. Since the second boot program provides fewer functions than the first boot program, the memory required for the second firmware may be smaller than the memory required for the first firmware.  
         [0009]     Furthermore, the present invention also provides a computer using the above-mentioned control chip, and the computer comprises a CPU, a memory, a screen, and the control chip.  
         [0010]     The present invention further provides a method of executing a boot program in the above-mentioned control chip of a computer under abnormal conditions. The method comprises receiving an initialization procedure, the initialization procedure used to completely stop power to the control chip; detecting whether an anomalous-condition procedure is executing; if the anomalous-condition procedure is executing, executing the second boot program to start the computer; otherwise executing the first boot program.  
         [0011]     With the firmware are arrangement of the above-mentioned keyboard control chip and the related method, the computer can execute the second boot program to repair or update the first boot program.  
         [0012]     Other objects, advantages, and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]      FIG. 1  is a front view of a computer according to the present invention.  
         [0014]      FIG. 2  is rear view of the computer according to the present invention.  
         [0015]      FIG. 3  is a functional block drawing of the computer according to the present invention.  
         [0016]      FIG. 4  is a schematic drawing of a keyboard control chip according to the present invention.  
         [0017]      FIG. 5  is a schematic drawing of first firmware in a keyboard control chip according to the present invention.  
         [0018]      FIG. 6  is a schematic drawing of second firmware in a keyboard control chip according to the present invention.  
         [0019]      FIG. 7  is a flowchart of a boot procedure according to the present invention.  
         [0020]      FIG. 8  is a flowchart of an anomalous condition in a first embodiment according to the present invention.  
         [0021]      FIG. 9  is a flowchart of an anomalous condition in a second embodiment according to the present invention. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT  
       [0022]     Please refer to  FIG. 1  to  FIG. 3  for the hardware structure of a computer. In this embodiment, the computer is a notebook computer, and a keyboard control chip  40  is used to control a boot procedure of the computer (of course, the control chip should not be construed as limited to keyboard control chips; for example, the control chip may be designed to receive boot signals from other devices, such as from a mouse). The following description simply uses the keyboard control chip  40  as an exemplary embodiment.  
         [0023]     The computer  10  comprises a CPU  11 , a memory  12 , a screen  13 , a keyboard  14 , a power switch  17 , a pointing device  18  (for controlling a cursor) and the keyboard control chip  40 ; the power source of the computer  10  may be a battery  15  or a power cable  16  connected to an external power supply, which is controlled by the power switch  17 . A characteristic of the present invention is that when the computer  10  is unable to execute the boot procedure normally, for example due to firmware damage or production errors, the present invention provides an anomalous-condition boot procedure to repair the original system.  
         [0024]     In order to achieve the above objective, the keyboard control chip  40  of the present invention provides an additional program area to execute the anomalous-condition boot procedure. Please refer to  FIG. 4 .  FIG. 4  is a schematic drawing of a keyboard control chip according to the present invention. The keyboard control chip  40  comprises a processor  41 , a timer  42 , a plurality of GPIO pins  44  and at least one programmable memory  43 . The processor  41  is used to execute various operational procedures in the keyboard control chip  40 ; the timer  42  keeps track of time, and the keyboard control chip  40  utilizes the GPIO pins  44  to connect to other hardware components and to transmit information. Since the processor  41 , the timer  42  and the GPIO pins  44  are well known technologies, and are not characteristics of the present invention, they require no further description. The programmable memory  43  comprises a first firmware  51  and a second firmware  52 . The first firmware  51  is used to execute a normal boot procedure for the computer  10 ; if the computer  10  has firmware update problems that cause the first firmware  51  to function abnormally, the second firmware  52  may be used to execute the anomalous-condition boot procedure for the computer  10  to repair the first firmware  51 .  
         [0025]     Please refer to  FIG. 5  and  FIG. 6 .  FIG. 5  is a schematic drawing of the first firmware in the keyboard control chip according to the present invention.  
         [0026]      FIG. 6  is a schematic drawing of the second firmware in the keyboard control chip according to the present invention. The first firmware  51  is coded with a first boot program  511 , which includes a basic boot procedure  511   a , an OS command download procedure  511   b , a temperature detection control procedure  511   c , a battery charge/discharge procedure  511   d , a built-in keyboard support procedure  511   e , a built-in pointing device support procedure  511   f  and a BIOS communication support procedure  511   g . The second firmware  52  is coded with a second boot program  521 ; when the first boot program  511  is unable to execute, or requires repair or updating, the second boot program  521  may be executed to update the first boot program  511 . Therefore, the second boot program  521  only needs to include certain necessary procedures: a basic boot procedure  521   a , an OS command download procedure  521   b , a built-in keyboard support procedure  521   e , and a built-in pointing device support procedure  521   f . Since the second boot program  521  provides fewer functions than the first boot program  511 , the memory required for the second firmware  52  may be smaller than the memory required for the first firmware  51 . The second boot program  521  uses the basic boot procedure  521   a  to start the computer  10 , and then uses the OS command download procedure  521   b  to burn, correct or modify the first boot program  511 .  
         [0000]     Please refer to  FIG. 7 .  FIG. 7  is a flowchart of a boot procedure according to the present invention.  
         [0000]     Step  701 :  
         [0027]     Receiving an initialization procedure; the initialization procedure completely stops providing power to the keyboard control chip  40 . Taking the notebook computer  10  as an example, the battery  15  or the power cable  16  connected to the external power needs to be removed to initialize the keyboard control chip  40 .  
         [0000]     Step  702 :  
         [0028]     Detecting whether the anomalous-condition boot procedure is performed. A software program for this detection step can be stored in the second boot program  521  in the second firmware  52  and is executed by the processor  41 .  
         [0029]     The contents of the anomalous-condition boot procedure are described in steps  801 ˜step  802  in a first embodiment, and in steps  901 ˜step  902  in a second embodiment.  
         [0030]     If the anomalous-condition boot procedure is performed, step  703  is executed; otherwise, step  704  is executed.  
         [0000]     Step  703 :  
         [0031]     The second boot program  521  is used to start the computer.  
         [0000]     Step  704 :  
         [0032]     The first boot program  511  is used to start the computer.  
         [0000]     Please refer to  FIG. 8 .  FIG. 8  is a flowchart of an anomalous-condition procedure in a first embodiment according to the present invention.  
         [0000]     Step  801 :  
         [0033]     The power switch  17  is pressed and held, the power cable  16  is inserted, and then the power switch  17  is released.  
         [0034]     First, a user must press and hold the power switch  17  of the computer  10 , insert the battery  15  or the power cable  16  connected to external power, and continuously hold the power switch  17  for two or more seconds and then release the power switch  17 ; since the timer  42  provides time information, the software program can determine the required time period. The time period for continuously pressing the power switch  17  can be adjusted with software parameters, and need not be limited to two seconds. The purpose of continuously holding the power switch  17  for a predetermined period of time is to prevent the user from accidentally executing the second boot program  521 .  
         [0000]     Step  802 :  
         [0035]     The power switch  17  is pressed again.  
         [0036]     This step can be skipped, as long as step  801  automatically turns on the power and step  703  continues. Step  802  is provided because most users prefer to manually turn on the power again.  
         [0037]     Since the keyboard control chip  40  can detect power supply changes via the GPIO pins  44 , when step  801  and step  802  detect unusual power supply changes, the processor  41  may execute the anomalous-condition boot procedure.  
         [0038]     Please refer to  FIG. 9 .  FIG. 9  is a flowchart for an anomalous condition procedure in a second embodiment according to the present invention.  
         [0000]     Step  901 :  
         [0039]     Pressing and holding at least one key  141  on the keyboard  14  (i.e., for more than two seconds), inserting the power cable  16  and then releasing the at least one key  141  on the keyboard  14 ; step  901  is similar to step  801 . The at least one key  141  may be a less-frequently used key, or more than one key  141  (i.e., pressing the “A”, “D”, and “G” keys together), to prevent the user from accidentally executing the second boot program.  
         [0000]     Step  902 :  
         [0040]     The power switch  17  is again pressed.  
         [0041]     As with step  802 , step  902  may also be skipped.  
         [0042]     Since the keyboard control chip  40  can detect power supply changes via the GPIO pins  44 , when step  901  and step  902  detect unusual power supply changes, the processor  41  may execute the anomalous-condition boot procedure.  
         [0043]     Although the present invention has been explained in relation to its preferred embodiment, it is to be understood that many other possible modifications and variations can be made without departing from the spirit and scope of the invention as hereinafter claimed.