A microcode upgrade method, device, computer program product and medium

By splitting the microcode upgrade service in system management interrupts into multiple subtasks and only one subtask is executed at a time, the problem of excessive microcode upgrade time in the existing microcode upgrade solution is solved, and the system response delay is reduced and improve system stability.

CN119201227BActive Publication Date: 2025-02-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411721303.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-25
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The microcode upgrade time of the existing microcode upgrade solution is too long, resulting in delayed system response, affecting the system's I/O performance, and may even lead to serious consequences such as system crashes and data loss.

Method used

Split the microcode upgrade service in system management interrupts into multiple subtasks. Only one subtask is executed for each system management interrupt. The microcode upgrade is completed by triggering system management interrupts multiple times, and the process of updating is controlled according to the execution status of the subtask. Identification.

Benefits of technology

It reduces the execution time of a single system management interrupt, enables other interrupts or requests to respond in a timely manner, reduces the system's response delay, and improves system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201227B_ABST
    Figure CN119201227B_ABST
Patent Text Reader

Abstract

The present invention discloses a microcode upgrade method, device, computer program product and medium, which relates to the field of firmware upgrade technology, including: in response to receiving a trigger signal of a system management interrupt, determining a subtask to be executed according to a process control identifier of a microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and triggering the system management interrupt once to execute one subtask; executing the subtask to be executed to perform microcode upgrade; updating the process control identifier according to the execution status of the subtask to be executed. The method can reduce system response delay and ensure system stability while realizing microcode upgrade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of firmware upgrade technology, and in particular to a microcode upgrade method, device, computer program product and medium. Background Art

[0002] CPU (Central Processing Unit) microcode is a kind of firmware used inside the CPU to control its operation mode and functions. It plays an important role in instruction decoding, performance optimization, error handling and compatibility improvement. By upgrading the microcode, some errors, vulnerabilities and instability problems in the CPU can be fixed, while improving the operating efficiency and performance of the CPU, thereby improving the overall performance and stability of the server. CPU microcode upgrade requires microcode upgrade for each physical core on the server, and it takes a certain amount of time to upgrade the microcode of each physical core. The core action of microcode upgrade is the execution of BIOS (Basic Input / Output System) code in SMI (System Management Interrupt). However, the microcode upgrade time of the current microcode upgrade solution is too long, and the system cannot respond to other interrupts and requests in time, resulting in a backlog of tasks, which in turn causes the system to respond late and the application to execute slowly. At the same time, it affects the I / O performance of the system, resulting in slower disk read and write speeds and increased network communication delays. Long-term response delays in the system may also lead to reduced system stability, resulting in serious consequences such as system crashes and data loss, posing a threat to business operations and user data. Therefore, how to solve the above technical defects has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0003] The object of the present invention is to provide a microcode upgrade method, device, computer program product and medium, which can reduce system response delay and ensure system stability while realizing microcode upgrade.

[0004] In order to solve the above technical problems, the present invention provides a microcode upgrade method, comprising:

[0005] In response to receiving a trigger signal of a system management interrupt, a subtask to be executed is determined according to a process control identifier of a microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and one subtask is executed when the system management interrupt is triggered once;

[0006] Execute the subtask to be executed to perform microcode upgrade;

[0007] The process control identifier is updated according to the execution status of the subtask to be executed.

[0008] In some embodiments, updating the process control identifier according to the execution status of the subtask to be executed includes:

[0009] If the execution status of the subtask to be executed is normal, the value of the process control identifier is updated to the value corresponding to the subtask executed after the subtask to be executed, and the number of retries of the subtask to be executed is cleared;

[0010] If the execution state of the subtask to be executed is abnormal, determining whether the number of retries of the subtask to be executed is less than a preset threshold;

[0011] If it is less than, the value of the process control flag is kept unchanged, and the number of retries of the subtask to be executed is increased by one;

[0012] If it is not less than, the value of the process control identifier is updated to the value corresponding to the first subtask executed, and the number of retries of the subtask to be executed is cleared.

[0013] In some embodiments, updating the value of the process control identifier to a value corresponding to a subtask executed after the subtask to be executed includes:

[0014] If the subtask to be executed is to perform microcode image replication and verification check, then the value of the process control identifier is updated to a value corresponding to executing the first batch of physical core microcode upgrades;

[0015] If the subtask to be executed is to execute the first batch of physical core microcode upgrades, then the value of the process control identifier is updated to a value corresponding to executing the second batch of physical core microcode upgrades;

[0016] If the subtask to be executed is to execute the second batch of physical core microcode upgrades, the value of the process control identifier is updated to a value corresponding to executing microcode image replication and verification checking.

[0017] In some embodiments, determining the subtask to be executed according to the process control identifier of the microcode upgrade process includes:

[0018] If the value of the process control identifier is the first value, determining that the subtask to be executed is to perform microcode image copying and verification checking;

[0019] If the value of the process control identifier is the second value, determining that the subtask to be executed is to execute the first batch of physical core microcode upgrades;

[0020] If the value of the process control identifier is the third value, it is determined that the subtask to be executed is to execute the second batch of physical core microcode upgrades.

[0021] In some embodiments, it also includes:

[0022] According to the execution status of the subtask to be executed, a completion status identifier is fed back to the control device; the completion status identifier is used to identify the completion status of the microcode upgrade.

[0023] In some embodiments, according to the execution status of the subtask to be executed, feeding back a completion status indicator to the control device includes:

[0024] If the execution status of the subtask to be executed is normal, the value of the process control identifier is increased by one as the value of the completion status identifier and fed back to the control device; wherein, if the subtask to be executed is the last subtask to be executed, the value of the process control identifier corresponding to the first subtask to be executed is fed back to the control device as the value of the completion status identifier;

[0025] If the execution state of the subtask to be executed is abnormal and the number of retries is less than a preset threshold, feeding back the first value corresponding to the subtask to be executed to the control device;

[0026] If the execution state of the subtask to be executed is abnormal and the number of retries is not less than a preset threshold, the second numerical value corresponding to the subtask to be executed is fed back to the control device.

[0027] In some embodiments, different subtasks correspond to different first values; different subtasks correspond to different second values.

[0028] In some embodiments, it also includes:

[0029] If the value of the process control identifier is not a value corresponding to any of the subtasks, the value of the process control identifier is changed to a value corresponding to the first subtask.

[0030] In some embodiments, it also includes:

[0031] If the value of the process control identifier is not a value corresponding to any of the subtasks, a completion status identifier is fed back to the control device.

[0032] In some embodiments, if the value of the process control identifier is not a value corresponding to any of the subtasks, feeding back a completion status identifier to the control device includes:

[0033] If the value of the process control identifier is not the value corresponding to any of the subtasks, a third value is fed back to the control device; the third value is different from the first value fed back when the execution status of the subtask is abnormal, and is different from the second value fed back when the execution status of the subtask is abnormal.

[0034] In some embodiments, it also includes:

[0035] Updates microcode upgrade events and / or microcode version information.

[0036] In some embodiments, updating the microcode upgrade event and / or the microcode version information includes:

[0037] After each execution of the subtask to be executed, the microcode upgrade event and / or the microcode version information is updated.

[0038] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the microcode upgrade method as described above when executed by a processor.

[0039] In order to solve the above technical problems, the present invention further provides a microcode upgrade device, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is used to implement the steps of the microcode upgrade method as described above when executing the computer program.

[0042] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the microcode upgrade method as described above are implemented.

[0043] In order to solve the above technical problems, the present invention also provides a microcode upgrading device, comprising:

[0044] A determination module, configured to determine a subtask to be executed according to a process control identifier of a microcode upgrade process in response to receiving a trigger signal of a system management interrupt; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and one subtask is executed when the system management interrupt is triggered once;

[0045] An execution module, used for executing the subtask to be executed to perform microcode upgrade;

[0046] An updating module is used to update the process control identifier according to the execution status of the subtask to be executed.

[0047] The microcode upgrade method provided by the present invention includes: in response to receiving a trigger signal of a system management interrupt, determining a subtask to be executed according to a process control identifier of a microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and the system management interrupt is triggered once to execute one subtask; executing the subtask to be executed to perform a microcode upgrade; and updating the process control identifier according to the execution status of the subtask to be executed.

[0048] It can be seen that the microcode upgrade method provided by the present invention divides the microcode upgrade service in the system management interrupt into multiple subtasks, and only executes one subtask in one system management interrupt. In this way, different subtasks of the microcode upgrade service are executed separately in multiple system management interrupts, thereby reducing the execution time of a single system management interrupt, enabling other interrupts or requests to be responded to in a timely manner, reducing the response delay of the system, and improving the stability of the system.

[0049] The microcode upgrade device, computer program product, computer readable storage medium and microcode upgrade apparatus provided by the present invention all have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A schematic diagram of a flow chart of a microcode upgrade method provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a specific microcode upgrade solution provided by an embodiment of the present invention;

[0053] Figure 3 A schematic diagram of an execution flow of a system management interrupt provided by an embodiment of the present invention;

