Search

CN-121579049-B - Method and system for upgrading batch firmware of hard disk based on MCTP over SMBus

CN121579049BCN 121579049 BCN121579049 BCN 121579049BCN-121579049-B

Abstract

The invention discloses a method and a system for upgrading batch firmware of hard disks based on MCTP over SMBus, and belongs to the technical field of computer hardware management. The method comprises the steps of firstly carrying out security verification on a firmware image and completing identity authentication with a hard disk to be upgraded, then dividing the image into data packets with unique identification for broadcast transmission, switching a unicast mode query state after sending preset data units, establishing a global state table, carrying out targeted broadcast retransmission on missing data packets according to information in the table and confirming, and finally instructing the hard disk to carry out parallel verification on the image and then uniformly activating new firmware. The scheme integrates the advantages of broadcasting and unicasting, improves batch upgrading efficiency, ensures transmission integrity and upgrading reliability, strengthens safety and manageability, adapts to the existing standard protocol and hardware interface, and has strong practicability.

Inventors

  • ZHOU LINSHEN

Assignees

  • 华鲲振宇智能科技国际有限公司
  • 四川华鲲振宇智能科技有限责任公司

Dates

Publication Date
20260508
Application Date
20260126

Claims (7)

  1. 1. The hard disk batch firmware upgrading method based on MCTP over SMBus is characterized by comprising the following steps of: S1, acquiring a firmware image file and executing security check operation, and respectively completing identity handshake authentication with each hard disk to be upgraded in a unicast mode; S2, dividing the firmware mirror image data passing the verification into a plurality of data packets, and sequentially transmitting the data packets to all hard disks to be upgraded in a broadcasting mode through the public slave address of the SMBus; s3, after the preset data units are sent, switching to a unicast mode to inquire the receiving state of each hard disk to be upgraded one by one, receiving response information fed back by the hard disk, and establishing a global state table to record the relevant state of each hard disk; s4, identifying the hard disk with abnormal reception and the corresponding missing data packet according to the global state table, and after the missing data packet is retransmitted in a targeted mode through a broadcast mode, confirming the reception state again in a unicast mode; s5, after the transmission of all the data packets is completed, sending verification instructions to all the hard disks to enable the hard disks to verify firmware images in parallel, and after verification is passed, sending broadcast instructions to coordinate all the hard disks to uniformly activate new firmware; Wherein, step S1 includes: s1.1, carrying out decryption processing and digital signature verification on an obtained firmware image file, and confirming that the source of the firmware image file is legal and is not tampered; S1.2, sending an identity authentication request to each hard disk to be upgraded in a unicast mode through an MCTP over SMBus protocol, receiving identity information fed back by each hard disk to be upgraded and finishing bidirectional authentication; Wherein, step S3 includes: S3.1, switching the SMBus controller to a unicast mode after the preset data unit is sent to be a data packet sequence or a complete data block; s3.2, accessing the exclusive addresses of the hard disks to be upgraded one by one according to a preset sequence, and sending a state query instruction; S3.3, receiving confirmation response, retransmission request or error state information fed back by each hard disk to be upgraded, and recording the upgrading progress, receiving state and abnormal identification of each hard disk to be upgraded in a global state table; Wherein, step S4 includes: S4.1, traversing a global state table, screening out a hard disk to be upgraded, which is not responded by a feedback retransmission request or overtime, and extracting a missing data packet identifier corresponding to the hard disk to be upgraded; s4.2, switching the SMBus controller to a broadcasting mode, firstly sending a retransmission notification instruction, and then sending the missing data packet in a targeted broadcasting way; And S4.3, switching to a unicast mode after retransmission is finished, carrying out state inquiry again only on the hard disk to be upgraded with abnormal reception, updating the global state table, and circularly executing until feedback reception of all the hard disks to be upgraded is successful.
  2. 2. The method according to claim 1, wherein step S2 comprises: S2.1, dividing firmware mirror image data into a plurality of independent data packets with equal length according to the data packet length limitation of an SMBus transmission protocol, and distributing unique identifiers for each data packet; s2.2, switching the SMBus controller of the baseboard management controller to a broadcasting mode, aiming at a public slave address to sequentially broadcast and send each data packet, and enabling all hard disks to be upgraded to synchronously receive the firmware data stream.
  3. 3. The method according to claim 1, wherein in step S1.1, the decryption process of the firmware image file uses an asymmetric encryption algorithm, and the digital signature verification is implemented by comparing preset legal signature information with signature information attached to the image file.
  4. 4. The method according to claim 1, characterized in that in step S2.1, the unique identification assigned to each data packet is generated in association with the content of the data packet, the identification information comprising the sequence number and the data range characteristics of the data packet.
  5. 5. The method according to claim 1, wherein in step S4, when the missing data packet is retransmitted in a targeted manner, the broadcasted retransmission notification command includes a unique identifier of the missing data packet, and the hard disk to be upgraded determines whether to receive the data packet to be retransmitted later according to the identifier.
  6. 6. The method according to claim 1, wherein in step S5, when each hard disk to be upgraded verifies the firmware image in parallel, the integrity of the image data and the compatibility with its own hardware are verified according to a preset verification rule, and the verification result is fed back to the baseboard management controller through an MCTP over SMBus protocol.
  7. 7. A hard disk batch firmware upgrade system implementing the method of any of claims 1-6, comprising a baseboard management controller module, a plurality of hard disk devices, and an SMBus network; The SMBus network is used for connecting a baseboard management controller module and all hard disk devices, the baseboard management controller module comprises a protocol processing unit, a broadcast/unicast control unit, a state management unit and a security authentication unit, the protocol processing unit is used for packaging and unpacking MCTP/PLDM messages, the broadcast/unicast control unit is used for switching communication modes of the SMBus, the state management unit is used for maintaining a global state table, the security authentication unit is used for firmware mirror verification and device identity authentication, and the hard disk devices support the MCTP over SMBus protocol and comprise firmware storage areas and receiving caches.

