WO2015051647A1 - 一种固件的升级方法和系统、上位机和光模块 - Google Patents

一种固件的升级方法和系统、上位机和光模块 Download PDF

Info

Publication number
WO2015051647A1
WO2015051647A1 PCT/CN2014/080222 CN2014080222W WO2015051647A1 WO 2015051647 A1 WO2015051647 A1 WO 2015051647A1 CN 2014080222 W CN2014080222 W CN 2014080222W WO 2015051647 A1 WO2015051647 A1 WO 2015051647A1
Authority
WO
WIPO (PCT)
Prior art keywords
firmware
optical module
type
upgrade
firmware upgrade
Prior art date
Application number
PCT/CN2014/080222
Other languages
English (en)
French (fr)
Inventor
朱亚敏
刘世兴
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP14852023.2A priority Critical patent/EP3043512B1/en
Publication of WO2015051647A1 publication Critical patent/WO2015051647A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Definitions

  • the present invention relates to the field of remote online upgrade technologies, and in particular, to a firmware upgrade method and system, a host computer, and an optical module. Background technique
  • MDIO Management Data Input/Output
  • MSA Multi Source Agreement
  • Figure 1 is a timing diagram of online upgrade of software in the prior art.
  • the online upgrade process of the software image specified by MDIO MSA is as follows:
  • the software image is divided into several data blocks by the host computer, and each data block should include a data portion and a Cyclic Redundancy Checks (CRC) checksum; the host computer sends a request for downloading the image to the optical module.
  • CRC Cyclic Redundancy Checks
  • the software upgrade process is initiated, the optical module accepts the request, and sets the "upgrade data block preparation" flag. Once any error occurs during the current data block receiving process, the optical module notifies the upper computer, and the upper computer retransmits the data block; The data block has multiple CRC check errors, and the host computer forcibly terminates the upgrade process.
  • the host computer sends a download completion command to end the transfer process; the optical module confirms that the complete image has been successfully downloaded by successfully completing the status command.
  • Errors during the download are fed back by setting the error status register.
  • the host computer sends a download image request, and the optical module will test the downloaded software image. After the trial run is successful, the host computer issues the image default version (commit) command.
  • the registers defined by the MSA used in the above software upgrade process are shown in Table 1 below:
  • the MDIO upgrade preparation time gives a maximum value that can be waited.
  • the value is 5
  • An embodiment of the present invention provides a firmware upgrade method, where a firmware upgrade is configured in an optical module.
  • a type identifier register where the firmware upgrade type identifier register holds a firmware type identifier that the optical module supports upgrade, and the method includes:
  • the determining, by the firmware upgrade status register of the optical module, whether the optical module supports the firmware type to be upgraded includes:
  • performing the corresponding type of firmware upgrade processing on the optical module includes: sending a download instruction to the optical module, and transmitting image data of the firmware to be upgraded; after the image data is successfully transmitted, the light is The module sends a trial run new firmware command, instructing the optical module to perform a trial run of the new firmware;
  • the image data specifying command is sent to the optical module, and the upgraded image data is designated as the default image data of the corresponding firmware of the optical module.
  • the embodiment of the present invention further provides a firmware upgrade method, where the firmware module is configured with a firmware upgrade type identifier register, and the firmware upgrade type identifier register stores the firmware type identifier of the optical module that supports the upgrade, and the method includes:
  • the performing the corresponding type of firmware upgrade processing includes:
  • the corresponding firmware activation policy is invoked through the unified interface to perform the trial run of the new firmware, and the trial run succeeds. Afterwards, sending a firmware trial run success message to the host computer; after receiving the image data designation command sent by the host computer, setting the upgraded image data to a default boot corresponding firmware according to the specified command Image data.
  • the firmware upgrade type identifier register is a management data input/output multi-source protocol.
  • the embodiment of the present invention further provides a host computer, where the firmware module is configured with a firmware upgrade type identifier register, and the firmware upgrade type identifier register stores the firmware type identifier of the optical module that supports the upgrade, and the host computer includes:
  • the type judging unit is configured to write the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module, and determine whether the optical module supports the optical module by reading the firmware upgrade status register of the optical module. Upgraded firmware type;
  • a firmware upgrade unit configured to perform a corresponding type of firmware upgrade processing on the optical module when the determination result of the type determining unit indicates that the optical module supports the firmware type to be upgraded.
  • the type determining unit is configured to read an upgrade command execution status bit in the firmware upgrade status register of the optical module, and if the read bit indicates that the command is successfully executed, determine that the optical module supports writing
  • the firmware type identifies the firmware upgrade of the corresponding type; if the command execution fails, the upgrade command execution failure reason register in the firmware upgrade status register of the optical module is read, and if the reason register indicates that the firmware type is not supported, it is determined that the optical module does not A firmware upgrade that supports the type of firmware that is written.
  • the firmware upgrade unit includes:
  • a data transmission subunit configured to send a download instruction to the optical module, and transmit image data of the firmware to be upgraded
  • a firmware commissioning indication subunit configured to send a trial run new firmware command to the optical module after the image data transmission is successful, instructing the optical module to perform a trial run of the new firmware
  • the data indication subunit is configured to be After the optical module is successfully tested, the image data specifying command is sent to the optical module, and the image data after the upgrade is specified to be the default image data of the corresponding firmware of the optical module.
  • the embodiment of the present invention further provides an optical module, where the optical module is configured with a firmware upgrade type identifier register, and the firmware upgrade type identifier register stores the firmware type identifier that the optical module supports upgrade, and the optical module Also includes:
  • the upgrade processing unit is configured to perform a corresponding type of firmware upgrade processing according to the upgrade firmware type written by the upper computer in the firmware upgrade type identifier register when receiving the download instruction of the upper computer.
  • the upgrade processing unit includes:
  • a data downloading subunit configured to receive image data of the firmware to be upgraded transmitted by the upper computer after receiving the download instruction sent by the upper computer, and after the image data is successfully downloaded, to the upper computer Send a download completion message;
  • a firmware commissioning subunit configured to, after receiving the trial run new firmware command sent by the host computer, execute the new firmware by calling a corresponding type of firmware activation policy according to the firmware type identifier in the command Trial operation, and after the trial run is successful, send a firmware trial run success message to the host computer;
  • a data specifying subunit configured to, after receiving the image data specifying command sent by the upper computer, set the upgraded image data as the default image data for starting the corresponding firmware according to the specified command.
  • the firmware upgrade type identifier register is a management data input/output multi-source protocol. Reserved register for MDIO MS A.
  • An embodiment of the present invention further provides a firmware upgrade system, where the system includes the above-mentioned upper computer and an optical module;
  • a firmware upgrade type identifier register is disposed in the optical module, and the firmware upgrade type identifier register stores a firmware type identifier that is supported by the optical module to be upgraded;
  • the upper computer is configured to write a type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module, and determine whether the optical module supports the optical module by reading the firmware upgrade status register of the optical module.
  • the firmware type to be upgraded when it is determined that the optical module supports the firmware type to be upgraded, performing a corresponding type of firmware upgrade processing on the optical module; the optical module is configured to receive the download of the upper computer
  • the firmware upgrade process of the corresponding type is performed according to the upgrade firmware type written by the upper computer in the firmware upgrade type identifier register.
  • the embodiment of the present invention further provides a computer readable storage medium, where the storage medium includes a set of computer executable instructions, and the instructions are used to execute an upgrade method of firmware on the host computer side.
  • the embodiment of the invention further provides a computer readable storage medium, the storage medium comprising a set of computer executable instructions, wherein the instructions are used to execute a firmware upgrade method on the optical module side.
  • a firmware upgrade method and system, a host computer and an optical module provided by an embodiment of the present invention use a reserved register in the MDIO MSA as an upgrade firmware type identification register, and multiplex the online upgrade control and status register in the MDIO MSA.
  • FIG. 1 is a timing diagram of online upgrade of software in the prior art
  • FIG. 2 is a timing diagram of a firmware upgrade according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of firmware activation according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an internal online upgrade register group of an optical module according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a firmware upgrade system according to an embodiment of the present invention.
  • the firmware upgrade method provided by the embodiment of the present invention is configured with a firmware upgrade type identifier register in the optical module, where the firmware upgrade type identifier register stores the firmware type identifier that the optical module supports upgrade, and the method mainly includes Writing the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module, and reading the firmware upgrade status register of the optical module to determine whether the optical module supports the firmware type to be upgraded; When the optical module supports the firmware type to be upgraded, performing a corresponding type of firmware upgrade processing on the optical module.
  • the execution body of the method may be a host computer. Therefore, the upgrade method may also be described as: the host computer writes the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module, and reads the optical module by reading the optical module.
  • the firmware upgrade status register determines whether the optical module supports the firmware type to be upgraded. When determining that the optical module supports the firmware type to be upgraded, performing a corresponding type of firmware upgrade processing on the optical module.
  • a reserved register in the MDIO MSA may be enabled as a firmware upgrade type identifier register; preferably, the reserved register B052 in the MDIO MSA may be set as a firmware upgrade type identifier register, and 15 ⁇ of the register is used.
  • the 12-bit number is used as the firmware upgrade type identifier.
  • Table 3 lists three types of firmware: MCU software image, FPGA logic image, Digital Signal Processor (DSP) chip image.
  • DSP Digital Signal Processor
  • the firmware type is not supported in the upgrade command failure reason bit information of the MDIO MSA original register B051.
  • the corresponding values are shown in Table 3. Hexadecimal size access type bit register name/bit name description initial value system address (bytes)
  • the B052 register Since the B052 register is non-volatile, it will revert to the last set value after power-down or reset restart.
  • the firmware upgrade status register of the optical module is used to determine whether the optical module supports the firmware type to be upgraded, including:
  • a test run new firmware command is sent to the optical module, instructing the optical module to perform a trial run of the new firmware
  • the image data designation command is sent to the optical module, and the upgraded image data is designated as the default image data of the corresponding firmware of the optical module.
  • the embodiment of the present invention further provides a firmware upgrade method, where a firmware upgrade type identifier register is configured in the optical module, and the firmware upgrade type identifier register stores a firmware type identifier that the optical module supports upgrade, and the method mainly includes Including: when receiving the download instruction of the host computer, perform corresponding firmware upgrade processing according to the upgrade firmware type written by the host computer in the firmware upgrade type identifier register.
  • the execution body of the method is an optical module. Therefore, the upgrade method is also described as follows: When the optical module receives the download instruction of the upper computer, it is written according to the upper computer in the firmware upgrade type identification register. Upgrade the firmware type and perform the corresponding type of firmware upgrade processing.
  • a reserved register in the MDIO MSA may be enabled as a firmware upgrade type identifier register; preferably, the reserved register B052 in the MDIO MSA may be set as a firmware upgrade type identifier register, and 15 ⁇ of the register is used.
  • the 12-bit number is used as the firmware upgrade type identifier, and the corresponding values of the specific types are as shown in Table 2 above. Since the B052 register is non-volatile, it will revert to the last set value after a power-down or reset restart.
  • the optical module performs a corresponding type of firmware upgrade processing, including:
  • the corresponding firmware activation policy is invoked through the unified interface to perform the trial run of the new firmware, and the trial run succeeds. Afterwards, sending a firmware trial run success message to the host computer; after receiving the image data designation command sent by the host computer, setting the upgraded image data to a default boot corresponding firmware according to the specified command Image data.
  • the firmware upgrade process performed between the host computer and the optical module will be further described in detail below in conjunction with the timing diagram shown in FIG.
  • the firmware upgrade process mainly includes:
  • Step 201 The host computer sets an upgrade firmware type to the optical module.
  • the host computer writes the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register of the optical module.
  • Step 202 The host computer queries whether the setting of the upgrade firmware type is successful.
  • the host computer reads the upgrade command execution status bit in the firmware upgrade status register of the optical module, and if the read bit indicates that the command is successfully executed, determining the type corresponding to the firmware type identifier that the optical module supports to write.
  • Firmware upgrade if the command fails to execute, then read the If the register indicates that the firmware type is not supported, it is determined that the optical module does not support the firmware upgrade of the type corresponding to the written firmware type identifier. After the upgrade firmware type is set successfully, continue with the next steps; after the upgrade firmware type setting fails, the operation is terminated.
  • Step 203 205 The host computer sends a download instruction to the optical module, and transmits image data of the firmware to be upgraded.
  • a feasible data transmission process is as follows: The upper computer divides the image data of the firmware to be upgraded into several data blocks, and each data block should include a data part and a Cyclic Redundancy Checks (CRC) check. And; once any error occurs in the current data block receiving process, the optical module will notify the upper computer, the upper computer retransmits the data block; if the same data block has multiple CRC check errors, the upper computer forcibly terminates the upgrade process. After all the image data packets have been transmitted, the host computer sends a data transfer completion command to end the transfer process; the optical module will confirm that the complete image has been successfully downloaded by sending an online download completion message. Errors in the download process are recorded and fed back through the status register of the optical module.
  • CRC Cyclic Redundancy Checks
  • Step 206 After the image data transmission is successful, the host computer sends a trial run new firmware command to the optical module, instructing the optical module to perform a trial run of the new firmware.
  • Step 207 After receiving the trial run new firmware command sent by the host computer, the optical module performs a trial run of the new firmware by using a unified type of firmware activation policy according to the firmware type identifier in the command, and is in trial operation. After successful, a firmware trial success message is sent to the host computer.
  • the embodiment of the present invention uses the firmware type identifier in the command by the optical module, and invokes the corresponding type of firmware activation policy to execute the trial operation of the new firmware by using the unified dynamic interface.
  • the optical module when performing the trial operation of the MCU image data, performs the corresponding MCU firmware activation step by calling the unified activation firmware interface, including: setting the MCU firmware. Run the flag bit; the MCU software restarts; the boot or boot process initiates a new MCU firmware based on the flag bit.
  • the optical module calls the unified activation solid
  • the component interface performs the corresponding FPGA firmware activation steps, including: saving the current FPGA important data; loading the new FPGA firmware; and restoring the state before the FPGA is activated according to the important data.
  • Step 208 After the optical module is successfully tested for the new firmware, the host computer sends an image data specifying command to the optical module, and specifies that the upgraded image data is the default image data of the corresponding firmware of the optical module.
  • Step 209 After receiving the image data specifying command sent by the host computer, the optical module sets the upgraded image data as the default image data for starting the corresponding firmware according to the specified command.
  • FIG. 4 is a schematic diagram of an internal online upgrade register group of an optical module according to an embodiment of the present invention.
  • the online upgrade register set includes: upgrade control register B051, status register B04D, data transfer control register B04C, data block storage register set (BC00 ⁇ BFFF), and firmware upgrade type identification register B052.
  • the upgrade control register B051 is responsible for controlling the firmware online upgrade process of the optical module;
  • the status register B04D is responsible for the state storage during the firmware online upgrade;
  • the data transfer control register B04C is responsible for the data interaction with the upper computer;
  • the data block storage register group BC00 BFFF is responsible for data storage during the online upgrade process;
  • firmware upgrade type identification register B052 is responsible for saving the firmware type identification of the optical module support upgrade, for example:
  • the identifier 0 represents the MCU image type
  • the identification 1 represents the FPGA image type
  • the identification 2 represents the DSP. Chip image type.
  • the host computer can perform firmware upgrade of the optical module, type read register B052 read/write operation, data block storage register group write operation, and so on.
  • the embodiment of the present invention further provides a firmware upgrade system, as shown in FIG. 5, the system includes: a host computer 10 and an optical module 20;
  • the firmware module is configured with a firmware upgrade type identifier register, and the firmware upgrade type identifier register stores the firmware type identifier that the optical module supports upgrade.
  • the host computer 10 is configured to write the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module 20, and determine whether the optical module 20 supports the firmware to be upgraded by reading the firmware upgrade status register of the optical module 20. When determining that the optical module 20 supports the firmware type to be upgraded, perform a corresponding type of firmware upgrade processing on the optical module 20; The optical module 20 is configured to perform a corresponding type of firmware upgrade process according to the upgrade firmware type written by the host computer 10 in the firmware upgrade type identifier register upon receiving the download instruction of the host computer 10.
  • the host computer 10 includes:
  • the type judging unit 11 is configured to write the type identifier of the firmware to be upgraded to the firmware upgrade type identifier register corresponding to the optical module 20, and determine whether the optical module 20 supports the upgrade to be upgraded by reading the firmware upgrade status register of the optical module 20.
  • Firmware type
  • the firmware upgrading unit 12 is configured to perform a corresponding type of firmware upgrade processing on the optical module 20 when the determination result of the type judging unit 11 indicates that the optical module 20 supports the firmware type to be upgraded.
  • the type judging unit 11 is configured to read the upgrade command execution status bit in the firmware upgrade status register of the optical module 20, and if the read bit indicates that the command is successfully executed, determine the firmware type identifier that the optical module 20 supports to write. Corresponding type of firmware upgrade; if the command execution fails, the upgrade command execution failure reason register in the firmware upgrade status register of the optical module 20, if the reason register indicates that the firmware type is not supported, it is determined that the optical module 20 does not support the written firmware.
  • the firmware upgrading unit 12 includes: a data transmission subunit 121 configured to send a download instruction to the optical module 20 and transmit image data of the firmware to be upgraded;
  • the firmware commissioning indication sub-unit 122 is configured to send a trial run new firmware command to the optical module 20 after the image data transmission succeeds, instructing the optical module 20 to perform a trial run of the new firmware;
  • the data indication sub-unit 123 is configured to send a mapping data designation command to the optical module 20 after the optical module is successfully tested for the new firmware, and specify the upgraded image data to be the default image data of the corresponding firmware of the optical module 20.
  • the optical module 20 further includes: an upgrade processing unit 21 configured to execute the corresponding type of firmware according to the upgrade firmware type written by the host computer 10 in the firmware upgrade type identifier register upon receiving the download instruction of the host computer 10 Upgrade processing.
  • an upgrade processing unit 21 configured to execute the corresponding type of firmware according to the upgrade firmware type written by the host computer 10 in the firmware upgrade type identifier register upon receiving the download instruction of the host computer 10 Upgrade processing.
  • the upgrade processing unit 21 includes: The data downloading subunit 211 is configured to receive the image data of the firmware to be upgraded transmitted by the host computer 10 after receiving the download instruction sent by the host computer 10, and send the download to the host computer 10 after the image data is successfully downloaded. Complete the message;
  • the firmware commissioning subunit 212 is configured to, after receiving the trial running new firmware command sent by the host computer 10, execute the new firmware by calling a corresponding type of firmware activation policy according to the firmware type identifier in the command. Trial run, and after the trial run is successful, send a firmware test run success message to the host computer 10;
  • the data designation subunit 213 is configured to, after receiving the image data designation command sent by the host computer 10, set the upgraded image data to the default image data for starting the corresponding firmware according to the specified command.
  • the type judging unit 11, the firmware upgrading unit 12, and the data transmission subunit 121, the firmware trial operation indication subunit 122, and the data indication subunit 123 may be configured by a central processing unit (CPU, Central Processing Unit) of the upper computer. , Microprocessor (MPU), Digital Signal Processor (DSP) or Field-Programmable Gate Array (FPGA);
  • CPU Central Processing Unit
  • MPU Microprocessor
  • DSP Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • the upgrade processing unit 21, and the data download subunit 211, the firmware trial run subunit 212, and the data designation subunit 213 can be implemented by a CPU, MPU, DSP or FPGA of the optical module.
  • the embodiment of the present invention further provides a computer readable storage medium, where the storage medium includes a set of computer executable instructions, and the instructions are used to execute an upgrade method of firmware on the host computer side.
  • the embodiment of the invention further provides a computer readable storage medium, the storage medium comprising a set of computer executable instructions, wherein the instructions are used to execute a firmware upgrade method on the optical module side.
  • the embodiment of the present invention uses a reserved register in the MDIO MSA as an upgrade firmware status register, which is used to reflect the firmware type of the online upgrade supported by the current optical module, and controls the firmware type of the online upgrade;
  • the online upgrade control and status register in the MSA add the online upgrade command execution failure reason information in the existing online upgrade status register, and unify the status indication and control mode in different firmware type upgrade processes;
  • the firmware type judgment link is added, and different types of upgrade firmware are used to differentiate the firmware, improve the firmware upgrade control timing, realize the versatility of the control process, the scalability of the firmware type, and the reusability of the register.
  • Adding the online upgrade firmware type identification register saves the resources of the reserved registers in the MDIO MSA, which greatly ensures the scalability; makes the reusability of the online upgrade control timing improved, and reduces the implementation complexity.