[0054] Figure 4 A schematic diagram of a control device triggering a microcode upgrade provided by an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of a microcode upgrading device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The core of the present invention is to provide a microcode upgrade method, device, computer program product and medium, which can reduce system response delay and ensure system stability while realizing microcode upgrade.

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] Please refer to Figure 1 , Figure 1 A schematic diagram of a microcode upgrade method provided by an embodiment of the present invention, referring to Figure 1 As shown, the method includes:

[0059] S101: In response to receiving a trigger signal of a system management interrupt, a subtask to be executed is determined according to a process control identifier of a microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and the system management interrupt is triggered once to execute one subtask.

[0060] S102: Execute the subtask to be executed to perform microcode upgrade.

[0061] By splitting the code of the microcode upgrade service in the system management interrupt into multiple parts, the microcode upgrade service is split into multiple subtasks. Each subtask is responsible for part of the operation in the complete microcode upgrade process, and each subtask is executed in sequence. One system management interrupt executes one subtask, and the microcode upgrade is finally completed by triggering the system management interrupt multiple times. Among them, the code of the microcode upgrade service in the system management interrupt can be split into multiple parts according to factors such as logical structure, data dependency, and execution time.

[0062] This embodiment controls the execution order of each subtask in the microcode upgrade service according to the process control identifier. The process control identifier can be a process control word. The BMC (Board Management Controller) triggers the system management interrupt, and after the BIOS receives the trigger signal, it enters the system management interrupt to execute the microcode upgrade. First, the BIOS determines the subtask to be executed according to the process control identifier, and then executes the determined subtask to be executed. The operation performed by a subtask is a part of the operation in the entire microcode upgrade process. The operations performed by all subtasks constitute a complete microcode upgrade operation.

[0063] In some embodiments, determining the subtask to be executed according to the process control identifier of the microcode upgrade process includes:

[0064] If the value of the process control identifier is the first value, determining that the subtask to be executed is to perform microcode image copying and verification checking;

[0065] If the value of the process control identifier is the second value, determining that the subtask to be executed is to execute the first batch of physical core microcode upgrades;

[0066] If the value of the process control identifier is the third value, it is determined that the subtask to be executed is to execute the second batch of physical core microcode upgrades.

[0067] The code of the microcode upgrade service in this embodiment is divided into three parts: one part is to execute the microcode FV (Firmware Volume) image copy to memory and verification check action, one part is to execute the first batch of physical core microcode upgrade action, and one part is to execute the second batch of physical core microcode upgrade action.

[0068] refer to Figure 2 As shown, the microcode in BMC is upgraded without any sense. The Host code first updates the FV area in BIOS Flash. Figure 2 In the above code, FVs represents multiple FV areas, and OS is the operating system. The microcode in the BMC upgrades the Host code without sense and then triggers a system management interrupt. If the value of the process control identifier is the first value, the BIOS determines that the subtask to be executed is to perform microcode image copying and verification check, and then executes the subtask to complete the action of copying the microcode image to the memory and verification check. The BMC delays for a certain time to trigger the next system management interrupt. If the value of the process control identifier is the second value, the BIOS determines that the subtask to be executed is to execute the first batch of physical core microcode upgrades, and then executes the subtask to complete the action of performing microcode upgrades on the first batch of physical cores. The BMC delays for a certain time to trigger the next system management interrupt. If the value of the process control identifier is the third value, the BIOS determines that the subtask to be executed is to execute the second batch of physical core microcode upgrades, and then executes the subtask to complete the action of performing microcode upgrades on the second batch of physical cores.

[0069] Exemplarily, the first value is 0, the second value is 1, and the third value is 2. If the value of the process control identifier is 0, it is determined that the subtask to be executed is to perform microcode image copying and verification checking, and then the subtask is executed to complete the action of copying the microcode image to the memory and the verification checking. If the value of the process control identifier is 1, it is determined that the subtask to be executed is to perform the first batch of physical core microcode upgrades, and then the subtask is executed to complete the action of performing microcode upgrades on the first batch of physical cores. If the value of the process control identifier is 2, it is determined that the subtask to be executed is to perform the second batch of physical core microcode upgrades, and then the subtask is executed to complete the action of performing microcode upgrades on the second batch of physical cores.

[0070] S103: Update the process control identifier according to the execution status of the subtask to be executed.

[0071] The process control identifier is updated according to the execution status of the subtask to be executed, so that after entering the system management interrupt next time, the subtask to be executed is determined and executed according to the updated process control identifier.

[0072] In some embodiments, updating the process control identifier according to the execution status of the subtask to be executed includes:

[0073] If the execution status of the subtask to be executed is normal, the value of the process control identifier is updated to the value corresponding to the subtask executed after the subtask to be executed, and the number of retries of the subtask to be executed is cleared;

