WO2008104117A1 - An electronic equipment, a starting method thereof and a method and device for upgrading bios - Google Patents

An electronic equipment, a starting method thereof and a method and device for upgrading bios Download PDF

Info

Publication number
WO2008104117A1
WO2008104117A1 PCT/CN2007/071405 CN2007071405W WO2008104117A1 WO 2008104117 A1 WO2008104117 A1 WO 2008104117A1 CN 2007071405 W CN2007071405 W CN 2007071405W WO 2008104117 A1 WO2008104117 A1 WO 2008104117A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
bios program
bios
storage area
program storage
Prior art date
Application number
PCT/CN2007/071405
Other languages
French (fr)
Chinese (zh)
Inventor
Jinhua Zhu
Guimin Chen
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2008104117A1 publication Critical patent/WO2008104117A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to an electronic device, an activation method of the electronic device, and a BIOS upgrade method and apparatus. Background of the invention
  • BIOS The Basic Input/Output System
  • ROM-BIOS basic input/output system
  • BIOS The Basic Input/Output System
  • ROM-BIOS basic input/output system
  • the BIOS is a "converter” or interface between the hardware and the software program, although it itself It is just a program that is responsible for resolving the immediate requirements of the hardware and implementing the hardware requirements according to the software.
  • the BIOS chip of the computer basically adopts the flash memory (FLASH ROM), and the BIOS can be upgraded through a specific writing program.
  • the BIOS has two main purposes: 1. Obtain new functions.
  • BIOS The most immediate benefit of upgrading the BIOS is that it can get many new features, such as support for new frequencies and new types of CPUs.
  • some older motherboards support the Tualatin core Pentium III and races by upgrading the BIOS.
  • Celeron some motherboards now support the latest Prescott core Pentium 4E CPU by upgrading the BIOS; breaking the capacity limit, directly using the large capacity hard drive; getting a new boot mode; Shielded features, such as Intel's Hyper-Threading Technology, VIA's memory interleaving technology, etc.; Identify other new hardware, etc.
  • BIOS is also a program
  • BIOS is also a program
  • BUG the development of hardware technology is changing with each passing day.
  • the cycle of motherboard manufacturers launching products is getting shorter and shorter, and there must be some unsatisfactory in BIOS writing.
  • the place, and these BUG often lead to inexplicable failures, such as unreasonable restart, frequent crashes, poor system performance, device conflicts, hardware devices are "lost" for no reason, and so on.
  • the BIOS upgrade method is implemented by directly covering the original BIOS program in the Flash ROM. In this way, if there is an abnormality in the BIOS upgrade process (such as file transfer exception, FLASH read/write error, power failure during upgrade), and the BIOS boot program used for the upgrade itself is defective, the computer, communication device, and other electronic devices will not be able to be used. start up. Summary of the invention
  • the embodiments of the present invention provide an electronic device, an electronic device booting method, and a BIOS upgrade method, so that the electronic device can still start normally safely in the event that an abnormality occurs in the BIOS upgrade process and the upgrade fails.
  • an embodiment of the present invention provides a method for starting an electronic device, including:
  • the electronic device When the electronic device is powered on, the electronic device is booted by the first basic input/output system BIOS program storage area, and when the startup is unsuccessful or the electronic device is powered on again, the electronic device switches from the first BIOS program storage area to the second BIOS.
  • the program storage area boots the electronic device with the second BIOS program storage area.
  • an embodiment of the present invention further provides a BIOS for upgrading a basic input/output system, including the following steps:
  • BIOS program storage area is configured to store a BIOS program for booting the electronic device, and when the electronic device is upgraded by the BIOS, the package is Including the following steps:
  • the BIOS program for upgrading is loaded into another BIOS program storage area outside the BIOS program storage area where the booting electronic device is successfully booted; the electronic device guides the electronic device in the BIOS program storage area storing the upgrade BIOS program.
  • the device restarts, when the restart is unsuccessful, the booting electronic device is booted by the BIOS program storage area storing the original BIOS program; the BIOS program storage area in the boot electronic device successfully restarting is the BIOS program storage area storing the upgraded BIOS program.
  • the upgrade BIOS program is loaded into a BIOS program storage area that stores the original BIOS program.
  • an embodiment of the present invention further provides an electronic device, including a central processing unit, a memory, and a basic input/output system BIOS switching unit, where:
  • the memory is provided with two BIOS program storage areas, and the BIOS storage area stores a BIOS program for booting the electronic device;
  • the BIOS switching unit is configured to trigger the electronic device to switch from one BIOS program storage area in the memory to boot from another BIOS program storage area when the electronic device is powered on or reset.
  • the embodiment of the invention further provides a BIOS upgrade device, wherein the device comprises:
  • a first loading unit configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device;
  • the determining unit after the electronic device restarts successfully, determining whether the BIOS program storage area for booting the electronic device restarting during the restart is a BIOS program storage area for storing the upgrade BIOS program and generating a corresponding judgment result;
  • a second loading unit configured to: when the judgment result of the determining unit indicates that the restart is In the program memory area, the upgrade BIOS program is loaded into the BIOS program storage area where the original BIOS program is stored.
  • the BIOS upgrade method and device of the embodiment of the present invention by setting two BIOS program storage areas, loading the BIOS program for upgrading to the first BIOS program storage area currently used for booting the electronic device startup when the electronic device is in normal operation.
  • a second BIOS program storage area when the electronic device is powered on again, triggering the electronic device to jump to boot the electronic device in the second BIOS program storage area by the hardware logic circuit, and if the boot is unsuccessful, pass the hardware again
  • the logic circuit triggers the electronic device to jump to boot the electronic device booting with the first BIOS program storage area storing the original BIOS program, thereby avoiding an upgrade failure during the upgrade process, such as an abnormality of the BIOS upgrade program or a BIOS program for upgrading.
  • the failure caused by the defect itself, the potential risk to the device ensures that the electronic device can start normally regardless of whether the BIOS upgrade succeeds or fails, and improves the security of the BIOS upgrade.
  • 1 is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for starting an electronic device according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a BIOS booting method in a BIOS upgrade method according to an embodiment of the present invention. Mode for carrying out the invention
  • FIG. 1 it is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention.
  • the electronic device according to the embodiment of the present invention includes a general-purpose computer system such as a personal computer, and a communication electronic device such as a network access device, a communication switching device, and the like that uses a dedicated computer system such as an embedded computer system.
  • the electronic device according to the embodiment of the present invention mainly includes a central processing unit 1, a memory 2, a switch unit 3, a switching unit 4, and an upgrade control subsystem 5. The individual components are described in detail below.
  • the central processing unit 1 performs the operations of the address access and the data reading of the memory 2 through the address bus and the data bus, and is the same as the prior art, and details are not described herein again.
  • the memory 2 is provided with a BIOS program memory area A and a BIOS program memory area B, both of which are used to store a BIOS program for booting the electronic device.
  • the memory 2 is powered off without loss of memory, and is generally an electrically erasable programmable ROM (EPROM) or a FLASH ROM.
  • the BIOS program storage area A and the BIOS program storage area B are sequentially set from the lowest bit of the memory 2, for example, when the preset maximum space of the BIOS program storage area is 512K, the partition address of the BIOS program storage area A The range of 0x0 to 0x03FFFF, the partition address of the BIOS program storage area B is 0x040000 to 0x07FFFF. At this time, corresponding to the BIOS program storage area A, the output of the address bus A18 of the central processing unit 1 is 0.
  • the output of the address bus A18 of the central processing unit 1 is 1.
  • the partition address allocation of the BIOS program storage area A and the BIOS program storage area B may be relatively flexible.
  • the partition address range of the BIOS program storage area A may be set to 0x0 to 0x7FFFF
  • the partition address range of the BIOS program storage area B is 0x080000 to OxFFFFF
  • the output of the address bus A19 of the central processing unit 1 is 0, corresponding to The BIOS program storage area B
  • the output of the address bus A19 of the central processing unit 1 is 1.
  • the BIOS switching unit 4 is configured to trigger the electronic device to switch from one BIOS program storage area in the memory to boot the electronic device from another BIOS program storage area when the electronic device is powered on or reset.
  • the switch unit 3 is configured to disconnect the central processing unit 1 to the partition address line of the memory 2 when the electronic device is powered on or reset, and to enable the electronic device to be turned on after the electronic device is successfully booted. Partition address line.
  • the switching unit 4 and the switching unit 3 will be described in detail below.
  • the BIOS switching unit 4 has a first output pin and a second output pin.
  • the output state of an output pin is an enable signal output state, and the enable signal is used to control the switch unit 3 to disconnect the central processor 1 to the partition address line of the memory 2;
  • the output state of the first output pin is a disable enable signal output state, and the disable enable signal is used to control the switch unit 3 to turn on the central processor 1 to the partition address of the memory 2.
  • the output state of the second output pin includes two address output states corresponding to the respective BIOS program storage areas, and the second output pin is triggered when the electronic device is powered on reset or the electronic device is reset. The output state is switched by one of the two address output states to another address output state.
  • the partition address line is one of a plurality of data buses between the central processing unit 1 and the memory 2.
  • the logical output state (0 or 1) of the partition address line may determine the central processing unit 1
  • the range of partition addresses read from the memory 2. For example, when the preset maximum space of the BIOS program storage area is 512K, the partition address range of the BIOS program storage area A is 0x0 to 0x03FFFF, and the partition address range of the BIOS program storage area B is 0x040000 to 0x07FFFF, at this time, corresponding to the BIOS program storage area A, the output of the address bus A18 of the central processing unit is 0, corresponding to the BIOS program storage area B, the address bus of the central processing unit 1 The output of A18 is 1, and the address bus A18 is the partition address line.
  • the BIOS program storage area A and the BIOS program storage area B in the memory in the electronic device according to the embodiment of the present invention are sequentially set from the lowest bit of the memory 2, and the preset of the BIOS program storage area is preset.
  • the switching unit 4 is a programmable hardware logic circuit, such as Complex Programmable Logic Devices (CPLD)
  • the switching unit 3 is a hardware logic circuit, such as a 244 logic driving circuit.
  • the main function is equivalent to a controllable switching circuit, that is, the conduction state of the input and output terminals is controlled by the input state of the enable terminal, and the first output pin of the switching unit 4 and the switch unit 3 are The end can be connected.
  • the central processing unit 2 reads the BIOS program storage area A, that is, in the storage area of the memory 2 whose address range is 0x0 to 0x3FFFF, the output of the address bus A18 of the central processing unit 1 is 0, when the center
  • the processor 2 reads the BIOS program storage area B, that is, when the address range of the memory 2 is 0x040000 to 0x07FFFF, the output of the address bus A18 of the central processing unit 1 is 1, which is implemented in the present invention.
  • the first output pin output enable signal of the switching unit 4 controls the switch unit 3 to disconnect the central processing unit 1 to the memory during a power-on to a successful startup period.
  • the address bus A18 of 2 for example, when the enable terminal of the switch unit is turned on at a low level and turned off at a high level, the enable signal is a high level signal.
  • the second pin of the switching unit 4 includes two address output states, and the second pin is connected to an input terminal of the address bus A18 in the memory 2.
  • the central processing unit 1 When the output of the second pin is 0, the central processing unit 1 reads a BIOS program for booting the system from the BIOS program storage area A in the memory 2; When the second pin output is 1, the central processing unit 1 reads a BIOS program for booting the system boot from the BIOS program storage area B in the memory 2.
  • the address output state of the second output pin that triggers the switching unit 4 is between 0 and 1.
  • the switching unit 4 is a programmable hardware logic circuit, such as cyclic switching of the CPLD state itself does not require software control, when one of the BIOS program storage area A and the BIOS program storage area B is unavailable, such as an infected virus If the upgrade fails, etc., the corresponding BIOS program storage area may not be successfully booted.
  • the hardware output triggers the switching of the address output state of the second pin of the switching unit 4, thereby jumping to another BIOS program storage.
  • the zone boot system is started.
  • the central processing unit 1 controls the first of the switching unit 4 by executing a software program.
  • the output state of the pin is a disable enable signal output state, and the disable enable signal is used to control the switch unit 3 to turn on the central processor 1 to the address bus A18 of the memory, such as when the switch unit
  • the enable terminal is turned on at a low level, and when the high level is turned off, the disable enable signal is a low level signal.
  • the central processing unit 1 controls the output state of the second pin to be in a high impedance state by executing a software program.
  • the switching unit 4 includes a boot area flag register for saving the output status of the second pin of the switching unit for providing software only to the current boot area.
  • the upgrade control subsystem 5, the upgrade control subsystem 5 described in the embodiment of the present invention mainly includes:
  • the first loading unit 51 is configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device.
  • the BIOS program storage area of the booting electronic device is the BIOS program storage area A
  • the BIOS program for upgrading is loaded into the BIOS program storage area B
  • the BIOS program storage area started by the current booting electronic device is the BIOS.
  • program memory area B the BIOS program for upgrading is loaded into the BIOS program memory area A.
  • the BIOS program for upgrading may be a BIOS program file detected and downloaded by the network online upgrade.
  • the subsequent description will use the BIOS update area to indicate the BIOS program storage area in which the BIOS update program is loaded.
  • the determining unit 52 after the electronic device restarts successfully, determines whether the BIOS program storage area for booting the electronic device startup during the restart is the another BIOS program storage area and generates a corresponding judgment result.
  • the address output state of the second output pin of the switching unit 4 jumps, for example, assuming that the electronic device is currently powered on before the electronic device is restarted.
  • the BIOS boot area is the BIOS program storage area A.
  • the BIOS update area is the BIOS program storage area B, and the output of the second output pin of the corresponding switching unit 4 is 0, and the electronic device is powered on and reset.
  • the output of the second output pin that triggers the switching unit 4 jumps to 1, and the central processor 1 is configured to read the BIOS program from the BIOS program storage area B to boot the electronic device.
  • the second loading unit 53 is configured to: when the determination result of the determining unit is YES, load the BIOS program in the BIOS program storage area for booting the electronic device startup during the restarting to the BIOS program storage area Another BIOS program storage area.
  • the upgrade result output unit 54 is configured to output a BIOS upgrade success prompt message when the determination result of the determination unit is YES, and output a BIOS upgrade failure success prompt message when the determination unit determines that the result is NO.
  • step s201 two BIOS program storage areas are set.
  • the BIOS program storage area is used to store a BIOS program that boots the electronic device to boot.
  • the two BIOS program storage areas are set in the same power-down without loss of memory, such as EPROM or FLASH ROM.
  • the two BIOS program storage areas are sequentially set from the lowest bit of the power-down without loss of memory, for example, when the preset maximum space of the BIOS program storage area is 512K, for convenience of description, the two The BIOS program storage area is named BIOS program storage area and BIOS program storage area B.
  • the BIOS program storage area A has a partition address range of 0x0 to 0x03FFFF
  • the BIOS program storage area B has a partition address range of 0x040000 to 0x07FFFF.
  • the output of the address bus A18 of the electronic device CPU is 0, corresponding to the BIOS program storage area B, and the output of the address bus A18 of the electronic device CPU is 1.
  • the partition address allocation of the BIOS program storage area A and the BIOS program storage area B may be relatively flexible.
  • the partition address range of the BIOS program storage area A may be set to 0x0 to 0x7FFFF
  • the partition address range of the BIOS program storage area B is 0x080000 to OxFFFFF.
  • the output of the address bus A19 of the electronic device CPU is 0, corresponding to the BIOS program storage.
  • the output of the address bus A19 of the electronic device CPU is 1.
  • Step s202 When the electronic device is powered on, the electronic device is booted by the first BIOS program storage area.
  • the hardware logic circuit controls the electronic device CPU to boot from one of the two BIOS program storage areas.
  • Step s203 If the startup is unsuccessful or the electronic device is powered on again, booting the electronic device in the second BIOS program storage area.
  • the electronic logic device triggers the electronic device to jump from the first BIOS program storage area to boot the electronic device in the second BIOS program storage area.
  • Step s204 After the electronic device is successfully started, loading the BIOS program in the second BIOS program storage area into the first BIOS program storage area.
  • one of the two BIOS program storage areas in the embodiment of the present invention may be unavailable, that is, the electronic device cannot be booted normally, if In step s202, the first BIOS program storage area cannot guide the electronic device to be successfully started.
  • the watchdog hardware circuit will issue a reset signal, and the electronic device is triggered from the first BIOS program by controlling the address output state of the hardware logic circuit.
  • the storage area is switched to the second BIOS program storage area, and the second BIOS program storage area is used to boot the electronic device, and the reset signal of the watchdog circuit triggers the address output state of the hardware logic circuit to be switched between 0 and 1, and the implementation of the present invention
  • the switching of the address output state of the hardware logic circuit described in the example does not need to be controlled by executing software, thereby ensuring that the electronic device can be booted after the electronic device is successfully booted (the electronic device is booted before the electronic device is successfully booted). The former is unable to execute the software).
  • the embodiment of the present invention further provides a BIOS upgrade method based on the startup method of the embodiment of the present invention.
  • FIG. 3 it is a schematic flowchart of a BIOS program loading method in a BIOS upgrade method according to an embodiment of the present invention.
  • the BIOS program loading method mainly includes the following steps: Step s301, setting two BIOS program storage areas.
  • the setting method and function of the two BIOS program storage areas are the same as those in the step s201, and details are not described herein again.
  • Step s302 When the electronic device is powered on, the electronic device is booted by the first BIOS program storage area.
  • the first BIOS program storage area is a current booting area of the electronic device, that is, after the electronic device is powered on, under the jump control of the hardware logic circuit, the electronic device CPU reads from the BIOS program storage area.
  • the BIOS program boots the electronic device to boot.
  • the hardware logic provides a boot area flag register for saving the current boot area flag of the electronic device.
  • the address output state of the hardware logic corresponding to the BIOS program memory area A is 0 (corresponding to The partition address of the memory is 0x0 to 0x03FFFF), and the address of the hardware logic corresponding to the BIOS program memory area B is 1 (corresponding to the memory partition address is 0x040000 to 0x07FFFF).
  • the hardware logic circuit will provide the boot area flag register.
  • the corresponding address output status is saved (0 or 1). By reading the address output status in the boot area flag register, the current boot boot area of the electronic device and another BIOS program storage area can be distinguished.
  • Step s303 After the electronic device is successfully booted, the BIOS program for upgrading is loaded into the second BIOS program storage area.
  • the second BIOS storage area is another BIOS program storage area outside the boot area of the electronic device in the two BIOS program storage areas.
  • Step s304 setting update area identification information and saving the setting update area identification information.
  • the update identifier information includes update flag information and update area tag information, where the update flag information is used to reflect whether there is an update update to the BIOS program, such as setting an update in the step s304.
  • the flag information is valid, and the update area flag information is used to mark the updated BIOS program storage area.
  • the BIOS loading process of the BIOS upgrade method of the embodiment of the present invention updates only the BIOS in the second BIOS program storage area (that is, the non-current boot boot area) in the two BIOS program storage areas. a program, and whether the newly loaded BIOS update program in the second BIOS program storage area is valid is not determined, because the BIOS program is only called when the electronic device is started, if the electronic device can be the second
  • the BIOS booting method after the electronic device is restarted will be described in detail below by way of an embodiment.
  • FIG. 4 it is a schematic flowchart of a BIOS booting method in a BIOS upgrade method according to an embodiment of the present invention.
  • the BIOS booting method mainly includes the following steps: Step s401: The electronic device is powered on.
  • Step s402 prohibiting logical address redirection.
  • the prohibition of logical address redirection means that after the electronic device is successfully booted, the electronic device CPU controls the hardware logic circuit by executing a software program, and turns on an address line between the CPU and the BIOS program memory that is blocked when the electronic device is started.
  • the address bus A18, and the hardware logic circuit sets the address output state of the BIOS memory to a high-impedance state, thereby ensuring normal operation of the memory and data reading operations of the CPU when the electronic device is operating normally.
  • Step s403 reading the update flag information.
  • the update flag information is used to reflect whether there is an upgrade update to the BIOS program.
  • step s404 it is judged whether there is an update. If the determination result is yes, step 404 is performed; otherwise, the process is ended.
  • the BIOS program is updated. Otherwise, the BIOS program is not updated.
  • Step s405 reading the update area tag information.
  • step s406 it is determined whether the current startup area is an update area. If the determination result is yes, step s407 is performed; otherwise, step s408 is performed.
  • the hardware logic circuit controls the jump of the BIOS boot area by the switching of the address output state when the electronic device is powered on, if the current boot area, that is, the electronic device is successfully booted, is used to boot the electronic device.
  • the BIOS program storage area is the update area, indicating that the BIOS program storage area of the upgraded BIOS program can successfully boot the electronic device to start, indicating that the upgrade is successful; otherwise, if the current boot area is not the update area, the actual boot storage area, the description is The BIOS program storage area of the upgrade and update BIOS program can successfully boot the electronic device.
  • the electronic device powers on and jumps to the update area, the electronic device starts to fail with the update area, the startup timeout, the watchdog reset signal resets the hardware logic circuit, and triggers.
  • the BIOS program copy in the current boot area is loaded into another BIOS program storage area.
  • Step s408 prompting that the upgrade is not successful.
  • Step s409 setting the update flag information to be invalid.
  • step s409 the purpose of the step s409 is to ensure the normal operation and use of the electronic device when the electronic device BIOS is not upgraded.
  • Step s410 the processing ends.
  • the BIOS upgrade method of the embodiment of the present invention loads two BIOS program storage areas, and loads the BIOS program for upgrading to the first BIOS program storage area for booting the electronic device when the electronic device is in normal operation.
  • a BIOS storage area when the electronic device is powered on again, by triggering the hardware logic circuit to jump to boot the electronic device in the second BIOS program storage area, if the boot is unsuccessful, trigger the hardware logic circuit to jump again to Booting the electronic device with the first BIOS program storage area storing the original BIOS program Booting, thus avoiding the upgrade failure during the upgrade process, such as the abnormality of the BIOS upgrade program or the failure of the BIOS program itself for upgrading, the potential risk to the device, ensuring that the electronic device is successfully upgraded regardless of the BIOS.
  • the failure can be started normally, which improves the security of the BIOS upgrade.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

