Abstract:
An embodiment of the invention provides a secure boot method for an electronic device including an embedded controller and a processor. The method includes the steps of verifying a secure loader by the embedded controller, unlocking a peripheral hardware of the electronic device by the embedded controller, and executing the secure loader by the processor.

Description:
CROSS REFERENCE TO RELATED APPILCATIONS 
       [0001]    This Application claims priority of Taiwan Patent Application No. 101138577, filed on Oct. 19, 2012, the entirety of which is incorporated by reference herein. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The invention relates to a secure boot method, and more particularly to a secure boot method implemented by an embedded controller. 
         [0004]    2. Description of the Related Art 
         [0005]    Along with the popularity of computers and portable devices, consumers are now accustomed to storing a variety of information in electronic devices, for which, some of the information is regarded as information which should be secure. Currently, malicious software and Trojan programs continue to exist via the Internet, wherein secure information may be compromised or even destroyed. While antivirus software exists, some malicious software and Trojan programs load during the start-up of an electronic device before antivirus software loading, thus, not allowing the antivirus software programs to work. There are many ways to achieve secure booting, such as having a Trust Platform Module (TPM) to verify software to ensure that an electronic device can be securely booted. A TPM directly encrypts and decrypts data stored in the electronic device. Thus, even if a user&#39;s password is used without authorization, the encrypted data stored in the electronic device will not be stolen or decrypted without the corresponding TPM. However, the TPM chip increases the cost of the electronic devices. 
       BRIEF SUMMARY OF THE INVENTION 
       [0006]    An embodiment of the invention provides a secure boot method for an electronic device comprising an embedded controller and a processor. The method comprises the steps of verifying a secure loader by the embedded controller, unlocking a peripheral hardware of the electronic device by the embedded controller, executing the secure loader by the processor. 
         [0007]    Another embodiment of the invention provides a secure boot method for an electronic device comprising an embedded controller and a processor. The method comprises the steps of verifying a BIOS of the electronic device by the embedded controller, executing the BIOS and verifying an operating system loader when the BIOS is verified, when the operating system loader is verified, executing the operating system loader, by the processor, to load an operating system of the electronic device. 
         [0008]    Another embodiment of the invention provides an electronic device with a secure booting mechanism. The electronic device comprises a processor, a secure loader, a peripheral hardware and an embedded controller. The embedded controller verifies the secure loader, wherein when the secure booting mechanism is executed, the embedded controller verifies the secure loader, and when the secure loader is verified, the embedded controller unlocks the peripheral hardware and the processor executes the secure loader. 
         [0009]    A detailed description is given in the following embodiments with reference to the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]    The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein: 
           [0011]      FIG. 1  is a flow chart of a secure boot method of an electronic device according to an embodiment of the invention. 
           [0012]      FIG. 2  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. 
           [0013]      FIG. 3  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. 
           [0014]      FIG. 4  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. 
           [0015]      FIG. 5  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. 
           [0016]      FIG. 6  is a schematic diagram of an electronic device with a secure boot mechanism according to an embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0017]    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. 
         [0018]      FIG. 1  is a flow chart of a secure boot method of an electronic device according to an embodiment of the invention. The secure boot method can be applied to a portable device, a desktop or a laptop. The embodiment is illustrated with a laptop. The laptop comprises an embedded controller, controlling the power management, the battery management and the temperature control and fan control of the processor of the laptop. In another embodiment, the embedded controller is used to control the keyboard of the laptop. 
         [0019]    In the invention, when the laptop is powered up by an AC adapter, the embedded controller first executes an initialization procedure and disables the power button of the laptop. Thus, a user cannot turn on the laptop via the power button for security. Similarly, when the secure boot method is applied to the portable device in the invention, the user cannot turn on the portable device via the button. In some models of portable devices, if a user wants to update the portable device or enters an engineer mode of the portable device, the user must input some specific combination of keywords to enter the engineer mode or update the portable device. By locking the power button, a user can not update the portable device or enters an engineer mode of the portable device, and then the portable device can be booted securely, which reduces unauthorized access of the operating system of the portable device. 
         [0020]    In step S 11 , the embedded controller first verifies a secure loader. The embedded controller verifies the secure loader via a Hash verification procedure. In one embodiment, the secure loader and the BIOS are stored in the same storage device, such as a flash ROM. The embedded controller stores a correct Hash value of the secure loader and the address of the secure loader. When the embedded controller completes the initialization procedure, the embedded controller loads the secure loader and verifies whether the secure loader is modified or not. In one embodiment, when the embedded controller executes the initialization procedure, only the embedded controller is available. The other elements, circuits or peripheral devices of the electronic devices are locked, by the embedded controller, and cannot be accessed or operated. 
         [0021]    In step S 12 , if the secure loader does not pass the verification procedure, the embedded controller or processor controls the electronic device to generate a warning message to inform a user. The warning message may be a specific acoustic signal output by a buzzer or a visible flashing light of a specific LED of the electronic device. In step S 12 , if the secure loader passes the verification procedure, step S 13  is executed. In step S 13 , the embedded controller unlocks the hardware of the electronic device. At this time, the power button is unlocked and the user can turn on the electronic device via the power button. 
         [0022]    In step S 15 , the embedded controller executes a normal power management procedure. In step S 16 , the processor executes the secure loader. In step S 17 , the secure loader verifies the BIOS. In step S 18 , if the BIOS does not pass the verification procedure, the embedded controller or the processor controls the electronic device to generate a warning message to inform a user. If the BIOS passes the verification procedure, step S 19  is executed. Then, the processor executes the BIOS and loads an operating system of the electronic device. 
         [0023]      FIG. 2  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. The secure boot method can be applied to a portable device, a desktop or a laptop. The embodiment is illustrated with a laptop. The laptop comprises an embedded controller, controlling the power management of the laptop, the battery management and the temperature control and fan control of the processor of the laptop. In another embodiment, the embedded controller is the keyboard controller of the laptop. 
         [0024]    In step S 21 , the embedded controller or the processor of the electronic device determines that a power state of the electronic device is a default power state. The embodiment is illustrated with the power states of the ACPI (Advanced Configuration and Power Interface) standard. In step S 21 , it is determined whether a power configuration of the electronic device complies with a predetermined condition. For example, whether the power state of the electronic device has changed from a specific power state to a normal operation state (S 0 ). The specific power state may be the power state S 3 , S 4  or S 5 . The following paragraph explains the meaning of each of the power states. 
         [0025]    S 3  (sleeping state, or called standby state): At this state, the main memory (such as RAM) of the electronic device is still receiving power, and may be the only powered element in the electronic device. Since the operating system, programs and opened files are all temporarily saved in the main memory (RAM), the content temporarily saved in the main memory (RAM) is not be changed when the electronic device changes its power state from the power state S 3  to another power state, such as the power state S 0 . Thus, the user can recover the computer to previous state. At the power state S 3 , the private information of any executed program, such as an opened file, is not written to a nonvolatile memory, such as a hard drive. 
         [0026]    S 4  (sleeping mode): The power states S 3  and S 4  are sleeping modes, but the hardware configurations of the computer at the states are different. At the power state S 4 , most elements of the computer are not powered on. At this state, all the contents temporarily saved in the main memory (RAM) are stored in a nonvolatile memory, such as a hard drive, to protect the current state of the computer. The content of the current state comprises programs, and opened files. In other words, when the computer is resumed from the power state S 4 , the original working state is available for the user. This is the same result as when the computer is resumed from the power state S 3  to the original working state, such as the power state S 0 . The difference between the power states S 3  and S 4  is the time it takes to move the content of the main memory (RAM) to the nonvolatile memory and remove content from the nonvolatile memory to the main memory (RAM). Furthermore, the content stored in the power state S 3  is lost when a power failure happens. In the power state S 4 , content is not lost in during power failure because the content is stored in the hard drive. 
         [0027]    S 5  (soft off): Only the data of the operating system is reserved. The settings or functions of the power state S 5  is similar to those in the power state S 4 . When the computer is at the power state S 5 , the computer may be awaken via a LAN, keyboard or USB device. 
         [0028]    In step S 21 , the embedded controller or the processor of the electronic device determines whether the electronic device has entered the normal operation state S 0  from the power state, such as power state S 3 , S 4  or S 5 , whereafter, step S 22  is then executed. In step S 22 , the embedded controller first verifies a secure loader. The embedded controller verifies the secure loader via a Hash verification procedure. The embedded controller stores a correct Hash value of the secure loader and the address of the secure loader. When the embedded controller completes the initialization procedure, the embedded controller loads the secure loader and verifies whether the secure loader has been modified or not. 
         [0029]    In step S 23 , if the secure loader does not pass the verification procedure, the embedded controller or processor controls the electronic device to generate a warning message to inform a user. The warning message may be a specific acoustic signal output by a buzzer or a visible flashing light of a specific LED of the electronic device. In step S 23 , if the secure loader passes the verification procedure, step S 25  is executed. In step S 25 , the embedded controller unlocks the hardware of the electronic device. In step S 26 , the embedded controller executes a normal power management procedure. In step S 27 , the processor of the electronic device executes the BIOS or the secure loader. 
         [0030]      FIG. 3  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. The secure boot method can be applied to a portable device, a desktop or a laptop. The embodiment is illustrated with a laptop. The laptop comprises an embedded controller, controlling the power management of the laptop, the battery management and the temperature control and fan control of the processor of the laptop. In another embodiment, the embedded controller is the keyboard controller of the laptop. 
         [0031]    When the laptop is turned on, if a user wants to ensure that the operating system loaded by the laptop has not been modified by hackers, first, it must be determined whether the OS loader is reliable. The OS loader is verified by the BIOS. Thus, if the BIOS is reliable, the OS loader is also reliable. In an embodiment of the invention, verifications of the BIOS is executed by an embedded controller to ensure that the laptop can be booted securely. 
         [0032]    In step S 31 , an embedded controller of the laptop verifies the BIOS. The embedded controller verifies the BIOS via a Hash verification procedure. The embedded controller stores a correct Hash value of the BIOS and the address of the BIOS. When the embedded controller confirms that the BIOS has not been modified, step S 32  is executed. In step S 32 , the processor of the laptop executes the BIOS and verifies the OS loader in the BIOS. In another embodiment, the OS loader and the BIOS are stored in the same storage device, such as a flash ROM. In another embodiment, the OS loader and the BIOS are stored in different storage devices. For example, the OS loader is stored in the hard drive and the BIOS is stored in the flash memory. 
         [0033]    When the OS loader passes the verification procedure, step S 33  is then executed. The processor executes the OS loader to load the operating system. In one embodiment, the OS loader and the operating system are stored in the same storage device, such as a hard drive or a flash memory. In another embodiment, the OS loader and the operating system are stored in different storage devices. For example, the OS loader is stored in a flash memory and the operating system is stored in the hard drive. 
         [0034]    Thus, a safe operating system loading process is assured and the objective of secure boot is achieved. 
         [0035]      FIG. 4  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. The secure boot method is suitable for a portable device. Generally speaking, when the portable device is turned on, the operating system is loaded via an OS loader. To ensure that the portable device is booted securely, the embodiment uses a secure loader. 
         [0036]    In step S 41 , the portable device is turned on and an embedded controller of the portable device is enabled. The embedded controller acquires a secure loader from a specific address in a storage device, such as a nonvolatile memory. Then, the embedded controller verifies the secure loader. In this embodiment, the embedded controller can be used to control a keyboard. In another embodiment, the embedded controller is a controller or a control circuit, except for an application processor, of the portable device. 
         [0037]    In step S 42 , if the secure loader passes a verification process, step S 43  is executed. If the secure loader does not pass the verification process, the embedded controller or processor controls the electronic device to generate a warning message to inform a user. In step S 43 , the application processor of the portable device verifies an OS loader. In step S 45 , if the OS loader does not pass the verification process, step S 44  is executed. The embedded controller or processor controls the electronic device to generate a warning message to inform a user. If the OS loader passes the verification process, step S 46  is executed. In step S 46 , the application processor executes the OS loader to load the operating system of the portable device. 
         [0038]      FIG. 5  is a flow chart of a secure boot method of an electronic device according to another embodiment of the invention. The secure boot method can be applied to a portable device, a desktop or a laptop. The embodiment is illustrated with a laptop. The laptop comprises an embedded controller, controlling the power management of the laptop, the battery management and the temperature control and fan control of the processor of the laptop. In another embodiment, the embedded controller can be used to the keyboard controller of the laptop. 
         [0039]    When the laptop connects to an AC adapter, a specific circuit temporally invalidates a power button of the laptop before a secure loader is verified. Accordingly, it can be assured that the firmware of the laptop has not been downgraded. Although the embodiment is illustrated with the laptop, the invention is not limited thereto. The secure boot method can also be applied to a portable device. 
         [0040]    In step S 501 , the laptop connects to an AC adapter and an embedded controller is activated. The embedded controller executes an initialization procedure. The embedded controller acquires a firmware from a flash memory via a private system bus to execute the initialization procedure. During the initialization procedure, the embedded controller locks the elements or peripheral device of the laptop, except for the embedded controller and main memory, such that the elements and peripheral devices cannot be accessed or used for security. 
         [0041]    After the embedded controller completes the initialization procedure, in step S 502 , the embedded controller verifies a secure loader. In one embodiment, the secure loader and the BIOS of the laptop are stored in the same storage device, such as a flash memory. The embedded controller stores a correct Hash value and a start address of the secure loader. In step S 503 , if the secure loader does not pass the verification process, the embedded controller or processor generates a warning message to inform a user in step S 504 . If the secure loader passes the verification process, step S 505  is executed. 
         [0042]    In step S 505 , the embedded controller unlocks the hardware of the laptop and the laptop starts its core service. The core service may be the detection of peripheral circuits. When the user presses the power button of the laptop, the embedded controller transmits a trigger signal to the processor of the laptop. In step S 506 , the processor acquires instructions from a specific address, such as 0×FFFF_FFF0. In step S 507 , the processor executes the secure loader. After the processor finishes executing the secure loader, the processor executes a power on self test (POST) of the bios. 
         [0043]    In step S 508 , the processor executes the POST of the bios and laptop, and the processor executes a verification procedure with the embedded controller. The processor and the embedded controller will verify each other. In step S 509 , if the processor and the embedded controller pass the verification procedure in step S 508 , step S 510  is then executed. If the processor and the embedded controller do not pass the verification procedure in step S 508 , step S 504  is then executed. In step S 510 , the processor executes an OS loader of the BIOS to load an operating system. In another embodiment, the OS loader and the BIOS are stored in the same storage device, such as a flash memory. In another embodiment, the OS loader and the BIOS are stored in different storage devices. For example, the OS loader is stored in the hard drive and the BIOS is stored in the flash memory. 
         [0044]    Notably, in this embodiment, when the operating system is loading, the embedded controller locks a storage device, such as a flash memory, storing the secure loader, the OS loader, the BIOS and corresponding Hash value to prevent the content stored in the flash memory from being maliciously modified. 
         [0045]      FIG. 6  is a schematic diagram of an electronic device with a secure boot mechanism according to an embodiment of the invention. The electronic device comprises a processor  61 , an embedded controller  62 , a flash memory  63 , a chipset  64 , a main memory  65  and a hard drive  66  storing an operating system  66   a.  The chipset  64  comprises a south bridge chip  64   b  and a north bridge chip  64   a.  A secure loader  63   a,  OS loader  63   b  and BIOS  63   c  are stored in the flash memory  63 . When the electronic device is turned on, the embedded controller  62  and the processor  61  can execute the secure boot method described in  FIGS. 1-5  to ensure that the electronic device is booted securely. Note that those skilled in the art can add or cancel steps in the secure boot methods of  FIGS. 1-5 . 
         [0046]    In this embodiment, when the electronic device is turned on, a secure boot mechanism is executed. The embedded controller first executes an initialization procedure, and only the embedded controller  62  in the electronic device works normally. Meanwhile, the other elements are locked, by the embedded controller  62 , and cannot work for security. 
         [0047]    The embedded controller  62  verifies the secure loader  63   a  via a Hash verification procedure. The embedded controller  62  stores a correct Hash value of the secure loader  63   a  and the address of the secure loader  63   a  in the flash memory  63 . If the secure loader  63   a  does not pass the verification procedure executed, by the embedded controller  62 , the embedded controller  62  or processor  61  controls the electronic device to generate a warning message to inform a user. The warning message may be a specific acoustic signal output by a buzzer or a visible flashing LED light of a specific color of the electronic device. If the secure loader  63   a  passes the verification procedure, the embedded controller  62  unlocks the hardware of the electronic device. At this time, the power button is unlocked and the user can turn on the electronic device via the power button. 
         [0048]    Then, the processor  61  executes the secure loader  63   a.  The secure loader  63   a  verifies the BIOS  63   c  to determine whether the BIOS  63   c  has been modified or not. If the BIOS  63   c  does not pass the verification procedure, the embedded controller  62  or processor  61  controls the electronic device to generate a warning message to inform a user. If the BIOS  63   c  passes the verification procedure, the processor  61  executes the BIOS  63   c  and the OS loader  63   b  to load the operating system  66   a  stored in the hard drive  66 . 
         [0049]    The embodiment is illustrated with the BIOS  63   c,  but the invention is not limited thereto. The embodiment is also suitable for an electronic device using a Unified Extensible Firmware Interface (UFEI). 
         [0050]    The chipset  64  is a communication bridge between the processor  61  and the embedded controller  62 . The north bridge chip  64   a  processes the communications between the processor  61  and the main memory  62 . The south bridge chip  64   b  processes the communications between the processor  61  and peripheral devices. The peripheral device may be the hard drive  66 , a keyboard, a mouse or other device. 
         [0051]    While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. 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.