CN113238778A - Method, system, equipment and medium for upgrading BIOS firmware - Google Patents

Method, system, equipment and medium for upgrading BIOS firmware Download PDF

Info

Publication number
CN113238778A
CN113238778A CN202110561826.5A CN202110561826A CN113238778A CN 113238778 A CN113238778 A CN 113238778A CN 202110561826 A CN202110561826 A CN 202110561826A CN 113238778 A CN113238778 A CN 113238778A
Authority
CN
China
Prior art keywords
bios
firmware
image file
partition
determining
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202110561826.5A
Other languages
Chinese (zh)
Other versions
CN113238778B (en
Inventor
廖伟宏
周立祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110561826.5A priority Critical patent/CN113238778B/en
Publication of CN113238778A publication Critical patent/CN113238778A/en
Application granted granted Critical
Publication of CN113238778B publication Critical patent/CN113238778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method, a system, equipment and a storage medium for upgrading BIOS firmware, wherein the method comprises the following steps: responding to updating of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware; responding to the attribute that the BIOS image file comprises BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume head according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume head; judging whether the actual partition is a configuration partition of the BIOS firmware or not based on the attribute of the firmware volume head; and in response to the actual partition being a configuration partition of the BIOS firmware, updating the configuration partition of the BIOS firmware using the offset and the size. By decoupling with the BIOS, the invention does not need to cause that the BMC can not reserve the configuration when updating the BIOS firmware because of the change of the offset of the BIOS configuration partition, and can also completely reserve all configuration items of the BIOS.

Description

Method, system, equipment and medium for upgrading BIOS firmware
Technical Field
The present invention relates to the field of servers, and more particularly, to a method, a system, a computer device, and a readable medium for upgrading a BIOS firmware.
Background
Current servers, whether Intel (Intel) or AMD (Advanced Micro Devices, ultra Micro semiconductor corporation) platforms, use BIOS (Basic Input/Output System) firmware to enable the server. Besides updating the BIOS Firmware through OS (Operating System) or UEFI (Unified Extensible Firmware Interface) shell related tools, the remote BIOS Firmware update can be generally performed through BMC (Baseboard Management Controller) Firmware, and besides full BIOS Firmware update, theoretically, the retention of BIOS related configuration can also be supported. However, the BIOS related configuration is reserved, and at present, there is no way to effectively reserve all settings, and it is often necessary to customize the configuration items that can be reserved through communication with the BIOS, or if there is a BIOS configuration offset of flash layout that changes the location, the BMC has no way to completely ensure that the BIOS configuration can be reserved when updating the BIOS firmware.
The current method is to find the offset by informing a BIOS engineer of the fixed offset in advance, and the design forces that BMC and BIOS cannot be decoupled, and as long as the offset is changed by the BIOS due to the update of the configuration item, BMC needs to be updated along with the synchronization. Even if the BIOS configuration items are customized through the communication between the BIOS and the BMC, the BMC and the BIOS cannot be decoupled, or the effect that all the configuration items are reserved cannot be achieved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, a computer device, and a computer readable storage medium for upgrading a BIOS firmware, in which the offset and the size of an actual partition are obtained through a firmware volume header, and a configuration partition of the BIOS firmware is updated by using the offset and the size, so that decoupling from the BIOS is achieved, a BMC cannot keep configuration when updating the BIOS firmware without changing the offset of the BIOS configuration partition, and all configuration items of the BIOS can be completely kept.
Based on the above object, an aspect of the embodiments of the present invention provides a method for upgrading a BIOS firmware, including the following steps: responding to updating of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware; responding to the attribute that the BIOS image file comprises BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume head according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume head; judging whether the actual partition is a configuration partition of the BIOS firmware or not based on the attribute of the firmware volume head; and in response to the actual partition being a configuration partition of the BIOS firmware, updating the configuration partition of the BIOS firmware using the offset and the size.
In some embodiments, the method further comprises: distributing corresponding identifiers to different partitions in the BIOS firmware, creating an attribute table according to the identifiers, and synchronizing the attribute table to the BIOS mirror image file.
In some embodiments, the determining the location of the signature in the BIOS image file comprises: and matching signatures from the head to the tail of the BIOS image file in sequence, and recording the position of the signature in the BIOS image file in response to successful matching.
In some embodiments, said determining a firmware volume header from the signed location comprises: and determining the mapping relation of the signature, and determining the firmware volume head based on the position of the signature and the mapping relation.
In some embodiments, the determining whether the real partition is a configuration partition of the BIOS firmware based on the attribute of the firmware volume header includes: and judging whether the attribute table in the mirror image file has the identifier of the configuration partition.
In some embodiments, the method further comprises: and responding to the existence of a plurality of BIOS image files, reading the offset and the time stamp corresponding to the size of the actual partition in each BIOS image file, and determining the BIOS image file for updating according to the time stamp.
In some embodiments, said determining a BIOS image file for updating from said time stamp comprises: and in response to the abnormal BIOS firmware after updating, restoring the updating item and determining a new BIOS image file for updating according to the time stamp again.
In another aspect of the embodiments of the present invention, a system for upgrading a BIOS firmware is provided, including: the starting module is configured to respond to updating of the BIOS firmware, start the BIOS image file and judge whether the BIOS image file comprises the attribute of the BIOS firmware; the acquisition module is configured to respond to the attribute that the BIOS image file comprises BIOS firmware, determine the position of a signature in the BIOS image file, determine a firmware volume header according to the position of the signature, and acquire the offset and the size of an actual partition according to the firmware volume header; the judging module is configured to judge whether the actual partition is the configuration partition of the BIOS firmware based on the attribute of the firmware volume header; and an execution module configured to update the configuration partition of the BIOS firmware using the offset and the size in response to the actual partition being the configuration partition of the BIOS firmware.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: the offset and the size of the actual partition are obtained through the firmware volume head, and the offset and the size are used for updating the configuration partition of the BIOS firmware, so that the BIOS firmware can be decoupled, the situation that the BMC cannot keep the configuration when updating the BIOS firmware due to the change of the offset of the BIOS configuration partition is avoided, and all configuration items of the BIOS can be completely kept.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a diagram illustrating an embodiment of a method for upgrading BIOS firmware according to the present invention;
FIG. 2 is a schematic diagram of a hardware structure of an embodiment of a computer device for upgrading BIOS firmware provided in the present invention;
FIG. 3 is a diagram of an embodiment of a computer storage medium for upgrading BIOS firmware according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In a first aspect of the embodiments of the present invention, an embodiment of a method for upgrading BIOS firmware is provided. Fig. 1 is a schematic diagram illustrating an embodiment of a method for upgrading BIOS firmware provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, responding to the update of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware;
s2, responding to the attribute that the BIOS image file comprises BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume header according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume header;
s3, judging whether the actual partition is the configuration partition of the BIOS firmware or not based on the attribute of the firmware volume header; and
s4, responding to the actual partition being the configuration partition of the BIOS firmware, and updating the configuration partition of the BIOS firmware by using the offset and the size.
The BIOS, i.e., the basic input/output system, is a non-tamper-able boot program engraved On a motherboard ROM (Read Only Memory) chip, and is responsible for a computing system Self-Test (POST) and a system Self-boot program, and thus is a first program after the computer system is started. Due to the non-tamper-proofness, the program is stored in the ROM chip and the original settings can still be maintained after power-off.
The BMC, i.e., the baseboard management controller, is a small operating system independent of the server system, is a chip integrated on the motherboard, and also a product is inserted on the motherboard in a form of PCIE (Peripheral Component Interface Express, bus and Interface standard), and the external expression form of the product is only a standard RJ45 network port, and has a firmware system of an independent IP (Internet Protocol). The server cluster generally uses a BMC instruction to perform large-scale unattended operation, including remote management, monitoring, installation, restart, and the like of the server.
An object often needs to deal with other objects, including learning the states of other objects and behaviors depending on other objects, and once a dependency relationship occurs, the object is considered to depend on another object, and as long as a relationship exists between two objects, one depends on the other, the two objects are considered to be coupled. In the prior art, as long as the offset of the BIOS is changed due to the update of the configuration item, the BMC needs to be updated synchronously, that is, there is a coupling relationship between the BIOS and the BMC.
In order to avoid such a relationship, the method for implementing the decoupling between the BMC and the BIOS mainly includes the following steps:
the first method is realized by expanding the structural body. Defining a data structure of interaction between the BIOS and the BMC, when a new requirement is added on one side, performing corresponding data expansion on the last of the structure, if the BIOS expands the structure and is matched with the old version of the BMC, the BMC does not analyze newly expanded contents, and if the BMC expands the structure and is matched with the old version of the BIOS, the BMC does not receive the contents of the expanded structure sent by the BIOS and executes the contents according to a default strategy. The method is easy to realize the integral processing of data between the BIOS and the BMC, but the information interaction between the BIOS and the BMC is more, and the classification processing needs to be carried out aiming at different information types under many conditions, so the method is lack of flexibility and expansibility;
the second method is to classify the interaction information of the BMC and the BIOS, such as fru information, CPU asset information, PCIE asset information, etc., where each type corresponds to one code, only one type of information is transmitted each time, and when a structure of one type needs to be expanded, one type of code is added instead of the structure, and the type of data is reorganized. The method ensures the integrity of original data before, but when the BMC does not support the newly expanded data type and the BIOS supports the data type, the BIOS is blindly sent to the BMC, or the BMC cannot return normally, the starting speed of the server can be influenced by the operation of retrying the BIOS and the like, and serious consequences such as restarting and shutting down the server can be caused by directly triggering IPMI (Intelligent Platform Management Interface) Watchdog.
The embodiment of the invention provides a method for dynamically searching a BIOS configuration partition, which helps a BMC not to modify related codes because of the change of offset of BIOS configuration or the increase/decrease of customization of configuration items, and is issued synchronously with a BIOS, so that the aim of decoupling cannot be fulfilled.
And responding to the update of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware. When a user wants to update the BIOS firmware, a BIOS image file is uploaded, and the BIOS image file can be a document for recording BIOS image information. Whether the uploading is successful or not can be judged in real time in the uploading process, and after the uploading of the BIOS image file is successful, the BMC can start the uploaded BIOS image file.
In the embodiment of the invention, corresponding identifiers are distributed to different partitions in the BIOS firmware, an attribute table is created according to the identifiers, and the attribute table is synchronized to the BIOS mirror image file. For example: the identification of the attribute (attribute) partition of the BIOS is 0x10000000, the identification of the boot loader partition of the BIOS is 0x10000001, the identification of the configuration (NVRAM, Non-Volatile Random Access Memory) partition of the BIOS is 0x10000002, and the identification of the Backup (Backup) configuration partition of the BIOS is 0x10000004, which may be specifically referred to in the following table:
BIOS firmware 0x10000000(BIOS attribute base)
BIOS bootloader 0x10000001
BIOS NVRAM 0x10000002
BIOS Backup NVRAM 0x10000004
and responding to the attribute that the BIOS image file comprises the BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume header according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume header. Firstly, it is determined whether the 0x10000000 identifier in the image file corresponds to the partition of the BIOS firmware attribute, and if so, the location of the signature in the BIOS image file can be determined.
The content of the digital signature may not be specifically limited, and it is easily understood that the content at least includes encrypted information such as a signature value obtained after the image runs an encryption algorithm, and in addition, the digital signature may also include information of the BIOS firmware, for example, the creation time of the BIOS image and the size of the BIOS image.
The present embodiment does not limit the type of the encryption algorithm, but merely provides an exemplary method for setting a digital signature, and the method includes generating digest information by using a preset algorithm for a configuration partition of the BIOS, encrypting the digest information by using a private key, packaging the encrypted ciphertext and the configuration partition of the BIOS to obtain a configuration packet, and sending the configuration packet to a detection module to determine whether the digital signature is authentic. The detection module may be an RTU (Root of Trust for Update), the RTU may be an individual module or a trusted component or module in the server, if the RTU is an individual module, one end of the RTU needs to be connected to a BIOS Flash, and the other end is connected to a processing end of the server, where the processing end includes but is not limited to a BMC.
In some embodiments, the determining the location of the signature in the BIOS image file comprises: and matching signatures from the head to the tail of the BIOS image file in sequence, and recording the position of the signature in the BIOS image file in response to successful matching. If the image file is confirmed to be the BIOS firmware, the signature is searched from the head to the tail of the image file. In the embodiment of the invention, the configuration packet can be decrypted by adopting the RTU, and the RTU decrypts the configuration packet by utilizing the public key corresponding to the private key to obtain the actual summary information; and judging whether the actual summary information is consistent with the summary information in the BIOS mirror image file or not, if so, determining that the configuration package is credible and the corresponding signature is successfully matched. Specifically, in the actual operation, it may be determined whether the current location reaches the end of the BIOS image file, and if not, it may be determined whether the current location has a signature, and if so, it may be determined whether the matching is successful, and if so, the current location may be recorded.
In some embodiments, said determining a firmware volume header from the signed location comprises: and determining the mapping relation of the signature, and determining the firmware volume head based on the position of the signature and the mapping relation. When the signature is found, the data structure is mapped to a data structure (i.e., firmware volume header), and the data structure contains information such as the signature, the attribute, the offset, the partition size, and the like. And judging whether the actual partition is the configuration partition of the BIOS firmware or not based on the attribute of the firmware volume header. In some embodiments, the determining whether the real partition is a configuration partition of the BIOS firmware based on the attribute of the firmware volume header includes: and judging whether the attribute table in the mirror image file has the identifier of the configuration partition. At this time, the BMC starts to detect whether the attribute table in the image file has the identifier of the configured partition, and if the identifier of the configured partition exists, such as the NVRAM or Backup NVRAM, or 0x10000002 or 0x10000004, the offset of the partition and the size of the partition may be recorded at this time.
In response to the actual partition being a configuration partition of the BIOS firmware, updating the configuration partition of the BIOS firmware using the offset and the size.
When the BIOS firmware is actually updated to an SPI (Serial Peripheral Interface) flash, the BIOS configuration information may be determined in the same manner. If the user decides to reserve the BIOS configuration partition, the corresponding partition may be skipped to reserve the BIOS configuration during the update process according to the recorded partition information.
In some embodiments, the method further comprises: and responding to the existence of a plurality of BIOS image files, reading the offset and the time stamp corresponding to the size of the actual partition in each BIOS image file, and determining the BIOS image file for updating according to the time stamp. If a plurality of BIOS mirror image files are opened at the same time, a plurality of groups of offsets and sizes can be obtained under the condition that the steps are not changed, a timestamp corresponding to each group of offsets and sizes can be obtained at the same time, and the closer the time represented on the timestamp is to the current time, the newer the data of the offsets and sizes are. The configuration partition in the BIOS may be updated with the closest offset and size to the current time if the most up-to-date data is needed.
In some embodiments, said determining a BIOS image file for updating from said time stamp comprises: and in response to the abnormal BIOS firmware after updating, restoring the updating item and determining a new BIOS image file for updating according to the time stamp again. If the BIOS firmware is abnormal after updating, which indicates that some configuration items are not compatible with the BIOS firmware, the BIOS image file can be selected again to update the configuration partition of the BIOS firmware.
The embodiment of the invention can obtain the attribute of the BIOS configuration partition according to the signature by searching whether the BIOS firmware image file contains the corresponding signature or not, ensure that the partition is actually the BIOS configuration partition after the attribute of the BIOS configuration partition is compared with the BIOS firmware, and can obtain the offset position of the partition and calculate the size of the partition. In addition, the BMC can record the information of the partition, and if the user adjusts some configuration items to cause the problem that the server cannot be started, the configuration items can be restored to ensure that the server can normally operate.
It should be particularly noted that, the steps in the embodiments of the method for upgrading BIOS firmware described above can be mutually intersected, replaced, added, or deleted, and therefore, these methods for upgrading BIOS firmware that are reasonably changed in permutation and combination should also fall within the scope of the present invention, and should not limit the scope of the present invention to the embodiments.
In view of the above object, according to a second aspect of the embodiments of the present invention, there is provided a system for upgrading BIOS firmware, including: the starting module is configured to respond to updating of the BIOS firmware, start the BIOS image file and judge whether the BIOS image file comprises the attribute of the BIOS firmware; the acquisition module is configured to respond to the attribute that the BIOS image file comprises BIOS firmware, determine the position of a signature in the BIOS image file, determine a firmware volume header according to the position of the signature, and acquire the offset and the size of an actual partition according to the firmware volume header; the judging module is configured to judge whether the actual partition is the configuration partition of the BIOS firmware based on the attribute of the firmware volume header; and an execution module configured to update the configuration partition of the BIOS firmware using the offset and the size in response to the actual partition being the configuration partition of the BIOS firmware.
In some embodiments, the system further comprises a creation module configured to: distributing corresponding identifiers to different partitions in the BIOS firmware, creating an attribute table according to the identifiers, and synchronizing the attribute table to the BIOS mirror image file.
In some embodiments, the acquisition module is configured to: and matching signatures from the head to the tail of the BIOS image file in sequence, and recording the position of the signature in the BIOS image file in response to successful matching.
In some embodiments, the acquisition module is configured to: and determining the mapping relation of the signature, and determining the firmware volume head based on the position of the signature and the mapping relation.
In some embodiments, the determining module is configured to: and judging whether the attribute table in the mirror image file has the identifier of the configuration partition.
In some embodiments, the system further comprises a reading module configured to: and responding to the existence of a plurality of BIOS image files, reading the offset and the time stamp corresponding to the size of the actual partition in each BIOS image file, and determining the BIOS image file for updating according to the time stamp.
In some embodiments, the reading module is configured to: and in response to the abnormal BIOS firmware after updating, restoring the updating item and determining a new BIOS image file for updating according to the time stamp again.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, responding to the update of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware; s2, responding to the attribute that the BIOS image file comprises BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume header according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume header; s3, judging whether the actual partition is the configuration partition of the BIOS firmware or not based on the attribute of the firmware volume header; and S4, in response to the actual partition being the configuration partition of the BIOS firmware, updating the configuration partition of the BIOS firmware using the offset and the size.
In some embodiments, the steps further comprise: distributing corresponding identifiers to different partitions in the BIOS firmware, creating an attribute table according to the identifiers, and synchronizing the attribute table to the BIOS mirror image file.
In some embodiments, the determining the location of the signature in the BIOS image file comprises: and matching signatures from the head to the tail of the BIOS image file in sequence, and recording the position of the signature in the BIOS image file in response to successful matching.
In some embodiments, said determining a firmware volume header from the signed location comprises: and determining the mapping relation of the signature, and determining the firmware volume head based on the position of the signature and the mapping relation.
In some embodiments, the determining whether the real partition is a configuration partition of the BIOS firmware based on the attribute of the firmware volume header includes: and judging whether the attribute table in the mirror image file has the identifier of the configuration partition.
In some embodiments, the steps further comprise: and responding to the existence of a plurality of BIOS image files, reading the offset and the time stamp corresponding to the size of the actual partition in each BIOS image file, and determining the BIOS image file for updating according to the time stamp.
In some embodiments, said determining a BIOS image file for updating from said time stamp comprises: and in response to the abnormal BIOS firmware after updating, restoring the updating item and determining a new BIOS image file for updating according to the time stamp again.
Fig. 2 is a schematic diagram of a hardware structure of an embodiment of the computer device for upgrading BIOS firmware according to the present invention.
Taking the apparatus shown in fig. 2 as an example, the apparatus includes a processor 201 and a memory 202, and may further include: an input device 203 and an output device 204.
The processor 201, the memory 202, the input device 203 and the output device 204 may be connected by a bus or other means, and fig. 2 illustrates the connection by a bus as an example.
The memory 202, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for upgrading BIOS firmware in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the server by executing the nonvolatile software programs, instructions and modules stored in the memory 202, that is, implements the method of upgrading the BIOS firmware of the above-described method embodiment.
The memory 202 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a method of upgrading BIOS firmware, and the like. Further, the memory 202 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 202 may optionally include memory located remotely from processor 201, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 203 may receive information such as a user name and a password that are input. The output device 204 may include a display device such as a display screen.
One or more program instructions/modules corresponding to a method of upgrading BIOS firmware are stored in the memory 202, and when executed by the processor 201, perform a method of upgrading BIOS firmware in any of the above-described method embodiments.
Any embodiment of the computer device executing the method for upgrading the BIOS firmware can achieve the same or similar effects as any corresponding embodiment of the foregoing method.
The invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, performs the method as above.
Fig. 3 is a schematic diagram of an embodiment of a computer storage medium for updating BIOS firmware according to the present invention. Taking the computer storage medium as shown in fig. 3 as an example, the computer readable storage medium 3 stores a computer program 31 which, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes of the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program of the method for upgrading the BIOS firmware can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for upgrading BIOS firmware, comprising the steps of:
responding to updating of the BIOS firmware, starting a BIOS image file and judging whether the BIOS image file comprises the attribute of the BIOS firmware;
responding to the attribute that the BIOS image file comprises BIOS firmware, determining the position of a signature in the BIOS image file, determining a firmware volume head according to the position of the signature, and acquiring the offset and the size of an actual partition according to the firmware volume head;
judging whether the actual partition is a configuration partition of the BIOS firmware or not based on the attribute of the firmware volume head; and
in response to the actual partition being a configuration partition of the BIOS firmware, updating the configuration partition of the BIOS firmware using the offset and the size.
2. The method of claim 1, further comprising:
distributing corresponding identifiers to different partitions in the BIOS firmware, creating an attribute table according to the identifiers, and synchronizing the attribute table to the BIOS mirror image file.
3. The method of claim 1, wherein determining the location of the signature in the BIOS image file comprises:
and matching signatures from the head to the tail of the BIOS image file in sequence, and recording the position of the signature in the BIOS image file in response to successful matching.
4. The method of claim 3, wherein determining the firmware header according to the signed location comprises:
and determining the mapping relation of the signature, and determining the firmware volume head based on the position of the signature and the mapping relation.
5. The method of claim 2, wherein determining whether the real partition is a configuration partition of the BIOS firmware based on the property of the firmware volume header comprises:
and judging whether the attribute table in the mirror image file has the identifier of the configuration partition.
6. The method of claim 1, further comprising:
and responding to the existence of a plurality of BIOS image files, reading the offset and the time stamp corresponding to the size of the actual partition in each BIOS image file, and determining the BIOS image file for updating according to the time stamp.
7. The method of claim 6, wherein determining the BIOS image file for updating based on the timestamp comprises:
and in response to the abnormal BIOS firmware after updating, restoring the updating item and determining a new BIOS image file for updating according to the time stamp again.
8. A system for upgrading BIOS firmware, comprising:
the starting module is configured to respond to updating of the BIOS firmware, start the BIOS image file and judge whether the BIOS image file comprises the attribute of the BIOS firmware;
the acquisition module is configured to respond to the attribute that the BIOS image file comprises BIOS firmware, determine the position of a signature in the BIOS image file, determine a firmware volume header according to the position of the signature, and acquire the offset and the size of an actual partition according to the firmware volume header;
the judging module is configured to judge whether the actual partition is the configuration partition of the BIOS firmware based on the attribute of the firmware volume header; and
an execution module configured to update a configuration partition of the BIOS firmware using the offset and size in response to the actual partition being the configuration partition of the BIOS firmware.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110561826.5A 2021-05-23 2021-05-23 Method, system, equipment and medium for upgrading BIOS firmware Active CN113238778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110561826.5A CN113238778B (en) 2021-05-23 2021-05-23 Method, system, equipment and medium for upgrading BIOS firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110561826.5A CN113238778B (en) 2021-05-23 2021-05-23 Method, system, equipment and medium for upgrading BIOS firmware

Publications (2)

Publication Number Publication Date
CN113238778A true CN113238778A (en) 2021-08-10
CN113238778B CN113238778B (en) 2024-02-13

Family

ID=77138307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110561826.5A Active CN113238778B (en) 2021-05-23 2021-05-23 Method, system, equipment and medium for upgrading BIOS firmware

Country Status (1)

Country Link
CN (1) CN113238778B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995893A (en) * 2022-08-01 2022-09-02 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131447A1 (en) * 2009-11-30 2011-06-02 Gyan Prakash Automated modular and secure boot firmware update
CN111381850A (en) * 2020-02-21 2020-07-07 苏州浪潮智能科技有限公司 BIOS firmware upgrading method, device, equipment and medium
CN111414174A (en) * 2020-03-13 2020-07-14 苏州浪潮智能科技有限公司 Server firmware upgrading method and device and related equipment
CN112507343A (en) * 2020-12-11 2021-03-16 浪潮电子信息产业股份有限公司 BIOS updating method, device, equipment and medium
CN112817621A (en) * 2021-01-22 2021-05-18 浪潮电子信息产业股份有限公司 BIOS firmware refreshing method and device and related components

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131447A1 (en) * 2009-11-30 2011-06-02 Gyan Prakash Automated modular and secure boot firmware update
CN111381850A (en) * 2020-02-21 2020-07-07 苏州浪潮智能科技有限公司 BIOS firmware upgrading method, device, equipment and medium
CN111414174A (en) * 2020-03-13 2020-07-14 苏州浪潮智能科技有限公司 Server firmware upgrading method and device and related equipment
CN112507343A (en) * 2020-12-11 2021-03-16 浪潮电子信息产业股份有限公司 BIOS updating method, device, equipment and medium
CN112817621A (en) * 2021-01-22 2021-05-18 浪潮电子信息产业股份有限公司 BIOS firmware refreshing method and device and related components

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王晓箴 等: "‘BIOS采样分析系统的设计与实现’", 《计算机工程》, vol. 37, no. 11, pages 7 - 9 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995893A (en) * 2022-08-01 2022-09-02 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium
CN114995893B (en) * 2022-08-01 2022-11-01 摩尔线程智能科技(北京)有限责任公司 Firmware management method, flash memory, host and storage medium

Also Published As

Publication number Publication date
CN113238778B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN107346252B (en) Application updating method and device
US9195451B2 (en) Server system and update method thereof
US10033534B2 (en) Methods and apparatus to provide for efficient and secure software updates
US9965270B2 (en) Updating computer firmware
EP2472402B1 (en) Remote management systems and methods for mapping operating system and management controller located in a server
WO2013078951A1 (en) Method and system for upgrading software
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
WO2020224238A1 (en) Blockchain node depolyment method, device and equipment, and storage medium
CN109739619B (en) Processing method and device based on containerized application and storage medium
CN111273924B (en) Software updating method and device
CN111225064A (en) Ceph cluster deployment method, system, device and computer-readable storage medium
US20020092011A1 (en) Methods and arrangements for managing devices
WO2021169124A1 (en) Method and apparatus for installing software package to target host, and computer device
US20020091720A1 (en) Methods and arrangements for providing improved software version control in managed devices
JP6404708B2 (en) Information processing apparatus, BIOS setting information changing method, and computer program
CN113238778A (en) Method, system, equipment and medium for upgrading BIOS firmware
JP4759941B2 (en) Boot image providing system and method, boot node device, boot server device, and program
TWI514279B (en) Server system and firmware update method
CN107562470B (en) Method and device for optimizing starting of electronic equipment
WO2024022212A1 (en) Configuration information management method and apparatus, and server
US20230359741A1 (en) Trusted boot method and apparatus, electronic device, and readable storage medium
WO2023198056A1 (en) Firmware update method for embedded device, and embedded device
CN101616002B (en) User identity authentication method and device thereof
CN115495129A (en) Firmware upgrading method, device, equipment, medium and product
CN115993979A (en) Configuration conversion method, smooth upgrading method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant