BOOTROM correction method and device
By detecting the set of flag bits of the chip system and loading the target correction firmware, the problem of high cost and long time for BOOTROM defect correction is solved, a convenient and efficient correction process is achieved, and the correction effect after chip chip is improved.
Patent Information
- Application Number
- CN202411025219.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, when BOOTROM has defects, chip chip chipping costs and development costs increase, delaying chip mass production and time to market, and lacking methods to improve the convenience of BOOTROM correction.
By detecting the set of flag bits of the chip system, we determine whether the preset correction conditions are met, and loading the matching target correction firmware to correct the BOOTROM, so as to fix the BOOTROM defect without redischarge.
It improves the convenience, accuracy and versatility of BOOTROM correction, and reduces the correction cost and time after chip chip chipping.
Smart Images

Figure CN119201513A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a BOOTROM correction method and device. Background Art
[0002] BOOTROM (boot read-only memory) is a mask ROM inside a chip that stores the first code executed when the chip is powered on or reset. Its main function is to initialize the basic modules of the chip, such as power, clock, and memory, and decide where to load the next execution code based on the external pins or the configuration inside the chip (such as RAM or EFUSE inside the chip), and check the legality and integrity of the code.
[0003] As an important component of the chip, BOOTROM will be taped out along with the chip. At this time, if there is a defect in BOOTROM, since the chip cannot be modified during tape-out, the BOOTROM needs to be corrected and re-taped, which not only increases the chip tape-out cost and development cost, but also delays the chip mass production and market launch time, which is not conducive to chip production and maintenance.
[0004] It can be seen that it is particularly important to propose a technical solution to improve the convenience of BOOTROM correction. Summary of the invention
[0005] The present invention provides a BOOTROM correction method and device, which can improve the convenience of BOOTROM correction.
[0006] In order to solve the above technical problems, the first aspect of the present invention discloses a BOOTROM correction method, the method comprising:
[0007] Detect the flag bit set of the chip system where the BOOTROM is located;
[0008] According to the flag bit set, determining whether the BOOTROM satisfies a preset correction condition, wherein the preset correction condition is used to indicate that the chip system has a correction environment for the BOOTROM;
[0009] When it is determined that the BOOTROM satisfies the preset correction condition, a target correction firmware matching the preset correction condition is loaded according to the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
[0010] As an optional implementation, in the first aspect of the present invention, the chip system includes a plurality of firmwares, each flag bit in the flag bit set has a corresponding firmware, the firmware is used to represent software or hardware, and judging whether the BOOTROM satisfies a preset correction condition according to the flag bit set includes:
[0011] Determine whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is determined that the target flag bit exists in the flag bit set, determine a first target firmware corresponding to the target flag bit in all the firmwares;
[0012] According to the first target firmware, matching and correcting the second target firmware of the BOOTROM;
[0013] Acquire status information of the second target firmware;
[0014] According to the state information, determining whether the second target firmware satisfies a preset control condition, and when it is determined that the second target firmware satisfies the preset control condition, determining that the BOOTROM satisfies a preset correction condition;
[0015] And, the method further comprises:
[0016] The second target firmware is determined as the target revised firmware.
[0017] As an optional implementation manner, in the first aspect of the present invention, matching and correcting the second target firmware of the BOOTROM according to the first target firmware includes:
[0018] generating, according to the first target firmware and the target flag bit, a first correction strategy of the BOOTROM for the first target firmware;
[0019] generating a second correction strategy for the BOOTROM according to the first correction strategy;
[0020] According to the second revision strategy, the second target firmware of the BOOTROM is matched and revised.
[0021] As an optional implementation, in the first aspect of the present invention, the first target firmware has a corresponding preset priority value, and judging whether the second target firmware satisfies a preset control condition according to the state information includes:
[0022] Analyzing the call control condition of the second target firmware according to the state information, the call control condition including at least one of call control time, call control accessories, call control environment, and call control authority permission;
[0023] According to the call control condition, analyzing the call permission control period of the BOOTROM to the second target firmware;
[0024] Analyzing the modification permission control period of the first target firmware by the BOOTROM according to the preset priority value and the target flag of the first target firmware;
[0025] determining whether the calling permission control period matches the modifying permission control period, and when it is determined that the calling permission control period matches the modifying permission control period, determining that the second target firmware satisfies a preset control condition;
[0026] And, the method further comprises:
[0027] When it is determined that the calling permission control period does not match the modifying permission control period, it is determined that the second target firmware does not meet the preset control condition, and a control failure factor of the second target firmware is analyzed according to the calling control condition and the modifying permission control period, wherein the control failure factor is used to indicate the reason why the calling permission control period does not match the modifying permission control period;
[0028] A repair control strategy is generated according to the control failure factor, where the repair control strategy is used to make the second target firmware meet the preset control condition.
[0029] As an optional implementation, in the first aspect of the present invention, generating a modified control strategy according to the control failure factor includes:
[0030] determining a control failure item of the second target firmware according to the control failure factor, the control failure item being used to indicate an event in the second target firmware that causes the calling permission control period to be inconsistent with the modifying permission control period;
[0031] According to the control failure item, determining whether the second target firmware satisfies a preset replacement condition; when it is determined that the second target firmware satisfies the preset replacement condition, matching a replacement target firmware of the second target firmware that satisfies the preset control condition according to the control failure item and the second correction strategy, and determining the replacement target firmware as the new second target firmware;
[0032] When it is determined that the second target firmware does not meet the preset firmware replacement condition, generating a call correction strategy for the second target firmware according to the control failure item and the call control condition;
[0033] Wherein, the correction control strategy includes the replacement target firmware or the calling correction strategy.
[0034] As an optional implementation manner, in the first aspect of the present invention, after loading the target correction firmware matching the preset correction condition according to the preset correction condition, the method further includes:
[0035] Correcting the firmware according to the target, matching the firmware verification method, the firmware verification method having a corresponding preset verification condition;
[0036] Determine whether the target revised firmware satisfies the preset verification condition within a preset period of time; when it is determined that the target revised firmware does not satisfy the preset verification condition within the preset period of time, match the verification supplement item of the target revised firmware according to the preset verification condition, update the target revised firmware according to the verification supplement item, and re-trigger the execution of the operation of determining whether the target revised firmware satisfies the preset verification condition within the preset period of time until the target revised firmware satisfies the preset verification condition within the preset period of time.
[0037] As an optional implementation, in the first aspect of the present invention, before updating the target revision firmware according to the verification supplement item, the method further includes:
[0038] Checking the attribute information of the verification supplementary item;
[0039] According to the attribute information, matching the security risk items of the verification supplementary items;
[0040] Determine whether there is a target item matching the security risk item in the preset security risk items, and when it is determined that the target item exists in the preset security risk items, adjust the firmware verification method according to the verification supplement item, and re-trigger the operation of determining whether the target revised firmware meets the preset verification condition within a preset period of time;
[0041] When it is determined that the target item does not exist in the preset security risk items, the operation of updating the target correction firmware according to the verification supplement item is triggered.
[0042] The second aspect of the present invention discloses a BOOTROM correction device, the device comprising:
[0043] A detection module is used to detect the flag bit set of the chip system where the BOOTROM is located;
[0044] A judgment module, used for judging whether the BOOTROM satisfies a preset correction condition according to the flag bit set, wherein the preset correction condition is used for indicating that the chip system has a correction environment for the BOOTROM;
[0045] The loading module is used to load the target correction firmware matching the preset correction condition according to the preset correction condition when the judging module judges that the BOOTROM satisfies the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
[0046] As an optional implementation, in the second aspect of the present invention, the chip system includes multiple firmwares, each flag bit in the flag bit set has a corresponding firmware, the firmware is used to represent software or hardware, and the judgment module judges whether the BOOTROM meets the preset correction condition according to the flag bit set. The specific method includes:
[0047] Determine whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is determined that the target flag bit exists in the flag bit set, determine a first target firmware corresponding to the target flag bit in all the firmwares;
[0048] According to the first target firmware, matching and correcting the second target firmware of the BOOTROM;
[0049] Acquire status information of the second target firmware;
[0050] According to the state information, determining whether the second target firmware satisfies a preset control condition, and when it is determined that the second target firmware satisfies the preset control condition, determining that the BOOTROM satisfies a preset correction condition;
[0051] And, the device further comprises:
[0052] A determination module is used to determine the second target firmware as the target revised firmware.
[0053] As an optional implementation, in the second aspect of the present invention, the specific manner in which the judgment module matches and corrects the second target firmware of the BOOTROM according to the first target firmware includes:
[0054] generating, according to the first target firmware and the target flag bit, a first correction strategy of the BOOTROM for the first target firmware;
[0055] generating a second correction strategy for the BOOTROM according to the first correction strategy;
[0056] According to the second revision strategy, the second target firmware of the BOOTROM is matched and revised.
[0057] As an optional implementation, in the second aspect of the present invention, the first target firmware has a corresponding preset priority value, and the specific manner in which the judgment module judges whether the second target firmware satisfies the preset control condition according to the state information includes:
[0058] Analyzing the call control condition of the second target firmware according to the state information, the call control condition including at least one of call control time, call control accessories, call control environment, and call control authority permission;
[0059] According to the call control condition, analyzing the call permission control period of the BOOTROM to the second target firmware;
[0060] Analyzing the modification permission control period of the first target firmware by the BOOTROM according to the preset priority value and the target flag of the first target firmware;
[0061] determining whether the calling permission control period matches the modifying permission control period, and when it is determined that the calling permission control period matches the modifying permission control period, determining that the second target firmware satisfies a preset control condition;
[0062] And, the determination module is further used to determine that the second target firmware does not meet the preset control condition when the judgment module determines that the calling permission control period does not match the correction permission control period;
[0063] And, the device further comprises:
[0064] an analysis module, configured to analyze a control failure factor of the second target firmware according to the call control condition and the modified permission control period, wherein the control failure factor is used to indicate a reason why the call permission control period does not match the modified permission control period;
[0065] A generation module is used to generate a repair control strategy according to the control failure factor, wherein the repair control strategy is used to make the second target firmware meet the preset control condition.
[0066] As an optional implementation, in the second aspect of the present invention, the specific manner in which the generation module generates the modified control strategy according to the control failure factor includes:
[0067] determining a control failure item of the second target firmware according to the control failure factor, the control failure item being used to indicate an event in the second target firmware that causes the calling permission control period to be inconsistent with the modifying permission control period;
[0068] According to the control failure item, determining whether the second target firmware satisfies a preset replacement condition; when it is determined that the second target firmware satisfies the preset replacement condition, matching a replacement target firmware of the second target firmware that satisfies the preset control condition according to the control failure item and the second correction strategy, and determining the replacement target firmware as the new second target firmware;
[0069] When it is determined that the second target firmware does not meet the preset firmware replacement condition, generating a call correction strategy for the second target firmware according to the control failure item and the call control condition;
[0070] Wherein, the correction control strategy includes the replacement target firmware or the calling correction strategy.
[0071] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0072] A matching module, configured to match a firmware verification method according to the target revised firmware after the loading module loads the target revised firmware matching the preset revised condition according to the preset revised condition, wherein the firmware verification method has a corresponding preset verification condition;
[0073] The judging module is further used to judge whether the target correction firmware satisfies the preset verification condition within a preset period of time;
[0074] The matching module is further configured to match the verification supplementary item of the target revised firmware according to the preset verification condition when the judging module judges that the target revised firmware does not meet the preset verification condition within the preset period of time;
[0075] An update module is used to update the target revision firmware according to the verification supplement item, and to re-trigger the judgment module to perform the operation of judging whether the target revision firmware satisfies the preset verification condition within a preset period of time, until the target revision firmware satisfies the preset verification condition within the preset period of time.
[0076] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0077] A verification module, used for verifying the attribute information of the verification supplement item before the update module updates the target revised firmware according to the verification supplement item;
[0078] The matching module is further used to match the security risk items of the verification supplementary items according to the attribute information;
[0079] The judgment module is further used to judge whether there is a target item matching the security risk item in the preset security risk items;
[0080] an adjustment module, configured to adjust the firmware verification method according to the verification supplementary item when the judgment module determines that the target item exists in the preset security risk items, and re-trigger the judgment module to perform the operation of determining whether the target revised firmware meets the preset verification condition within a preset period of time;
[0081] When the judgment module determines that the target item does not exist in the preset security risk items, the update module is triggered to execute the operation of updating the target revised firmware according to the verification supplement item.
[0082] The third aspect of the present invention discloses another BOOTROM correction device, the device comprising:
[0083] A memory storing executable program code;
[0084] a processor coupled to the memory;
[0085] The processor calls the executable program code stored in the memory to execute the BOOTROM correction method disclosed in the first aspect of the present invention.
[0086] The fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the BOOTROM correction method disclosed in the first aspect of the present invention.
[0087] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0088] In the embodiment of the present invention, the flag bit set of the chip system where the BOOTROM is located is detected; according to the flag bit set, it is determined whether the BOOTROM satisfies the preset correction condition, and the preset correction condition is used to indicate that the chip system has a correction environment for the BOOTROM; when it is determined that the BOOTROM satisfies the preset correction condition, the target correction firmware matching the preset correction condition is loaded according to the preset correction condition, and the target correction firmware is used to correct the BOOTROM. It can be seen that the implementation of the present invention can determine whether the BOOTROM satisfies the preset correction condition for indicating that the chip system has a correction environment for the BOOTROM based on the flag bit set of the chip system where the BOOTROM is located, and when it is determined that the BOOTROM satisfies the above-mentioned preset correction condition, the target correction firmware matching the preset correction condition is loaded according to the preset correction condition to correct the BOOTROM, so that after the chip is taped out, without re-taping, the defects existing in the BOOTROM are corrected, and then the defects of the chip system where the BOOTROM is located are repaired, and the convenience, accuracy and versatility of defect correction of the BOOTROM are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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.
[0090] Figure 1 It is a flow chart of a BOOTROM correction method disclosed in an embodiment of the present invention;
[0091] Figure 2 It is a flow chart of another BOOTROM correction method disclosed in an embodiment of the present invention;
[0092] Figure 3 It is a structural schematic diagram of a BOOTROM correction device disclosed in an embodiment of the present invention;
[0093] Figure 4 It is a structural schematic diagram of another BOOTROM correction device disclosed in an embodiment of the present invention;
[0094] Figure 5 It is a structural schematic diagram of another BOOTROM correction device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0095] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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.
[0096] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0097] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0098] The present invention discloses a BOOTROM correction method and device, which can judge whether the BOOTROM satisfies a preset correction condition for indicating that the chip system has a BOOTROM based on a flag bit set of the detected chip system where the BOOTROM is located, and when it is judged that the BOOTROM satisfies the preset correction condition, according to the preset correction condition, load a target correction firmware matching the preset correction condition to correct the BOOTROM, so that after the chip is taped out, without re-taping, the defects existing in the BOOTROM are corrected, and then the defects of the chip system where the BOOTROM is located are repaired, thereby improving the convenience, accuracy and versatility of the BOOTROM correction. The following are detailed descriptions.
[0099] Embodiment 1
[0100] See also Figure 1 , Figure 1 1 is a flow chart of a BOOTROM correction method disclosed in an embodiment of the present invention. Figure 1The described BOOTROM correction method can be applied to chips, and can also be applied to chip application devices, including but not limited to one or more of intelligent network devices, battery devices, cloud devices, edge computing devices, relay devices, base station devices, and urban management devices, which are not limited in the embodiments of the present invention. Figure 1 As shown, the BOOTROM correction method may include the following operations:
[0101] 101. Detect the flag bit set of the chip system where the BOOTROM is located;
[0102] In an embodiment of the present invention, optionally, the above-mentioned chip includes but is not limited to CPU, MCU, SoC, FPGA, etc., and the above-mentioned flag bit set includes but is not limited to EFUSE, GPIO, etc., specifically, such as a specific bit configuration on EFUSE, one or more GPIO specific combinations or level states, etc.
[0103] 102. According to the flag bit set, determine whether the BOOTROM satisfies a preset correction condition, where the preset correction condition is used to indicate that a BOOTROM correction environment exists in the chip system;
[0104] In the embodiments of the present invention, it should be noted that the BOOTROM itself does not have a correction function, but the chip system startup process can be improved or repaired by updating or replacing the firmware therein. The above-mentioned chip system has a BOOTROM correction environment, which can specifically include the following two aspects. On the one hand, it is determined through the above-mentioned flag bit set that the BOOTROM needs to be corrected. On the other hand, there is a firmware for correcting the BOOTROM, and the firmware is ready, and based on the firmware, the BOOTROM can be corrected, thereby achieving the purpose of repairing the defects of the chip system where the BOOTROM is located.
[0105] In an embodiment of the present invention, as an optional implementation, the chip system includes multiple firmwares, each flag bit in the flag bit set has a corresponding firmware, and the firmware is used to represent software or hardware. The above-mentioned judging whether the BOOTROM meets the preset correction condition according to the flag bit set may include the following operations:
[0106] Determine whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is determined that there is a target flag bit in the flag bit set, determine the first target firmware corresponding to the target flag bit in all firmwares;
[0107] According to the first target firmware, matching and correcting the second target firmware of BOOTROM;
[0108] Obtaining status information of the second target firmware;
[0109] According to the state information, determining whether the second target firmware satisfies a preset control condition, and when it is determined that the second target firmware satisfies the preset control condition, determining that the BOOTROM satisfies a preset correction condition;
[0110] Optionally, the method may further include the following operations:
[0111] The second target firmware is determined as the target revised firmware.
[0112] In this optional embodiment, optionally, the first target firmware and the second target firmware are not specific firmware, but are a general term, and the firmware can be software or hardware.
[0113] Further optionally, the above-mentioned status information may represent at least one of the message information, thread information, task information, belonging object information, and historical usage information of the above-mentioned second target firmware.
[0114] It can be seen that the implementation of this optional embodiment can improve the matching accuracy of the second target firmware by judging whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is judged that the target flag bit exists in the flag bit set, determining the first target firmware corresponding to the target flag bit among all the firmware in the chip system, and then matching and correcting the second target firmware of the BOOTROM, judging whether the second target firmware meets the preset control condition based on the status information of the second target firmware obtained, and when the judgment result is yes, determining that the BOOTROM meets the preset correction condition, and improving the accuracy of the BOOTROM correction control.
[0115] In this optional embodiment, as an optional implementation, the above-mentioned matching and correcting the second target firmware of BOOTROM according to the first target firmware may include the following operations:
[0116] Generate a first correction strategy of BOOTROM for the first target firmware according to the first target firmware and the target flag bit;
[0117] According to the first correction strategy, a second correction strategy for BOOTROM is generated;
[0118] According to the second revision strategy, the second target firmware of the BOOTROM is matched and revised.
[0119] In this optional embodiment, it needs to be explained again that BOOTROM itself does not have a correction function, but the chip system startup process can be improved or repaired by updating or replacing the firmware therein. The above-mentioned first correction strategy can be understood as determining that BOOTROM needs to be corrected based on the above-mentioned flag bit set, which is specifically manifested in that there is a target flag bit in the flag bit set that matches the preset correction flag bit, thereby achieving the strategy of correcting the target flag bit to correspond to the first target firmware to repair the chip system; the second correction strategy is a strategy for correcting BOOTROM.
[0120] It can be seen that the implementation of this optional embodiment can generate a first correction strategy for the BOOTROM for the first target firmware by determining the first target firmware and the target flag, thereby generating a second correction strategy for the BOOTROM to match and correct the second target firmware of the BOOTROM, which can further improve the matching accuracy and scientificity of the second target firmware, and is conducive to further improving the accuracy of the BOOTROM correction control.
[0121] In this optional embodiment, as another optional implementation, the first target firmware has a corresponding preset priority value, and the above-mentioned judging whether the second target firmware satisfies the preset control condition according to the state information may include the following operations:
[0122] Analyze the call control condition of the second target firmware according to the status information, where the call control condition includes at least one of a call control time, a call control accessory, a call control environment, and a call control authority permission;
[0123] Analyzing the calling permission control period of the BOOTROM to the second target firmware according to the calling control condition;
[0124] Analyzing the modification permission control period of the first target firmware by the BOOTROM according to the preset priority value and the target flag of the first target firmware;
[0125] Determining whether the calling permission control period matches the modifying permission control period, and when it is determined that the calling permission control period matches the modifying permission control period, determining that the second target firmware satisfies the preset control condition;
[0126] In this optional embodiment, optionally, the matching of the above-mentioned calling permission control period and the above-mentioned correcting permission control period does not mean that they are equal. They can be matched in timing or interspersed with other threads, depending on the actual application scenario.
[0127] It can be seen that the implementation of this optional embodiment can analyze the calling control conditions of the second target firmware including at least one of calling control time, calling control accessories, calling control environment, and calling control authority permission according to the above-mentioned status information, thereby analyzing the calling permission control period of BOOTROM for the second target firmware based on the calling control conditions, and analyzing the modification permission control period of BOOTROM for the first target firmware according to the preset priority value and target flag of the first target firmware. When it is judged that the calling permission control period matches the modification permission control period, it is determined that the second target firmware meets the preset control conditions, which can improve the accuracy of determining that the second target firmware meets the preset control conditions and the scientific nature of the analysis, and is conducive to further improving the accuracy of BOOTROM modification control.
[0128] Optionally, the method may further include the following operations:
[0129] When it is determined that the calling permission control period does not match the modifying permission control period, it is determined that the second target firmware does not meet the preset control condition, and the control failure factor of the second target firmware is analyzed according to the calling control condition and the modifying permission control period, the control failure factor being used to indicate the reason why the calling permission control period does not match the modifying permission control period;
[0130] A repair control strategy is generated according to the control failure factor, and the repair control strategy is used to make the second target firmware meet the preset control condition.
[0131] It can be seen that the implementation of this optional embodiment can determine that the second target firmware does not meet the preset control conditions when it is judged that the call permission control period does not match the correction permission control period. At this time, the control failure factor used to represent the reason why the call permission control period and the correction permission control period of the second target firmware do not match can be analyzed based on the call control conditions and the correction permission control period, thereby generating a repair control strategy based on the control failure factor. The repair control strategy is used to make the second target firmware meet the preset control conditions, which can further improve the stability of the BOOTROM correction control and the diversity of the correction control, and is conducive to ensuring the stable operation of the chip system.
[0132] In this optional embodiment, as another optional implementation, the above-mentioned generation of a modified control strategy according to the control failure factor may include the following operations:
[0133] Determining a control failure item of the second target firmware according to the control failure factor, the control failure item being used to indicate an event in the second target firmware that causes the calling permission control period to be inconsistent with the modifying permission control period;
[0134] According to the control failure item, determining whether the second target firmware meets the preset replacement condition; when it is determined that the second target firmware meets the preset replacement condition, matching the replacement target firmware of the second target firmware that meets the preset control condition according to the control failure item and the second correction strategy, and determining the replacement target firmware as the new second target firmware;
[0135] When it is determined that the second target firmware does not meet the preset firmware replacement condition, a call correction strategy for the second target firmware is generated according to the control failure item and the call control condition;
[0136] Among them, modifying the control strategy includes replacing the target firmware or calling the modification strategy.
[0137] It can be seen that the implementation of this optional embodiment can further determine the control failure item used to indicate the matter that causes the call permission control period and the correction permission control period to not match in the second target firmware based on the control failure factor analyzed above and used to indicate the reason why the call permission control period and the correction permission control period of the second target firmware do not match, and then determine whether the second target firmware meets the preset replacement condition. When it is determined that the second target firmware meets the preset replacement condition, the replacement target firmware of the second target firmware that meets the preset control condition is matched according to the control failure item and the second correction strategy, and the replacement target firmware is determined as the new second target firmware; when it is determined that the second target firmware does not meet the preset replacement firmware condition, the call correction strategy of the second target firmware is generated according to the control failure item and the call control condition; wherein the correction control strategy includes replacing the target firmware or calling the correction strategy, that is, from the two aspects of directly coordinating the mismatch between the call permission control period and the correction permission control period and replacing the firmware, the problem that the second target firmware does not meet the preset control condition is solved, which can further improve the richness of the correction control strategy, so as to improve the stability and diversity of the BOOTROM correction control, which is conducive to ensuring the stable operation of the chip system.
[0138] In this optional embodiment, as an optional implementation, the above-mentioned control failure item is an operation item corresponding to the second target firmware, each control failure item may have a preset priority control level value, and the above-mentioned judging whether the second target firmware meets the preset replacement condition according to the control failure item may include the following operations:
[0139] Determine whether the priority control level value of the control failure item is greater than or equal to the preset priority control level threshold. When it is determined that the priority control level value of the control failure item is greater than or equal to the preset priority control level threshold, it is determined that the second target firmware meets the preset replacement condition. When it is determined that the priority control level value of the control failure item is less than the preset priority control level threshold, it is determined that the second target firmware does not meet the preset replacement condition.
[0140] It can be seen that the implementation of this optional embodiment can determine whether the second target firmware meets the preset replacement conditions by analyzing whether the priority control level value of the above-mentioned control failure item is greater than or equal to the preset priority control level threshold, thereby improving the accuracy, scientificity and globality of the generation of the correction control strategy, which is conducive to improving the stability of the BOOTROM correction control and the diversity of the correction control.
[0141] In this optional embodiment, as another optional implementation, the above-mentioned replacement target firmware matching the second target firmware that meets the preset control condition according to the control failure item and the second correction strategy may include the following operations:
[0142] According to the control failure item and the second correction strategy, matching at least one prepared replacement target firmware of the second target firmware that meets the preset control condition;
[0143] For each prepared replacement target firmware, obtaining firmware attribute information of the prepared replacement target firmware, wherein the firmware attribute information includes at least one of firmware object information, firmware historical application information, firmware task execution information, firmware size information, and firmware permitted application space information;
[0144] Analyze the replacement risk items of the prepared replacement target firmware according to the firmware attribute information, where the replacement risk items are used to indicate the security risk situation of replacing the prepared replacement target firmware with the second target firmware;
[0145] Determine whether there is a matching item that matches the replacement risk item in the preset replacement risk item set, and when it is determined that there is no matching item in the preset replacement risk item set, determine that the prepared replacement target firmware is a replacement target firmware of the second target firmware that meets the preset control condition;
[0146] When it is determined that there is a matching item in the preset replacement risk item set, determining that the prepared replacement target firmware is not a replacement target firmware of the second target firmware that satisfies the preset control condition;
[0147] When it is determined that the replacement risk items of all the prepared replacement target firmware have matching items in the preset replacement risk item set, the replacement target firmware of the second target firmware that meets the preset control condition is screened from all the prepared replacement target firmware according to all the matching items.
[0148] It can be seen that the implementation of this optional embodiment can further improve the replacement risk warning capability of the replacement target firmware when matching the replacement target firmware of the second target firmware that meets the preset control conditions, can further improve the richness of the correction control strategy, further solve the problem that the second target firmware does not meet the preset control conditions, improve the stability of the BOOTROM correction control and the diversity of the correction control, and is conducive to ensuring the stable operation of the chip system.
[0149] 103. When it is determined that the BOOTROM satisfies the preset correction condition, a target correction firmware matching the preset correction condition is loaded according to the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
[0150] In the embodiment of the present invention, optionally, the above-mentioned target correction firmware matching the preset correction condition can be loaded based on the storage medium corresponding to the BOOTROM according to the preset correction condition. Optionally, the above-mentioned storage medium can have a firmware supplement interface. Please refer to the actual application scenario for details. The embodiment of the present invention does not limit this.
[0151] It can be seen that the implementation of the embodiment of the present invention can determine whether the BOOTROM satisfies the preset correction conditions for indicating the correction environment of the BOOTROM in the chip system based on the flag bit set of the detected chip system where the BOOTROM is located, and when it is determined that the BOOTROM satisfies the above-mentioned preset correction conditions, according to the preset correction conditions, the target correction firmware matching the preset correction conditions is loaded to correct the BOOTROM, so that after the chip is taped out, the defects in the BOOTROM can be corrected without re-taping the chip, and then the defects in the chip system where the BOOTROM is located can be repaired, thereby improving the convenience, accuracy and versatility of the BOOTROM correction.
[0152] Embodiment 2
[0153] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another BOOTROM correction method disclosed in an embodiment of the present invention. Figure 2 The described BOOTROM correction method can be applied to chips, and can also be applied to chip application devices, including but not limited to one or more of intelligent network devices, battery devices, cloud devices, edge computing devices, relay devices, base station devices, and urban management devices, which are not limited in the embodiments of the present invention. Figure 2 As shown, the BOOTROM correction method may include the following operations:
[0154] 201. Detect the flag bit set of the chip system where the BOOTROM is located;
[0155] 202. According to the flag bit set, determine whether the BOOTROM satisfies a preset correction condition, where the preset correction condition is used to indicate that a BOOTROM correction environment exists in the chip system;
[0156] 203. When it is determined that the BOOTROM satisfies the preset correction condition, a target correction firmware matching the preset correction condition is loaded according to the preset correction condition, and the target correction firmware is used to correct the BOOTROM;
[0157] In the embodiment of the present invention, for the supplementary explanation of step 201 to step 203, please refer to the supplementary explanation of step 101 to step 103 in the first embodiment, and the embodiment of the present invention will not elaborate on this.
[0158] 204. Correct the firmware according to the target and match the firmware verification method, and the firmware verification method has a corresponding preset verification condition;
[0159] In an embodiment of the present invention, optionally, the above-mentioned firmware verification method includes but is not limited to one or more of the MAGIC mark in the repair program code header, CRC verification, symmetric encryption (key preset in EFUSE or CE internal key), MAC (key preset in EFUSE or CE internal key), RSA / ECC-HASH asymmetric signature verification (public key HASH preset in EFUSE).
[0160] 205. Determine whether the target correction firmware meets a preset verification condition within a preset period of time;
[0161] 206. When it is determined that the target revised firmware does not satisfy the preset verification condition within the preset period, matching the verification supplementary item of the target revised firmware according to the preset verification condition;
[0162] 207. Update the target revision firmware according to the verification supplementary item, and re-trigger the operation of step 205 until the target revision firmware meets the preset verification condition within a preset period of time.
[0163] It can be seen that the implementation of the embodiment of the present invention can match the firmware verification method according to the target correction firmware after loading the target correction firmware that matches the preset correction condition, and then when it is determined that the target correction firmware does not meet the preset verification condition corresponding to the matched firmware verification method within the preset time period, the verification supplement item of the target correction firmware is matched according to the preset verification condition, and then the target correction firmware is updated according to the verification supplement item, so that the target correction firmware meets the preset verification condition within the preset time period, which can further improve the stability of BOOTROM correction, reduce the occurrence of firmware verification failure, BOOTROM correction failure, etc., and is conducive to improving the operation stability of the chip system.
[0164] In the embodiment of the present invention, as an optional implementation, before updating the target revision firmware according to the verification supplementary item, the method may further include the following operations:
[0165] Verify the attribute information of the supplementary items;
[0166] According to the attribute information, match and verify the security risk items of the supplementary items;
[0167] Determine whether there is a target item matching the security risk item in the preset security risk items. When it is determined that there is a target item in the preset security risk items, adjust the firmware verification method according to the verification supplement item, and re-trigger the operation of determining whether the target revised firmware meets the preset verification conditions within the preset time period;
[0168] When it is determined that the target item does not exist in the preset security risk items, an operation of updating the target correction firmware according to the verification supplement item is triggered.
[0169] It can be seen that the implementation of this optional embodiment can match the security risk items of the verification supplementary items by checking the attribute information of the verification supplementary items. When it is determined that there is a target item matching the security risk item in the preset security risk items, the firmware verification method is adjusted according to the verification supplementary items, and the operation of determining whether the target revised firmware meets the preset verification conditions within the preset time period is re-triggered to improve the matching accuracy of the firmware verification method. In addition, when it is determined that the target item does not exist in the preset security risk items, the operation of updating the target revised firmware according to the verification supplementary items is triggered to be executed, which can further improve the stability of BOOTROM correction and is conducive to further improving the operating stability of the chip system.
[0170] Embodiment 3
[0171] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of a BOOTROM correction device disclosed in an embodiment of the present invention. The BOOTROM correction device can be applied to chips, and can also be applied to chip application devices. The above-mentioned application devices include but are not limited to one or more of intelligent network devices, battery devices, cloud devices, edge computing devices, relay devices, base station devices, and urban management devices, which are not limited in the embodiment of the present invention. Figure 3 As shown, the BOOTROM correction device transmission module may include:
[0172] A detection module 301 is used to detect a flag bit set of a chip system where the BOOTROM is located;
[0173] The judging module 302 is used to judge whether the BOOTROM satisfies a preset correction condition according to the flag bit set, and the preset correction condition is used to indicate that the chip system has a correction environment for the BOOTROM;
[0174] The loading module 303 is used to load the target correction firmware matching the preset correction condition according to the preset correction condition when the judging module 302 judges that the BOOTROM satisfies the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
[0175] It can be seen that the implementation of the embodiment of the present invention can determine whether the BOOTROM satisfies the preset correction conditions for indicating the correction environment of the BOOTROM in the chip system based on the flag bit set of the detected chip system where the BOOTROM is located, and when it is determined that the BOOTROM satisfies the above-mentioned preset correction conditions, according to the preset correction conditions, the target correction firmware matching the preset correction conditions is loaded to correct the BOOTROM, so that after the chip is taped out, the defects in the BOOTROM can be corrected without re-taping the chip, and then the defects in the chip system where the BOOTROM is located can be repaired, thereby improving the convenience, accuracy and versatility of the BOOTROM correction.
[0176] In the embodiment of the present invention, as an optional implementation, the chip system includes multiple firmwares, each flag bit in the flag bit set has a corresponding firmware, and the firmware is used to represent software or hardware. The specific manner in which the judgment module 302 judges whether the BOOTROM meets the preset correction condition according to the flag bit set includes:
[0177] Determine whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is determined that there is a target flag bit in the flag bit set, determine the first target firmware corresponding to the target flag bit in all firmwares;
[0178] According to the first target firmware, matching and correcting the second target firmware of BOOTROM;
[0179] Obtaining status information of the second target firmware;
[0180] According to the state information, determining whether the second target firmware satisfies a preset control condition, and when it is determined that the second target firmware satisfies the preset control condition, determining that the BOOTROM satisfies a preset correction condition;
[0181] Optional, such as Figure 4 As shown, the device may also include:
[0182] The determination module 304 is configured to determine the second target firmware as the target revised firmware.
[0183] It can be seen that the implementation of this optional embodiment can improve the matching accuracy of the second target firmware by judging whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is judged that the target flag bit exists in the flag bit set, determining the first target firmware corresponding to the target flag bit among all the firmware in the chip system, and then matching and correcting the second target firmware of the BOOTROM, judging whether the second target firmware meets the preset control condition based on the status information of the second target firmware obtained, and when the judgment result is yes, determining that the BOOTROM meets the preset correction condition, and improving the accuracy of the BOOTROM correction control.
[0184] In this optional embodiment, as an optional implementation, the specific manner in which the above-mentioned determination module 302 matches and corrects the second target firmware of the BOOTROM according to the first target firmware includes:
[0185] Generate a first correction strategy of BOOTROM for the first target firmware according to the first target firmware and the target flag bit;
[0186] According to the first correction strategy, a second correction strategy for BOOTROM is generated;
[0187] According to the second revision strategy, the second target firmware of the BOOTROM is matched and revised.
[0188] It can be seen that the implementation of this optional embodiment can generate a first correction strategy for the BOOTROM for the first target firmware by determining the first target firmware and the target flag, thereby generating a second correction strategy for the BOOTROM to match and correct the second target firmware of the BOOTROM, which can further improve the matching accuracy and scientificity of the second target firmware, and is conducive to further improving the accuracy of the BOOTROM correction control.
[0189] In this optional embodiment, as another optional implementation, the first target firmware has a corresponding preset priority value, and the specific manner in which the judgment module 302 judges whether the second target firmware meets the preset control condition according to the state information includes:
[0190] Analyze the call control condition of the second target firmware according to the status information, where the call control condition includes at least one of a call control time, a call control accessory, a call control environment, and a call control authority permission;
[0191] Analyzing the calling permission control period of the BOOTROM to the second target firmware according to the calling control condition;
[0192] Analyzing the modification permission control period of the first target firmware by the BOOTROM according to the preset priority value and the target flag of the first target firmware;
[0193] Determining whether the calling permission control period matches the modifying permission control period, and when it is determined that the calling permission control period matches the modifying permission control period, determining that the second target firmware satisfies the preset control condition;
[0194] It can be seen that the implementation of this optional embodiment can analyze the calling control conditions of the second target firmware including at least one of calling control time, calling control accessories, calling control environment, and calling control authority permission according to the above-mentioned status information, thereby analyzing the calling permission control period of BOOTROM for the second target firmware based on the calling control conditions, and analyzing the modification permission control period of BOOTROM for the first target firmware according to the preset priority value and target flag of the first target firmware. When it is judged that the calling permission control period matches the modification permission control period, it is determined that the second target firmware meets the preset control conditions, which can improve the accuracy of determining that the second target firmware meets the preset control conditions and the scientific nature of the analysis, and is conducive to further improving the accuracy of BOOTROM modification control.
[0195] Optionally, the determination module 304 is further configured to determine that the second target firmware does not meet the preset control condition when the determination module 302 determines that the calling permission control period does not match the modifying permission control period;
[0196] Optional, such as Figure 4 As shown, the device may also include:
[0197] An analysis module 305 is used to analyze a control failure factor of the second target firmware according to the call control condition and the modified permission control period, wherein the control failure factor is used to indicate the reason why the call permission control period does not match the modified permission control period;
[0198] The generating module 306 is used to generate a repair control strategy according to the control failure factor, where the repair control strategy is used to make the second target firmware meet the preset control condition.
[0199] It can be seen that the implementation of this optional embodiment can determine that the second target firmware does not meet the preset control conditions when it is judged that the call permission control period does not match the correction permission control period. At this time, the control failure factor used to represent the reason why the call permission control period and the correction permission control period of the second target firmware do not match can be analyzed based on the call control conditions and the correction permission control period, thereby generating a repair control strategy based on the control failure factor. The repair control strategy is used to make the second target firmware meet the preset control conditions, which can further improve the stability of the BOOTROM correction control and the diversity of the correction control, and is conducive to ensuring the stable operation of the chip system.
[0200] In this optional embodiment, as an optional implementation, the specific manner in which the above-mentioned generation module 306 generates the modified control strategy according to the control failure factor includes:
[0201] Determining a control failure item of the second target firmware according to the control failure factor, the control failure item being used to indicate an event in the second target firmware that causes the calling permission control period to be inconsistent with the modifying permission control period;
[0202] According to the control failure item, determining whether the second target firmware meets the preset replacement condition; when it is determined that the second target firmware meets the preset replacement condition, matching the replacement target firmware of the second target firmware that meets the preset control condition according to the control failure item and the second correction strategy, and determining the replacement target firmware as the new second target firmware;
[0203] When it is determined that the second target firmware does not meet the preset firmware replacement condition, a call correction strategy for the second target firmware is generated according to the control failure item and the call control condition;
[0204] Among them, modifying the control strategy includes replacing the target firmware or calling the modification strategy.
[0205] It can be seen that the implementation of this optional embodiment can further determine the control failure item used to indicate the matter that causes the call permission control period and the correction permission control period to not match in the second target firmware based on the control failure factor analyzed above and used to indicate the reason why the call permission control period and the correction permission control period of the second target firmware do not match, and then determine whether the second target firmware meets the preset replacement condition. When it is determined that the second target firmware meets the preset replacement condition, the replacement target firmware of the second target firmware that meets the preset control condition is matched according to the control failure item and the second correction strategy, and the replacement target firmware is determined as the new second target firmware; when it is determined that the second target firmware does not meet the preset replacement firmware condition, the call correction strategy of the second target firmware is generated according to the control failure item and the call control condition; wherein the correction control strategy includes replacing the target firmware or calling the correction strategy, that is, from the two aspects of directly coordinating the mismatch between the call permission control period and the correction permission control period and replacing the firmware, the problem that the second target firmware does not meet the preset control condition is solved, which can further improve the richness of the correction control strategy, so as to improve the stability and diversity of the BOOTROM correction control, which is conducive to ensuring the stable operation of the chip system.
[0206] In an optional embodiment, optionally, as Figure 4 As shown, the device may also include:
[0207] The matching module 307 is used to match the firmware verification mode according to the target correction firmware after the loading module 303 loads the target correction firmware matching the preset correction condition according to the preset correction condition, and the firmware verification mode has the corresponding preset verification condition;
[0208] The judgment module 302 is also used to judge whether the target correction firmware meets the preset verification condition within a preset period of time;
[0209] The matching module 307 is further configured to match the verification supplementary item of the target revised firmware according to the preset verification condition when the judging module judges that the target revised firmware does not meet the preset verification condition within the preset period of time;
[0210] The updating module 308 is used to update the target revision firmware according to the verification supplementary items, and to re-trigger the operation of determining whether the target revision firmware satisfies the preset verification condition within a preset period of time executed by the determining module 302, until the target revision firmware satisfies the preset verification condition within the preset period of time.
[0211] It can be seen that the implementation of the embodiment of the present invention can match the firmware verification method according to the target correction firmware after loading the target correction firmware that matches the preset correction condition, and then when it is determined that the target correction firmware does not meet the preset verification condition corresponding to the matched firmware verification method within the preset time period, the verification supplement item of the target correction firmware is matched according to the preset verification condition, and then the target correction firmware is updated according to the verification supplement item, so that the target correction firmware meets the preset verification condition within the preset time period, which can further improve the stability of BOOTROM correction, reduce the occurrence of firmware verification failure, BOOTROM correction failure, etc., and is conducive to improving the operation stability of the chip system.
[0212] In this optional embodiment, as an optional implementation, Figure 4 As shown, the device may also include:
[0213] The checking module 309 is used to check the attribute information of the verification supplementary item before the updating module 308 updates the target revised firmware according to the verification supplementary item;
[0214] The matching module 307 is further used to match and verify the security risk items of the supplementary items according to the attribute information;
[0215] The judgment module 302 is also used to judge whether there is a target item matching the security risk item in the preset security risk items;
[0216] The adjustment module 310 is used to adjust the firmware verification method according to the verification supplement item when the judgment module 302 determines that there is a target item in the preset security risk items, and re-trigger the operation of the judgment module 302 to determine whether the target revised firmware meets the preset verification condition within the preset time period;
[0217] When the determination module 302 determines that the target item does not exist in the preset security risk items, the update module 308 is triggered to perform an operation of updating the target revised firmware according to the verification supplement item.
[0218] It can be seen that the implementation of this optional embodiment can match the security risk items of the verification supplementary items by checking the attribute information of the verification supplementary items. When it is determined that there is a target item matching the security risk item in the preset security risk items, the firmware verification method is adjusted according to the verification supplementary items, and the operation of determining whether the target revised firmware meets the preset verification conditions within the preset time period is re-triggered to improve the matching accuracy of the firmware verification method. In addition, when it is determined that the target item does not exist in the preset security risk items, the operation of updating the target revised firmware according to the verification supplementary items is triggered to be executed, which can further improve the stability of BOOTROM correction and is conducive to further improving the operating stability of the chip system.
[0219] Embodiment 4
[0220] See also Figure 5 , Figure 5 It is a structural diagram of another BOOTROM correction device disclosed in an embodiment of the present invention. The BOOTROM correction device can be applied to chips, and can also be applied to chip application devices. The above-mentioned application devices include but are not limited to one or more of intelligent network devices, battery devices, cloud devices, edge computing devices, relay devices, base station devices, and urban management devices, which are not limited in the embodiment of the present invention. Figure 5 As shown, the BOOTROM correction device may include:
[0221] The memory 401 stores executable program codes.
[0222] A processor 402 is coupled to the memory 401 .
[0223] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the BOOTROM correction method described in the first embodiment of the present invention or the second embodiment of the present invention.
[0224] Embodiment 5
[0225] The embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the BOOTROM correction method described in the first embodiment or the second embodiment of the present invention.
[0226] Embodiment 6
[0227] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the BOOTROM correction method described in the first or second embodiment.
[0228] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0229] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0230] Finally, it should be noted that the BOOTROM correction method and device disclosed in the embodiment of the present invention discloses only the preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A BOOTROM correction method, characterized in that: The method comprises: Detect the flag bit set of the chip system where the BOOTROM is located; According to the flag bit set, determining whether the BOOTROM satisfies a preset correction condition, wherein the preset correction condition is used to indicate that the chip system has a correction environment for the BOOTROM; When it is determined that the BOOTROM satisfies the preset correction condition, a target correction firmware matching the preset correction condition is loaded according to the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
2. The BOOTROM correction method according to claim 1, characterized in that: The chip system includes a plurality of firmwares, each flag bit in the flag bit set has a corresponding firmware, the firmware is used to represent software or hardware, and judging whether the BOOTROM satisfies a preset correction condition according to the flag bit set includes: Determine whether there is a target flag bit matching the preset correction flag bit in the flag bit set, and when it is determined that the target flag bit exists in the flag bit set, determine a first target firmware corresponding to the target flag bit in all the firmwares; According to the first target firmware, matching and correcting the second target firmware of the BOOTROM; Acquire status information of the second target firmware; According to the state information, determining whether the second target firmware satisfies a preset control condition, and when it is determined that the second target firmware satisfies the preset control condition, determining that the BOOTROM satisfies a preset correction condition; And, the method further comprises: The second target firmware is determined as the target revised firmware.
3. The BOOTROM correction method according to claim 2, characterized in that: The step of matching and correcting the second target firmware of the BOOTROM according to the first target firmware includes: generating, according to the first target firmware and the target flag bit, a first correction strategy of the BOOTROM for the first target firmware; generating a second correction strategy for the BOOTROM according to the first correction strategy; According to the second revision strategy, the second target firmware of the BOOTROM is matched and revised.
4. The BOOTROM correction method according to claim 3, characterized in that: The first target firmware has a corresponding preset priority value, and judging whether the second target firmware satisfies a preset control condition according to the state information includes: Analyzing the call control condition of the second target firmware according to the state information, the call control condition including at least one of call control time, call control accessories, call control environment, and call control authority permission; According to the call control condition, analyzing the call permission control period of the BOOTROM to the second target firmware; Analyzing the modification permission control period of the first target firmware by the BOOTROM according to the preset priority value and the target flag of the first target firmware; determining whether the calling permission control period matches the modifying permission control period, and when it is determined that the calling permission control period matches the modifying permission control period, determining that the second target firmware satisfies a preset control condition; And, the method further comprises: When it is determined that the calling permission control period does not match the modifying permission control period, it is determined that the second target firmware does not meet the preset control condition, and a control failure factor of the second target firmware is analyzed according to the calling control condition and the modifying permission control period, wherein the control failure factor is used to indicate the reason why the calling permission control period does not match the modifying permission control period; A repair control strategy is generated according to the control failure factor, where the repair control strategy is used to make the second target firmware meet the preset control condition.
5. The BOOTROM correction method according to claim 4, characterized in that: The step of generating a modified control strategy according to the control failure factor comprises: determining a control failure item of the second target firmware according to the control failure factor, the control failure item being used to indicate an event in the second target firmware that causes the calling permission control period to be inconsistent with the modifying permission control period; According to the control failure item, determining whether the second target firmware satisfies a preset replacement condition; when it is determined that the second target firmware satisfies the preset replacement condition, matching a replacement target firmware of the second target firmware that satisfies the preset control condition according to the control failure item and the second correction strategy, and determining the replacement target firmware as the new second target firmware; When it is determined that the second target firmware does not meet the preset firmware replacement condition, generating a call correction strategy for the second target firmware according to the control failure item and the call control condition; Wherein, the correction control strategy includes the replacement target firmware or the calling correction strategy.
6. The BOOTROM correction method according to any one of claims 1 to 5, characterized in that: After loading the target correction firmware matching the preset correction condition according to the preset correction condition, the method further includes: Correcting the firmware according to the target, matching the firmware verification method, the firmware verification method having a corresponding preset verification condition; Determine whether the target revised firmware satisfies the preset verification condition within a preset period of time; when it is determined that the target revised firmware does not satisfy the preset verification condition within the preset period of time, match the verification supplement item of the target revised firmware according to the preset verification condition, update the target revised firmware according to the verification supplement item, and re-trigger the execution of the operation of determining whether the target revised firmware satisfies the preset verification condition within the preset period of time until the target revised firmware satisfies the preset verification condition within the preset period of time.
7. The BOOTROM correction method according to claim 6, characterized in that: Before updating the target revision firmware according to the verification supplement item, the method further includes: Checking the attribute information of the verification supplementary item; According to the attribute information, matching the security risk items of the verification supplementary items; Determine whether there is a target item matching the security risk item in the preset security risk items, and when it is determined that the target item exists in the preset security risk items, adjust the firmware verification method according to the verification supplement item, and re-trigger the operation of determining whether the target revised firmware meets the preset verification condition within a preset period of time; When it is determined that the target item does not exist in the preset security risk items, the operation of updating the target correction firmware according to the verification supplement item is triggered.
8. A BOOTROM correction device, characterized in that: The device comprises: A detection module is used to detect the flag bit set of the chip system where the BOOTROM is located; A judgment module, used for judging whether the BOOTROM satisfies a preset correction condition according to the flag bit set, wherein the preset correction condition is used for indicating that the chip system has a correction environment for the BOOTROM; The loading module is used to load the target correction firmware matching the preset correction condition according to the preset correction condition when the judging module judges that the BOOTROM satisfies the preset correction condition, and the target correction firmware is used to correct the BOOTROM.
9. A BOOTROM correction device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the BOOTROM correction method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the BOOTROM correction method according to any one of claims 1 to 7.
Citation Information
Cited By
Dynamic repair method of DSP BootROM in optical module, DSP chip and optical module
CN120872678A
A dynamic repair method of a DSP BootROM in an optical module, a DSP chip and an optical module
CN120872678B
Chip BootROM repairing method and chip
CN120874066A
Chip bootrom patching method and chip
CN120874066B