Search

CN-119987881-B - Chip starting method, device, equipment and medium

CN119987881BCN 119987881 BCN119987881 BCN 119987881BCN-119987881-B

Abstract

The application discloses a chip starting method, a device, equipment and a medium, which relate to the technical field of computers and comprise the steps of updating starting parameters in target storage areas of all chip media after chip firmware is updated, wherein the starting parameters in the target storage areas represent designated starting states of the corresponding chip media, the designated starting states represent whether the corresponding chip media are started, reading the starting parameters in the target storage areas of all the chip media after the chip is powered on again, so that corresponding chip media are selected from all the chip media to serve as starting media based on the read starting parameters, reading new firmware programs obtained after the chip firmware is updated from the starting media, and executing the new firmware programs to realize chip starting. The application avoids the condition that a certain chip medium is idle for a long time, improves the utilization rate of the chip medium, simplifies the design of the chip and an external circuit, and reduces the design complexity and the cost.

Inventors

  • ZHUANG XUKUN

Assignees

  • 山东云海国创云计算装备产业创新中心有限公司

Dates

Publication Date
20260508
Application Date
20250221

Claims (9)

  1. 1. A method for starting a chip, comprising: Updating starting parameters in target storage areas of all chip media after upgrading chip firmware, wherein the starting parameters in the target storage areas represent specified starting states of the corresponding chip media, and the specified starting states represent whether the corresponding chip media are started or not; After the chip is powered on again, reading the starting parameters in the target storage areas of all the chip media so as to select the corresponding chip media from all the chip media as starting media based on the read starting parameters, and reading new firmware programs obtained after chip firmware upgrading from the starting media; executing the new firmware program to realize chip starting; The chip starting method further comprises the following steps: determining a medium type by reading the level state of a first chip pin, and determining a redundancy mode by reading the level state of a second chip pin, wherein all the chip media are determined to be a first chip medium and a second chip medium based on the redundancy mode; Correspondingly, updating the starting parameters in the target storage areas of all the chip media, reading the starting parameters in the target storage areas of all the chip media so as to select the corresponding chip media from all the chip media as the starting media based on the read starting parameters, and comprising the following steps: Updating the starting parameters in the target storage areas of the first chip medium and the second chip medium, and reading the starting parameters in the target storage areas of the first chip medium and the second chip medium so as to select the corresponding chip medium from the first chip medium and the second chip medium as a starting medium based on the read starting parameters; Correspondingly, the executing the new firmware program to realize the chip start includes: And migrating a first firmware program in the new firmware program to a static random access memory, judging whether the first firmware program is safe and reliable, if so, executing the first firmware program, migrating a second firmware program in the new firmware program to the static random access memory, and then executing the second firmware program to realize the starting of a chip.
  2. 2. The chip starting method according to claim 1, further comprising: If the redundancy mode is dual-medium redundancy, determining a first storage area of the first chip medium as the target storage area of the first chip medium, and determining the first storage area of the second chip medium as the target storage area of the second chip medium; And if the redundancy mode is double-partition redundancy, determining the first storage area of the first chip medium as the target storage area of the first chip medium, and determining the second storage area of the second chip medium as the target storage area of the second chip medium.
  3. 3. The method of claim 1, wherein after executing the new firmware program to implement the chip start-up, further comprising: Judging whether the chip is started successfully or not; If the chip is started successfully, copying the new firmware program to other chip media except the starting media so as to realize the backup of the new firmware program.
  4. 4. The method of claim 1, wherein after executing the new firmware program to implement the chip start-up, further comprising: Triggering and starting a duration timing operation; If the chip is started successfully, closing the timing operation of the starting duration; if the chip is failed to start, when the starting time is longer than a preset time threshold, reading the new firmware program obtained after the chip firmware is upgraded from the chip medium except the starting medium, and executing the new firmware program to realize the chip starting.
  5. 5. The method for starting a chip according to claim 4, wherein the reading the new firmware program obtained after the chip firmware upgrade from the chip medium other than the starting medium, and executing the new firmware program, to realize the chip starting, further comprises: if the chip is started to fail, jumping to the step of reading the new firmware program obtained after the chip firmware is updated from the starting medium until the chip is started successfully or the jumping times meet the preset threshold.
  6. 6. The chip start-up method according to any one of claims 1 to 5, further comprising, after updating start-up parameters in the target storage areas of all chip media: checking the integrity and the safety of the updated starting parameters; And if the verification is passed, triggering the historical starting parameter erasing operation in the target storage area.
  7. 7. A chip starting device, characterized by comprising: The system comprises a starting parameter updating module, a starting parameter updating module and a starting parameter updating module, wherein the starting parameter updating module is used for updating starting parameters in target storage areas of all chip media after chip firmware is updated, the starting parameters in the target storage areas represent the corresponding appointed starting states of the chip media, and the appointed starting states represent whether the starting is carried out from the corresponding chip media or not; the starting medium selection module is used for reading the starting parameters in the target storage areas of all the chip mediums after the chips are powered on again, so that the corresponding chip mediums are selected from all the chip mediums to serve as starting mediums based on the read starting parameters, and new firmware programs obtained after chip firmware upgrading are read from the starting mediums; The chip starting module is used for executing the new firmware program to realize chip starting; wherein, the chip starting device is further used for: determining a medium type by reading the level state of a first chip pin, and determining a redundancy mode by reading the level state of a second chip pin, wherein all the chip media are determined to be a first chip medium and a second chip medium based on the redundancy mode; Correspondingly, updating the starting parameters in the target storage areas of all the chip media, reading the starting parameters in the target storage areas of all the chip media so as to select the corresponding chip media from all the chip media as the starting media based on the read starting parameters, and comprising the following steps: Updating the starting parameters in the target storage areas of the first chip medium and the second chip medium, and reading the starting parameters in the target storage areas of the first chip medium and the second chip medium so as to select the corresponding chip medium from the first chip medium and the second chip medium as a starting medium based on the read starting parameters; Correspondingly, the executing the new firmware program to realize the chip start includes: And migrating a first firmware program in the new firmware program to a static random access memory, judging whether the first firmware program is safe and reliable, if so, executing the first firmware program, migrating a second firmware program in the new firmware program to the static random access memory, and then executing the second firmware program to realize the starting of a chip.
  8. 8. An electronic device, comprising: A memory for storing a computer program; a processor for executing the computer program to implement the chip start-up method according to any one of claims 1 to 6.
  9. 9. A computer-readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the chip start-up method according to any one of claims 1 to 6.

Description

Chip starting method, device, equipment and medium Technical Field The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for starting a chip. Background In the field of chip technology, chip firmware is typically stored in erasable read-only memory (ELECTRICALLY ERASABLE PROGRAMMABLE ROM, EEPROM) or FLASH (FLASH) chips. In order to ensure the stable operation of the chip, a user can write a new firmware program into the EEPROM or FLASH chip by means of a specific refreshing program, so that the firmware upgrading is completed. In order to prevent the chip from being unable to start due to damage of a certain storage medium, the chip usually adopts a dual Flash or dual EEPROM mode to make redundancy backup for the firmware. In the conventional technology, when the chip firmware is updated, new firmware programs need to be written into two Flash or EEPROM. In addition, since most chips are designed to be simplified, they are usually started from a certain Flash or EEPROM, and the starting medium cannot be flexibly specified, which makes another storage medium in an idle state for a long time. Although some chips can be started from a designated medium by means of external pins, in this way, not only is the chip required to draw out additional pins to indicate the starting medium, but also an external circuit is required to record the firmware upgrade state of the chip and input the firmware upgrade state to the chip through the pins, which clearly increases the design complexity and cost of the chip and the external circuit. For this reason, the above technical problems are to be solved by those skilled in the art. Disclosure of Invention In view of the above, the present application aims to provide a method, a device and a medium for starting a chip, which avoid the long-term idle condition of a certain chip medium, improve the utilization rate of the chip medium, simplify the design of the chip and an external circuit, and reduce the design complexity and cost, and the specific scheme is as follows: in a first aspect, the application discloses a chip starting method, which comprises the following steps: Updating starting parameters in target storage areas of all chip media after the chip firmware is updated, wherein the starting parameters in the target storage areas represent the appointed starting states of the corresponding chip media, and the appointed starting states represent whether the corresponding chip media are started or not; after the chip is electrified again, the starting parameters in the target storage areas of all the chip media are read, so that corresponding chip media are selected from all the chip media to serve as starting media based on the read starting parameters, and new firmware programs obtained after the chip firmware is updated are read from the starting media; Executing the new firmware program to realize the chip start. Optionally, the method for starting the chip firmware further comprises: Determining a medium type by reading the level state of a first chip pin, determining a redundancy mode by reading the level state of a second chip pin, and determining all chip media as a first chip medium and a second chip medium based on the redundancy mode, wherein the redundancy mode comprises dual-medium redundancy or dual-partition redundancy; Correspondingly, updating the starting parameters in the target storage areas of all the chip media, reading the starting parameters in the target storage areas of all the chip media so as to select the corresponding chip media from all the chip media as the starting media based on the read starting parameters, and comprising the following steps: Updating the starting parameters in the target storage areas of the first chip medium and the second chip medium, and reading the starting parameters in the target storage areas of the first chip medium and the second chip medium so as to select the corresponding chip medium from the first chip medium and the second chip medium as the starting medium based on the read starting parameters; correspondingly, executing the new firmware program to realize the chip start-up comprises: And migrating a first firmware program in the new firmware program to the static random access memory, judging whether the first firmware program is safe and reliable, if so, executing the first firmware program, migrating a second firmware program in the new firmware program to the static random access memory, and then executing the second firmware program to realize the starting of the chip. Optionally, the method for starting the chip firmware further comprises: If the redundancy mode is dual-medium redundancy, determining a first storage area of the first chip medium as a target storage area of the first chip medium, and determining a first storage area of the second chip medium as a target storage area of the second chip medium; If the r