[0074] If the execution state of the subtask to be executed is abnormal, determining whether the number of retries of the subtask to be executed is less than a preset threshold;

[0075] If it is less than, the value of the process control flag is kept unchanged, and the number of retries of the subtask to be executed is increased by one;

[0076] If it is not less than, the value of the process control identifier is updated to the value corresponding to the first subtask executed, and the number of retries of the subtask to be executed is cleared.

[0077] This embodiment is provided with a code execution failure re-execution function, so that when a subtask fails to execute, the subtask is re-executed within a limited number of times. If the execution status of the subtask to be executed is normal, the value of the process control identifier is updated to the value corresponding to the subtask executed after the subtask to be executed, and the number of retries of the subtask to be executed is cleared to zero, so that the subsequent subtask can be executed after the system management interrupt is triggered next time. If the execution status of the subtask to be executed is abnormal, it is determined whether the number of retries of the subtask to be executed is less than a preset threshold. If it is less than, the value of the process control identifier is kept unchanged, and the number of retries of the subtask to be executed is increased by one, so that the subtask to be executed is executed again after the system management interrupt is triggered next time. If it is not less than, the value of the process control identifier is updated to the value corresponding to the first subtask to be executed, and the number of retries of the subtask to be executed is cleared to zero, so that the first subtask to be executed can be executed after the system management interrupt is triggered next time.

[0078] Exemplarily, the preset threshold is 3. If the execution status of the subtask to be executed is normal, the value of the process control identifier is updated to the value corresponding to the subtask executed after the subtask to be executed, and the number of retries of the subtask to be executed is cleared to zero, so that the subsequent subtask can be executed after the system management interrupt is triggered next time. If the execution status of the subtask to be executed is abnormal, it is determined whether the number of retries of the subtask to be executed is less than 3. If it is less than, the value of the process control identifier is kept unchanged, and the number of retries of the subtask to be executed is increased by one, so that the subtask to be executed is executed again after the system management interrupt is triggered next time. If it is not less than, the value of the process control identifier is updated to the value corresponding to the first subtask to be executed, and the number of retries of the subtask to be executed is cleared to zero, so that the first subtask to be executed can be executed after the system management interrupt is triggered next time.

[0079] In some embodiments, updating the value of the process control identifier to a value corresponding to a subtask executed after the subtask to be executed includes:

[0080] If the subtask to be executed is to perform microcode image replication and verification check, then the value of the process control identifier is updated to a value corresponding to executing the first batch of physical core microcode upgrades;

[0081] If the subtask to be executed is to execute the first batch of physical core microcode upgrades, then the value of the process control identifier is updated to a value corresponding to executing the second batch of physical core microcode upgrades;

[0082] If the subtask to be executed is to execute the second batch of physical core microcode upgrades, the value of the process control identifier is updated to a value corresponding to executing microcode image replication and verification checking.

[0083] Exemplary, reference Figure 3 As shown, if the execution status of the subtask of executing microcode image copy and verification check is normal, the value of the process control identifier is updated to 1, so that the first batch of physical core microcode upgrades can be executed after the next system management interrupt is entered. If the execution status of the subtask of executing microcode image copy and verification check is abnormal and the number of retries is less than 3, the value of the process control identifier is kept unchanged at 0, and the number of retries of the subtask of executing microcode image copy and verification check is increased by one, so that the microcode image copy and verification check can be executed again after the next system management interrupt is entered. If the execution status of the subtask of executing microcode image copy and verification check is abnormal and the number of retries is not less than 3, the value of the process control identifier is updated to 0, that is, the value of the process control identifier is kept unchanged at 0, and the number of retries of the subtask of executing microcode image copy and verification check is cleared.

[0084] If the execution status of the subtask for executing the first batch of physical core microcode upgrades is normal, the value of the process control identifier is updated to 2 so that the second batch of physical core microcode upgrades can be executed after the next system management interrupt is entered. If the execution status of the subtask for executing the first batch of physical core microcode upgrades is abnormal and the number of retries is less than 3, the value of the process control identifier is kept unchanged at 1, and the number of retries of the subtask for executing the first batch of physical core microcode upgrades is increased by one, so that the first batch of physical core microcode upgrades can be executed again after the next system management interrupt is entered. If the execution status of the subtask for executing the first batch of physical core microcode upgrades is abnormal and the number of retries is not less than 3, the value of the process control identifier is updated to 0, and the number of retries of the subtask for executing the first batch of physical core microcode upgrades is cleared to zero.

