Abstract:
A boot method for a platform system including a Universal Extensible Firmware Interface (UEFI) Basic Input/Output System (BIOS) is provided. The UEFI BIOS includes partitions storing an initial boot program code, a factory setting boot program code, a first customized boot program code, a second customized boot program code and boot information respectively. The provided method comprises steps of: loading the initial boot program code stored in one of the partitions of the UEFI BIOS into a memory, and executing the initial boot program code stored in the memory by a CPU to perform a first phase of boot; and loading one of the factory setting boot program code, the first customized boot program code and the second customized boot program code stored in the partitions of the UEFI BIOS into the memory according to data in the boot information, and executing the program code loaded in the memory to perform a second phase of boot by the CPU.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a boot method and more particularly to a boot method for a platform system comprising a Universal Extensible Firmware Interface (UEFI) Basic Input/Output System (BIOS); the present invention also relates to a boot system comprising a UEFI BIOS for implementing the boot methods and to a recording medium storing a program which causes a platform system to implement the boot methods. 
         [0003]    2. Background of the Invention 
         [0004]    A BIOS is a program embedded in a Read Only Memory (ROM) on a motherboard of a platform system such as a computer, a tablet or a smart phone in the manufacture thereof, and is by definition a firmware on the motherboard and plays a role for communicating between the hardware and an operating system. Operation of a platform system, including relevant parameters of its hardware, can be adjusted by means of a BIOS in which basic input/output programs related and essential to the platform system, system information settings, Power On Self Test (POST), system bootstrap programs, etc. is stored. While a platform system is powered up, the BIOS performs a test on the platform system by using associated programs. After the test is completed, the operating system is loaded into a memory such as dynamic random access memory (DRAM) of the platform system. If the BIOS is damaged or out of function due to, for example, a virus attack, the platform system will not boot successfully. 
         [0005]    Accordingly, design for multiple BIOS modules is adopted in modern platform systems to prevent from the boot failure as described above. In such design, a backup BIOS module is provided in addition to the original primary BIOS module. Once the primary BIOS module is damaged or out of function, the backup BIOS module will take over to perform the boot procedure of the platform system and recover the primary BIOS module. However, the design of multiple BIOS modules needs to be realized by using two hardware devices such as Serial Peripheral Interface (SPI) ROMs, and therefore the hardware cost increases. 
       BRIEF SUMMARY OF THE INVENTION 
       [0006]    In view of the above-mentioned problems, the present invention provides a boot method for a platform system comprising a UEFI BIOS, and a boot system comprising a UEFI BIOS for implementing said methods. In the present invention, single hardware is used to accomplish the function of multiple BIOS and to reduce the hardware cost of the platform system. 
         [0007]    A first aspect of the present invention is to provide a boot method for a platform system including a UEFI BIOS which has partitions for storing an initial boot program code, a factory setting boot program code, a first customized boot program code, a second customized boot program code and boot information respectively. The method comprises steps of: loading the initial boot program code stored in one of the partitions of the UEFI BIOS into a memory, and executing the initial boot program code stored in the memory by a CPU to perform a first phase of boot; and loading one of the factory setting boot program code, the first customized boot program code and the second customized boot program code stored in the partitions of the UEFI BIOS into the memory according to data in the boot information, and executing the program code loaded in the memory to perform a second phase of boot by the CPU. 
         [0008]    A second aspect of the present invention is to provide another boot method for a platform system including a UEFI BIOS which has partitions storing an initial boot program code, a factory setting boot program code, a first customized boot program code, a second customized boot program code and boot information respectively. The method comprises steps of: loading a program code of system firmware file into a memory; determining which one of the partitions storing the first and the second customized boot program codes respectively is to be updated according to data of the boot information, and updating the determined one of the partitions storing the first and the second customized boot program codes respectively with the program code of system firmware file stored in the memory; and loading the updated one of the first and the second customized boot program codes stored respectively in the partitions of the UEFI BIOS into the memory, and executing the updated one of the first and the second customized boot program codes in the memory to boot the platform system. 
         [0009]    A third aspect of the present invention is to provide another boot method for a platform system including a UEFI BIOS in which an initial boot program code, a factory setting boot program code, a first customized boot program code and first boot information are stored. The method comprises steps of: loading the initial boot program code into a memory, and executing the initial boot program code stored in the memory to perform a first phase of boot, whereby the platform system is enabled to connect with a remote server in which a second customized boot program code and second boot information are stored; and loading one of the factory setting boot program code, the first customized boot program code and the second customized boot program code into the memory according to data in the first and second boot information, and executing the program code loaded into the memory to perform a second phase of boot. 
         [0010]    A forth aspect of the present invention is to provide another boot system for a platform system comprising a UEFI BIOS having partitions storing an initial boot program code, a factory setting boot program code, a first customized boot program code and first boot information respectively, wherein the platform system is enabled to connect with a remote server in which a second customized boot program code and second boot information are stored; a memory for storing the initial boot program code, the factory setting boot program code, the first customized boot program code or the second customized boot program code; and a CPU for executing the initial boot program code, the factory setting boot program code, the first customized boot program code or the second customized boot program code stored in the memory so as to boot the platform system. The boot system is capable of implementing the boot methods according to the third aspect of the present invention. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]      FIG. 1  is a system block diagram of a boot and update system according to one embodiment of the present invention. 
           [0012]      FIG. 2  is a flowchart of a boot method according to one embodiment of the present invention. 
           [0013]      FIG. 3  is a flowchart of a boot and update method according to one embodiment of the present invention. 
           [0014]      FIG. 4  is a system block diagram of a boot and update system connecting with a remote server according to one embodiment of the present invention. 
           [0015]      FIG. 5  is a flowchart of a boot method according to one embodiment of the present invention. 
           [0016]      FIG. 6  is a flowchart of a boot and update method according to one embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0017]    In order to make the disclosure more comprehensible for a person having ordinary skill in the art, several preferred embodiments of the present invention are provided hereinafter with reference to the accompanying drawings so as to illustrate the present invention in more detail. 
         [0018]      FIG. 1  is a block diagram of a boot and update system comprising a UEFI BIOS according to the present invention. In  FIG. 1 , a platform system  10  (e.g. a computer, a tablet or a smart phone) comprises a UEFI BIOS  12 , a memory  14  and a CPU  16 . 
         [0019]    The UEFI BIOS  12  is divided into a plurality of partitions for storing an initial boot program code, a factory setting boot program code, a customized boot program code PaFW, a customized boot program code PbFW and boot information respectively, wherein an example of the storage partitions is an Embedded Multi Media Card (eMMC) device or an SPI device. One or more of the initial boot program code, the factory setting boot program code, the customized boot program code PaFW, the customized boot program code PbFW and the boot information can be loaded into the memory  14 . The CPU  16  executes the program code stored in the memory  14  to boot the platform system  10 . In the UEFI BIOS  12 , the addresses and sizes of the partitions for storing the customized boot program code PaFW and the customized boot program code PbFW are variable. 
         [0020]      FIG. 2  is a flowchart of a boot method for a platform system comprising a UEFI BIOS according to the present invention. The flow steps in  FIG. 2  is explained with reference to the components shown in  FIG. 1 . 
         [0021]    In  FIG. 2 , the initial boot program code is loaded into the memory  14  from the partition storing the initial boot program code of the UEFI BIOS  12  in the platform system  10 , and the CPU  16  executes the initial boot program code in the memory  14  to perform a first phase of boot (step S 202 ). In one embodiment of the present invention, the initial boot program code may comprise a Security (SEC) phase program code and a Pre-Extensible Firmware Interface Initialization (Pre-EFI Initialization; PEI) phase program code, and thus the CPU  16  executes the SEC phase program code and the PEI phase program code in the memory  12  to perform the first phase of boot. 
         [0022]    After executing the SEC phase program code and the PEI phase program code, the CPU  16  reads a flag Pa and a flag Pb in boot information, which corresponding respectively to the customized boot program code PaFW and the customized boot program code PbFW, to determine which of the factory setting boot program code, the customized boot program code PaFW and the customized boot program code PbFW is to be executed. 
         [0023]    Firstly, the CPU  16  checks the flag Pa corresponding to the customized boot program code PaFW to determine whether the customized boot program code PaFW is to be executed to perform a second phase of boot (step S 204 ). If the flag Pa is set to bootable, the customized boot program code PaFW is loaded into the memory  14  from the partition storing the customized boot program code PaFW of the UEFI BIOS  12  in the platform system  10 , and the CPU  16  executes the customized boot program code PaFW in the memory  14  to perform a second phase of boot (step S 206 ). 
         [0024]    In one embodiment of the present invention, the first customized boot program code PaFW may comprise a Driver Execution Environment (DXE) phase program code and a Boot Device Selection (BDS) phase program code, and be designed and updated based on a user&#39;s requirements. Accordingly, the CPU  16  executes the DXE phase program code and the BDS phase program code in the memory  14  to perform the second phase of boot. 
         [0025]    If the flag Pa is set to unbootable, the CPU  16  checks the flag Pb corresponding to the customized boot program code PbFW to determine whether the customized boot program code PbFW is to be executed to perform a second phase of boot (step S 208 ). If the flag Pb is set to bootable, the customized boot program code PbFW is loaded into the memory  14  from the partition storing the customized boot program code PbFW of the UEFI BIOS  12  in the platform system  10 , and the CPU  16  executes the customized boot program code PbFW in the memory  14  to perform a second phase of boot (step S 210 ). 
         [0026]    In one embodiment of the present invention, the customized boot program code PbFW may comprise a DXE phase program code and a BDS phase program code, which could be designed and updated based on a user&#39;s requirements, and the CPU  16  executes the DXE phase program code and the BDS phase program code in the memory  14  to perform the second phase of boot. 
         [0027]    If the flag Pb is set to unbootable, the factory setting boot program code is loaded into the memory  14  from the partition storing the factory setting boot program code of the UEFI BIOS  12  in the platform system  10 , and the CPU  16  executes the factory setting boot program code in the memory  14  to perform a second phase of boot (step S 212 ). 
         [0028]    In one embodiment of the present invention, the factory setting boot program code may comprise a DXE phase program code and a BDS phase program code, and be configured in the manufacture of the platform system  10 . Accordingly, the CPU  16  executes the DXE phase program code and the BDS phase program code in the memory  14  to perform the second phase of boot. 
         [0029]      FIG. 3  is a flowchart of a boot and update method for a platform system comprising a UEFI BIOS according to the present invention. The flow steps in  FIG. 3  is explained with reference to the components shown in  FIG. 1 . 
         [0030]    In  FIG. 3 , a platform system  10  performs a boot procedure composed of flow steps shown in  FIG. 2  (step S 302 ). 
         [0031]    After the boot procedure is completed, a program code of system firmware file is loaded from a recording medium or an external network into the memory  14  in the platform  10  so as to update one of the customized boot program codes PaFW and PbFW which needs to be updated. The CPU  16  reads flags Pa and Pb corresponding respectively to the customized boot program codes PaFW and PbFW from the boot information stored in one of the partitions of the UEFI BIOS  12 , and accordingly update the partition of the customized boot program code PaFW or the partition of the customized boot program code PbFW (step S 304 ). 
         [0032]    If the flag Pb is set to bootable, the partition storing the customized boot program code PaFW will be updated with the program code of system firmware file stored in the memory  14  of the platform system  10  (step S 306 ). Then, it is determined whether the program code of system firmware file is identical to the updated customized boot program code PaFW in the updated partition (step S 308 ). 
         [0033]    In case the program code of system firmware file is identical to the updated customized boot program code PaFW, the flag Pb corresponding to the customized boot program code PbFW will be set to unbootable and the flag Pa corresponding to the customized boot program code PaFW will be set to bootable in the boot information stored in one of the partitions of the UEFI BIOS  12  in the platform system  10  (step S 310 ). Then, the platform system  10  restarts and performs a boot procedure composed of aforementioned flow steps S 202 , S 204  and S 206  of  FIG. 2  (step S 312 ). 
         [0034]    In case the program code of system firmware file is different from the updated customized boot program code PaFW, the platform system  10  will restart and perform a boot procedure composed of aforementioned flow steps S 202 , S 204 , S 208  and S 210  of  FIG. 2  (step S 314 ). 
         [0035]    If the flag Pa is set to bootable, the partition storing the customized boot program code PbFW will be updated with the program code of system firmware file stored in the memory  14  of the platform system  10  (step S 316 ). Then, it is determined whether the program code of system firmware file is identical to the updated customized boot program code PbFW in the updated partition (step S 318 ). 
         [0036]    In case the program code of system firmware file is identical to the updated customized boot program code PbFW, the flag Pa corresponding to the customized boot program code PaFW will be set to unbootable and the flag Pb corresponding to the customized boot program code PbFW will be set to bootable in the boot information stored in one of the partitions of the UEFI BIOS  12  in the platform system  10  (step S 320 ). Then, the platform system  10  restarts and performs a boot procedure composed of the aforementioned flow steps S 202 , S 204 , S 208  and S 210  of  FIG. 2  (step S 322 ). 
         [0037]    In case the program code of system firmware file is different from the updated customized boot program code PbFW, the platform system  10  will restart and perform a boot procedure composed of the aforementioned flow steps S 202 , S 204  and S 206  of  FIG. 2  (step S 324 ). 
         [0038]      FIG. 4  is a block diagram of a boot and update system comprising a UEFI BIOS  42  according to the present invention. In contrast with the boot and update system  10  shown in  FIG. 1 , an initial boot program code comprised in the UEFI BIOS  42  is capable of enabling a network connection, and capable of enabling a network connection can be implement on Security (SEC) phase program code, Pre-Extensible Firmware Interface Initialization (Pre-EFI Initialization; PEI) phase program code or early stage of Driver Execution Environment (DXE) phase. Therefore, a platform system having the UEFI BIOS  42  is allowed to access boot information and download a customized boot program code PcFW or PdFW stored in a remote server  48  via the network connection, and to execute the customized boot program code PcFW or PdFW to carry out a boot procedure. 
         [0039]      FIG. 5  is a flowchart of a boot method for a platform system comprising the UEFI BIOS  42  described above, and the flow steps in  FIG. 5  are explained with reference to the components shown in  FIG. 4 . 
         [0040]    In  FIG. 5 , the initial boot program code is loaded into a memory  44  from the UEFI BIOS  42 , and a CPU  46  executes the initial boot program code in the memory  44  to proceed a first phase of boot (step S 502 ). Since the initial boot program code is configured to enable a network connection, the platform system having the UEFI BIOS  42  will be able to connect a network after the first phase of boot is performed. Then, the CPU  46  accesses flags Pa and Pb in boot information stored in the UEFI BIOS to determine which of the customized boot program codes PaFW (in correspondence with the flag Pa) and PbFW (in correspondence with the flag Pb) is to be executed. 
         [0041]    Firstly, the CPU  46  checks the flag Pa corresponding to the customized boot program code PaFW to determine whether the customized boot program code PaFW is to be executed to perform a second phase of boot (step S 504 ). If the flag Pa is set to bootable, the customized boot program code PaFW will be loaded into the memory  44  and be executed to perform a second phase of boot (step S 506 ). 
         [0042]    If the flag Pa is set to unbootable, the CPU  46  checks the flag Pb corresponding to the customized boot program code PbFW to determine whether the customized boot program code PbFW is to be executed to perform a second phase of boot (step S 508 ). If the flag Pb is set to bootable, the customized boot program code PbFW will be loaded into the memory  44  and executed to perform a second phase of boot (step S 510 ). 
         [0043]    In case the flags Pa and Pb are both set to unbootable, the status of the network connection will be checked (step S 512 ). If the network connection is unavailable, a factory setting boot program code will be loaded into the memory  44  and executed to perform a second phase of boot (step S 514 ). 
         [0044]    If the network connection is available, however, the CPU  46  reads flags Pc and Pd in boot information stored in the remote server  48  to determine which of the customized boot program code PcFW (corresponding to the flag Pc) and the customized boot program code PdFW (corresponding to the flag Pd) stored in the remote server  48  is to be executed. 
         [0045]    Similarly, the CPU  46  checks the flag Pc corresponding to the customized boot program code PcFW to determine whether the customized boot program code PcFW is to be executed to perform a second phase of boot (step S 514 ). If the flag Pc is set to bootable, the customized boot program code PcFW will be downloaded from the remote server  48  into the memory  44 , and be executed to perform a second phase of boot (step S 516 ). 
         [0046]    If the flag Pc is set to unbootable, the CPU  46  checks the flag Pd corresponding to the customized boot program code PdFW to determine whether the customized boot program code PdFW is to be executed to perform a second phase of boot (step S 518 ). If the flag Pd is set to bootable, the customized boot program code PdFW will be downloaded from the remote server  48  into the memory  44 , and be executed to perform a second phase of boot (step S 520 ). 
         [0047]    However, if the flags Pc and Pd are both set to unbootable, a factory setting boot program code is loaded into the memory  44  and executed to perform a second phase of boot (step S 522 ). 
         [0048]    Furthermore,  FIG. 6  shows a flowchart of a boot and update method according to the present invention for a local host connecting with a remote server, and the flow steps therein are explained with reference to the components shown in  FIG. 4 . 
         [0049]    In the beginning step S 602  of  FIG. 6 , a platform system performs a boot procedure comprising flow steps S 502 , S 504 , S 508  and S 512  as shown in  FIG. 5 ; since there is no customized boot program code allowed to be executed in the local host and the network is available, the boot procedure continues from step S 516  to step S 518 , S 522  or S 524 . 
         [0050]    After the boot procedure is completed, a program code of system firmware file is loaded from a recording medium or an external network into a memory of the remote server  48  so as to update one of the customized boot program codes PcFW and PdFW which needs to be updated. 
         [0051]    However, the boot procedure involving the steps of accessing the remote server  48  implies that the customized boot program codes PaFW and PbFW are unbootable according to the flags Pa and Pb set in the local host. Therefore, the customized boot program codes PaFW and PbFW in the local host have to be updated as well as the customized boot program codes in the remote server, and the flags Pa and/or Pb will be correspondingly set to bootable thereafter. 
         [0052]    In this embodiment, the CPU  46  reads flags Pc and Pd corresponding to the customized boot program codes PcFW and PdFW respectively from the boot information stored in the remote server  48 , and updates the partition of the customized boot program code PcFW or PdFW accordingly (step S 604 ). 
         [0053]    If the flag Pd is set to bootable, the partition storing the customized boot program code PcFW will be updated with the program code of system firmware file stored in the remote server  48  and the partition storing the customized boot program code PaFW will be updated with the program code of system firmware file stored in the memory of the platform system (step S 606 ). Then, it is determined whether the program code of system firmware file is identical to the updated customized boot program code PcFW stored in the updated partition (step S 608 ). 
         [0054]    If the program code of system firmware file is identical to the updated customized boot program code PcFW, it is then determined whether the updated customized boot program code PcFW is identical to the updated customized boot program code PaFW stored in the updated partition (step S 610 ); if the program code of system firmware file is different from the updated customized boot program code PcFW, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504 , S 508 , S 512 , S 516 , S 520  and S 522  in which the customized boot program code PdFW is loaded and executed (step S 612 ). 
         [0055]    In case the program code of system firmware file is identical to the updated customized boot program code PcFW and the updated program codes of the customized boot program codes PcFW and PaFW are identical, the flag Pd in the boot information stored in the remote server  48  and corresponding to the customized boot program code PdFW will be set to unbootable, and both the flags Pc and Pa corresponding respectively to the customized boot program codes PcFW (stored in the remote server  48 ) and PaFW (stored in the local host) will be set to bootable (step S 614 ). Then, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504  and S 506  in which the customized boot program code PaFW is loaded and executed (step S 616 ). 
         [0056]    In case the program code of system firmware file is identical to the updated customized boot program code PcFW and the updated program codes of the customized boot program codes PcFW and PaFW are not identical, the flag Pd in the boot information stored in the remote server  48  and corresponding to the customized boot program code PdFW will be set to unbootable, and the flag Pc corresponding to the customized boot program code PcFW stored in the remote server  48  will be set to bootable (step S 618 ). Then, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504 , S 508 , S 512 , S 516  and S 518  in which the customized boot program code PcFW is loaded and executed (step S 620 ). 
         [0057]    Referring back to step S 604 , if the flag Pc is set to bootable, the partition storing the customized boot program code PdFW will be updated with the program code of system firmware file stored in the remote server  48 , and the partition storing the customized boot program code PbFW will be updated with the program code of system firmware file stored in the local host (step S 622 ). Then, it is determined whether the program code of system firmware file is identical to the updated customized boot program code PdFW in the updated partition (step S 624 ). 
         [0058]    If the program code of system firmware file is identical to the updated customized boot program code PdFW, it is then determined whether the updated customized boot program code PdFW in the updated partition is identical to the updated customized boot program code PbFW in the local host (step S 626 ); if the program code of system firmware file is different from the updated customized boot program code PdFW, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504 , S 508 , S 512 , S 516  and S 518  in which the customized boot program code PcFW is loaded and executed (step S 628 ). 
         [0059]    In case the program code of system firmware file is identical to the updated customized boot program code PdFW and the updated program codes of the customized boot program codes PdFW and PbFW are identical, the flag Pc in the boot information stored in the remote server  48  and corresponding to the customized boot program code PcFW will be set to unbootable, and both the flags Pd and Pb corresponding respectively to the customized boot program codes PdFW (stored in the remote server  48 ) and PbFW (stored in the local host) will be set to bootable (step S 630 ). Then, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504 , S 508  and S 510  in which the customized boot program code PbFW is loaded and executed (step S 632 ). 
         [0060]    In case the program code of system firmware file is identical to the updated customized boot program code PdFW and the updated program codes of the customized boot program codes PdFW and PbFW are not identical, the flag Pc in the boot information stored in the remote server  48  and corresponding to the customized boot program code PcFW will be set to unbootable, and the flag Pd corresponding to the customized boot program code PdFW stored in the remote server  48  will be set to bootable (step S 634 ). Then, the platform system of the local host restarts and performs a boot procedure composed of aforementioned flow steps S 502 , S 504 , S 508 , S 512 , S 516 , S 520  and S 522  in which the customized boot program code PdFW is loaded and executed (step S 636 ). 
         [0061]    The boot and update method for a platform system comprising a UEFI BIOS according to the present invention described above is implemented in the form of a program which can be stored in a recording medium. When said program is loaded from the Internet or a recording medium and executed by, for example, a computer, the boot and update method illustrated in the foregoing description and drawings can thus be implemented. 
         [0062]    The present invention provides a boot system comprising a UEFI BIOS, a boot method for a platform system comprising a UEFI BIOS, and a boot and update method for a platform system comprising a UEFI BIOS. An advantage of the present invention is resulted from the use of a single hardware having multiple partitions in which boot program codes for boot and update are stored respectively, and the boot program codes respectively stored in the partitions is updated, whereby the mechanism of multiple BIOS can be achieved without increasing the hardware cost of the platform system. 
         [0063]    Although the present invention has been explained above in relation to its preferred embodiment and exemplary drawings, it shall not be considered limited thereby. It is to be understood that many possible modifications, omissions and variations can be made by those skilled in the art without departing from the scope of the present invention as hereinafter claimed. 
       BRIEF DESCRIPTION OF THE REFERENCE NUMERALS 
       [0000]    
       
           10  Boot system 
           12 ,  42  UEFI BIOS 
           14 ,  44  Memory 
           16 ,  46  CPU 
           48  Remote server