System for detecting computer startup and method of system
11250929 · 2022-02-15
Assignee
- HONG FU JIN PRECISION INDUSTRY (WuHan) CO., LTD. (Wuhan, CN)
- Hon Hai Precision Industry Co., Ltd. (New Taipei, TW)
Inventors
Cpc classification
G06F1/28
PHYSICS
International classification
G06F1/28
PHYSICS
G06F11/22
PHYSICS
Abstract
An arrangement to guarantee boot up of a computer includes a control center microchip with BIOS boot block and BIOS program, and a flash memory divided into a first protected block, a main block, and a second protected block. In the computer, an embedded controller (EC) with stored modules is electrically connected to the flash memory and the control center microchip. The modules include a determining module to check that the code of the first protected block is identical with the code of the second protected block and a recovery module able to reinstate correct code from the second protected block into the first protected block if required. A method applied to the disclosed computer startup detection system is also disclosed.
Claims
1. A computer, comprising: a control center microchip storing a BIOS boot block and a BIOS program; a flash memory divided into a first protected block, a main block configured to store fixed codes, and a second protected block configured to store backup codes for repairing the first protected block, wherein the second protected block is write-protected; and an embedded controller (EC) electrically connected to the flash memory and the control center microchip; and a power supply; a central processing unit (CPU); and one or more modules that are stored in the EC and executed by the CPU, the one or more modules comprising: a determining module determining whether the codes of the first protected block are identical with the codes of the second protected block; a recovering module copying the codes of the second protected block into the first protected block to repair the first protected block when the codes of the first protected block are not identical with the codes of the second protected block; a control module controlling the power supply to provide electric power to the control center microchip when the codes of the first protected block are identical with the codes of the second protected block; and a starting module reading the codes from the first protected block and the main block by the BIOS boot block of the control center microchip, initializing the BIOS boot block, and booting the BIOS program to perform power on self test (POST) by the BIOS boot block.
2. The computer of claim 1, wherein the determining module further determines whether a timeout flag is raised in relation to the codes in the main block, the recovering module copies backup codes of the main block from a storage into the main block to repair the main block when the timeout flag is raised.
3. The computer of claim 2, further comprising a processing module, wherein the processing module is configured to control the computer to automatically restart after repairing the main block or the first protected block.
4. The computer of claim 1, wherein the starting module is further configured to operate the BIOS program to boot up the computer to activate the OS.
5. The computer of claim 1, further comprising a locking module, wherein the locking module is further configured to lock and unlock a write-protect bar of the second protected block.
6. The computer of claim 1, further comprising a selector, wherein one end of the selector is selectively connected to the control center microchip and the EC, the other end of the selector is connected to the flash memory.
7. A computer-implemented method, the computer comprising control center microchip, an embedded controller (EC), a flash memory, and a power supply, wherein the control center microchip stores a BIOS boot block and a BIOS program, the EC is electrically connected to the flash memory and the control center microchip, the flash memory is divided into a first protected block, a main block configured to store fixed codes, and a second protected block configured to store backup codes for repairing the first protected block, the second protected block is write-protected, the method comprising: providing electric power to the EC and the flash memory when the computer is powered-on; determines whether the codes of the first protected block are identical with the codes of the second protected block; copying the codes of the second protected block into the first protected block to repair the first protected block when the codes of the first protected block are not identical with the codes of the second protected block; providing the electric power to the control center microchip when the codes of the first protected block are identical with the codes of the second protected block; and reading the codes from the first protected block and the main block by the BIOS boot block of the control center microchip; initializing the BIOS boot block; and booting the BIOS program to perform power on self test (POST) by the BIOS boot block.
8. The method of claim 7, after “reads the codes from the first protected block and the main block”, further comprising: determining whether a timeout flag is raised in relation to the codes in the main block; and copying backup codes of the main block from a storage into the main block to repair the main block when the timeout flag is raised.
9. The method of claim 8, further comprising controlling the computer to automatically restart after repairing the main block or the first protected block.
10. The method of claim 7, after “booting the BIOS program to perform a POST action on the computer”, further comprising operating the BIOS program to operate the BIOS program to boot up the computer to activate the OS.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Many aspects of the present disclosure can be better understood with reference to the drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the views.
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION
(6) It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiment described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure.
(7)
(8) The EC 3 is electrically connected to the flash memory 4 through a serial peripheral interface or other similar bus (SPI 31), and electrically connected to the control center microchip 2 through SPI bus 32. The CPU 1 is electrically connected to the control center microchip 2. The flash memory 4 is electrically connected to the control center microchip 2 through the EC 3. The power supply 5 provides electric power to the EC 3 and flash memory 4, and provides electric power to the control center microchip 2 under control of the EC 3.
(9) In this embodiment, the computer 100 can be a personal computer (PC), a workstation computer, a notebook, a server, or other electronic computing device.
(10) The control center microchip 2 is configured to store a BIOS boot block 21 and a BIOS program 22. The BIOS boot block 21 is configured to operate the BIOS program 22 thereby starting the computer 100 when a power-on button of the computer 100 is pressed by a user. The BIOS program 22 is configured to perform a power on self test (POST) action on the computer 100, and then normally import an operating system (OS) to complete the entire boot process when the computer 100 is started. The EC 3 has functions of monitoring and managing various hardware of the computer 100, such as detecting and managing hard disks, printers, power supplies, displays, and related serial ports (i.e., a COM port and a serial port) and other functions.
(11) The computer startup detecting system is stored in a memory of the EC 3, thus firmware (FW) cannot make changes through mistaken operations and non-booting problems are avoided.
(12) The flash memory 4 is divided into a first protected block 41, a main block 42, and a second protected block 43.
(13) The first protected block 41 is write-protected. The first protected block 41 stores codes reserved for a booting action and cannot be changed during any operation after booting. Since the first protected block 41 is write-protected during any operation after booting, a write-protect bar of the protected block 41 can be unlocked only when the flash memory 4 is updated.
(14) The main block 42 is not write-protected. The main block 42 stores fixed codes which can include a BIOS main program, a POST program, an OS program, and other rewritable data blocks.
(15) The second protected block 43 is write-protected. The second protected block 43 stores the same codes as are stored in the first protected block 41. The codes stored in the second protected block 43 are used as backup codes for repairing the first protected block 41. A write-protect bar of the second protected block 43 cannot be unlocked during a process of updating the first protected block 41 and the main block 42. It is only after the first protected block 41 and the main block 42 are updated and the computer 100 then started that the write-protect bar of the second protected block 43 is unlocked. Then the codes are copied from the first protected block 41 to the second protected block 43, the write-protect bar of the second protected block 43 is immediately applied and resumed as long as the copy is correctly completed.
(16) Referring to
(17) Referring to
(18) Referring to
(19) At block 400, when the computer 100 is powered-on, the power supply 5 provides electric power to the EC 3 and the flash memory 4. The control module 201 does not electric power to the control center microchip 2, and the control center microchip 2 is in an unpowered state.
(20) At block 401, the determining module 202 determines whether the codes of the first protected block 41 are identical with the codes of the second protected block 43. If the codes of the first protected block 41 are identical, that means the codes of the first protected block 41 are correct, and the process goes to block 402. If the codes are not identical, the codes of the first protected block 41 are in error, and the process goes to block 410.
(21) At block 402, the control module 201 controls the power supply 5 to provide electric power to the control center microchip 2.
(22) At block 403, the starting module 203 controls the BIOS booting block 21 of the control center microchip 2 to read the codes from the first protected block 41 and the main block 42 to perform booting of the computer 100.
(23) At block 404, the determining module 202 determines whether a timeout flag is raised in relation to the codes in the main block 42. If no timeout flag is raised, the process goes to block 405. If the timeout flag is raised, that means the codes of the main block 42 are in error, and the process goes to block 410.
(24) At block 405, the starting module 203 activates a timer of the EC 3.
(25) At block 406, the starting module 203 performs initialization of the BIOS boot block 21, and the BIOS boot block 21 boots the BIOS program 22 to perform the POST action on the computer 100.
(26) At block 407, the recovering module 204 copies to a DRAM the codes of the flash memory 4 but not the codes of the second protected block 43. In other embodiment, the block 407 can be omitted.
(27) At block 408, the starting module 203 stops the timer of the EC 3.
(28) At block 409, the starting module 203 operates the BIOS program to boot up the computer 100 to activate the OS.
(29) At block 500, the locking module 205 unlocks the write-protect bar of the first protected block 41, the first protected block 41 can then be overwritten.
(30) At block 511, the recovering module 204 copies the codes of the second protected block 43 into the first protected block 41 to repair or replace the first protected block 41.
(31) At block 512, the locking module 205 relocks the write-protect bar of the first protected block 41.
(32) At block 513, the processing module 206 controls the computer 100 to automatically restart, and then the process returns to block 401.
(33) At block 600, the recovering module 204 copies backup codes of the main block 42 from a storage into the main block 42 to repair or replace the main block 42. The storage can be, for example, a Hard Disk Drive (HDD), a Solid State Drive (SSD), a USB memory, or the like.
(34) At block 601, the processing module 206 controls the computer to automatically restart, and the process returns to block 403.
(35) In other embodiment, the locking module 205 is further configured to lock down and unlock the write-protect bar of the second protected block 43 thereby allowing another unlocking of the write-protect bar of the second protected block 43 only when the first protected block 43 and the main block 42 are correctly updated.
(36) The above-mentioned computer startup detecting system using the method control the power supply 5 to provide electric power to the control center chip 2 after confirming that the codes of the first protection block 41 are correct, thereby any damage or malfunction of the flash memory 4 is irrelevant in relation to booting the computer. In addition, the computer startup detecting system 20 and the method can repair the first protected block 41 by using the backup codes of second protection block 43, and repair the main block 42 by using the stored codes, thereby avoiding any adverse changes to the flash memory 4 caused by a mistake or other operation of the user, and also reducing cost.
(37) The embodiments shown and described above are only examples. Many details are found in the relevant art, therefore many such details are neither shown nor described. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, especially in matters of shape, size, and arrangement of the parts within the principles of the present disclosure, up to and including the full extent established by the broad general meaning of the terms used in the claims. It will therefore be appreciated that the embodiments described above may be modified within the scope of the claims.