Abstract

本发明公开了一种固件的升级方法,光模块中配置有固件升级类型标识寄存器,所述固件升级类型标识寄存器中保存有所述光模块支持升级的固件类型标识,方法包括:向所述光模块对应的固件升级类型标识寄存器中写入待升级固件的类型标识,并通过读取所述光模块的固件升级状态寄存器,判断所述光模块是否支持待升级的固件类型;在确定所述光模块支持所述待升级的固件类型时,对所述光模块执行相应类型的固件升级处理。另一种固件的升级方法包括:在收到上位机的下载指令时,根据所述上位机在所述固件升级类型标识寄存器中写入的升级固件类型,执行相应类型的固件升级处理。本发明还公开了一种固件的升级系统、上位机和光模块。

Description

一种固件的升级方法和系统、 上位机和光模块 技术领域
本发明涉及远程在线升级技术领域, 尤其涉及一种固件的升级方法和 系统、 上位机和光模块。 背景技术
随着光网络设备对可维护性要求的提高, 远程在线升级功能成为光模 块产品的关键需求之一。 目前 MDIO ( Management Data Input/Output, 管理 数据输入 /输出 ) MSA ( Multi Source Agreement, 多源协议 )只定义了软件 在线升级的实现方式,并未涵盖其他类型固件升级的处理方式,也即 MDIO MSA并未定义适用于不同文件类型升级的途径和方法。
如图 1所示, 图 1为现有技术中软件在线升级的时序图, MDIO MSA 所规定的软件映像在线升级过程如下:
软件映像被上位机分割为若干个数据块, 每个数据块应包含数据部分 和循环冗余校验码(CRC, Cyclic Redundancy Checks )校验和; 上位机向 光模块发送一个下载映像的请求来启动软件升级过程, 光模块接受此请求, 设置 "升级数据块准备" 标志, 一旦当前数据块接收过程中发生了任何错 误, 光模块都会通知上位机, 上位机重新传送该数据块; 如果同一个数据 块发生多次 CRC校验错误, 上位机强制终止升级过程。 当所有的软件映像 数据包传送完成后, 上位机下发下载完成命令来结束传送过程; 光模块会 通过成功完成状态命令来确认完整的映像已经被下载成功。 下载过程中的 错误通过设置错误状态寄存器来反馈。 软件映像数据传输完成后, 上位机 下发运行下载映像请求,光模块将试运行下载的软件映像。试运行成功后, 上位机下发映像默认版本指定(commit )命令。 以上软件升级过程中所用的 MSA定义的寄存器如下表 1所示:
十六 大小 访问 比特 寄存器名称 /比特 描述 初值 进制 (字节) 类型 位 位名称
地址
B04Ch 1 模块升级数据 000 lh 读 / 15 升级数据块准备 当上位机完成向 OxBCOO地址写数据 0b 写 块时设置该标志。 当该标志被模块清
除之后, 主机可以写下一个数据块 读 14-0 最大的升级数据 模块设置升级数据块大小 lb 块大小
模块升级控制 0000h
B04Dh 1 读 / 15-12 升级命令 0: 无操作 0000b 写 1: 启动下载
2: 结束下载
3: 运行映像 A
4: 运行映像 B
5: 终止映像下载
6: 拷贝映像 A到 B
7: 拷贝映像 B到 A
8: 指定映像 A
9: 指定映像 B
读 11-8 MDIO升级准备 在软件升级处理过程中, 当主机发出 0000b 时间 了运行映像命令时, MDIO是不可用
的, 需要等待。 MDIO升级准备时间给 出一个可以等待的最大值, 该值是 5
秒的整数倍
读 7-0 保留 0b 模块升级状态 OOOOh
B051h 1 读 15-14 升级命令执行状 00: 空闲 00b
,态 01: 命令成功完成
10: 命令处理中
11: 命令失败
13 升级下载映像时 0: 升级到当前下载映像不会影响业务 0b 业务受影响状态 1: 升级到当前下载映像会影响业务
12 映像运行 0: 映像 A 0b 1: 映像 B
11-10 映像 A状态 00: 无映像 00b
01: 存在有效映像
10: 存在损坏的映像
11: 保留
9-8 映像 B状态 00: 无映像 00b
01: 存在有效映像
10: 存在损坏的映像
11: 保留
7 映像指定 0: 映像 A Ob
1: 映像 B
6-0 升级命令失败原 0: 无 吴 Ob 因 1: CRC校验错误
2: 映像长度错误
3: Flash写操作 吴
4-127: 保留
表 1
由于光模块设计复杂度的提高导致器件越来越多样, 因此在线升级对 象类型的单一性已经无法满足远程维护的需求。 目前釆用 MDIO MSA的光 模块所涉及的在线升级固件类型包括: 微控制单元(MCU, Micro Control Unit )软件映像、现场可编程门阵列( FPGA, Field Programmable Gate Array ) 逻辑映像和核心集成电路(IC, Integrated Circuit ) 映像等。 不同类型的固 件升级过程存在差异, 若每种类型都单独釆用一种自定义的升级方式, 将 会增加协议的复杂性和冗余度。 因此, 怎样提供一种光模块的统一在线升 级方法,使其能够同时适应不同类型的固件升级,是目前亟待解决的问题。 发明内容 为解决现有存在的技术问题, 本发明实施例提供一种固件的升级方法 和系统、 上位机和光模块。
本发明实施例提供了一种固件的升级方法, 光模块中配置有固件升级 类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持 升级的固件类型标识, 该方法包括:
向所述光模块对应的固件升级类型标识寄存器中写入待升级固件的类 型标识, 并通过读取所述光模块的固件升级状态寄存器, 判断所述光模块 是否支持待升级的固件类型; 在确定所述光模块支持所述待升级的固件类 型时, 对所述光模块执行相应类型的固件升级处理。
优选的, 所述通过读取光模块的固件升级状态寄存器, 判断所述光模 块是否支持待升级的固件类型, 包括:
读取所述光模块的固件升级状态寄存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则确定所述光模块支持写入的固件类型 标识所对应类型的固件升级; 如果命令执行失败, 则读所述光模块的固件 升级状态寄存器中升级命令执行失败原因寄存器, 若原因寄存器指示固件 类型不支持, 则确定所述光模块不支持写入的固件类型标识所对应类型的 固件升级。
优选的, 所述对光模块执行相应类型的固件升级处理, 包括: 向所述光模块发送下载指令, 并传输待升级的固件的映像数据; 在所述映像数据传输成功后, 向所述光模块发送试运行新固件命令, 指示所述光模块执行新固件的试运行;
在所述光模块试运行新固件成功后, 向所述光模块发送映像数据指定 命令, 指定升级后的所述映像数据为所述光模块默认的启动相应固件的映 像数据。
本发明实施例还提供了一种固件的升级方法, 光模块中配置有固件升 级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支 持升级的固件类型标识, 该方法包括:
在收到上位机的下载指令时, 根据所述上位机在所述固件升级类型标 识寄存器中写入的升级固件类型, 执行相应类型的固件升级处理。 优选的, 所述执行相应类型的固件升级处理, 包括:
在收到所述上位机发送的下载指令后, 接收所述上位机传输的待升级 的固件的映像数据, 并在所述映像数据下载成功后, 向所述上位机发送下 载完成消息;
在收到所述上位机发送的试运行新固件命令后, 根据所述命令中的固 件类型标识, 通过统一接口调用相应类型的固件激活策略执行所述新固件 的试运行, 并在试运行成功后, 向所述上位机发送固件试运行成功消息; 在收到所述上位机发送的映像数据指定命令后, 根据所述指定命令将 升级后的所述映像数据设定为默认的启动相应固件的映像数据。
优选的, 所述固件升级类型标识寄存器为管理数据输入 /输出多源协议
MDIO MS A的保留寄存器。
本发明实施例还提供了一种上位机, 光模块中配置有固件升级类型标 识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持升级的 固件类型标识, 所述上位机包括:
类型判断单元, 配置为向所述光模块对应的固件升级类型标识寄存器 中写入待升级固件的类型标识, 并通过读取所述光模块的固件升级状态寄 存器, 判断所述光模块是否支持待升级的固件类型;
固件升级单元, 配置为在所述类型判断单元的判断结果表征所述光模 块支持所述待升级的固件类型时, 对所述光模块执行相应类型的固件升级 处理。
优选的, 所述类型判断单元配置为, 读取所述光模块的固件升级状态 寄存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则 确定所述光模块支持写入的固件类型标识所对应类型的固件升级; 如果命 令执行失败, 则读所述光模块的固件升级状态寄存器中升级命令执行失败 原因寄存器, 若原因寄存器指示固件类型不支持, 则确定所述光模块不支 持写入的固件类型标识所对应类型的固件升级。 优选的, 所述固件升级单元包括:
数据传输子单元, 配置为向所述光模块发送下载指令, 并传输待升级 的固件的映像数据;
固件试运行指示子单元, 配置为在所述映像数据传输成功后, 向所述 光模块发送试运行新固件命令, 指示所述光模块执行新固件的试运行; 数据指示子单元, 配置为在所述光模块试运行新固件成功后, 向所述 光模块发送映像数据指定命令, 指定升级后的所述映像数据为所述光模块 默认的启动相应固件的映像数据。
本发明实施例还提供了一种光模块, 所述光模块中配置有固件升级类 型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持升 级的固件类型标识, 所述光模块还包括:
升级处理单元, 配置为在收到上位机的下载指令时, 根据所述上位机 在所述固件升级类型标识寄存器中写入的升级固件类型, 执行相应类型的 固件升级处理。
优选的, 所述升级处理单元包括:
数据下载子单元, 配置为在收到所述上位机发送的下载指令后, 接收 所述上位机传输的待升级的固件的映像数据, 并在所述映像数据下载成功 后, 向所述上位机发送下载完成消息;
固件试运行子单元, 配置为在收到所述上位机发送的试运行新固件命 令后, 根据所述命令中的固件类型标识, 通过统一接口调用相应类型的固 件激活策略执行所述新固件的试运行, 并在试运行成功后, 向所述上位机 发送固件试运行成功消息;
数据指定子单元, 配置为在收到所述上位机发送的映像数据指定命令 后, 根据所述指定命令将升级后的所述映像数据设定为默认的启动相应固 件的映像数据。
优选的, 所述固件升级类型标识寄存器为管理数据输入 /输出多源协议 MDIO MS A的保留寄存器。
本发明实施例还提供了一种固件的升级系统, 所述系统包括上述的上 位机、 以及光模块;
所述光模块中配置有固件升级类型标识寄存器, 所述固件升级类型标 识寄存器中保存有所述光模块支持升级的固件类型标识;
所述上位机, 配置为向所述光模块对应的固件升级类型标识寄存器中 写入待升级固件的类型标识, 并通过读取所述光模块的固件升级状态寄存 器, 判断所述光模块是否支持待升级的固件类型; 在确定所述光模块支持 所述待升级的固件类型时, 对所述光模块执行相应类型的固件升级处理; 所述光模块, 配置为在在收到上位机的下载指令时, 根据所述上位机 在所述固件升级类型标识寄存器中写入的升级固件类型, 执行相应类型的 固件升级处理。
本发明实施例还提供了一种计算机可读存储介质, 所述存储介质包括 一组计算机可执行指令, 所述指令用于执行上位机侧的固件的升级方法。
本发明实施例还提供了一种计算机可读存储介质, 所述存储介质包括 一组计算机可执行指令, 所述指令用于执行光模块侧的固件的升级方法。
本发明实施例所提供的一种固件的升级方法和系统、 上位机和光模块, 釆用 MDIO MSA中的一个保留寄存器作为升级固件类型标识寄存器, 并复 用 MDIO MSA中的在线升级控制和状态寄存器,将不同固件类型升级过程 中状态指示和控制方式统一起来; 改进固件升级控制时序, 实现控制过程 的通用性、 固件类型的可扩展性, 以及寄存器的可复用性。 附图说明
图 1为现有技术中软件在线升级的时序图;
图 2为本发明实施例的一种固件升级的时序图;
图 3为本发明实施例的固件激活示意图; 图 4为本发明实施例的一种光模块的内部在线升级寄存器组的示意图; 图 5为本发明实施例的一种固件升级系统的组成结构示意图。 具体实施方式
下面结合附图和具体实施例对本发明的技术方案进一步详细阐述。 本发明实施例提供的一种固件的升级方法, 在光模块中配置有固件升 级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支 持升级的固件类型标识, 该方法主要包括: 向光模块对应的固件升级类型 标识寄存器中写入待升级固件的类型标识, 并通过读取所述光模块的固件 升级状态寄存器, 判断所述光模块是否支持待升级的固件类型; 在确定所 述光模块支持所述待升级的固件类型时, 对所述光模块执行相应类型的固 件升级处理。
该方法的执行主体可以是上位机, 因此, 该升级方法也可描述为: 上 位机向光模块对应的固件升级类型标识寄存器中写入待升级固件的类型标 识, 并通过读取所述光模块的固件升级状态寄存器, 判断所述光模块是否 支持待升级的固件类型; 在确定所述光模块支持所述待升级的固件类型时, 对所述光模块执行相应类型的固件升级处理。
本发明实施例中, 可以启用 MDIO MSA中的一个保留寄存器, 作为固 件升级类型标识寄存器;优选的,可以将 MDIO MSA中的保留寄存器 B052 设定为固件升级类型标识寄存器, 使用该寄存器的 15 ~ 12比特位作为固件 升级类型标识, 具体类型对应值如下表 2所示。 表 2中列举了三种固件类 型: MCU软件映像、 FPGA逻辑映像、 数字信号处理(DSP, Digital Signal Processor )芯片映像, 当然, 本发明实施例并非仅限于这些固件类型, 其他 类型固件可在此基础上进行扩展。 另外, 本发明实施例中, 在 MDIO MSA 原有寄存器 B051 的升级命令失败原因比特信息中增加固件类型不支持一 项。 其对应值如表 3所示。 十六进 大小 访问类型 比特位 寄存器名称 /比特位名称 描述 初值 制地址 (字节)
B052 1 在线升级固件类型标识
读 /写 15-12 固件类型 0: MCU映像 0
1: FPGA映像
2: DSP芯片映像 3-15: 保留
读 11-0 保留 0 表 2
模块升级状态 OOOOh
B051h 1 读 15-14 升级命令执行状 00: 空闲 00b
,态 01: 命令成功完成
10: 命令处理中
11: 命令失败
13 升级下载映像时 0: 升级到当前下载映像不会影响业务 0b 业务受影响状态 1: 升级到当前下载映像会影响业务
12 映像运行 0: 映像 A 0b
1: 映像 B
11-10 映像 A状态 00: 无映像 00b
01: 存在有效映像
10: 存在损坏的映像
11: 保留
9-8 映像 B状态 00: 无映像 00b
01: 存在有效映像
10: 存在损坏的映像
11: 保留
7 映像指定 0: 映像 A 0b
1: 映像 B
6-0 升级命令失败原 0: 无 吴 0b 因 1: CRC校验错误
2: 映像长度错误
3: Flash写操作 吴
4: 固件类型不支持 5-127: 保留
表 3
由于 B052寄存器为非易失性的, 因此掉电或复位重启后会恢复为最后 一次的设置值。
作为本发明的一种优选实施方式, 所述通过读取光模块的固件升级状 态寄存器, 判断所述光模块是否支持待升级的固件类型, 包括:
读取所述光模块的固件升级状态寄存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则确定所述光模块支持写入的固件类型 标识所对应类型的固件升级; 如果命令执行失败, 则读所述光模块的固件 升级状态寄存器中升级命令执行失败原因寄存器, 若原因寄存器指示固件 类型不支持, 则确定所述光模块不支持写入的固件类型标识所对应类型的 固件升级。
在确定光模块支持待升级的固件类型时, 对光模块执行相应类型的固 件升级处理, 包括:
向光模块发送下载指令, 并传输待升级的固件的映像数据;
在映像数据传输成功后, 向光模块发送试运行新固件命令, 指示光模 块执行新固件的试运行;
在光模块试运行新固件成功后, 向光模块发送映像数据指定命令, 指 定升级后的映像数据为光模块默认的启动相应固件的映像数据。
本发明实施例还提供了一种固件的升级方法, 在光模块中配置有固件 升级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块 支持升级的固件类型标识,该方法主要包括:在收到上位机的下载指令时, 根据上位机在固件升级类型标识寄存器中写入的升级固件类型, 执行相应 类型的固件升级处理。
该方法的执行主体是光模块, 因此, 该升级方法也描述为: 光模块在 收到上位机的下载指令时, 根据上位机在固件升级类型标识寄存器中写入 的升级固件类型, 执行相应类型的固件升级处理。
本发明实施例中, 可以启用 MDIO MSA中的一个保留寄存器, 作为固 件升级类型标识寄存器;优选的,可以将 MDIO MSA中的保留寄存器 B052 设定为固件升级类型标识寄存器, 使用该寄存器的 15 ~ 12比特位作为固件 升级类型标识, 具体类型对应值如上表 2所示。 由于 B052寄存器为非易失 性的, 因此掉电或复位重启后会恢复为最后一次的设置值。
作为本发明的一种优选实施方式, 所述光模块执行相应类型的固件升 级处理, 包括:
在收到所述上位机发送的下载指令后, 接收所述上位机传输的待升级 的固件的映像数据, 并在所述映像数据下载成功后, 向所述上位机发送下 载完成消息;
在收到所述上位机发送的试运行新固件命令后, 根据所述命令中的固 件类型标识, 通过统一接口调用相应类型的固件激活策略执行所述新固件 的试运行, 并在试运行成功后, 向所述上位机发送固件试运行成功消息; 在收到所述上位机发送的映像数据指定命令后, 根据所述指定命令将 升级后的所述映像数据设定为默认的启动相应固件的映像数据。
下面再结合图 2 所示的时序图, 对上位机和光模块之间执行的固件升 级过程进一步详细说明。 固件升级过程主要包括:
步骤 201, 上位机向光模块设置升级固件类型。
具体的, 上位机向光模块的固件升级类型标识寄存器中写入待升级固 件的类型标识。
步骤 202, 上位机查询升级固件类型的设置是否成功。
具体的, 上位机读取所述光模块的固件升级状态寄存器中升级命令执 行状态比特位, 若所读比特位指示命令执行成功, 则确定所述光模块支持 写入的固件类型标识所对应类型的固件升级; 如果命令执行失败, 则读所 寄存器指示固件类型不支持, 则确定所述光模块不支持写入的固件类型标 识所对应类型的固件升级。 在升级固件类型设置成功后, 继续执行后续步 骤; 在升级固件类型设置失败后, 终止操作。
步骤 203 205,上位机向光模块发送下载指令, 并传输待升级的固件的 映像数据。
一种可行的数据传输过程为: 上位机将待升级的固件的映像数据分割 为若干个数据块, 每个数据块应包含数据部分和循环冗余校验码(CRC, Cyclic Redundancy Checks )校验和; 一旦当前数据块接收过程中发生了任 何错误, 光模块都会通知上位机, 上位机重新传送该数据块; 如果同一个 数据块发生多次 CRC校验错误, 上位机强制终止升级过程。 当所有的映像 数据包传送完成后, 上位机下发数据传输完成命令来结束传送过程; 光模 块会通过发送在线下载完成消息来确认完整的映像已经被下载成功。 下载 过程中的错误通过光模块的状态寄存器来记录并反馈。
步骤 206, 在映像数据传输成功后, 上位机向光模块发送试运行新固件 命令, 指示光模块执行新固件的试运行。
步骤 207, 在收到上位机发送的试运行新固件命令后, 光模块根据所述 命令中的固件类型标识, 通过统一接口调用相应类型的固件激活策略执行 新固件的试运行, 并在试运行成功后, 向所述上位机发送固件试运行成功 消息。
由于不同映像数据的激活方式会不同, 因此, 本发明实施例通过光模 块利用命令中的固件类型标识, 釆用统一的动态接口调用相应类型的固件 激活策略执行新固件的试运行。 以 MCU映像和 FPGA映像的激活为例,如 图 3所示, 当执行 MCU映像数据的试运行时, 光模块通过调用统一的激活 固件接口, 执行相应的 MCU固件激活步骤, 包括: 置 MCU固件运行标识 位; MCU软件重启; boot (引导)或管理进程根据标识位启动新的 MCU 固件。 当执行 FPGA映像数据的试运行时, 光模块通过调用统一的激活固 件接口, 执行相应的 FPGA固件激活步骤, 包括: 保存当前 FPGA重要数 据; 加载新的 FPGA固件; 根据重要数据回复 FPGA激活前的状态。
步骤 208, 在光模块试运行新固件成功后, 上位机向光模块发送映像数 据指定命令, 指定升级后的映像数据为光模块默认的启动相应固件的映像 数据。
步骤 209, 光模块在收到上位机发送的映像数据指定命令后,根据所述 指定命令将升级后的映像数据设定为默认的启动相应固件的映像数据。
再如图 4所示, 图 4为本发明实施例一种光模块的内部在线升级寄存 器组的示意图。 图 4 中, 在线升级寄存器组包括: 升级控制寄存器 B051、 状态寄存器 B04D、 数据传输控制寄存器 B04C、 数据块存储寄存器组 ( BC00~BFFF )、 以及固件升级类型标识寄存器 B052。 其中, 升级控制寄 存器 B051负责控制光模块的固件在线升级过程; 状态寄存器 B04D负责固 件在线升级过程中的状态存储;数据传输控制寄存器 B04C负责与上位机之 间的数据交互;数据块存储寄存器组 BC00 BFFF负责在线升级过程中的数 据存储; 固件升级类型标识寄存器 B052负责保存光模块支持升级的固件类 型标识, 例如: 图 4中标识 0代表 MCU映像类型, 标识 1代表 FPGA映像 类型, 标识 2代表 DSP芯片映像类型。 上位机可执行对光模块的固件升级 类型标识寄存器 B052的读 /写操作,对数据块存储寄存器组的写操作等等。
对应上述固件升级的方法, 本发明实施例还提供一种固件升级的系统, 如图 5所示, 该系统包括: 上位机 10和光模块 20;
其中, 光模块 20中配置有固件升级类型标识寄存器, 所述固件升级类 型标识寄存器中保存有所述光模块支持升级的固件类型标识;
上位机 10,配置为向光模块 20对应的固件升级类型标识寄存器中写入 待升级固件的类型标识, 并通过读取光模块 20的固件升级状态寄存器, 判 断光模块 20是否支持待升级的固件类型; 在确定光模块 20支持待升级的 固件类型时, 对光模块 20执行相应类型的固件升级处理; 光模块 20, 配置为在在收到上位机 10的下载指令时, 根据上位机 10 在固件升级类型标识寄存器中写入的升级固件类型, 执行相应类型的固件 升级处理。
优选的, 上位机 10包括:
类型判断单元 11,配置为向光模块 20对应的固件升级类型标识寄存器 中写入待升级固件的类型标识, 并通过读取光模块 20的固件升级状态寄存 器, 判断光模块 20是否支持待升级的固件类型;
固件升级单元 12, 配置为在类型判断单元 11 的判断结果表征光模块 20支持待升级的固件类型时, 对光模块 20执行相应类型的固件升级处理。
优选的, 类型判断单元 11 配置为, 读取光模块 20的固件升级状态寄 存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则确 定光模块 20支持写入的固件类型标识所对应类型的固件升级; 如果命令执 行失败, 则读光模块 20的固件升级状态寄存器中升级命令执行失败原因寄 存器, 若原因寄存器指示固件类型不支持, 则确定光模块 20不支持写入的 固件类型标识所对应类型的固件升级。 优选的, 固件升级单元 12包括: 数据传输子单元 121, 配置为向光模块 20发送下载指令, 并传输待升 级的固件的映像数据;
固件试运行指示子单元 122, 配置为在映像数据传输成功后, 向光模块 20发送试运行新固件命令, 指示光模块 20执行新固件的试运行;
数据指示子单元 123, 配置为在光模块试运行新固件成功后, 向光模块 20发送映像数据指定命令,指定升级后的所述映像数据为光模块 20默认的 启动相应固件的映像数据。
优选的, 光模块 20还包括: 升级处理单元 21, 配置为在收到上位机 10的下载指令时,根据上位机 10在固件升级类型标识寄存器中写入的升级 固件类型, 执行相应类型的固件升级处理。
优选的, 升级处理单元 21包括: 数据下载子单元 211, 配置为在收到上位机 10发送的下载指令后, 接 收上位机 10传输的待升级的固件的映像数据, 并在所述映像数据下载成功 后, 向上位机 10发送下载完成消息;
固件试运行子单元 212, 配置为在收到上位机 10发送的试运行新固件 命令后, 根据所述命令中的固件类型标识, 通过统一接口调用相应类型的 固件激活策略执行所述新固件的试运行, 并在试运行成功后, 向上位机 10 发送固件试运行成功消息;
数据指定子单元 213, 配置为在收到上位机 10发送的映像数据指定命 令后, 根据所述指定命令将升级后的所述映像数据设定为默认的启动相应 固件的映像数据。
其中, 所述类型判断单元 11、 固件升级单元 12, 以及数据传输子单元 121、 固件试运行指示子单元 122、 数据指示子单元 123, 可以由上位机的 中央处理器 (CPU, Central Processing Unit )、 微处理器 (MPU, Micro Processing Unit )、 数字信号处理器(DSP, Digital Signal Processor )或可编 程逻辑阵列 (FPGA, Field - Programmable Gate Array ) 实现;
升级处理单元 21, 以及数据下载子单元 211、 固件试运行子单元 212、 数据指定子单元 213可以由光模块的 CPU、 MPU、 DSP或 FPGA实现。
本发明实施例还提供了一种计算机可读存储介质, 所述存储介质包括 一组计算机可执行指令, 所述指令用于执行上位机侧的固件的升级方法。
本发明实施例还提供了一种计算机可读存储介质, 所述存储介质包括 一组计算机可执行指令, 所述指令用于执行光模块侧的固件的升级方法。
综上所述, 本发明实施例釆用 MDIO MSA中的一个保留寄存器作为升 级固件状态寄存器, 用来反映当前光模块所支持的在线升级的固件类型, 并控制在线升级的固件类型; 复用 MDIO MSA中的在线升级控制和状态寄 存器, 在已有的在线升级状态寄存器中添加在线升级命令执行失败原因信 息, 将不同固件类型升级过程中状态指示和控制方式统一起来; 在升级控 制时序中增加对固件类型判断环节, 依据不同类型的升级固件对其进行差 异化处理, 改进固件升级控制时序, 实现控制过程的通用性、 固件类型的 可扩展性, 以及寄存器的可复用性, 有利于将来新增固件类型时的扩展, 有利于扩大 MDIO MSA的适用范围。 添加在线升级固件类型标识寄存器, 节省了 MDIO MSA中保留寄存器的资源, 使可扩展性得到极大保证; 使得 在线升级控制时序的可复用性得到提高, 降低了实现复杂度。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。