[0085] If the execution status of the subtask for executing the second batch of physical core microcode upgrades is normal, the value of the process control identifier is updated to 0 so that the microcode image copy and verification check can be performed after the next system management interrupt is entered. If the execution status of the subtask for executing the second batch of physical core microcode upgrades is abnormal and the number of retries is less than 3, the value of the process control identifier is kept unchanged at 2, and the number of retries of the subtask for executing the second batch of physical core microcode upgrades is increased by one, so that the second batch of physical core microcode upgrades can be executed again after the next system management interrupt is entered. If the execution status of the subtask for executing the second batch of physical core microcode upgrades is abnormal and the number of retries is not less than 3, the value of the process control identifier is updated to 0, and the number of retries of the subtask for executing the second batch of physical core microcode upgrades is cleared to zero.

[0086] In some embodiments, it also includes:

[0087] According to the execution status of the subtask to be executed, a completion status identifier is fed back to the control device; the completion status identifier is used to identify the completion status of the microcode upgrade.

[0088] The completion status identifier may be a status word. After each subtask is executed, the status word may be fed back to the BMC so that the BMC can understand the microcode upgrade status.

[0089] In some embodiments, according to the execution status of the subtask to be executed, feeding back a completion status indicator to the control device includes:

[0090] If the execution status of the subtask to be executed is normal, the value of the process control identifier is increased by one as the value of the completion status identifier and fed back to the control device; wherein, if the subtask to be executed is the last subtask to be executed, the value of the process control identifier corresponding to the first subtask to be executed is fed back to the control device as the value of the completion status identifier;

[0091] If the execution state of the subtask to be executed is abnormal and the number of retries is less than a preset threshold, feeding back the first value corresponding to the subtask to be executed to the control device;

[0092] If the execution state of the subtask to be executed is abnormal and the number of retries is not less than a preset threshold, the second numerical value corresponding to the subtask to be executed is fed back to the control device.

[0093] In some embodiments, different subtasks correspond to different first values; different subtasks correspond to different second values.

[0094] Exemplary, reference Figure 3 As shown, if the execution status of the subtask of executing microcode image copy and verification check is normal, the flow control word 1 is fed back to the BMC as the value of the completion status mark. If the execution status of the subtask of executing microcode image copy and verification check is abnormal and the number of retries is less than 3, the value of the completion status mark is changed to 0xe0 and fed back to the BMC. If the execution status of the subtask of executing microcode image copy and verification check is abnormal and the number of retries is not less than 3, the value of the completion status mark is changed to 0xff and fed back to the BMC.

[0095] If the execution status of the subtask for executing the first batch of physical core microcode upgrade is normal, the process control word 2 is fed back to the BMC as the value of the completion status mark. If the execution status of the subtask for executing the first batch of physical core microcode upgrade is abnormal and the number of retries is less than 3, the value of the completion status mark is changed to 0xe1 and fed back to the BMC. If the execution status of the subtask for executing the first batch of physical core microcode upgrade is abnormal and the number of retries is not less than 3, the value of the completion status mark is changed to 0xfe and fed back to the BMC.

[0096] If the execution status of the subtask for executing the second batch of physical core microcode upgrades is normal, the process control word 0 is fed back to the BMC as the value of the completion status mark. If the execution status of the subtask for executing the second batch of physical core microcode upgrades is abnormal and the number of retries is less than 3, the value of the completion status mark is changed to 0xe2 and fed back to the BMC. If the execution status of the subtask for executing the second batch of physical core microcode upgrades is abnormal and the number of retries is not less than 3, the value of the completion status mark is changed to 0xfd and fed back to the BMC.

[0097] like Figure 4 As shown, the BMC determines whether the status word returned by the BIOS is one of 1, 2, 0xe0, 0xe1, and 0xe2. If the status word returned by the BIOS is 1 or 2, it means that the microcode upgrade service has not been completed, and the next system management interrupt is triggered after a certain delay. If the status word returned by the BIOS is 0xe0 or 0xe1 or 0xe2, it means that the subtask execution status is abnormal within a limited number of times and is trying to be re-executed. At this time, the next system management interrupt is also triggered after a certain delay. BMC triggers the next system management interrupt after a certain delay to avoid frequent interrupt switching. If the status word returned by the BIOS is 0, it means that all subtasks of the microcode upgrade service have been executed normally and the microcode upgrade is normal. If the status word returned by the BIOS is one of 0xfd, 0xfe, and 0xff, it means that the execution of the subtask of the microcode upgrade is abnormal.

[0098] In some embodiments, it also includes:

[0099] If the value of the process control identifier is not a value corresponding to any of the subtasks, the value of the process control identifier is changed to a value corresponding to the first subtask.

[0100] If the value of the process control identifier is not the value corresponding to any subtask, it is determined that there is an abnormality, and the value of the process control identifier is changed to the value corresponding to the first subtask. Exemplarily, if the value of the process control identifier is not the value corresponding to any subtask, the value of the process control identifier is changed to 0.

[0101] In some embodiments, it also includes:

[0102] If the value of the process control identifier is not a value corresponding to any of the subtasks, a completion status identifier is fed back to the control device.

[0103] In some embodiments, if the value of the process control identifier is not a value corresponding to any of the subtasks, feeding back a completion status identifier to the control device includes:

[0104] If the value of the process control identifier is not the value corresponding to any of the subtasks, a third value is fed back to the control device; the third value is different from the first value fed back when the execution status of the subtask is abnormal, and is different from the second value fed back when the execution status of the subtask is abnormal.

[0105] If the value of the process control identifier is not the value corresponding to any subtask, it is determined that there is an exception, and the completion status identifier is fed back to the BMC. Exemplarily, if the value of the process control identifier is not the value corresponding to any subtask, the value of the completion status identifier fed back to the BMC is 0xfc. If the status word returned by the BIOS is 0xfc, it means that the execution of the subtask of the microcode upgrade is abnormal.

[0106] In some embodiments, it also includes:

[0107] Updates microcode upgrade events and / or microcode version information.

[0108] In some embodiments, updating the microcode upgrade event and / or the microcode version information includes:

[0109] After each execution of the subtask to be executed, the microcode upgrade event and / or the microcode version information is updated.

[0110] Exemplarily, after successfully executing the microcode FV image copy and verification check, the microcode upgrade event and / or microcode version information is updated. After successfully executing the first batch of physical core microcode upgrades, the microcode upgrade event and / or microcode version information is updated. After successfully executing the second batch of physical core microcode upgrades, the microcode upgrade event and / or microcode version information is updated.

[0111] In some embodiments, it also includes:

[0112] Count the number of subtask execution failures;

[0113] When the number of subtask execution failures reaches a preset number, a subtask exception prompt is issued so that the corresponding code can be modified.

[0114] If the number of subtask execution failures reaches the preset number, it means that there is a defect in the part of the code itself, so a subtask exception prompt is given to modify the part of the code to ensure that the subtask can be executed normally during the subsequent microcode upgrade.

[0115] In some embodiments, it also includes:

[0116] Count the number of tasks backlogged during the duration of the system management outage;

[0117] The subtasks of the microcode upgrade service are re-divided according to the number of tasks backlogged during the duration of the system management interruption.

[0118] If there is a small backlog of tasks or even no backlog during the duration of the system management interruption, the number of subtasks can be reduced, thereby increasing the duration of the system management interruption and speeding up the completion of the microcode upgrade. If there is a small backlog of tasks or even no backlog during the duration of the system management interruption, the number of subtasks can be increased, thereby shortening the duration of the system management interruption and reducing the number of backlog tasks.

[0119] To sum up, the microcode upgrade method provided by the present invention divides the microcode upgrade service in the system management interrupt into multiple subtasks, and only executes one subtask in one system management interrupt. In this way, different subtasks of the microcode upgrade service are executed separately in multiple system management interrupts, thereby reducing the execution time of a single system management interrupt, enabling other interrupts or requests to be responded to in a timely manner, reducing the response delay of the system, and improving the stability of the system.

[0120] The present invention also provides a microcode upgrade device, referring to Figure 5 As shown, the device includes a memory 1 and a processor 2 .

[0121] Memory 1, used for storing computer programs;

[0122] Processor 2 is used to execute the computer program to implement the following steps:

[0123] In response to receiving a trigger signal of a system management interrupt, the subtask to be executed is determined according to the process control identifier of the microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and the system management interrupt is triggered once to execute one subtask; the subtask to be executed is executed to perform a microcode upgrade; and the process control identifier is updated according to the execution status of the subtask to be executed.

[0124] For an introduction to the device provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

[0125] The present invention also provides a computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the following steps are implemented:

[0126] In response to receiving a trigger signal of a system management interrupt, the subtask to be executed is determined according to the process control identifier of the microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and the system management interrupt is triggered once to execute one subtask; the subtask to be executed is executed to perform a microcode upgrade; and the process control identifier is updated according to the execution status of the subtask to be executed.

[0127] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

[0128] In response to receiving a trigger signal of a system management interrupt, the subtask to be executed is determined according to the process control identifier of the microcode upgrade process; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and the system management interrupt is triggered once to execute one subtask; the subtask to be executed is executed to perform a microcode upgrade; and the process control identifier is updated according to the execution status of the subtask to be executed.

[0129] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0130] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not elaborate on it here.

[0131] The present invention also provides a microcode upgrade device, which can be referred to in correspondence with the method described above. The device includes:

[0132] A determination module, configured to determine a subtask to be executed according to a process control identifier of a microcode upgrade process in response to receiving a trigger signal of a system management interrupt; the microcode upgrade service in the system management interrupt includes a plurality of subtasks, each of which is executed in sequence, and one subtask is executed when the system management interrupt is triggered once;

[0133] An execution module, used for executing the subtask to be executed to perform microcode upgrade;

[0134] An updating module is used to update the process control identifier according to the execution status of the subtask to be executed.

[0135] In some embodiments, the determining module includes:

[0136] A first determining unit, configured to determine that the subtask to be executed is to perform microcode image copying and verification checking if the value of the process control identifier is a first value;

[0137] A second determining unit is used to determine that the subtask to be executed is to execute the first batch of physical core microcode upgrades if the value of the process control identifier is a second value;

[0138] The third determining unit is used to determine that the subtask to be executed is to execute the second batch of physical core microcode upgrades if the value of the process control identifier is a third value.

[0139] In some embodiments, the update module includes:

[0140] A first updating unit is used to update the value of the process control identifier to a value corresponding to a subtask executed after the subtask to be executed if the execution status of the subtask to be executed is normal, and clear the number of retries of the subtask to be executed to zero;

[0141] A judging unit, configured to judge whether the number of retries of the subtask to be executed is less than a preset threshold if the execution state of the subtask to be executed is abnormal;

[0142] A holding unit, configured to keep the value of the process control flag unchanged if it is less than , and increase the number of retries of the subtask to be executed by one;

[0143] The second updating unit is used to update the value of the process control identifier to the value corresponding to the first subtask to be executed if it is not less than, and clear the number of retries of the subtask to be executed.

[0144] In some embodiments, the first updating unit includes:

[0145] A first updating subunit is used to update the value of the process control identifier to a value corresponding to executing the first batch of physical core microcode upgrades if the subtask to be executed is to execute microcode image replication and verification check;

[0146] A second updating subunit is used to update the value of the process control identifier to a value corresponding to executing the second batch of physical core microcode upgrades if the subtask to be executed is executing the first batch of physical core microcode upgrades;

[0147] The third updating subunit is used to update the value of the process control identifier to a value corresponding to executing microcode image copy and verification check if the subtask to be executed is to execute the second batch of physical core microcode upgrades.

[0148] In some embodiments, it also includes:

[0149] The first feedback module is used to feed back a completion status identifier to the control device according to the execution status of the subtask to be executed; the completion status identifier is used to identify the completion status of the microcode upgrade.

[0150] In some embodiments, the first feedback module includes:

[0151] A first feedback unit is used to, if the execution status of the subtask to be executed is normal, add one to the value of the process control identifier as the value of the completion status identifier and feed it back to the control device; wherein, if the subtask to be executed is the last subtask to be executed, the value of the process control identifier corresponding to the first executed subtask is fed back to the control device as the value of the completion status identifier;

[0152] a second feedback unit, configured to feed back a first value corresponding to the subtask to be executed to the control device if the execution state of the subtask to be executed is abnormal and the number of retries is less than a preset threshold;

[0153] The third feedback unit is used to feed back the second value corresponding to the subtask to be executed to the control device if the execution state of the subtask to be executed is abnormal and the number of retries is not less than a preset threshold.

[0154] In some embodiments, different subtasks correspond to different first values; different subtasks correspond to different second values.

[0155] In some embodiments, it also includes:

[0156] The changing module is used to change the value of the process control identifier to the value corresponding to the first subtask if the value of the process control identifier is not the value corresponding to any of the subtasks.

[0157] In some embodiments, it also includes:

[0158] The second feedback module is used to feedback a completion status identifier to the control device if the value of the process control identifier is not a value corresponding to any of the subtasks.

[0159] In some embodiments, the second feedback module is specifically configured to:

[0160] If the value of the process control identifier is not the value corresponding to any of the subtasks, a third value is fed back to the control device; the third value is different from the first value fed back when the execution status of the subtask is abnormal, and is different from the second value fed back when the execution status of the subtask is abnormal.

[0161] In some embodiments, it also includes:

[0162] The system message update module is used to update microcode upgrade events and / or microcode version information.

[0163] In some embodiments, the system message update module is specifically used to:

[0164] After each execution of the subtask to be executed, the microcode upgrade event and / or the microcode version information is updated.

[0165] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, equipment, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0166] 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 the present invention.

[0167] 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.