Description

Method and system for upgrading batch firmware of hard disk based on MCTP over SMBus Technical Field The invention relates to the technical field of computer hardware management, in particular to a method and a system for upgrading batch firmware of hard disks based on MCTP over SMBus. Background Under the current digital transformation acceleration, an enterprise server and a data center become core infrastructures for supporting various business operations, the carried data volume of the enterprise server and the data center is increased in a explosive manner, and the corresponding hard disk deployment scale is also continuously enlarged. The hard disk is used as a core carrier of data storage, and the firmware is used as a bottom layer running program to directly influence the read-write performance, the data security and the compatibility with a system of the equipment, so that the consistency and the latest state of the firmware version are maintained, the firmware is a key link for guaranteeing the stable running of the whole IT system, and the firmware upgrading also becomes an important component part of daily operation and maintenance work of a data center. Currently, various technical frameworks related to firmware upgrade have been formed in the industry, and MCTP (management component transfer protocol) over SMBus (system management bus) has become a mainstream scheme for out-of-band communication between a Baseboard Management Controller (BMC) and an external device such as a hard disk by means of standardized communication specifications, low power consumption and good compatibility, so that reliable underlying protocol support is provided for batch upgrade. In the aspect of data transmission, two modes of broadcast transmission and unicast transmission are commonly adopted in the prior art, the broadcast transmission can simultaneously transmit data to a plurality of devices through a public slave address of an SMBus, the unicast transmission can realize point-to-point accurate communication between a master control end and a single device, and the two modes have application scenes, so that basic technical support is provided for firmware upgrading. However, the existing hard disk batch firmware upgrading technology still faces a plurality of key problems to be solved in practical application, and the problems directly affect the upgrading effect. From the balance of transmission efficiency and reliability, when broadcast transmission is simply relied on, a main control end adopts a mechanism of no matter after transmission, the data packet receiving state of each target hard disk can not be obtained, whether the data is completely received and correctly processed can not be confirmed, any hard disk receiving failure can cause incomplete upgrading and seriously affect the reliability, and when unicast transmission is simply adopted, complete firmware data is required to be transmitted to each hard disk one by one, a large number of repeated transmission exists, the bus load is too high, the upgrading efficiency is low, and the large-scale deployment scene is difficult to adapt. From the aspect of flow control, the existing scheme lacks a centralized state management mechanism, cannot track the upgrading progress of each hard disk in real time, is difficult to accurately locate equipment for receiving the abnormality and corresponding missing data, cannot conduct targeted processing after the abnormality occurs, and is chaotic in upgrading process and difficult to control. From the aspect of upgrading ending links, in the prior art, firmware verification and activation of each hard disk lack of a cooperative mechanism, the verification process is scattered and time-consuming, the activation operation is asynchronous, and part of equipment is activated in advance to possibly cause the problem of system compatibility and influence service continuity. These problems are interleaved, resulting in the difficulty of the prior art in meeting the requirements of large-scale hard disk firmware upgrades for efficiency, reliability, controllability and business continuity at the same time. Disclosure of Invention The invention aims to overcome the defects of the prior art and provides a method and a system for upgrading batch firmware of hard disks based on MCTP over SMBus. The aim of the invention is realized by the following technical scheme: the method for upgrading the hard disk batch firmware based on the MCTP over SMBus comprises the following steps: S1, acquiring a firmware image file and executing security check operation, and respectively completing identity handshake authentication with each hard disk to be upgraded in a unicast mode; S2, dividing the firmware mirror image data passing the verification into a plurality of data packets, and sequentially transmitting the data packets to all hard disks to be upgraded in a broadcasting mode through the public slave address of the SMBus; s3, after t