Claims

权利要求书
1、一种固件的升级方法,光模块中配置有固件升级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持升级的固件类型 标识, 该方法包括:
向所述光模块对应的固件升级类型标识寄存器中写入待升级固件的 类型标识, 并通过读取所述光模块的固件升级状态寄存器, 判断所述光 模块是否支持待升级的固件类型; 在确定所述光模块支持所述待升级的 固件类型时, 对所述光模块执行相应类型的固件升级处理。
2、 根据权利要求 1所述固件的升级方法, 其中, 所述通过读取光模 块的固件升级状态寄存器, 判断所述光模块是否支持待升级的固件类型, 包括:
读取所述光模块的固件升级状态寄存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则确定所述光模块支持写入的固件类 型标识所对应类型的固件升级; 如果命令执行失败, 则读所述光模块的 示固件类型不支持, 则确定所述光模块不支持写入的固件类型标识所对 应类型的固件升级。
3、 根据权利要求 1或 2所述固件的升级方法, 其中, 所述对光模块 执行相应类型的固件升级处理, 包括:
向所述光模块发送下载指令, 并传输待升级的固件的映像数据; 在所述映像数据传输成功后, 向所述光模块发送试运行新固件命令, 指示所述光模块执行新固件的试运行;
在所述光模块试运行新固件成功后, 向所述光模块发送映像数据指 定命令, 指定升级后的所述映像数据为所述光模块默认的启动相应固件 的映像数据。
4、一种固件的升级方法,光模块中配置有固件升级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持升级的固件类型 标识, 该方法包括:
在收到上位机的下载指令时, 根据所述上位机在所述固件升级类型 标识寄存器中写入的升级固件类型, 执行相应类型的固件升级处理。
5、 根据权利要求 4所述固件的升级方法, 其中, 所述执行相应类型 的固件升级处理, 包括:
在收到所述上位机发送的下载指令后, 接收所述上位机传输的待升 级的固件的映像数据, 并在所述映像数据下载成功后, 向所述上位机发 送下载完成消息;
在收到所述上位机发送的试运行新固件命令后, 根据所述命令中的 固件类型标识, 通过统一接口调用相应类型的固件激活策略执行所述新 固件的试运行, 并在试运行成功后, 向所述上位机发送固件试运行成功 消息;
在收到所述上位机发送的映像数据指定命令后, 根据所述指定命令 将升级后的所述映像数据设定为默认的启动相应固件的映像数据。
6、 根据权利要求 4或 5所述固件的升级方法, 其中, 所述固件升级 类型标识寄存器为管理数据输入 /输出多源协议 MDIO MSA的保留寄存 器。
7、 一种上位机, 光模块中配置有固件升级类型标识寄存器, 所述固 件升级类型标识寄存器中保存有所述光模块支持升级的固件类型标识, 所述上位机包括:
类型判断单元, 配置为向所述光模块对应的固件升级类型标识寄存 器中写入待升级固件的类型标识, 并通过读取所述光模块的固件升级状 态寄存器, 判断所述光模块是否支持待升级的固件类型;
固件升级单元, 配置为在所述类型判断单元的判断结果表征所述光 模块支持所述待升级的固件类型时, 对所述光模块执行相应类型的固件 升级处理。
8、 根据权利要求 7所述上位机, 其中, 所述类型判断单元进一步用 于, 读取所述光模块的固件升级状态寄存器中升级命令执行状态比特位, 若所读比特位指示命令执行成功, 则确定所述光模块支持写入的固件类 型标识所对应类型的固件升级; 如果命令执行失败, 则读所述光模块的 示固件类型不支持, 则确定所述光模块不支持写入的固件类型标识所对 应类型的固件升级。
9、根据权利要求 7或 8所述上位机,其中,所述固件升级单元包括: 数据传输子单元, 配置为向所述光模块发送下载指令, 并传输待升 级的固件的映像数据;
固件试运行指示子单元, 配置为在所述映像数据传输成功后, 向所 述光模块发送试运行新固件命令, 指示所述光模块执行新固件的试运行; 数据指示子单元, 配置为在所述光模块试运行新固件成功后, 向所 述光模块发送映像数据指定命令, 指定升级后的所述映像数据为所述光 模块默认的启动相应固件的映像数据。
10、 一种光模块, 所述光模块中配置有固件升级类型标识寄存器, 所述固件升级类型标识寄存器中保存有所述光模块支持升级的固件类型 标识, 所述光模块还包括:
升级处理单元, 配置为在收到上位机的下载指令时, 根据所述上位 机在所述固件升级类型标识寄存器中写入的升级固件类型, 执行相应类 型的固件升级处理。
11、 根据权利要求 10所述光模块, 其中, 所述升级处理单元包括: 数据下载子单元, 配置为在收到所述上位机发送的下载指令后, 接 收所述上位机传输的待升级的固件的映像数据, 并在所述映像数据下载 成功后, 向所述上位机发送下载完成消息; 固件试运行子单元, 配置为在收到所述上位机发送的试运行新固件 命令后, 根据所述命令中的固件类型标识, 通过统一接口调用相应类型 的固件激活策略执行所述新固件的试运行, 并在试运行成功后, 向所述 上位机发送固件试运行成功消息;
数据指定子单元, 配置为在收到所述上位机发送的映像数据指定命 令后, 根据所述指定命令将升级后的所述映像数据设定为默认的启动相 应固件的映像数据。
12、根据权利要求 10或 11所述光模块, 其中, 所述固件升级类型标 识寄存器为管理数据输入 /输出多源协议 MDIO MSA的保留寄存器。
13、 一种固件的升级系统, 所述系统包括权利要求 7-9任一项所述的 上位机、 以及权利要求 10-12任一项所述的光模块;
所述光模块中配置有固件升级类型标识寄存器, 所述固件升级类型 标识寄存器中保存有所述光模块支持升级的固件类型标识;
所述上位机, 配置为向所述光模块对应的固件升级类型标识寄存器 中写入待升级固件的类型标识, 并通过读取所述光模块的固件升级状态 寄存器, 判断所述光模块是否支持待升级的固件类型; 在确定所述光模 块支持所述待升级的固件类型时, 对所述光模块执行相应类型的固件升 级处理;
所述光模块, 配置为在在收到上位机的下载指令时, 根据所述上位 机在所述固件升级类型标识寄存器中写入的升级固件类型, 执行相应类 型的固件升级处理。
14、 一种计算机可读存储介质, 所述存储介质包括一组计算机可执 行指令, 所述指令用于执行权利要求 1-3任一项所述的固件的升级方法。
15、 一种计算机可读存储介质, 所述存储介质包括一组计算机可执 行指令, 所述指令用于执行权利要求 4-6任一项所述的固件的升级方法。
PCT/CN2014/080222 2013-10-10 2014-06-18 一种固件的升级方法和系统、上位机和光模块 WO2015051647A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP14852023.2A EP3043512B1 (en) 2013-10-10 2014-06-18 Firmware upgrade method and system, upper computer and optical module

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310469841.2A CN104579719B (zh) 2013-10-10 2013-10-10 一种固件的升级方法和系统、上位机和光模块
CN201310469841.2 2013-10-10