[0168] The microcode upgrade method, device, computer program product and medium provided by the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, multiple improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A microcode upgrade method, characterized in that: include: In response to receiving a trigger signal of a system management interrupt, determining a subtask to be executed according to a process control identifier of a microcode upgrade process; The microcode upgrade service in the system management interruption includes a plurality of subtasks, each of which is executed in sequence, and the system management interruption is triggered once to execute one subtask; Execute the subtask to be executed to perform microcode upgrade; updating the process control identifier according to the execution status of the subtask to be executed; Updating the process control identifier according to the execution status of the subtask to be executed includes: If the execution status of the subtask to be executed is normal, the value of the process control identifier is updated to the value corresponding to the subtask executed after the subtask to be executed, and the number of retries of the subtask to be executed is cleared; If the execution state of the subtask to be executed is abnormal, determining whether the number of retries of the subtask to be executed is less than a preset threshold; If it is less than, the value of the process control flag is kept unchanged, and the number of retries of the subtask to be executed is increased by one; If it is not less than, the value of the process control identifier is updated to the value corresponding to the first subtask executed, and the number of retries of the subtask to be executed is cleared.

2. The microcode upgrade method according to claim 1, characterized in that: Updating the value of the process control identifier to a value corresponding to a subtask executed after the subtask to be executed includes: If the subtask to be executed is to perform microcode image replication and verification check, then the value of the process control identifier is updated to a value corresponding to executing the first batch of physical core microcode upgrades; If the subtask to be executed is to execute the first batch of physical core microcode upgrades, then the value of the process control identifier is updated to a value corresponding to executing the second batch of physical core microcode upgrades; If the subtask to be executed is to execute the second batch of physical core microcode upgrades, the value of the process control identifier is updated to a value corresponding to executing microcode image replication and verification checking.

3. The microcode upgrade method according to claim 1, characterized in that: The subtasks to be executed according to the process control identifier of the microcode upgrade process include: If the value of the process control identifier is the first value, determining that the subtask to be executed is to perform microcode image copying and verification checking; If the value of the process control identifier is the second value, determining that the subtask to be executed is to execute the first batch of physical core microcode upgrades; If the value of the process control identifier is the third value, it is determined that the subtask to be executed is to execute the second batch of physical core microcode upgrades.

4. The microcode upgrade method according to claim 1, characterized in that: Also includes: Feedback a completion status indicator to the control device according to the execution status of the subtask to be executed; The completion status identifier is used to identify the completion status of the microcode upgrade.

5. The microcode upgrade method according to claim 4, characterized in that: Feedback of a completion status indicator to the control device according to the execution status of the subtask to be executed includes: If the execution status of the subtask to be executed is normal, the value of the process control identifier is increased by one as the value of the completion status identifier and fed back to the control device; wherein, if the subtask to be executed is the last subtask to be executed, the value of the process control identifier corresponding to the first subtask to be executed is fed back to the control device as the value of the completion status identifier; If the execution state of the subtask to be executed is abnormal and the number of retries is less than a preset threshold, feeding back the first value corresponding to the subtask to be executed to the control device; If the execution state of the subtask to be executed is abnormal and the number of retries is not less than a preset threshold, the second numerical value corresponding to the subtask to be executed is fed back to the control device.

6. The microcode upgrade method according to claim 5, characterized in that: The first values ​​corresponding to different subtasks are different; and the second values ​​corresponding to different subtasks are different.

7. The microcode upgrade method according to claim 1, characterized in that: Also includes: If the value of the process control identifier is not a value corresponding to any of the subtasks, the value of the process control identifier is changed to a value corresponding to the first subtask.

8. The microcode upgrade method according to claim 1, characterized in that: Also includes: If the value of the process control identifier is not a value corresponding to any of the subtasks, a completion status identifier is fed back to the control device.

9. The microcode upgrade method according to claim 8, characterized in that: If the value of the process control identifier is not a value corresponding to any of the subtasks, feeding back a completion status identifier to the control device includes: If the value of the process control identifier is not the value corresponding to any of the subtasks, a third value is fed back to the control device; the third value is different from the first value fed back when the execution status of the subtask is abnormal, and is different from the second value fed back when the execution status of the subtask is abnormal.

10. The microcode upgrade method according to claim 1, characterized in that: Also includes: Updates microcode upgrade events and / or microcode version information.

11. The microcode upgrade method according to claim 10, characterized in that: Updated microcode upgrade events and / or microcode version information include: After each execution of the subtask to be executed, the microcode upgrade event and / or the microcode version information is updated.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the microcode upgrade method according to any one of claims 1 to 11 are implemented.

13. A microcode upgrade device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the microcode upgrade method as described in any one of claims 1 to 11 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the microcode upgrade method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Terminal firmware upgrading method and device, equipment and storage medium

    CN116938710A

  • Microcode upgrading method and server

    CN118377515A