An electronic equipment includes a CPU, a memory and BIOS switching unit. In the memory two BIOS program memory areas are set. The BIOS switching unit triggers the electronic equipment to switch from one BIOS program memory area in the memory to another, thereby the electronic equipment is inducted to starting. Also a starting method and a method and a device for upgrading BIOS. Whether BIOS upgrades successfully or not, the electronic equipment may start normally, which ensures the security of BIOS upgrade

Description

一种电子设备、 电子设备的启动方法及 BIOS升级方法、 装置 技术领域 Electronic device, electronic device starting method and BIOS upgrading method and device
本发明涉及电子技术领域, 具体涉及一种电子设备、 电子设备的启 动方法及 BIOS升级方法、 装置。 发明背景  The present invention relates to the field of electronic technologies, and in particular, to an electronic device, an activation method of the electronic device, and a BIOS upgrade method and apparatus. Background of the invention
基本输入输出系统(BIOS, Basic Input/Output System, )是只读存 储器基本输入 /输出系统 (ROM - BIOS ) 的筒写, 它实际是一组被固 化到计算机等电子设备中, 为计算机设备提供最低级最直接的硬件控制 的程序, 它是连通软件程序和硬件设备之间的枢纽, 通俗地说, BIOS 是硬件与软件程序之间的一个"转换器"或者说是接口, 虽然它本身也只 是一个程序, 负责解决硬件的即时要求, 并按软件对硬件的操作要求具 体执行。  The Basic Input/Output System (BIOS) is a write-once memory of a basic input/output system (ROM-BIOS). It is actually a group that is solidified into an electronic device such as a computer to provide computer equipment. The lowest level of the most direct hardware controlled program, which is the hub between the connected software program and the hardware device. In layman's terms, the BIOS is a "converter" or interface between the hardware and the software program, although it itself It is just a program that is responsible for resolving the immediate requirements of the hardware and implementing the hardware requirements according to the software.
目前计算机的 BIOS芯片基本都采用了闪存( FLASH ROM ) , 可通 过特定的写入程序实现 BIOS的升级, 升级 BIOS主要有两大目的: 一、 获得新功能。  At present, the BIOS chip of the computer basically adopts the flash memory (FLASH ROM), and the BIOS can be upgraded through a specific writing program. The BIOS has two main purposes: 1. Obtain new functions.
升级 BIOS最直接的好处就是能获得许多新功能, 比如能支持新频 率和新类型的中央处理器( CPU ),例如以前的某些老主板通过升级 BIOS 支持图拉丁核心奔腾 ( Pentium ) III和赛扬(Celeron ), 现在的某些主板 通过升级 BIOS 能支持最新的普雷斯科特(Prescott )核心 Pentium 4E CPU; 突破容量限制, 能直接使用大容量硬盘; 获得新的启动方式; 开 启以前被屏蔽的功能, 例如英特尔的超线程技术, VIA的内存交错技术 等; 识别其它新硬件等。  The most immediate benefit of upgrading the BIOS is that it can get many new features, such as support for new frequencies and new types of CPUs. For example, some older motherboards support the Tualatin core Pentium III and races by upgrading the BIOS. Celeron, some motherboards now support the latest Prescott core Pentium 4E CPU by upgrading the BIOS; breaking the capacity limit, directly using the large capacity hard drive; getting a new boot mode; Shielded features, such as Intel's Hyper-Threading Technology, VIA's memory interleaving technology, etc.; Identify other new hardware, etc.
二、 解决旧版 BIOS中的漏洞 (BUG )。 BIOS既然也是程序, 就必然存在着 BUG, 而且现在硬件技术发展 曰新月异,随着市场竟争的加剧,主板厂商推出产品的周期也越来越短, 在 BIOS编写上必然也有不尽如意的地方,而这些 BUG常会导致莫名其 妙的故障, 例如无故重启, 经常死机, 系统效能低下, 设备沖突, 硬件 设备无故"丢失"等等。 Second, solve the vulnerabilities (BUG) in the old BIOS. Since the BIOS is also a program, there must be a BUG, and now the development of hardware technology is changing with each passing day. As the market competition intensifies, the cycle of motherboard manufacturers launching products is getting shorter and shorter, and there must be some unsatisfactory in BIOS writing. The place, and these BUG often lead to inexplicable failures, such as unreasonable restart, frequent crashes, poor system performance, device conflicts, hardware devices are "lost" for no reason, and so on.
在现有技术中, BIOS 升级方式采用直接覆盖 Flash ROM 中原有 BIOS程序的方法实现。 采用这种方式如果 BIOS升级过程出现异常(例 如文件传输异常、 FLASH读写异常、升级过程中掉电)、用于升级的 BIOS 引导程序本身存在缺陷, 会导致计算机、 通信装置等电子设备将无法启 动。 发明内容  In the prior art, the BIOS upgrade method is implemented by directly covering the original BIOS program in the Flash ROM. In this way, if there is an abnormality in the BIOS upgrade process (such as file transfer exception, FLASH read/write error, power failure during upgrade), and the BIOS boot program used for the upgrade itself is defective, the computer, communication device, and other electronic devices will not be able to be used. start up. Summary of the invention
有鉴于此, 本发明实施例在于提供一种电子设备、 电子设备的启动 方法及 BIOS升级方法, 保证在 BIOS升级过程中出现异常导致升级失 败的情况下, 电子设备仍能安全正常启动。  In view of the above, the embodiments of the present invention provide an electronic device, an electronic device booting method, and a BIOS upgrade method, so that the electronic device can still start normally safely in the event that an abnormality occurs in the BIOS upgrade process and the upgrade fails.
为了达到所述方法目的, 本发明实施例提供了一种电子设备的启动 方法, 包括:  In order to achieve the purpose of the method, an embodiment of the present invention provides a method for starting an electronic device, including:
电子设备上电时, 以第一基本输入输出系统 BIOS程序存储区引导 电子设备启动, 在启动不成功或电子设备重新上电时, 电子设备从所述 第一 BIOS程序存储区切换到第二 BIOS程序存储区,以第二 BIOS程序 存储区引导电子设备启动。  When the electronic device is powered on, the electronic device is booted by the first basic input/output system BIOS program storage area, and when the startup is unsuccessful or the electronic device is powered on again, the electronic device switches from the first BIOS program storage area to the second BIOS. The program storage area boots the electronic device with the second BIOS program storage area.
另外, 本发明实施例还提供了一种基本输入输出系统 BIOS升级方 法, 包括步骤:  In addition, an embodiment of the present invention further provides a BIOS for upgrading a basic input/output system, including the following steps:
设置两个 BIOS程序存储区, 所述 BIOS程序存储区用于存储引导 电子设备启动的 BIOS程序, 当对所述电子设备进行 BIOS升级时, 包 括以下步骤: Two BIOS program storage areas are provided, the BIOS program storage area is configured to store a BIOS program for booting the electronic device, and when the electronic device is upgraded by the BIOS, the package is Including the following steps:
电子设备启动成功后, 将用于升级的 BIOS程序加载到当前引导电 子设备成功启动的 BIOS程序存储区之外的另一个 BIOS程序存储区; 电子设备以存储升级 BIOS程序的 BIOS程序存储区引导电子设备重新 启动, 当重新启动不成功时, 以存储原 BIOS程序的 BIOS程序存储区 引导电子设备启动; 在引导电子设备成功重新启动的 BIOS程序存储区 为存储所述升级 BIOS程序的 BIOS程序存储区时,将所述升级 BIOS程 序加载到存储原 BIOS程序的 BIOS程序存储区。  After the electronic device is successfully booted, the BIOS program for upgrading is loaded into another BIOS program storage area outside the BIOS program storage area where the booting electronic device is successfully booted; the electronic device guides the electronic device in the BIOS program storage area storing the upgrade BIOS program. The device restarts, when the restart is unsuccessful, the booting electronic device is booted by the BIOS program storage area storing the original BIOS program; the BIOS program storage area in the boot electronic device successfully restarting is the BIOS program storage area storing the upgraded BIOS program. The upgrade BIOS program is loaded into a BIOS program storage area that stores the original BIOS program.
相应地, 本发明实施例还提供了一种电子设备, 包括中央处理器、 存储器、 及基本输入输出系统 BIOS切换单元, 其中:  Correspondingly, an embodiment of the present invention further provides an electronic device, including a central processing unit, a memory, and a basic input/output system BIOS switching unit, where:
存储器, 设置有两个 BIOS程序存储区, 所述 BIOS存储区存储有 用于引导电子设备启动的 BIOS程序;  The memory is provided with two BIOS program storage areas, and the BIOS storage area stores a BIOS program for booting the electronic device;
BIOS 切换单元, 用于在电子设备上电或电子设备复位时, 触发电 子设备从所述存储器中的一个 BIOS程序存储区切换到从另一个 BIOS 程序存储区引导设备启动。  The BIOS switching unit is configured to trigger the electronic device to switch from one BIOS program storage area in the memory to boot from another BIOS program storage area when the electronic device is powered on or reset.
本发明实施例还提供了一种 BIOS升级装置, 其特征在于, 所述装 置包括:  The embodiment of the invention further provides a BIOS upgrade device, wherein the device comprises:
第一加载单元, 用于当对电子设备进行 BIOS升级时, 将用于升级 的 BIOS程序加载到当前引导电子设备启动的 BIOS程序存储区之外的 另一 BIOS程序存储区;  a first loading unit, configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device;
判断单元, 当电子设备重新启动成功后, 判断重新启动时用于引导 电子设备重新启动的 BIOS 程序存储区是否为存储升级 BIOS 程序的 BIOS程序存储区并生成相应的判断结果;  The determining unit, after the electronic device restarts successfully, determining whether the BIOS program storage area for booting the electronic device restarting during the restart is a BIOS program storage area for storing the upgrade BIOS program and generating a corresponding judgment result;
第二加载单元, 用于当所述判断单元的判断结果表明重新启动时用 程序存储区时, 将所述升级 BIOS程序加载到存储原 BIOS程序的 BIOS 程序存储区。 a second loading unit, configured to: when the judgment result of the determining unit indicates that the restart is In the program memory area, the upgrade BIOS program is loaded into the BIOS program storage area where the original BIOS program is stored.
本发明实施例的 BIOS升级方法和装置, 通过设置两个 BIOS程序 存储区, 在电子设备正常运行时, 将用于升级的 BIOS程序加载到当前 用于引导电子设备启动的第一 BIOS程序存储区外的第二 BIOS程序存 储区, 当电子设备再次上电时, 通过硬件逻辑电路触发电子设备跳转到 以所述第二 BIOS程序存储区引导电子设备启动, 如果引导不成功, 则 再次通过硬件逻辑电路触发电子设备跳转到以保存有原 BIOS程序的第 一 BIOS程序存储区引导电子设备启动, 从而避免了在升级过程中发生 升级失败, 比如 BIOS升级程序出现异常或用于升级的 BIOS程序本身 存在的缺陷引起的失败, 对设备产生的潜在风险, 保证了电子设备无论 BIOS升级成功还是失败均能正常启动, 提高了 BIOS升级的安全性。 附图简要说明  The BIOS upgrade method and device of the embodiment of the present invention, by setting two BIOS program storage areas, loading the BIOS program for upgrading to the first BIOS program storage area currently used for booting the electronic device startup when the electronic device is in normal operation. a second BIOS program storage area, when the electronic device is powered on again, triggering the electronic device to jump to boot the electronic device in the second BIOS program storage area by the hardware logic circuit, and if the boot is unsuccessful, pass the hardware again The logic circuit triggers the electronic device to jump to boot the electronic device booting with the first BIOS program storage area storing the original BIOS program, thereby avoiding an upgrade failure during the upgrade process, such as an abnormality of the BIOS upgrade program or a BIOS program for upgrading. The failure caused by the defect itself, the potential risk to the device, ensures that the electronic device can start normally regardless of whether the BIOS upgrade succeeds or fails, and improves the security of the BIOS upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
图 1是本发明实施例的电子设备组成示意图;  1 is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention;
图 2是本发明实施例的本发明实施例的一种电子设备的启动方法的 流程示意图; 示意图;  2 is a schematic flowchart of a method for starting an electronic device according to an embodiment of the present invention;
图 4是本发明实施例的 BIOS升级方法中的 BIOS引导启动方法流程 示意图。 实施本发明的方式  FIG. 4 is a schematic diagram of a BIOS booting method in a BIOS upgrade method according to an embodiment of the present invention. Mode for carrying out the invention
为了使本发明实施例的技术方案及优点更加清楚明白, 下面结合附 图并举实施例对本发明实施例进行进一步详细说明。 参考图 1 , 是本发明实施例的电子设备组成示意图。 本发明实施例 所述的电子设备既包括了如个人计算机等通用计算机系统, 也包括了运 用嵌入式计算机系统等专用计算机系统的通信电子设备, 如网络接入设 备、 通信交换设备等。 如图所示, 本发明实施例所述的电子设备主要包 括中央处理器 1、 存储器 2、 开关单元 3、 切换单元 4以及升级控制子系 统 5。 下面对各个组成部分进行详细说明。 The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Referring to FIG. 1 , it is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention. The electronic device according to the embodiment of the present invention includes a general-purpose computer system such as a personal computer, and a communication electronic device such as a network access device, a communication switching device, and the like that uses a dedicated computer system such as an embedded computer system. As shown in the figure, the electronic device according to the embodiment of the present invention mainly includes a central processing unit 1, a memory 2, a switch unit 3, a switching unit 4, and an upgrade control subsystem 5. The individual components are described in detail below.
中央处理器 1 , 通过地址总线和数据总线实现对所述存储器 2的地 址访问和数据读取等操作, 与现有技术相同, 在此不再赘述。  The central processing unit 1 performs the operations of the address access and the data reading of the memory 2 through the address bus and the data bus, and is the same as the prior art, and details are not described herein again.
存储器 2,设置有 BIOS程序存储区 A和 BIOS程序存储区 B,所述 BIOS程序存储区 A和 BIOS程序存储区 B均用于存储用于引导电子设 备启动的 BIOS程序。  The memory 2 is provided with a BIOS program memory area A and a BIOS program memory area B, both of which are used to store a BIOS program for booting the electronic device.
此处, 在具体实施时所述存储器 2是掉电不丢失存储器, 一般情况 为电可擦除可编程 ROM ( EPROM, Electrically Erasable Programmable ROM, )或 FLASH ROM, 为了筒化设计, 一般情况下, 将所述 BIOS 程序存储区 A和 BIOS程序存储区 B从所述存储器 2的最低位开始依次 设置, 例如 BIOS程序存储区的预设最大空间是 512K时, 所述 BIOS程 序存储区 A的分区地址范围为 0x0至 0x03FFFF, 所述 BIOS程序存储 区 B的分区地址范围为 0x040000至 0x07FFFF,此时,对应于所述 BIOS 程序存储区 A, 所述中央处理器 1的地址总线 A18的输出为 0, 对应于 所述 BIOS程序存储区 B, 所述中央处理器 1的地址总线 A18的输出为 1。 另外, 在具体实施时, 所述 BIOS程序存储区 A和所述 BIOS程序存 储区 B的分区地址分配是可以比较灵活的, 例如, 可以设置所述 BIOS 程序存储区 A的分区地址范围为 0x0至 0x7FFFF, 所述 BIOS程序存储 区 B的分区地址范围为 0x080000至 OxFFFFF, 此时, 对应于所述 BIOS 程序存储区 A, 所述中央处理器 1的地址总线 A19的输出为 0, 对应于 所述 BIOS程序存储区 B, 所述中央处理器 1的地址总线 A19的输出为 1。 Here, in a specific implementation, the memory 2 is powered off without loss of memory, and is generally an electrically erasable programmable ROM (EPROM) or a FLASH ROM. The BIOS program storage area A and the BIOS program storage area B are sequentially set from the lowest bit of the memory 2, for example, when the preset maximum space of the BIOS program storage area is 512K, the partition address of the BIOS program storage area A The range of 0x0 to 0x03FFFF, the partition address of the BIOS program storage area B is 0x040000 to 0x07FFFF. At this time, corresponding to the BIOS program storage area A, the output of the address bus A18 of the central processing unit 1 is 0. Corresponding to the BIOS program storage area B, the output of the address bus A18 of the central processing unit 1 is 1. In addition, in a specific implementation, the partition address allocation of the BIOS program storage area A and the BIOS program storage area B may be relatively flexible. For example, the partition address range of the BIOS program storage area A may be set to 0x0 to 0x7FFFF, the partition address range of the BIOS program storage area B is 0x080000 to OxFFFFF, at this time, corresponding to the BIOS program storage area A, the output of the address bus A19 of the central processing unit 1 is 0, corresponding to The BIOS program storage area B, the output of the address bus A19 of the central processing unit 1 is 1.
BIOS切换单元 4, 用于在电子设备上电或电子设备复位时, 触发电 子设备从所述存储器 中的一个 BIOS程序存储区切换到从另一个 BIOS 程序存储区引导电子设备启动。  The BIOS switching unit 4 is configured to trigger the electronic device to switch from one BIOS program storage area in the memory to boot the electronic device from another BIOS program storage area when the electronic device is powered on or reset.
开关单元 3, 用于在电子设备开机上电或电子设备复位时, 断开所 述中央处理器 1至所述存储器 2的分区地址线, 以及用于在电子设备成 功启动后, 导通所述分区地址线。 下面对所述切换单元 4和所述开关单 元 3进行详细描述。  The switch unit 3 is configured to disconnect the central processing unit 1 to the partition address line of the memory 2 when the electronic device is powered on or reset, and to enable the electronic device to be turned on after the electronic device is successfully booted. Partition address line. The switching unit 4 and the switching unit 3 will be described in detail below.
所述 BIOS切换单元 4具有第一输出接脚和第二输出接脚, 在电子 设备上电重置或电子设备复位, 例如电子设备启动超时, 硬件看门狗电 路复位电子设备时, 所述第一输出接脚的输出状态为使能信号输出状 态, 所述使能信号用于控制所述开关单元 3断开所述中央处理器 1至所 述存储器 2的分区地址线; 在电子设备成功启动后, 所述第一输出接脚 的输出状态为禁止使能信号输出状态, 所述禁止使能信号用于控制所述 开关单元 3导通所述中央处理器 1至所述存储器 2的分区地址线; 所述 第二输出接脚的输出状态包括两个与所述各个 BIOS程序存储区对应的 地址输出状态, 在电子设备上电重置或电子设备复位时, 触发所述第二 输出接脚的输出状态由所述两个地址输出状态中的一个地址输出状态 切换到另一个地址输出状态。  The BIOS switching unit 4 has a first output pin and a second output pin. When the electronic device is powered on reset or the electronic device is reset, for example, the electronic device starts to time out, and the hardware watchdog circuit resets the electronic device, the The output state of an output pin is an enable signal output state, and the enable signal is used to control the switch unit 3 to disconnect the central processor 1 to the partition address line of the memory 2; The output state of the first output pin is a disable enable signal output state, and the disable enable signal is used to control the switch unit 3 to turn on the central processor 1 to the partition address of the memory 2. The output state of the second output pin includes two address output states corresponding to the respective BIOS program storage areas, and the second output pin is triggered when the electronic device is powered on reset or the electronic device is reset. The output state is switched by one of the two address output states to another address output state.
所述分区地址线为所述中央处理器 1与所述存储器 2之间多根数据 总线中的一根, 所述分区地址线的逻辑输出状态 (0或 1 )可决定所述 中央处理器 1从所述存储器 2读取的分区地址范围。 例如 BIOS程序存 储区的预设最大空间是 512K时, 所述 BIOS程序存储区 A的分区地址 范围为 0x0至 0x03FFFF, 所述 BIOS程序存储区 B的分区地址范围为 0x040000至 0x07FFFF, 此时, 对应于所述 BIOS程序存储区 A, 所述 中央处理器的地址总线 A18的输出为 0, 对应于所述 BIOS程序存储区 B, 所述中央处理器 1的地址总线 A18的输出为 1 , 所述地址总线 A18 即为所述分区地址线。 The partition address line is one of a plurality of data buses between the central processing unit 1 and the memory 2. The logical output state (0 or 1) of the partition address line may determine the central processing unit 1 The range of partition addresses read from the memory 2. For example, when the preset maximum space of the BIOS program storage area is 512K, the partition address range of the BIOS program storage area A is 0x0 to 0x03FFFF, and the partition address range of the BIOS program storage area B is 0x040000 to 0x07FFFF, at this time, corresponding to the BIOS program storage area A, the output of the address bus A18 of the central processing unit is 0, corresponding to the BIOS program storage area B, the address bus of the central processing unit 1 The output of A18 is 1, and the address bus A18 is the partition address line.
下面以本发明实施例的电子设备中所述存储器 中的所述 BIOS程 序存储区 A和 BIOS程序存储区 B从所述存储器 2的最低位开始依次设 置, 且所述 BIOS程序存储区的预设最大空间为 512K时, 对所述切换 单元 4、 所述开关单元 3、 以及所述存储器 2进行进一步详细说明。 在 具体实施例时, 所述切换单元 4为可编程硬件逻辑电路, 如复杂可编程 還辑器件(CPLD, Complex Programmable Logic Devices, ), 所述开关单 元 3为硬件逻辑电路, 如 244逻辑驱动电路, 其主要功能等价于一可控 开关电路, 即其输入与输出端的导通状态受控于使能端的输入状态, 所 述切换单元 4的第一输出接脚与所述开关单元 3的使能端连接。 当中央 处理器 2读取所述 BIOS程序存储区 A, 即在所述存储器 2的地址范围 为 0x0至 0x3FFFF的存储分区时, 所述中央处理器 1的地址总线 A18 的输出为 0, 当中央处理器 2读取所述 BIOS程序存储区 B, 即在所述存 储器 2的地址范围为 0x040000至 0x07FFFF的存储分区时,所述中央处 理器 1的地址总线 A18的输出为 1 , 在本发明实施例中, 在电子设备上 电至成功启动时间段内, 所述切换单元 4的所述第一输出接脚输出使能 信号控制所述开关单元 3断开所述中央处理器 1至所述存储器 2的地址 总线 A18, 比如, 当所述开关单元的使能端为低电平导通, 高电平断开 时, 所述使能信号为高电平信号。 所述切换单元 4的所述第二接脚包括 两个地址输出状态, 所述第二接脚连接于所述存储器 2 中的地址总线 A18输入端。 当所述第二接脚输出为 0时, 所述中央处理器 1从所述存 储器 2中的 BIOS程序存储区 A中读取用于引导系统启动的 BIOS程序; 当所述第二接脚输出为 1 时, 所述中央处理器 1从所述存储器 2 中的 BIOS程序存储区 B中读取用于引导系统启动的 BIOS程序。 当电子设 备上电重置或者电子设备发生复位, 比如, 在看门狗电路发出复位信号 时, 触发所述切换单元 4的所述第二输出接脚的地址输出状态在 0和 1 之间进行切换, 由于所述切换单元 4为可编程硬件逻辑电路, 如 CPLD 自身状态的循环切换不需要软件控制, 当所述 BIOS程序存储区 A和 BIOS程序存储区 B中之一不可用时, 比如感染病毒、 升级失败等均可 能导致相应的 BIOS程序存储区不能成功引导系统启动时, 通过硬件复 位触发切换单元 4的所述第二接脚的地址输出状态的切换, 从而跳转到 另一 BIOS程序存储区引导系统启动。 在本发明实施例中, 当电子设备 成功启动后, 为了保证电子设备正常运行时 CPU的地址总线不受干扰, 所述中央处理器 1通过执行软件程序控制所述切换单元 4的所述第一接 脚的输出状态为禁止使能信号输出状态, 通过所述禁止使能信号控制所 述开关单元 3导通所述中央处理器 1至所述存储器的地址总线 A18, 如 当所述开关单元的使能端为低电平导通, 高电平断开时, 所述禁止使能 信号为低电平信号。 相应地, 所述中央处理器 1通过执行软件程序控制 第二接脚的输出状态为高阻态。 The BIOS program storage area A and the BIOS program storage area B in the memory in the electronic device according to the embodiment of the present invention are sequentially set from the lowest bit of the memory 2, and the preset of the BIOS program storage area is preset. When the maximum space is 512K, the switching unit 4, the switching unit 3, and the memory 2 will be described in further detail. In a specific embodiment, the switching unit 4 is a programmable hardware logic circuit, such as Complex Programmable Logic Devices (CPLD), and the switching unit 3 is a hardware logic circuit, such as a 244 logic driving circuit. The main function is equivalent to a controllable switching circuit, that is, the conduction state of the input and output terminals is controlled by the input state of the enable terminal, and the first output pin of the switching unit 4 and the switch unit 3 are The end can be connected. When the central processing unit 2 reads the BIOS program storage area A, that is, in the storage area of the memory 2 whose address range is 0x0 to 0x3FFFF, the output of the address bus A18 of the central processing unit 1 is 0, when the center The processor 2 reads the BIOS program storage area B, that is, when the address range of the memory 2 is 0x040000 to 0x07FFFF, the output of the address bus A18 of the central processing unit 1 is 1, which is implemented in the present invention. In an example, the first output pin output enable signal of the switching unit 4 controls the switch unit 3 to disconnect the central processing unit 1 to the memory during a power-on to a successful startup period. The address bus A18 of 2, for example, when the enable terminal of the switch unit is turned on at a low level and turned off at a high level, the enable signal is a high level signal. The second pin of the switching unit 4 includes two address output states, and the second pin is connected to an input terminal of the address bus A18 in the memory 2. When the output of the second pin is 0, the central processing unit 1 reads a BIOS program for booting the system from the BIOS program storage area A in the memory 2; When the second pin output is 1, the central processing unit 1 reads a BIOS program for booting the system boot from the BIOS program storage area B in the memory 2. When the electronic device is powered on reset or the electronic device is reset, for example, when the watchdog circuit issues a reset signal, the address output state of the second output pin that triggers the switching unit 4 is between 0 and 1. Switching, since the switching unit 4 is a programmable hardware logic circuit, such as cyclic switching of the CPLD state itself does not require software control, when one of the BIOS program storage area A and the BIOS program storage area B is unavailable, such as an infected virus If the upgrade fails, etc., the corresponding BIOS program storage area may not be successfully booted. When the system is started, the hardware output triggers the switching of the address output state of the second pin of the switching unit 4, thereby jumping to another BIOS program storage. The zone boot system is started. In the embodiment of the present invention, after the electronic device is successfully started, in order to ensure that the address bus of the CPU is not interfered during normal operation of the electronic device, the central processing unit 1 controls the first of the switching unit 4 by executing a software program. The output state of the pin is a disable enable signal output state, and the disable enable signal is used to control the switch unit 3 to turn on the central processor 1 to the address bus A18 of the memory, such as when the switch unit The enable terminal is turned on at a low level, and when the high level is turned off, the disable enable signal is a low level signal. Correspondingly, the central processing unit 1 controls the output state of the second pin to be in a high impedance state by executing a software program.
在具体实施例中, 所述切换单元 4包括一启动区标志寄存器, 其作 用为将所述切换单元的所述第二接脚的输出状态保存, 用于提供给软件 只别当前启动区。  In a specific embodiment, the switching unit 4 includes a boot area flag register for saving the output status of the second pin of the switching unit for providing software only to the current boot area.
升级控制子系统 5, 本发明实施例所述的升级控制子系统 5主要包 括:  The upgrade control subsystem 5, the upgrade control subsystem 5 described in the embodiment of the present invention mainly includes:
第一加载单元 51 , 用于当对电子设备进行 BIOS升级时, 将用于升 级的 BIOS程序加载到当前引导电子设备启动的 BIOS程序存储区之外 的另一 BIOS程序存储区。 此处, 在当前引导电子设备启动的 BIOS程序存储区为 BIOS程序 存储区 A时, 将用于升级的 BIOS程序加载到 BIOS程序存储区 B; 在 当前引导电子设备启动的 BIOS程序存储区为 BIOS程序存储区 B时, 将用于升级的 BIOS程序加载到 BIOS程序存储区 A。 所述用于升级的 BIOS程序可以是网络在线升级检测并下载到的 BIOS程序文件。为了描 述方便, 后续描述将用 BIOS更新区表示加载 BIOS新更新程序的 BIOS 程序存储区。 The first loading unit 51 is configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device. Here, when the BIOS program storage area of the booting electronic device is the BIOS program storage area A, the BIOS program for upgrading is loaded into the BIOS program storage area B; the BIOS program storage area started by the current booting electronic device is the BIOS. In program memory area B, the BIOS program for upgrading is loaded into the BIOS program memory area A. The BIOS program for upgrading may be a BIOS program file detected and downloaded by the network online upgrade. For convenience of description, the subsequent description will use the BIOS update area to indicate the BIOS program storage area in which the BIOS update program is loaded.
判断单元 52, 当电子设备重新启动成功后, 判断重新启动时用于引 导电子设备启动的 BIOS程序存储区是否为所述另一 BIOS程序存储区 并生成相应的判断结果。  The determining unit 52, after the electronic device restarts successfully, determines whether the BIOS program storage area for booting the electronic device startup during the restart is the another BIOS program storage area and generates a corresponding judgment result.
此处, 在电子设备重新启动上电重置时, 所述切换单元 4的所述第 二输出接脚的地址输出状态发生跳转, 例如, 假定在电子设备重新启动 上电之前电子设备的当前 BIOS引导区为 BIOS程序存储区 A, 此时, BIOS更新区为 BIOS程序存储区 B,相应的所述切换单元 4的所述第二 输出接脚的输出为 0, 在电子设备上电重置时, 触发所述切换单元 4的 所述第二输出接脚的输出跳转为 1 , 实现了所述中央处理器 1从 BIOS 程序存储区 B读取 BIOS程序引导电子设备启动。  Here, when the electronic device restarts the power-on reset, the address output state of the second output pin of the switching unit 4 jumps, for example, assuming that the electronic device is currently powered on before the electronic device is restarted. The BIOS boot area is the BIOS program storage area A. At this time, the BIOS update area is the BIOS program storage area B, and the output of the second output pin of the corresponding switching unit 4 is 0, and the electronic device is powered on and reset. At the same time, the output of the second output pin that triggers the switching unit 4 jumps to 1, and the central processor 1 is configured to read the BIOS program from the BIOS program storage area B to boot the electronic device.
第二加载单元 53, 用于当所述判断单元的判断结果为是时, 将所述 重新启动时用于引导电子设备启动的 BIOS程序存储区中的 BIOS程序 加载到该 BIOS程序存储区之外的另一 BIOS程序存储区。  The second loading unit 53 is configured to: when the determination result of the determining unit is YES, load the BIOS program in the BIOS program storage area for booting the electronic device startup during the restarting to the BIOS program storage area Another BIOS program storage area.
升级结果输出单元 54, 用于在所述判断单元判断结果为是时, 输出 BIOS升级成功提示信息, 在所述判断单元判断结果为否时, 输出 BIOS 升级不成功提示信息。  The upgrade result output unit 54 is configured to output a BIOS upgrade success prompt message when the determination result of the determination unit is YES, and output a BIOS upgrade failure success prompt message when the determination unit determines that the result is NO.
参考图 2, 是本发明实施例的一种启动方法的流程示意图。 如图所 示本发明实施例所述的启动方法主要包括以下步骤: 步骤 s201 , 设置两个 BIOS程序存储区。 Referring to FIG. 2, it is a schematic flowchart of a startup method according to an embodiment of the present invention. The startup method described in the embodiment of the present invention mainly includes the following steps: In step s201, two BIOS program storage areas are set.
此处, 所述 BIOS程序存储区用于存储引导电子设备启动的 BIOS 程序。 一般情况下, 所述两个 BIOS程序存储区设置在同一掉电不丢失 存储器中, 如 EPROM或 FLASH ROM。 一般情况下, 将所述两个 BIOS 程序存储区从所述掉电不丢失存储器的最低位开始依次设置,例如 BIOS 程序存储区的预设最大空间是 512K时,为了便于描述,将所述两个 BIOS 程序存储区命名为 BIOS程序存储区 和 BIOS程序存储区 B,所述 BIOS 程序存储区 A的分区地址范围为 0x0至 0x03FFFF, 所述 BIOS程序存 储区 B的分区地址范围为 0x040000至 0x07FFFF, 此时, 对应于所述 BIOS程序存储区 A, 电子设备 CPU的地址总线 A18的输出为 0, 对应 于所述 BIOS程序存储区 B,电子设备 CPU的地址总线 A18的输出为 1。 另外, 在具体实施时, 所述 BIOS程序存储区 A和所述 BIOS程序存储 区 B的分区地址分配是可以比较灵活的, 例如, 可以设置所述 BIOS程 序存储区 A的分区地址范围为 0x0至 0x7FFFF, 所述 BIOS程序存储区 B的分区地址范围为 0x080000至 OxFFFFF, 此时, 对应于所述 BIOS程 序存储区 A, 电子设备 CPU的地址总线 A19的输出为 0, 对应于所述 BIOS程序存储区 B, 电子设备 CPU的地址总线 A19的输出为 1。  Here, the BIOS program storage area is used to store a BIOS program that boots the electronic device to boot. In general, the two BIOS program storage areas are set in the same power-down without loss of memory, such as EPROM or FLASH ROM. Generally, the two BIOS program storage areas are sequentially set from the lowest bit of the power-down without loss of memory, for example, when the preset maximum space of the BIOS program storage area is 512K, for convenience of description, the two The BIOS program storage area is named BIOS program storage area and BIOS program storage area B. The BIOS program storage area A has a partition address range of 0x0 to 0x03FFFF, and the BIOS program storage area B has a partition address range of 0x040000 to 0x07FFFF. At this time, corresponding to the BIOS program storage area A, the output of the address bus A18 of the electronic device CPU is 0, corresponding to the BIOS program storage area B, and the output of the address bus A18 of the electronic device CPU is 1. In addition, in a specific implementation, the partition address allocation of the BIOS program storage area A and the BIOS program storage area B may be relatively flexible. For example, the partition address range of the BIOS program storage area A may be set to 0x0 to 0x7FFFF, the partition address range of the BIOS program storage area B is 0x080000 to OxFFFFF. At this time, corresponding to the BIOS program storage area A, the output of the address bus A19 of the electronic device CPU is 0, corresponding to the BIOS program storage. In the area B, the output of the address bus A19 of the electronic device CPU is 1.
步骤 s202, 电子设备上电时, 以第一 BIOS程序存储区引导电子设 备启动。  Step s202: When the electronic device is powered on, the electronic device is booted by the first BIOS program storage area.
此处, 当电子设备上电时,硬件逻辑电路控制电子设备 CPU从所述 两个 BIOS程序存储区中之一启动。  Here, when the electronic device is powered on, the hardware logic circuit controls the electronic device CPU to boot from one of the two BIOS program storage areas.
步骤 s203, 如果启动不成功或电子设备重新上电, 则以第二 BIOS 程序存储区引导电子设备启动。  Step s203: If the startup is unsuccessful or the electronic device is powered on again, booting the electronic device in the second BIOS program storage area.
此处, 具体实现时, 通过硬件逻辑电路触发电子设备从所述第一 BIOS程序存储区跳转到以第二 BIOS程序存储区引导电子设备启动。 步骤 s204, 电子设备成功启动后, 将所述第二 BIOS程序存储区中 的 BIOS程序加载到所述第一 BIOS程序存储区。 Here, in a specific implementation, the electronic logic device triggers the electronic device to jump from the first BIOS program storage area to boot the electronic device in the second BIOS program storage area. Step s204: After the electronic device is successfully started, loading the BIOS program in the second BIOS program storage area into the first BIOS program storage area.
此处, 由于升级失败、 病毒感染等原因均可能会导致本发明实施例 所述的两个 BIOS程序存储区中的一个 BIOS程序存储区不可用, 即不 能引导电子设备正常启动, 如果在所述步骤 s202中, 所述第一 BIOS程 序存储区不能引导电子设备成功启动, 启动超时时, 看门狗硬件电路将 发出复位信号, 通过控制硬件逻辑电路的地址输出状态触发电子设备从 第一 BIOS程序存储区切换到第二 BIOS程序存储区,以第二 BIOS程序 存储区引导电子设备启动, 看门狗电路的复位信号触发硬件逻辑电路的 地址输出状态在 0和 1之间进行切换, 本发明实施例所述的硬件逻辑电 路的地址输出状态的切换是不需要通过执行软件实现控制的, 从而保证 在电子设备成功启动前可切换到相应的可用 BIOS程序存储区引导电子 设备启动 (电子设备在启动前是无法执行软件的)。 当电子设备从所述 第二 BIOS程序存储区成功启动后, 将所述第二 BIOS程序存储区中的 BIOS程序复制加载到所述第一 BIOS程序存储区,从而保证电子设备以 所述两个 BIOS程序存储区中的任一个引导电子设备启动。  Here, due to the upgrade failure, the virus infection, etc., one of the two BIOS program storage areas in the embodiment of the present invention may be unavailable, that is, the electronic device cannot be booted normally, if In step s202, the first BIOS program storage area cannot guide the electronic device to be successfully started. When the startup timeout occurs, the watchdog hardware circuit will issue a reset signal, and the electronic device is triggered from the first BIOS program by controlling the address output state of the hardware logic circuit. The storage area is switched to the second BIOS program storage area, and the second BIOS program storage area is used to boot the electronic device, and the reset signal of the watchdog circuit triggers the address output state of the hardware logic circuit to be switched between 0 and 1, and the implementation of the present invention The switching of the address output state of the hardware logic circuit described in the example does not need to be controlled by executing software, thereby ensuring that the electronic device can be booted after the electronic device is successfully booted (the electronic device is booted before the electronic device is successfully booted). The former is unable to execute the software). After the electronic device is successfully booted from the second BIOS program storage area, copying the BIOS program in the second BIOS program storage area to the first BIOS program storage area, thereby ensuring that the electronic device is in the two Any of the booting electronic devices in the BIOS program memory area is booted.
在本发明实施例所述的启动方法的基 上, 本发明实施例还提供了 一种 BIOS升级方法。  The embodiment of the present invention further provides a BIOS upgrade method based on the startup method of the embodiment of the present invention.
参考图 3,是本发明实施例的 BIOS升级方法中的 BIOS程序加载方 法流程示意图。 如图所示该 BIOS程序加载方法主要包括以下步骤: 步骤 s301 , 设置两个 BIOS程序存储区。  Referring to FIG. 3, it is a schematic flowchart of a BIOS program loading method in a BIOS upgrade method according to an embodiment of the present invention. As shown in the figure, the BIOS program loading method mainly includes the following steps: Step s301, setting two BIOS program storage areas.
此处, 所述两个 BIOS程序存储区的设置方法以及功能与所述步骤 s201中相同, 在此不再赘述。  The setting method and function of the two BIOS program storage areas are the same as those in the step s201, and details are not described herein again.
步骤 s302, 电子设备上电时, 以第一 BIOS程序存储区引导电子设 备启动。 此处, 所述第一 BIOS程序存储区为电子设备当前启动引导区, 也 即电子设备在上电后,在硬件逻辑电路的跳转控制下, 电子设备 CPU从 该 BIOS程序存储区中读取 BIOS程序引导电子设备启动。 在本发明实 施例具体实现时, 硬件逻辑提供启动区标志寄存器, 用于保存电子设备 当前启动区标记, 具体实现时, 例如, BIOS程序存储区 A对应的硬件 逻辑的地址输出状态为 0 (对应存储器的分区地址为 0x0至 0x03FFFF ), BIOS程序存储区 B对应的硬件逻辑的地址输出状态为 1(对应存储器的 分区地址为 0x040000至 0x07FFFF ), 此时, 硬件逻辑电路通过提供启 动区标志寄存器将相应的地址输出状态保存(0或 1 )。 通过读取所述启 动区标志寄存器中的地址输出状态, 即可区分电子设备当前启动引导区 和另一 BIOS程序存储区。 Step s302: When the electronic device is powered on, the electronic device is booted by the first BIOS program storage area. Here, the first BIOS program storage area is a current booting area of the electronic device, that is, after the electronic device is powered on, under the jump control of the hardware logic circuit, the electronic device CPU reads from the BIOS program storage area. The BIOS program boots the electronic device to boot. When the embodiment of the present invention is specifically implemented, the hardware logic provides a boot area flag register for saving the current boot area flag of the electronic device. For specific implementation, for example, the address output state of the hardware logic corresponding to the BIOS program memory area A is 0 (corresponding to The partition address of the memory is 0x0 to 0x03FFFF), and the address of the hardware logic corresponding to the BIOS program memory area B is 1 (corresponding to the memory partition address is 0x040000 to 0x07FFFF). At this time, the hardware logic circuit will provide the boot area flag register. The corresponding address output status is saved (0 or 1). By reading the address output status in the boot area flag register, the current boot boot area of the electronic device and another BIOS program storage area can be distinguished.
步骤 s303 , 电子设备启动成功后, 将用于升级的 BIOS程序加载到 第二 BIOS程序存储区。  Step s303: After the electronic device is successfully booted, the BIOS program for upgrading is loaded into the second BIOS program storage area.
此处, 所述第二 BIOS存储区为所述两个 BIOS程序存储区中所述 电子设备当前启动引导区之外的另一 BIOS程序存储区。  Here, the second BIOS storage area is another BIOS program storage area outside the boot area of the electronic device in the two BIOS program storage areas.
步骤 s304, 设置更新区标识信息并将设置更新区标识信息保存。 此处, 在一具体实施例中, 所述更新标识信息包括更新标志信息以 及更新区标记信息, 所述更新标志信息用于反映是否有对 BIOS程序进 行升级更新,如在该步骤 s304中设置更新标志信息为有效,所述更新区 标记信息用于标记被更新的 BIOS程序存储区。  Step s304, setting update area identification information and saving the setting update area identification information. Here, in a specific embodiment, the update identifier information includes update flag information and update area tag information, where the update flag information is used to reflect whether there is an update update to the BIOS program, such as setting an update in the step s304. The flag information is valid, and the update area flag information is used to mark the updated BIOS program storage area.
通过本发明实施例的 BIOS升级方法的 BIOS程序加载流程, 只更 新了所述设置的两个 BIOS程序存储区中的所述第二 BIOS程序存储区 (也即非当前引导启动区) 中的 BIOS程序, 并且, 所述第二 BIOS程 序存储区中新加载的 BIOS更新程序是否有效并不确定, 由于 BIOS程 序只有在电子设备启动时才会被调用执行, 如果电子设备能以所述第二 BIOS程序存储区引导启动, 则表示升级加载的 BIOS程序是有效的, 说 明升级成功, 如果电子设备不能以所述第二 BIOS程序存储区引导成功 启动 (硬件复位, 将触发跳转到以所述第一 BIOS程序存储区引导电子 设备启动), 则说明升级不成功。 下面通过实施例描述, 对电子设备重 新启动后的 BIOS引导启动方法进行详细描述。 The BIOS loading process of the BIOS upgrade method of the embodiment of the present invention updates only the BIOS in the second BIOS program storage area (that is, the non-current boot boot area) in the two BIOS program storage areas. a program, and whether the newly loaded BIOS update program in the second BIOS program storage area is valid is not determined, because the BIOS program is only called when the electronic device is started, if the electronic device can be the second The BIOS program storage boot starts, indicating that the upgrade loaded BIOS program is valid, indicating that the upgrade is successful, if the electronic device cannot boot successfully with the second BIOS program storage area (hardware reset, a jump will be triggered to The first BIOS program storage area boots the electronic device to start), indicating that the upgrade is unsuccessful. The BIOS booting method after the electronic device is restarted will be described in detail below by way of an embodiment.
参考图 4,是本发明实施例的 BIOS升级方法中的 BIOS引导启动方 法流程示意图。 如图所示该 BIOS引导启动方法主要包括以下步骤: 步骤 s401 , 电子设备上电启动。  Referring to FIG. 4, it is a schematic flowchart of a BIOS booting method in a BIOS upgrade method according to an embodiment of the present invention. As shown in the figure, the BIOS booting method mainly includes the following steps: Step s401: The electronic device is powered on.
步骤 s402, 禁止逻辑地址重定向。  Step s402, prohibiting logical address redirection.
此处, 所述禁止逻辑地址重定向是指电子设备启动成功后, 电子设 备 CPU通过执行软件程序控制硬件逻辑电路, 导通 CPU与 BIOS程序 存储器之间在电子设备启动时被阻断的地址线, 如地址总线 A18, 并且 硬件逻辑电路对 BIOS存储器的地址输出状态设置为高阻态, 从而保证 电子设备正常运行时, CPU对存储器的正常地址访问以及数据读取等操 作。  Here, the prohibition of logical address redirection means that after the electronic device is successfully booted, the electronic device CPU controls the hardware logic circuit by executing a software program, and turns on an address line between the CPU and the BIOS program memory that is blocked when the electronic device is started. For example, the address bus A18, and the hardware logic circuit sets the address output state of the BIOS memory to a high-impedance state, thereby ensuring normal operation of the memory and data reading operations of the CPU when the electronic device is operating normally.
步骤 s403 , 读取更新标志信息。  Step s403, reading the update flag information.
此处, 所述更新标志信息用于反映是否有对 BIOS程序进行升级更 新。  Here, the update flag information is used to reflect whether there is an upgrade update to the BIOS program.
步骤 s404, 判断是否有更新, 如果判断结果为是, 则执行步骤 404, 否则, 则结束处理。  In step s404, it is judged whether there is an update. If the determination result is yes, step 404 is performed; otherwise, the process is ended.
此处, 当更新标志信息有效时, 则说明 BIOS程序有更新, 否则, 说明 BIOS程序没有更新。  Here, when the update flag information is valid, the BIOS program is updated. Otherwise, the BIOS program is not updated.
步骤 s405 , 读取更新区标记信息。  Step s405, reading the update area tag information.
此处, 通过读取更新区标记信息, 系统可获知所述两个 BIOS程序 存储器中具体哪一个被升级更新。 步骤 s406, 判断当前启动区是否为更新区, 如果判断结果为是, 则 执行步骤 s407, 否则, 执行步骤 s408。 Here, by reading the update area tag information, the system can know which of the two BIOS program memories is updated and updated. In step s406, it is determined whether the current startup area is an update area. If the determination result is yes, step s407 is performed; otherwise, step s408 is performed.
此处, 由于在设电子设备上电时, 硬件逻辑电路通过地址输出状态 的切换控制 BIOS启动区的跳转, 因此如果当前启动区, 即该次电子设 备成功启动时, 用于引导电子设备启动的 BIOS程序存储区为更新区, 则说明被升级更新 BIOS程序的 BIOS程序存储区能成功引导电子设备 启动, 表示升级成功; 反之, 如果当前启动区不是更新区, 则实际引导 存储区, 说明被升级更新 BIOS程序的 BIOS程序存储区能成功引导电 子设备启动, 电子设备上电跳转到更新区后, 以更新区引导电子设备启 动失败, 启动超时, 看门狗复位信号复位硬件逻辑电路, 触发到以保存 步骤 s407, 将当前启动区的中的 BIOS程序复制加载到另一 BIOS 程序存储区。  Here, since the hardware logic circuit controls the jump of the BIOS boot area by the switching of the address output state when the electronic device is powered on, if the current boot area, that is, the electronic device is successfully booted, is used to boot the electronic device. The BIOS program storage area is the update area, indicating that the BIOS program storage area of the upgraded BIOS program can successfully boot the electronic device to start, indicating that the upgrade is successful; otherwise, if the current boot area is not the update area, the actual boot storage area, the description is The BIOS program storage area of the upgrade and update BIOS program can successfully boot the electronic device. After the electronic device powers on and jumps to the update area, the electronic device starts to fail with the update area, the startup timeout, the watchdog reset signal resets the hardware logic circuit, and triggers. To save step s407, the BIOS program copy in the current boot area is loaded into another BIOS program storage area.
步骤 s408, 提示升级未成功。  Step s408, prompting that the upgrade is not successful.
步骤 s409, 设置更新标记信息为无效。  Step s409, setting the update flag information to be invalid.
此处, 该步骤 s409的目的是保证在不对电子设备 BIOS升级时, 电 子设备的正常运行和使用。  Here, the purpose of the step s409 is to ensure the normal operation and use of the electronic device when the electronic device BIOS is not upgraded.
步骤 s410, 结束处理。  Step s410, the processing ends.
本发明实施例的 BIOS升级方法通过设置两个 BIOS程序存储区, 在电子设备正常运行时, 将用于升级的 BIOS程序加载到当前用于引导 电子设备启动的第一 BIOS程序存储区外的第二 BIOS程序存储区, 当 电子设备再次上电时, 通过触发硬件逻辑电路跳转到以所述第二 BIOS 程序存储区引导电子设备启动, 如果引导不成功, 则再次触发硬件逻辑 电路跳转到以保存有原 BIOS程序的第一 BIOS程序存储区引导电子设 备启动, 从而避免了在升级过程中发生升级失败, 比如 BIOS升级程序 出现异常或用于升级的 BIOS程序本身存在的缺陷引起的失败, 对设备 产生的潜在风险, 保证了电子设备无论 BIOS升级成功还是失败均能正 常启动, 提高了 BIOS升级的安全性。 The BIOS upgrade method of the embodiment of the present invention loads two BIOS program storage areas, and loads the BIOS program for upgrading to the first BIOS program storage area for booting the electronic device when the electronic device is in normal operation. a BIOS storage area, when the electronic device is powered on again, by triggering the hardware logic circuit to jump to boot the electronic device in the second BIOS program storage area, if the boot is unsuccessful, trigger the hardware logic circuit to jump again to Booting the electronic device with the first BIOS program storage area storing the original BIOS program Booting, thus avoiding the upgrade failure during the upgrade process, such as the abnormality of the BIOS upgrade program or the failure of the BIOS program itself for upgrading, the potential risk to the device, ensuring that the electronic device is successfully upgraded regardless of the BIOS. The failure can be started normally, which improves the security of the BIOS upgrade.
以上所述仅是本发明的优选实施方式, 应当指出, 对于本技术领域 的普通技术人员来说, 在不脱离本发明原理的前提下, 还可以作出若干 改进和润饰, 这些改进和润饰也应视为本发明的保护范围。  The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It is considered as the scope of protection of the present invention.

Claims

权利要求书 Claim
1、 一种电子设备的启动方法, 其特征在于, 包括步骤:  A method for starting an electronic device, comprising the steps of:
电子设备上电时, 以第一基本输入输出系统 BIOS程序存储区引导 电子设备启动, 在启动不成功或电子设备重新上电时, 电子设备从所述 第一 BIOS程序存储区切换到第二 BIOS程序存储区,以第二 BIOS程序 存储区引导电子设备启动。  When the electronic device is powered on, the electronic device is booted by the first basic input/output system BIOS program storage area, and when the startup is unsuccessful or the electronic device is powered on again, the electronic device switches from the first BIOS program storage area to the second BIOS. The program storage area boots the electronic device with the second BIOS program storage area.
2、 如权利要求 1所述的方法, 其特征在于, 在所述以第二 BIOS程 序存储区引导电子设备启动的步骤之后, 所述方法进一步包括步骤: 电子设备启动成功后, 将所述第二 BIOS程序存储区中的 BIOS程 序加载到所述第一 BIOS程序存储区。  2. The method according to claim 1, wherein after the step of booting the electronic device in the second BIOS program storage area, the method further comprises the step of: after the electronic device is successfully booted, The BIOS program in the second BIOS program storage area is loaded into the first BIOS program storage area.
3、 一种基本输入输出系统 BIOS升级方法, 其特征在于, 设置两个  3, a basic input and output system BIOS upgrade method, which is characterized in that two
BIOS程序, 当对所述电子设备进行 BIOS升级时, 包括以下步骤: 电子设备启动成功后, 将用于升级的 BIOS程序加载到当前引导电子设 备成功启动的 BIOS程序存储区之外的另一个 BIOS程序存储区; 电子 当重新启动不成功时, 以存储原 BIOS程序的 BIOS程序存储区引导电 子设备启动; 在引导电子设备成功重新启动的 BIOS程序存储区为存储 所述升级 BIOS程序的 BIOS程序存储区时,将所述升级 BIOS程序加载 到存储原 BIOS程序的 BIOS程序存储区。 The BIOS program, when performing BIOS upgrade on the electronic device, includes the following steps: after the electronic device is successfully booted, loading the BIOS program for upgrading to another BIOS outside the BIOS program storage area where the booting electronic device is successfully booted. Program storage area; electronically, when the restart is unsuccessful, the electronic program storage area of the original BIOS program is booted to boot the electronic device; the BIOS program storage area for successfully booting the electronic device is stored in the BIOS program for storing the upgraded BIOS program. In the zone, the upgrade BIOS program is loaded into the BIOS program storage area where the original BIOS program is stored.
4、 如权利要求 3 所述的方法, 其特征在于, 在将所述用于升级的 BIOS程序加载到另一个 BIOS程序存储区的步骤之后还包括:  4. The method according to claim 3, further comprising: after the step of loading the BIOS program for upgrading to another BIOS program storage area, further comprising:
设置更新区标识信息并将所述更新区标识信息保存。  The update area identification information is set and the update area identification information is saved.
5、如权利要求 4所述的方法, 其特征在于, 判断所述当前引导电子 序存储区包括: 5. The method of claim 4, wherein determining the current guiding electron The order storage area includes:
读取所述更新区标识信息, 并根据所述更新区标识信息判断当前引 导电子设备成功启动的 BIOS程序存储区是否为所述存储升级 BIOS程 序的 BIOS程序存储区。  And reading the update area identification information, and determining, according to the update area identification information, whether a BIOS program storage area that is successfully booted by the current boot electronic device is a BIOS program storage area of the storage upgrade BIOS program.
6、如权利要求 4或 5所述的方法,其特征在于,在所述将升级 BIOS 程序加载到存储原 BIOS程序的 BIOS程序存储区之后还包括步骤: 清 除更新区标识信息。  The method according to claim 4 or 5, further comprising the step of: clearing the update area identification information after loading the upgrade BIOS program to the BIOS program storage area storing the original BIOS program.
7、 一种电子设备, 该电子设备包括中央处理器, 其特征在于, 还包 括:  An electronic device, comprising: a central processing unit, further comprising:
存储器, 设置有两个 BIOS程序存储区, 所述 BIOS存储区存储有 用于引导电子设备启动的 BIOS程序;  The memory is provided with two BIOS program storage areas, and the BIOS storage area stores a BIOS program for booting the electronic device;
BIOS切换单元,用于在电子设备上电或电子设备复位时,触发电子 设备从所述存储器中的一个 BIOS程序存储区切换到从另一个 BIOS程 序存储区引导电子设备启动。  The BIOS switching unit is configured to trigger the electronic device to switch from one BIOS program storage area in the memory to boot the electronic device from another BIOS program storage area when the electronic device is powered on or reset.
8、 如权利要求 7所述的电子设备, 其特征在于, 所述电子设备进一 步包括:  8. The electronic device of claim 7, wherein the electronic device further comprises:
开关单元, 用于在电子设备开机上电或电子设备复位时, 断开所述 中央处理器至所述存储器的分区地址线, 所述分区地址线为区分两个 BIOS 程序存储区的地址线, 在电子设备成功启动后, 导通所述分区地 址线;  a switching unit, configured to: when the electronic device is powered on or the electronic device is reset, disconnect the central processor to a partition address line of the memory, where the partition address line is an address line that distinguishes two BIOS program storage areas, After the electronic device is successfully booted, the partition address line is turned on;
所述中央处理器根据所述开关单元的断开或导通所述分区地址线, 读取相应的 BIOS程序存储区的 BIOS程序, 引导电子设备启动。  The central processor reads the BIOS program of the corresponding BIOS program storage area according to the disconnection or turning on of the partition address line of the switch unit, and boots the electronic device to start.
9、 如权利要求 8所述的电子设备, 其特征在于, 所述 BIOS切换单 元具有第一输出接脚和第二输出接脚, 在电子设备上电重置或电子设备 复位时, 所述第一输出接脚的输出状态为使能信号输出状态, 所述使能 信号用于控制所述开关单元断开所述中央处理器至所述存储器的分区 地址线; The electronic device according to claim 8, wherein the BIOS switching unit has a first output pin and a second output pin, and when the electronic device is powered on reset or the electronic device is reset, the An output state of an output pin is an enable signal output state, and the enable Signaling for controlling the switching unit to disconnect the central processor to a partition address line of the memory;
在电子设备成功启动后, 所述第一输出接脚的输出状态为禁止使能 信号输出状态, 所述禁止使能信号用于控制所述开关单元导通所述中央 处理器至所述存储器的分区地址线;  After the electronic device is successfully started, the output state of the first output pin is a disable enable signal output state, and the disable enable signal is used to control the switch unit to conduct the central processor to the memory. Partitioned address line;
所述第二输出接脚的输出状态包括两个与所述各个 BIOS程序存储 区对应的地址输出状态, 在电子设备上电重置或电子设备复位时, 触发 所述第二输出接脚的输出状态由所述两个地址输出状态中的一个地址 输出状态切换到另一个地址输出状态。  The output state of the second output pin includes two address output states corresponding to the respective BIOS program storage areas, and triggers the output of the second output pin when the electronic device is powered on reset or the electronic device is reset. The state is switched from one of the two address output states to another address output state.
10、 如权利要求 9所述的电子设备, 其特征在于, 在电子设备成功 启动后, 所述切换单元的第二输出接脚的输出状态为高阻态。  10. The electronic device according to claim 9, wherein after the electronic device is successfully activated, the output state of the second output pin of the switching unit is a high impedance state.
11、 如权利要求 10所述的电子设备, 其特征在于, 所述 BIOS切换 单元为可编程逻辑电路。  11. The electronic device of claim 10, wherein the BIOS switching unit is a programmable logic circuit.
12、如权利要求 7至 11所述的电子设备,其特征在于,还包括 BIOS 升级控制子系统, 所述升级控制子系统包括:  The electronic device according to any one of claims 7 to 11, further comprising a BIOS upgrade control subsystem, wherein the upgrade control subsystem comprises:
第一加载单元, 用于当对电子设备进行 BIOS升级时, 将用于升级 的 BIOS程序加载到当前引导电子设备启动的 BIOS程序存储区之外的 另一 BIOS程序存储区;  a first loading unit, configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device;
判断单元, 当电子设备重新启动成功后, 判断重新启动时用于引导 电子设备重新启动的 BIOS 程序存储区是否为存储升级 BIOS 程序的 BIOS程序存储区并生成相应的判断结果;  The determining unit, after the electronic device restarts successfully, determining whether the BIOS program storage area for booting the electronic device restarting during the restart is a BIOS program storage area for storing the upgrade BIOS program and generating a corresponding judgment result;
第二加载单元, 用于当所述判断单元的判断结果表明重新启动时用 程序存储区时, 将所述升级 BIOS程序加载到存储原 BIOS程序的 BIOS 程序存储区。 And a second loading unit, configured to: when the determination result of the determining unit indicates that the program storage area is used for restarting, loading the upgrade BIOS program to a BIOS program storage area storing the original BIOS program.
13、如权利要求 12所述的电子设备, 其特征在于, 所述升级控制子 系统还包括: The electronic device of claim 12, wherein the upgrade control subsystem further comprises:
升级结果输出单元, 用于在所述判断单元判断结果表明重新启动时 用于引导电子设备启动的 BIOS 程序存储区为存储升级 BIOS 程序的 BIOS程序存储区时, 输出 BIOS升级成功提示信息, 否则, 输出 BIOS 升级不成功提示信息。  An upgrade result output unit, configured to output a BIOS upgrade success prompt message when the BIOS program storage area for booting the electronic device startup is used to store the BIOS program storage area of the upgrade BIOS program when the judgment unit indicates that the restart result is restarted, otherwise, The output BIOS upgrade is not successful.
14、 一种基本输入输出系统 BIOS升级装置, 其特征在于, 所述装 置包括:  A BIOS for upgrading a basic input/output system, the device comprising:
第一加载单元, 用于当对电子设备进行 BIOS升级时, 将用于升级 的 BIOS程序加载到当前引导电子设备启动的 BIOS程序存储区之外的 另一 BIOS程序存储区;  a first loading unit, configured to load a BIOS program for upgrading to another BIOS program storage area outside the BIOS program storage area that is currently booted by the electronic device when performing BIOS upgrade on the electronic device;
判断单元, 当电子设备重新启动成功后, 判断重新启动时用于引导 电子设备重新启动的 BIOS 程序存储区是否为存储升级 BIOS 程序的 BIOS程序存储区并生成相应的判断结果;  The determining unit, after the electronic device restarts successfully, determining whether the BIOS program storage area for booting the electronic device restarting during the restart is a BIOS program storage area for storing the upgrade BIOS program and generating a corresponding judgment result;
第二加载单元, 用于当所述判断单元的判断结果表明重新启动时用 程序存储区时, 将所述升级 BIOS程序加载到存储原 BIOS程序的 BIOS 程序存储区。  And a second loading unit, configured to: when the judgment result of the determining unit indicates that the program storage area is used for restarting, load the upgrade BIOS program to a BIOS program storage area storing the original BIOS program.
15、 如权利要求 14所述的装置, 其特征在于, 所述装置还包括: 升级结果输出单元, 用于在所述判断单元判断结果表明重新启动时 用于引导电子设备启动的 BIOS 程序存储区为存储升级 BIOS 程序的 BIOS程序存储区时, 输出 BIOS升级成功提示信息, 否则, 输出 BIOS 升级不成功提示信息。  The device according to claim 14, wherein the device further comprises: an upgrade result output unit, configured to store a BIOS program storage area for booting the electronic device when the determining unit indicates that the restart result is restarted. When the BIOS program storage area of the BIOS program is updated, the BIOS upgrade success message is output. Otherwise, the BIOS upgrade failure message is output.
PCT/CN2007/071405 2007-02-27 2007-12-29 An electronic equipment, a starting method thereof and a method and device for upgrading bios WO2008104117A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710027017.6 2007-02-27
CNB2007100270176A CN100501679C (en) 2007-02-27 2007-02-27 Electric device

Publications (1)

Publication Number Publication Date
WO2008104117A1 true WO2008104117A1 (en) 2008-09-04

Family

ID=38726472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/071405 WO2008104117A1 (en) 2007-02-27 2007-12-29 An electronic equipment, a starting method thereof and a method and device for upgrading bios

Country Status (2)

Country Link
CN (1) CN100501679C (en)
WO (1) WO2008104117A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8239664B2 (en) 2008-10-20 2012-08-07 Asustek Computer Inc. Computer system having dual bios program protecting function and control method thereof
CN105653313A (en) * 2015-12-14 2016-06-08 重庆川仪自动化股份有限公司 Program updating method and apparatus
CN109358885A (en) * 2018-12-03 2019-02-19 郑州云海信息技术有限公司 A kind of update method of start-up picture, system, device and readable storage medium storing program for executing
CN110308935A (en) * 2018-03-27 2019-10-08 纬创资通股份有限公司 Electronic device and its operating method
CN111857840A (en) * 2020-06-10 2020-10-30 新华三技术有限公司 BIOS starting method and device

Families Citing this family (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470613A (en) * 2007-12-28 2009-07-01 华硕电脑股份有限公司 Debugging method and starting method for computer system and its basic input/output system
CN101222373B (en) * 2008-01-29 2010-07-28 杭州华三通信技术有限公司 Multi-master control system and master control board starting method thereof
TWI414996B (en) 2008-04-14 2013-11-11 Asustek Comp Inc Computer system
CN101739261B (en) * 2008-11-10 2015-03-25 纬创资通股份有限公司 Switching system for basic input and output system and switching method thereof
DE112009004563T5 (en) * 2009-04-29 2012-07-05 Hewlett-Packard Development Company, L.P. BIOS IMAGE ADMINISTRATOR
CN102467626A (en) * 2010-11-10 2012-05-23 鸿富锦精密工业(深圳)有限公司 Computer system data protection device and method
CN102486733B (en) * 2010-12-03 2015-10-21 中兴通讯股份有限公司 The upgrade method of boot and device
CN102567135B (en) * 2010-12-13 2015-04-29 联想(北京)有限公司 Refreshing/recovering method and electronic equipment
CN102637009A (en) * 2012-04-25 2012-08-15 山东省计算中心 Online programmable controller and implementation method thereof
CN103678018A (en) * 2012-09-04 2014-03-26 联想(北京)有限公司 Method and device for recovering data
CN106227568A (en) * 2012-11-09 2016-12-14 青岛海信移动通信技术股份有限公司 Terminal unit start, upgrade method and equipment
CN103077060A (en) * 2013-01-10 2013-05-01 中兴通讯股份有限公司 Method, device and system for switching master basic input/output system (BIOS) and spare BIOS
CN104182289A (en) * 2013-05-27 2014-12-03 英业达科技有限公司 System restoring method
CN104239078A (en) * 2013-06-14 2014-12-24 联想(北京)有限公司 Information processing method and electronic device
CN103500110A (en) * 2013-09-30 2014-01-08 Tcl通讯(宁波)有限公司 Mobile terminal and method for downloading system software thereof
CN104750564A (en) * 2013-12-27 2015-07-01 鸿富锦精密工业(武汉)有限公司 Computer system
CN105094875A (en) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 Software upgrading method and device
JP6364983B2 (en) * 2014-06-10 2018-08-01 富士ゼロックス株式会社 Electronic device and program
US10282194B2 (en) * 2014-10-07 2019-05-07 Ford Global Technologies, Llc Methods and systems to update a vehicle computing system
CN104503791A (en) * 2014-12-18 2015-04-08 天津市天安怡和信息技术有限公司 Intelligent remote upgrading and maintaining method for remote self-contained equipment
CN104503810B (en) * 2015-01-08 2018-03-23 合肥联宝信息技术有限公司 The method and device of BIOS/firmware in more new computer system
CN106033365A (en) * 2015-03-18 2016-10-19 中兴通讯股份有限公司 Electronic device starting method and device
CN105159693A (en) * 2015-07-02 2015-12-16 浪潮(北京)电子信息产业有限公司 Method and apparatus for realizing server startup
CN105653405B (en) * 2015-12-31 2018-12-14 北京锐安科技有限公司 A kind of fault handling method and system of Generic Bootstrap
CN106325857B (en) * 2016-08-11 2019-09-20 迈普通信技术股份有限公司 A kind of electronic equipment and control method of electronic device
CN106776282A (en) * 2016-11-24 2017-05-31 华为技术有限公司 The abnormality eliminating method and device of a kind of bios program
CN106775863A (en) * 2016-12-09 2017-05-31 湖南长城银河科技有限公司 A kind of method of remote automatic upgrading BIOS
CN108196858A (en) * 2017-12-22 2018-06-22 天津麒麟信息技术有限公司 A kind of double BIOS systems and its implementation based on platform of soaring
US10445088B2 (en) * 2018-01-11 2019-10-15 Macronix International Co., Ltd. System boot code clone
CN108196868B (en) * 2018-03-27 2021-10-22 联想(北京)有限公司 BIOS (basic input output System) upgrading method and electronic equipment
CN109117196B (en) * 2018-08-16 2021-08-03 郑州云海信息技术有限公司 Dual-BIOS starting and BIOS version comparison processing system
CN109062517A (en) * 2018-09-19 2018-12-21 郑州云海信息技术有限公司 A kind of firmware redundancy approach, device, equipment and medium
CN111142961B (en) * 2018-11-02 2022-12-27 佛山市顺德区顺达电脑厂有限公司 Basic input/output system setting method
CN110134425A (en) * 2019-05-20 2019-08-16 苏州沃联网络信息科技有限责任公司 Exempt from dismantling firmware upgrade method suitable for electronic tag
CN110399152A (en) * 2019-07-22 2019-11-01 浙江鸿泉车联网有限公司 A kind of device systems double copies upgrade method and device
CN111488161B (en) * 2020-04-02 2023-04-25 深圳宝新创科技股份有限公司 BIOS upgrading system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1461997A (en) * 2002-04-23 2003-12-17 华硕电脑股份有限公司 Method of automatic repairing basic input output system element and module
CN1635472A (en) * 2003-12-31 2005-07-06 英业达股份有限公司 Starting-up switching method of multi-processor computer system
CN1811707A (en) * 2005-01-25 2006-08-02 英业达股份有限公司 Automatic updating and back-up BIOS method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1461997A (en) * 2002-04-23 2003-12-17 华硕电脑股份有限公司 Method of automatic repairing basic input output system element and module
CN1635472A (en) * 2003-12-31 2005-07-06 英业达股份有限公司 Starting-up switching method of multi-processor computer system
CN1811707A (en) * 2005-01-25 2006-08-02 英业达股份有限公司 Automatic updating and back-up BIOS method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8239664B2 (en) 2008-10-20 2012-08-07 Asustek Computer Inc. Computer system having dual bios program protecting function and control method thereof
CN105653313A (en) * 2015-12-14 2016-06-08 重庆川仪自动化股份有限公司 Program updating method and apparatus
CN110308935A (en) * 2018-03-27 2019-10-08 纬创资通股份有限公司 Electronic device and its operating method
CN110308935B (en) * 2018-03-27 2022-06-14 纬创资通股份有限公司 Electronic device and operation method thereof
CN109358885A (en) * 2018-12-03 2019-02-19 郑州云海信息技术有限公司 A kind of update method of start-up picture, system, device and readable storage medium storing program for executing
CN111857840A (en) * 2020-06-10 2020-10-30 新华三技术有限公司 BIOS starting method and device
CN111857840B (en) * 2020-06-10 2023-10-27 新华三技术有限公司 BIOS (basic input output system) starting method and device

Also Published As

Publication number Publication date
CN101017441A (en) 2007-08-15
CN100501679C (en) 2009-06-17

Similar Documents

Publication Publication Date Title
WO2008104117A1 (en) An electronic equipment, a starting method thereof and a method and device for upgrading bios
US11010172B2 (en) Software upgrade and disaster recovery on a computing device
US8930931B2 (en) Information processing apparatus using updated firmware and system setting method
CN108304282B (en) Control method of double BIOS and related device
US10409617B2 (en) BIOS switching device
US20030065915A1 (en) Method for initializing computer system
US20050273588A1 (en) Bootstrap method and apparatus with plural interchangeable boot code images
US20100125752A1 (en) System for auto-operating backup firmware and method thereof
WO2012071945A1 (en) Method and device for backing up and upgrading bootstrap
JP5821393B2 (en) Information processing apparatus, activation method, program
US20200073652A1 (en) Firmware update method and computer system
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
TWI498822B (en) Electronic device for bios updatable and bios updating method thereof
WO2019156062A1 (en) Information processing system, information processing device, bios updating method for information processing device, and bios updating program for information processing device
US20060069904A1 (en) Information processing apparatus and startup control method
JP6599725B2 (en) Information processing apparatus, log management method, and computer program
CN113641537A (en) Starting system, method and medium for server
RU2600101C1 (en) Assembly control module and method of firmware updating for this control module
JP2004338883A (en) Elevator controller
JP4375857B2 (en) Computer with program rewrite function
CN107247642B (en) Method and device for determining executable mapping file during system startup
JP2019128608A (en) Information processing apparatus, information processing, and program
TWI722852B (en) Solid-state disk and startup method
WO2016145774A1 (en) Electronic equipment start-up method and device
JP2004280340A (en) Starting system for radio base station

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07846231

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07846231

Country of ref document: EP

Kind code of ref document: A1