Publications (1)

Publication Number Publication Date
WO2015051647A1 true WO2015051647A1 (zh) 2015-04-16

Family

ID=52812500

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080222 WO2015051647A1 (zh) 2013-10-10 2014-06-18 一种固件的升级方法和系统、上位机和光模块

Country Status (3)

Country Link
EP (1) EP3043512B1 (zh)
CN (1) CN104579719B (zh)
WO (1) WO2015051647A1 (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984200A (zh) * 2018-07-17 2018-12-11 郑州云海信息技术有限公司 一种定时更新固件的方法及装置
CN109144532A (zh) * 2017-06-13 2019-01-04 中兴通讯股份有限公司 升级方法及装置
CN109189434A (zh) * 2018-09-20 2019-01-11 安徽南瑞中天电力电子有限公司 一种电能表的在线升级方法
CN109901866A (zh) * 2017-12-07 2019-06-18 航天科工惯性技术有限公司 用于多模块系统的在线升级方法及旋转导向系统
CN111045703A (zh) * 2019-11-07 2020-04-21 许继集团有限公司 一种电池管理单元软件升级方法及系统
CN111309359A (zh) * 2020-03-16 2020-06-19 深圳益邦物联科技有限公司 固件远程控制自动升级方法、电子设备及存储介质
CN111880817A (zh) * 2020-07-27 2020-11-03 北京环境特性研究所 一种用于光电监控系统的远程烧写方法
CN112230967A (zh) * 2020-11-19 2021-01-15 成都新易盛通信技术股份有限公司 一种基于传统分区的光模块固件可回退在线升级方法
CN112783531A (zh) * 2021-01-29 2021-05-11 湖北三江航天红峰控制有限公司 一种fpga与dsp架构下以太网升级dsp程序方法
CN113821240A (zh) * 2021-09-03 2021-12-21 锐捷网络股份有限公司 固件升级方法、电子设备、存储介质及信号锁存电路
CN114915345A (zh) * 2021-01-29 2022-08-16 青岛海信宽带多媒体技术有限公司 一种光模块

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528186A (zh) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 资源文件的更新方法和装置
CN106598632B (zh) * 2015-10-15 2022-02-18 中兴通讯股份有限公司 一种光模块的固件升级方法及装置
CN105847067A (zh) * 2016-05-25 2016-08-10 北京小米移动软件有限公司 Zigbee设备的升级方法和装置
CN106843932B (zh) * 2016-12-26 2020-07-24 歌尔科技有限公司 虚拟现实设备固件的升级方法及系统
CN106681766B (zh) * 2016-12-26 2021-04-27 广东芬尼克兹节能设备有限公司 远程固件升级控制方法及系统
CN108694054A (zh) * 2017-04-10 2018-10-23 南昌欧菲生物识别技术有限公司 微处理器固件的升级方法及智能终端
CN107220091B (zh) * 2017-06-08 2020-06-26 成都欧飞凌通讯技术有限公司 一种100g cfp主备映象文件的升级与切换方法
CN109388413A (zh) * 2017-08-03 2019-02-26 中车株洲电力机车研究所有限公司 一种fpga程序更新方法及系统
CN108958765B (zh) * 2018-06-12 2022-12-09 新华三技术有限公司 升级光模块固件的方法及装置
CN108599861A (zh) * 2018-07-27 2018-09-28 深圳市极致兴通科技有限公司 一种通用的有源光模块写码装置及设备
CN111367539A (zh) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 一种eMMC在线升级方法和装置
CN110018854B (zh) * 2019-03-26 2021-10-22 联想(北京)有限公司 一种固件匹配方法、设备和计算机可读存储介质
CN110442356A (zh) * 2019-08-06 2019-11-12 东莞铭普光磁股份有限公司 Dsp固件的升级方法及装置
CN111273930A (zh) * 2020-01-21 2020-06-12 深圳市雷赛软件技术有限公司 固件升级控制方法、上位机及固件升级系统
CN112181467B (zh) * 2020-10-10 2023-11-14 北京字节跳动网络技术有限公司 终端的存储器固件升级方法、装置、终端和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950253A (zh) * 2010-08-12 2011-01-19 深圳市共进电子有限公司 借助web网页接口升级光网络单元中光模块固件的方法
CN102098590A (zh) * 2009-12-15 2011-06-15 中兴通讯股份有限公司 光网络单元固件版本自动升级方法及系统
CN102195798A (zh) * 2010-03-16 2011-09-21 中兴通讯股份有限公司 一种升级光网络单元的方法和系统
CN103248424A (zh) * 2012-02-14 2013-08-14 深圳市卓翼科技股份有限公司 光模块固件升级方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584822B (zh) * 2003-08-19 2010-04-21 联想(北京)有限公司 一种升级计算机固件程序的方法
GB2449193B (en) * 2004-07-07 2009-03-04 Dell Products Lp System and method for emdedding optical drive compatibility information in optical media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098590A (zh) * 2009-12-15 2011-06-15 中兴通讯股份有限公司 光网络单元固件版本自动升级方法及系统
CN102195798A (zh) * 2010-03-16 2011-09-21 中兴通讯股份有限公司 一种升级光网络单元的方法和系统
CN101950253A (zh) * 2010-08-12 2011-01-19 深圳市共进电子有限公司 借助web网页接口升级光网络单元中光模块固件的方法
CN103248424A (zh) * 2012-02-14 2013-08-14 深圳市卓翼科技股份有限公司 光模块固件升级方法及系统

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144532B (zh) * 2017-06-13 2023-04-11 中兴通讯股份有限公司 升级方法及装置
CN109144532A (zh) * 2017-06-13 2019-01-04 中兴通讯股份有限公司 升级方法及装置
CN109901866A (zh) * 2017-12-07 2019-06-18 航天科工惯性技术有限公司 用于多模块系统的在线升级方法及旋转导向系统
CN108984200A (zh) * 2018-07-17 2018-12-11 郑州云海信息技术有限公司 一种定时更新固件的方法及装置
CN109189434A (zh) * 2018-09-20 2019-01-11 安徽南瑞中天电力电子有限公司 一种电能表的在线升级方法
CN111045703A (zh) * 2019-11-07 2020-04-21 许继集团有限公司 一种电池管理单元软件升级方法及系统
CN111045703B (zh) * 2019-11-07 2023-08-11 许继集团有限公司 一种电池管理单元软件升级方法及系统
CN111309359A (zh) * 2020-03-16 2020-06-19 深圳益邦物联科技有限公司 固件远程控制自动升级方法、电子设备及存储介质
CN111880817A (zh) * 2020-07-27 2020-11-03 北京环境特性研究所 一种用于光电监控系统的远程烧写方法
CN111880817B (zh) * 2020-07-27 2023-04-07 北京环境特性研究所 一种用于光电监控系统的远程烧写方法
CN112230967A (zh) * 2020-11-19 2021-01-15 成都新易盛通信技术股份有限公司 一种基于传统分区的光模块固件可回退在线升级方法
CN112230967B (zh) * 2020-11-19 2024-03-29 成都新易盛通信技术股份有限公司 一种基于传统分区的光模块固件可回退在线升级方法
CN112783531A (zh) * 2021-01-29 2021-05-11 湖北三江航天红峰控制有限公司 一种fpga与dsp架构下以太网升级dsp程序方法
CN114915345A (zh) * 2021-01-29 2022-08-16 青岛海信宽带多媒体技术有限公司 一种光模块
CN114915345B (zh) * 2021-01-29 2023-12-01 青岛海信宽带多媒体技术有限公司 一种光模块
CN113821240A (zh) * 2021-09-03 2021-12-21 锐捷网络股份有限公司 固件升级方法、电子设备、存储介质及信号锁存电路
CN113821240B (zh) * 2021-09-03 2023-11-17 锐捷网络股份有限公司 固件升级方法、电子设备、存储介质及信号锁存电路

Also Published As

Publication number Publication date
EP3043512A4 (en) 2017-01-04
EP3043512B1 (en) 2020-01-01
CN104579719A (zh) 2015-04-29
CN104579719B (zh) 2019-07-19
EP3043512A1 (en) 2016-07-13

Similar Documents

Publication Publication Date Title
WO2015051647A1 (zh) 一种固件的升级方法和系统、上位机和光模块
WO2017067448A1 (zh) 一种无线固件升级方法、系统及计算机存储介质
JP5278222B2 (ja) 無線通信装置、無線通信方法および無線通信プログラム
CN102164363B (zh) 一种实现基站版本更新的方法和一种基站
CN112953775B (zh) 一种车机升级系统及方法
WO2011127860A2 (zh) 启动应用的方法、服务器和系统
WO2015100878A1 (zh) 一种芯片启动方法及多核处理器芯片、存储介质
CN106843933A (zh) 一种应用程序的漏洞修复方法、移动终端及补丁服务器
WO2011006378A1 (zh) 无线数据卡的升级方法和系统
WO2020114431A1 (zh) 基于PCIe接口的FPGA升级方法
WO2011130974A1 (zh) 文件下载方法及系统
WO2016078362A1 (zh) 一种双主控隔离的逐板升级的方法及装置
WO2017125016A1 (zh) 更改虚拟网卡配置信息的方法、设备及系统
WO2022166170A1 (zh) PCIe接口的设备枚举方法、装置、设备及存储介质
EP3734910B1 (en) Method and device for upgrading driver
WO2012100504A1 (zh) 一种无线通讯方法、系统及无线通讯终端
US20190028831A1 (en) Systems and methods for upgrading firmware in multiple devices of a wireless fire detection system
WO2014134989A2 (zh) 一种Android终端及其实现升级的方法
CN112383908A (zh) 一种蓝牙设备的升级方法及系统
WO2012139336A1 (zh) 一种无线网络接入终端及其运行方法
WO2012000240A1 (zh) 下载数据的方法和终端设备
CN103442041A (zh) 嵌入式设备固件升级的方法、装置及其系统
JP2013513874A (ja) データカードのアップグレーディング方法およびデバイス
CN105704707A (zh) 从设备及其空中升级的方法
WO2012163164A1 (zh) 一种选择网关的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14852023

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014852023

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014852023

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE