A microcode updating method, device, equipment and storage medium
By creating two firmware volumes in the BIOS image to store and update microcode files, the problem of low efficiency in BIOS image upgrades is solved, and the microcode update process is made more efficient and simplified.
Patent Information
- Application Number
- CN202111274456.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In the existing technology, when upgrading the BIOS image, the entire BIOS image needs to be upgraded, resulting in low microcode update efficiency. Especially in the mass production maintenance stage, a lot of time is spent on version sorting and verification.
By creating two new firmware volumes in the BIOS image for storing and updating microcode files, one as the active firmware volume and the other as the backup firmware volume, the microcode files are loaded and verified, and updated through the baseboard management controller Back up firmware volumes and reduce reliance on the entire BIOS image.
It improves the efficiency of microcode updates, reduces the need for BIOS image version sorting and release verification, and simplifies the upgrade process.
Smart Images

Figure CN114168169B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a microcode updating method, device, equipment and storage medium. Background Art
[0002] BIOS (Basic Input Output System) is a set of programs fixed on a ROM (Read-Only Memory) chip on the motherboard. It stores the computer's most important basic input and output programs, system setting information, self-test programs after power-on, and system self-starting programs. As the lowest-level and most direct hardware setting and control manager of the computer motherboard, it can provide the computer with many simple ease-of-use functions.
[0003] At present, the microcode file of the CPU (Central Processing Unit) is usually stored in the BIOS image, which is used for the BIOS to load the microcode file (i.e., the patch file of the CPU) during the system startup process, so that the CPU can be patched when the system is started, avoiding some major problems caused by the CPU itself. Usually, when the system has security vulnerabilities and other problems, it is necessary to upgrade the microcode file of the CPU to solve them. Due to the limitations of the BIOS code architecture, it is usually necessary to upgrade the entire BIOS image when upgrading the microcode. If the current machine is in the mass production maintenance stage, the BIOS has no major function import or bug (i.e., vulnerability) solution, and the entire BIOS image is upgraded simply to upgrade the microcode, it will take a lot of extra time to organize the BIOS image version and release verification.
[0004] In summary, how to reduce the dependency of upgrading the microcode file in the BIOS image on upgrading the entire BIOS image and improve the efficiency of microcode upgrading is a problem to be solved by those skilled in the art. Summary of the invention
[0005] In view of this, the purpose of this application is to provide a microcode update method, device, equipment and storage medium, which can reduce the dependency of upgrading the microcode file on upgrading the entire BIOS image and improve the efficiency of microcode upgrade. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a microcode update method, comprising:
[0007] Determine an active firmware volume from a pre-created first firmware volume and a second firmware volume, and use the other firmware volume as a backup firmware volume; the first firmware volume and the second firmware volume are located in a basic input / output system image;
[0008] Loading the microcode file to be updated from the active firmware volume, and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the active firmware volume, if the loading fails, obtaining the microcode file to be updated from the backup firmware volume;
[0009] A microcode image file generated by a user end based on the microcode file to be updated is obtained, and the microcode image file is sent to a baseboard management controller, so that the baseboard management controller updates the backup firmware volume using the microcode image file.
[0010] Optionally, after sending the microcode image file to the baseboard management controller, the method further includes:
[0011] Verifying whether the microcode image file is credible by the baseboard management controller, and if the microcode image file is credible, determining whether the microcode image file is the microcode image file required by the system;
[0012] If the microcode image file is the microcode image file required by the system, the permission to access the basic input and output system image is switched to the baseboard management controller.
[0013] Optionally, the microcode updating method further includes:
[0014] A first firmware volume and a second firmware volume are created in the basic input / output system image for performing read and write operations on the microcode file of the basic input / output system image when the microcode is updated.
[0015] Optionally, after the baseboard management controller updates the backup firmware volume using the microcode image file, the method further includes:
[0016] Switching the permission to access the basic input and output system image to the basic input and output system;
[0017] A system hot restart mechanism is triggered so that the basic input and output system patches the central processing unit using the microcode image file obtained from the backup firmware volume during the system startup process.
[0018] Optionally, the step of determining an activation firmware volume from the pre-created first firmware volume and the second firmware volume includes:
[0019] Comparing whether the microcode files in the first firmware volume and the second firmware volume are the same;
[0020] If the microcode files in the first firmware volume and the second firmware volume are the same, an active firmware volume is determined from the first firmware volume and the second firmware volume in a preset order.
[0021] Optionally, the step of determining an activation firmware volume from the pre-created first firmware volume and the second firmware volume includes:
[0022] Comparing whether the microcode files in the first firmware volume and the second firmware volume are the same;
[0023] If the microcode files in the first firmware volume and the second firmware volume are different, the firmware volume corresponding to the newer version of the microcode file is determined as the active firmware volume.
[0024] Optionally, before obtaining the microcode file to be updated from the backup firmware volume if the loading fails, the method further includes:
[0025] The characteristic information including the base address and size of the backup firmware volume is sent to the baseboard management controller, so that the baseboard management controller obtains the microcode file to be updated from the backup firmware volume according to the characteristic information.
[0026] In a second aspect, the present application discloses a microcode updating device, comprising:
[0027] A firmware volume determination module, used to determine an active firmware volume from a pre-created first firmware volume and a second firmware volume, and use the other firmware volume as a backup firmware volume; the first firmware volume and the second firmware volume are located in a basic input and output system image;
[0028] A file loading module, used for loading the microcode file to be updated from the active firmware volume, and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the active firmware volume, if the loading fails, obtaining the microcode file to be updated from the backup firmware volume;
[0029] The microcode update module is used to obtain a microcode image file generated by the user end based on the microcode file to be updated, and send the microcode image file to the baseboard management controller so that the baseboard management controller updates the backup firmware volume using the microcode image file.
[0030] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned microcode update method when executing a computer program stored in the memory.
[0031] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned microcode update method is implemented.
[0032] It can be seen that the present application first determines the activation firmware volume from the pre-created first firmware volume and the second firmware volume, and uses the other firmware volume as the backup firmware volume, then loads the microcode file to be updated from the activation firmware volume, and determines whether the loading is successful. If the loading is successful, the microcode file to be updated is obtained from the activation firmware volume, and if the loading fails, the microcode file to be updated is obtained from the backup firmware volume, and then the microcode image file generated by the user end based on the microcode file to be updated is obtained, and the microcode image file is sent to the baseboard management controller so that the baseboard management controller uses the microcode image file to update the backup firmware volume. It can be seen that the present application adjusts the code architecture of the basic input and output system and adds two new firmware volumes for storing microcode image files, which can reduce the dependence of upgrading microcode files on upgrading the entire basic input and output system image and improve the efficiency of microcode updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0034] Figure 1 A flow chart of a microcode updating method disclosed in this application;
[0035] Figure 2 A specific microcode update method flow chart disclosed in this application;
[0036] Figure 3 A schematic diagram of the structure of a microcode updating device disclosed in this application;
[0037] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] The present application embodiment discloses a microcode update method, see Figure 1 As shown, the method includes:
[0040] Step S11: determining an active firmware volume from a pre-created first firmware volume and a second firmware volume, and using another firmware volume as a backup firmware volume; the first firmware volume and the second firmware volume are located in a basic input / output system image.
[0041] In this embodiment, before determining the activation firmware volume from the pre-created first firmware volume and second firmware volume, it specifically also includes: creating a first firmware volume and a second firmware volume in the basic input / output system image for reading and writing the microcode file of the basic input / output system image when the microcode is updated. Specifically, firstly, the code architecture of the basic input / output system is modified, and two new firmware volumes, namely the first firmware volume and the second firmware volume, are created in the basic input / output system image for storing the microcode image file.
[0042] Furthermore, after creating a first firmware volume and a second firmware volume in the basic input / output system image for performing read and write operations on the microcode file of the basic input / output system image during microcode update, the microcode image files stored in the two newly created firmware volumes are compared, and the microcode file to be updated is determined based on the comparison results of the microcode image files, and then the firmware volume corresponding to the microcode file to be updated is determined as the activated firmware volume, and the other firmware volume remaining in the first firmware volume and the second firmware volume is used as the backup firmware volume.
[0043] In a first specific implementation, the determining of the activation firmware volume from the pre-created first firmware volume and the second firmware volume may specifically include: comparing whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are the same, then determining the activation firmware volume from the first firmware volume and the second firmware volume in a preset order. It is understandable that after comparing the microcode files in the first firmware volume and the second firmware volume, if the microcode files in the first firmware volume and the second firmware volume are the same, that is, the versions of the microcode files stored in the first firmware volume and the second firmware volume are consistent, then the activation firmware volume can be determined from the first firmware volume and the second firmware volume in a preset order, and the other firmware volume can be determined as a backup firmware volume. For example, according to the order in which the firmware volumes are located in the basic input and output system image, the first firmware volume is determined as the activation firmware volume, and the second firmware volume is determined as the backup firmware volume.
[0044] In a second specific implementation, the determination of the activation firmware volume from the pre-created first firmware volume and the second firmware volume may specifically include: comparing whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are not the same, then determining the firmware volume corresponding to the newer version of the microcode file as the activation firmware volume. It is understandable that after comparing the microcode files in the first firmware volume and the second firmware volume, if the microcode files in the first firmware volume and the second firmware volume are not the same, that is, the versions of the microcode files stored in the first firmware volume and the second firmware volume are inconsistent, then the firmware volume corresponding to the newer version of the above-mentioned microcode file can be determined as the activation firmware volume, and the remaining other firmware volume can be determined as the backup firmware volume.
[0045] Step S12: Load the microcode file to be updated from the activated firmware volume, and determine whether the loading is successful. If the loading is successful, obtain the microcode file to be updated from the activated firmware volume; if the loading fails, obtain the microcode file to be updated from the backup firmware volume.
[0046] In this embodiment, after determining the active firmware volume from the pre-created first firmware volume and the second firmware volume, and using the other firmware volume as a backup firmware volume, the microcode file to be updated can be loaded from the above-mentioned active firmware volume, and the basic input and output system is used to determine whether the microcode file to be updated is loaded successfully. If the loading is successful, the microcode file to be updated is obtained from the above-mentioned active firmware volume; if the loading fails, the microcode file to be updated is obtained from the above-mentioned backup firmware volume. For example, when the microcode file to be updated loaded from the above-mentioned active firmware volume is damaged, the loading will fail, and the microcode file to be updated will be obtained from the above-mentioned backup firmware volume.
[0047] It should be pointed out that before obtaining the microcode file to be updated from the backup firmware volume when loading fails, it specifically includes: sending characteristic information including the base address and size of the backup firmware volume to the baseboard management controller, so that the baseboard management controller obtains the microcode file to be updated from the backup firmware volume according to the characteristic information. It is understandable that in order to prevent the microcode file to be updated loaded from the above-mentioned activation firmware volume from being damaged, thereby causing the failure of microcode file loading, it is necessary to send the characteristic information including the base address and size of the backup firmware volume to the baseboard management controller in advance, so that after the failure of loading the microcode file to be updated from the above-mentioned activation firmware volume, the baseboard management controller can determine the location of the backup firmware volume by obtaining the characteristic information including the base address and size of the backup firmware volume, and obtain the microcode file to be updated from the backup firmware volume.
[0048] Step S13: obtaining a microcode image file generated by the user end based on the microcode file to be updated, and sending the microcode image file to the baseboard management controller, so that the baseboard management controller updates the backup firmware volume using the microcode image file.
[0049] In this embodiment, after loading the microcode file to be updated from the activation firmware volume and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the activation firmware volume, and if the loading fails, obtaining the microcode file to be updated from the backup firmware volume, the tool provided by the CPU manufacturer can be used to generate a microcode image file in a fixed format from the microcode file to be updated. For example, the tool provided by the CPU manufacturer can be used to generate a microcode image file in a Capsule (i.e., capsule network) format from the microcode file to be updated, and the microcode image file is sent to the baseboard management controller. After obtaining the microcode image file, the microcode image file can be used to update the microcode file in the backup firmware volume.
[0050] It can be seen that the embodiment of the present application first determines the activation firmware volume from the pre-created first firmware volume and the second firmware volume, and uses the other firmware volume as the backup firmware volume, then loads the microcode file to be updated from the activation firmware volume, and determines whether the loading is successful. If the loading is successful, the microcode file to be updated is obtained from the activation firmware volume, and if the loading fails, the microcode file to be updated is obtained from the backup firmware volume, and then the microcode image file generated by the user end based on the microcode file to be updated is obtained, and the microcode image file is sent to the baseboard management controller so that the baseboard management controller uses the microcode image file to update the backup firmware volume. It can be seen that the embodiment of the present application adjusts the code architecture of the basic input and output system and adds two new firmware volumes for storing microcode image files, which can reduce the dependence of upgrading the microcode file on upgrading the entire basic input and output system image, and does not require additional version sorting and release verification of the basic input and output system image, which can improve the efficiency of microcode update.
[0051] The present application embodiment discloses a specific microcode update method, see Figure 2 As shown, the method includes:
[0052] Step S21: determining an active firmware volume from a pre-created first firmware volume and a second firmware volume, and using another firmware volume as a backup firmware volume; the first firmware volume and the second firmware volume are located in a basic input / output system image.
[0053] Step S22: Load the microcode file to be updated from the activated firmware volume, and determine whether the loading is successful. If the loading is successful, obtain the microcode file to be updated from the activated firmware volume; if the loading fails, obtain the microcode file to be updated from the backup firmware volume.
[0054] Step S23: obtaining a microcode image file generated by the user end based on the microcode file to be updated, and sending the microcode image file to the baseboard management controller.
[0055] Step S24: verifying whether the microcode image file is credible by the baseboard management controller. If the microcode image file is credible, determining whether the microcode image file is the microcode image file required by the system.
[0056] In this embodiment, after obtaining the microcode image file generated by the user end based on the microcode file to be updated and sending the microcode image file to the baseboard management controller, the baseboard management controller will verify the obtained microcode image file to determine whether the microcode image file is a credible microcode image file of the system. If the microcode image file is a credible microcode file, it will further determine whether the microcode image file is the microcode image file required for the current system. It should be pointed out that the above-mentioned system includes but is not limited to a server system, such as a server system of an Intel platform, or a computer system, etc. In addition, the system includes but is not limited to a system installed on a smart phone, a tablet computer, a desktop computer, etc.
[0057] Step S25: If the microcode image file is the microcode image file required by the system, the permission to access the basic input and output system image is switched to the baseboard management controller.
[0058] In this embodiment, after checking whether the microcode image file is credible through the baseboard management controller, if the microcode image file is credible, it is determined whether the microcode image file is the microcode image file required by the system. If the above microcode image file is the microcode image file required by the system, the authority to access the basic input and output system image is switched from the original basic input and output system to the baseboard management controller.
[0059] Step S26: updating the backup firmware volume through the baseboard management controller and using the microcode image file.
[0060] In this embodiment, after the permission to access the basic input and output system image is switched to the baseboard management controller, the baseboard management controller can use the acquired microcode image file to update the microcode file in the backup firmware volume. It can be understood that the updated microcode file in the backup firmware volume will be determined as the latest version of the microcode file during the next microcode update process, that is, the corresponding firmware volume will be re-determined as the active firmware volume and used as the subsequent microcode file to be updated.
[0061] Furthermore, after the backup firmware volume is updated by the baseboard management controller and using the microcode image file, it can also specifically include: switching the permission to access the basic input / output system image to the basic input / output system; triggering the system hot restart mechanism, so that the basic input / output system uses the microcode image file obtained from the backup firmware volume to patch the central processing unit during the system startup process. It can be understood that after obtaining the microcode image file, the baseboard management controller will use the above-mentioned microcode image file to update the backup firmware volume, and switch the permission to access the basic input / output system image from the baseboard management controller to the basic input / output system, and trigger the system's hot restart mechanism through the baseboard management controller, and during the system restart process, the basic input / output system will use the microcode image file obtained from the backup firmware volume to patch the central processing unit with the updated patch file, that is, the updated microcode image file.
[0062] Among them, for more specific processing procedures of the above steps S21, S22, and S23, reference can be made to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0063] It can be seen that in the embodiment of the present application, after sending the microcode image file to the baseboard management controller, the baseboard management controller verifies whether the microcode image file is credible. If the microcode image file is credible, it is determined whether the microcode image file is the microcode image file required for use by the system. If the microcode image file is the microcode image file required for use by the system, the permission to access the basic input and output system image is switched to the baseboard management controller. By verifying the microcode image file, the integrity and availability of the microcode image file can be further guaranteed, thereby ensuring the success of the subsequent update of the microcode file in the firmware volume.
[0064] Correspondingly, the present application also discloses a microcode updating device, see Figure 3 As shown, the device comprises:
[0065] The firmware volume determination module 11 is used to determine an active firmware volume from a pre-created first firmware volume and a second firmware volume, and use the other firmware volume as a backup firmware volume; the first firmware volume and the second firmware volume are located in a basic input and output system image;
[0066] A file loading module 12, used for loading the microcode file to be updated from the active firmware volume, and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the active firmware volume, if the loading fails, obtaining the microcode file to be updated from the backup firmware volume;
[0067] The microcode update module 13 is used to obtain a microcode image file generated by the user end based on the microcode file to be updated, and send the microcode image file to the baseboard management controller so that the baseboard management controller updates the backup firmware volume using the microcode image file.
[0068] Among them, the specific working processes of the above-mentioned modules can refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0069] It can be seen that the embodiment of the present application first determines the activation firmware volume from the pre-created first firmware volume and the second firmware volume, and uses the other firmware volume as the backup firmware volume, then loads the microcode file to be updated from the activation firmware volume, and determines whether the loading is successful. If the loading is successful, the microcode file to be updated is obtained from the activation firmware volume, and if the loading fails, the microcode file to be updated is obtained from the backup firmware volume, and then the microcode image file generated by the user end based on the microcode file to be updated is obtained, and the microcode image file is sent to the baseboard management controller so that the baseboard management controller uses the microcode image file to update the backup firmware volume. It can be seen that the embodiment of the present application adjusts the code architecture of the basic input and output system and adds two new firmware volumes for storing microcode image files, which can reduce the dependence of upgrading the microcode file on upgrading the entire basic input and output system image and improve the efficiency of microcode update.
[0070] In some specific embodiments, after the microcode update module 13, the following may also be included:
[0071] A file verification unit, used for verifying whether the microcode image file is credible through the baseboard management controller;
[0072] A file judging unit, configured to judge whether the microcode image file is a microcode image file required by the system when the microcode image file is credible;
[0073] The first permission switching unit is used to switch the permission for accessing the basic input and output system image to the baseboard management controller when the microcode image file is the microcode image file required by the system.
[0074] In some specific embodiments, the microcode updating device may further include:
[0075] The creation unit is used to create a first firmware volume and a second firmware volume in the basic input / output system image for performing read and write operations on the microcode file of the basic input / output system image when the microcode is updated.
[0076] In some specific embodiments, after the microcode update module 13, the following may also be included:
[0077] A second permission switching unit, used for switching the permission for accessing the basic input and output system image to the basic input and output system;
[0078] The trigger unit is used to trigger the system hot restart mechanism so that the basic input and output system patches the central processing unit using the microcode image file obtained from the backup firmware volume during the system startup process.
[0079] In some specific embodiments, the firmware volume determination module 11 may specifically include:
[0080] A first file comparison unit, used for comparing whether the microcode files in the first firmware volume and the second firmware volume are the same;
[0081] The first determining unit is configured to determine an active firmware volume from the first firmware volume and the second firmware volume according to a preset order when the microcode files in the first firmware volume and the second firmware volume are the same.
[0082] In some specific embodiments, the firmware volume determination module 11 may specifically include:
[0083] A second file comparison unit, used for comparing whether the microcode files in the first firmware volume and the second firmware volume are the same;
[0084] The second determining unit is configured to determine, when the microcode files in the first firmware volume and the second firmware volume are different, a firmware volume corresponding to a newer version of the microcode file as an active firmware volume.
[0085] In some specific embodiments, before obtaining the to-be-updated microcode file from the backup firmware volume if the loading fails, the following may also be included:
[0086] The sending unit is used to send characteristic information including the base address and size of the backup firmware volume to the baseboard management controller, so that the baseboard management controller obtains the microcode file to be updated from the backup firmware volume according to the characteristic information.
[0087] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0088] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the microcode update method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0089] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0090] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0091] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the microcode update method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0092] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed microcode update method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0093] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0094] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0095] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0097] The above is a detailed introduction to a microcode update method, device, equipment and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A microcode update method, characterized in that: include: Determine an active firmware volume from the pre-created first firmware volume and the second firmware volume, and use the other firmware volume as a backup firmware volume; The first firmware volume and the second firmware volume are located in a basic input / output system image; Loading the microcode file to be updated from the active firmware volume, and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the active firmware volume, if the loading fails, obtaining the microcode file to be updated from the backup firmware volume; Acquire a microcode image file generated by the user end based on the microcode file to be updated, and send the microcode image file to the baseboard management controller so that the baseboard management controller updates the backup firmware volume using the microcode image file; The step of determining the activated firmware volume from the pre-created first firmware volume and the second firmware volume and using the other firmware volume as the backup firmware volume comprises: comparing the microcode image files stored in the pre-created first firmware volume and the second firmware volume, and determining the microcode file to be updated according to the comparison result of the microcode image files, and determining the firmware volume corresponding to the microcode file to be updated as the activated firmware volume, and using the other firmware volume remaining in the first firmware volume and the second firmware volume as the backup firmware volume; The step of determining the activated firmware volume from the pre-created first firmware volume and the second firmware volume comprises: comparing whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are the same, determining the activated firmware volume from the first firmware volume and the second firmware volume in a preset order; The method of determining the activated firmware volume from the pre-created first firmware volume and the second firmware volume includes: comparing whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are not the same, determining the firmware volume corresponding to the newer version of the microcode file as the activated firmware volume.
2. The microcode updating method according to claim 1, characterized in that: After sending the microcode image file to the baseboard management controller, the method further includes: Verifying whether the microcode image file is credible by the baseboard management controller, and if the microcode image file is credible, determining whether the microcode image file is the microcode image file required by the system; If the microcode image file is the microcode image file required by the system, the permission to access the basic input and output system image is switched to the baseboard management controller.
3. The microcode updating method according to claim 1, characterized in that: Also includes: A first firmware volume and a second firmware volume are created in the basic input / output system image for performing read and write operations on the microcode file of the basic input / output system image when the microcode is updated.
4. The microcode updating method according to claim 1, characterized in that: After the baseboard management controller updates the backup firmware volume using the microcode image file, the method further includes: Switching the permission to access the basic input and output system image to the basic input and output system; A system hot restart mechanism is triggered so that the basic input and output system patches the central processing unit using the microcode image file obtained from the backup firmware volume during the system startup process.
5. The microcode updating method according to any one of claims 1 to 4, characterized in that: Before obtaining the microcode file to be updated from the backup firmware volume if the loading fails, the method further includes: The characteristic information including the base address and size of the backup firmware volume is sent to the baseboard management controller, so that the baseboard management controller obtains the microcode file to be updated from the backup firmware volume according to the characteristic information.
6. A microcode updating device, characterized in that: include: A firmware volume determination module, used to determine an active firmware volume from the pre-created first firmware volume and the second firmware volume, and use the other firmware volume as a backup firmware volume; The first firmware volume and the second firmware volume are located in a basic input / output system image; A file loading module, used for loading the microcode file to be updated from the active firmware volume, and determining whether the loading is successful, if the loading is successful, obtaining the microcode file to be updated from the active firmware volume, if the loading fails, obtaining the microcode file to be updated from the backup firmware volume; A microcode update module, used for obtaining a microcode image file generated by a user end based on the microcode file to be updated, and sending the microcode image file to a baseboard management controller, so that the baseboard management controller updates the backup firmware volume using the microcode image file; The firmware volume determination module is specifically used to compare the microcode image files stored in the pre-created first firmware volume and the second firmware volume, and determine the microcode file to be updated according to the comparison result of the microcode image files, and determine the firmware volume corresponding to the microcode file to be updated as the activation firmware volume, and at the same time, use the other firmware volume remaining in the first firmware volume and the second firmware volume as the backup firmware volume; The firmware volume determination module is specifically used to compare whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are the same, determining the activation firmware volume from the first firmware volume and the second firmware volume according to a preset order; The firmware volume determination module is specifically used to compare whether the microcode files in the first firmware volume and the second firmware volume are the same; if the microcode files in the first firmware volume and the second firmware volume are not the same, the firmware volume corresponding to the newer version of the microcode file is determined as the active firmware volume.
7. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the microcode updating method as claimed in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the microcode updating method according to any one of claims 1 to 5 is implemented.
