Optical module firmware upgrading method and optical module
By dividing the optical module into secure and insecure worlds and employing encrypted communication and real-time monitoring, the security and reliability issues in the optical module firmware upgrade process are resolved, ensuring the security and compatibility of firmware file transmission and reducing memory usage.
Patent Information
- Application Number
- CN202511697416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-17
AI Technical Summary
The existing optical module firmware upgrade process lacks encrypted transmission and firmware source verification, making firmware files vulnerable to man-in-the-middle attacks that could steal or tamper with them, leading to communication link hijacking, data leakage, and hardware damage. Furthermore, the traditional upgrade process has low security and reliability.
The microprocessor employs a pre-defined security architecture to divide its internal space into a secure world and a non-secure world. Firmware files are transmitted through an encrypted communication channel, and integrity and signature verification are performed in the secure world. The working status of the optical module is monitored in real time to ensure that the firmware files are compatible with the hardware environment.
It improves the security and reliability of firmware file transmission, ensures the reliability of firmware file sources, reduces memory usage, and avoids irreversible damage to the optical module caused by upgrade errors.
Smart Images

Figure CN121541905A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical module technology, and more specifically, to an optical module firmware upgrade method and an optical module. Background Technology
[0002] An optical module is a standard photoelectric conversion module commonly used in electronic devices in the field of optical communication. An optical module consists of a microcontroller unit (MCU), an optical receiver, an optical transmitter, and storage media. When the optical module is powered on, the MCU loads and runs the optical module firmware from the storage media to coordinate and control the photoelectric conversion function of the optical module. During the loading and running of the optical module firmware, it is also necessary to periodically upgrade the firmware to optimize performance and fix vulnerabilities.
[0003] Currently, firmware upgrades for optical modules are often performed by transmitting firmware files via Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), or unencrypted Universal Serial Bus (USB).
[0004] However, when upgrading the firmware of optical modules using related technologies, the upgrade process lacks encrypted transmission and firmware source verification. This makes the firmware file vulnerable to man-in-the-middle attacks, allowing attackers to steal or tamper with the file. Attackers can also inject malicious firmware, leading to problems such as hijacking of the optical module's communication links, data leakage, and hardware damage. Therefore, the relevant technical solutions suffer from poor security and reliability in optical module firmware upgrades. Summary of the Invention
[0005] The purpose of this application is to provide a method for upgrading optical module firmware and an optical module, which can improve the security and reliability of firmware file transmission, ensure the reliability of firmware file sources, and reduce the memory usage of firmware files.
[0006] The embodiments of this application are implemented as follows: A first aspect of this application provides a firmware upgrade method for an optical module. The method is applied to a microprocessor in the optical module, where the microprocessor is divided into a secure world and a non-secure world based on a preset security framework. The method includes: The host computer sends an upgrade request to the optical module, and the insecure world establishes an encrypted communication channel with the host computer based on the upgrade request; The insecure world receives encrypted firmware files from the host computer through an encrypted communication channel. The encrypted firmware files include: encrypted firmware content, firmware signature, preset hash value, and target version number. The secure world performs integrity and signature verification on encrypted firmware files in the insecure world. If the verification passes, the encrypted firmware file is decrypted to obtain the decrypted firmware file. The secure world loads and runs the decrypted firmware file, and performs collaborative initialization and parameter calibration on the laser driver circuit, photodiode receiver module and temperature compensation unit in the optical module; By calling the digital diagnostic monitoring interface of the optical module through the secure world, the working status parameters of the optical module are monitored in real time. Based on the working status parameters, it is determined whether the upgraded firmware file matches the hardware environment of the optical module; if so, the firmware upgrade is completed.
[0007] As one possible implementation, the aforementioned encrypted firmware file includes: encrypted firmware content, firmware signature, preset hash value, and target version number.
[0008] As one possible implementation, the secure world performs integrity and signature verification on encrypted firmware files in the insecure world, including: Calculate the hash value of the encrypted firmware file, and determine whether the encrypted firmware file is complete based on the comparison result between the hash value and the preset hash value; If so, the firmware signature of the encrypted firmware file is verified using the preset public key to determine whether the encrypted firmware file is from a reliable source. If the encrypted firmware file is complete and its source is reliable, then the verification is successful.
[0009] As one possible implementation, the integrity of the encrypted firmware file is determined based on a comparison between the hash value and a preset hash value, including: If the hash value is equal to the preset hash value, the encrypted firmware file is confirmed to be complete. If the hash value is not equal to the preset hash value, the encrypted firmware file is determined to be incomplete.
[0010] As one possible implementation, a pre-configured public key is used to verify the firmware signature of the encrypted firmware file, including: Use a preset public key to decrypt the firmware signature of the encrypted firmware file to obtain the preset hash value corresponding to the firmware signature; The preset hash value obtained from decryption is compared with the actual hash value to determine whether the encrypted firmware file is from a reliable source.
[0011] As one possible implementation, the aforementioned secure world includes: a specific isolated partition and secure storage; after decrypting the encrypted firmware file to obtain the decrypted firmware file, it also includes: The decrypted firmware file is swapped into a specific isolated partition in the secure world, and the target version number of the decrypted firmware file is stored in secure storage.
[0012] As one possible implementation, the secure world loads and runs the decrypted firmware file, including: Secure World retrieves the current version number of the currently running firmware from the secure storage and compares the current version number with the target version number; If the target version number is later than the current version number, the decrypted firmware file will be loaded and run, and the power consumption data and latency of the microprocessor will be monitored in real time during the loading and running process. Based on power consumption data and latency, determine whether the decrypted firmware file runs successfully; If so, delete the old version of the firmware file in the specific isolated partition; If not, a rollback operation will be performed to restore the firmware file to the old version.
[0013] As one possible implementation, the laser driver circuit, photodiode receiver module, and temperature compensation unit in the optical module are collaboratively initialized and their parameters are calibrated, including: Based on the decrypted firmware file, the modulation parameters of the laser driver circuit are reconfigured, the sensitivity threshold of the photodiode receiver module is calibrated, and the configuration parameters of the temperature compensation unit are optimized.
[0014] As one possible implementation, the optical module's digital diagnostic monitoring interface is accessed through the secure world to monitor its operating status parameters in real time. Based on these parameters, it is determined whether the upgraded firmware file matches the optical module's hardware environment, including: Real-time monitoring of the bias current and output optical power of the laser driver circuit in the optical module, the bit error rate and signal jitter range of the photodiode receiver module, and the actual temperature value of the temperature compensation unit. Determine whether any of the following parameters—bias current, output optical power, bit error rate, signal jitter range, and actual temperature value—exceeds the corresponding preset threshold: If so, it indicates that the upgraded firmware file is incompatible with the hardware environment of the optical module.
[0015] As one possible implementation, after determining that the upgraded firmware file is incompatible with the hardware environment of the optical module, the following steps are taken: If the upgraded firmware file is incompatible with the hardware environment of the optical module, a rollback operation is performed to restore the old firmware file. At the same time, the original parameter configurations of the laser driver circuit, photodiode receiver module, and temperature compensation unit are restored based on historical data from the digital diagnostic monitoring interface.
[0016] As one possible implementation, the process of the host computer generating the encrypted firmware file includes: A firmware signature is generated based on a pre-set private key, and the firmware file is encrypted using a preset encryption algorithm to obtain an encrypted firmware file.
[0017] In a second aspect of this application, an optical module is provided for performing the steps of the optical module firmware upgrade method described in the first aspect.
[0018] The beneficial effects of the embodiments of this application include: This application provides a method for upgrading the firmware of an optical module. The microprocessor in the optical module has a trusted hardware resource isolation function. The microprocessor divides its internal space into a secure world and a non-secure world based on a preset security architecture. Edge programs in the firmware upgrade process are executed in the non-secure world, and key programs in the firmware upgrade process are executed in the secure world, thereby improving the security and reliability of the firmware upgrade. The process involves the optical module receiving an upgrade request from a host computer and establishing an encrypted communication channel. The host computer then sends an encrypted firmware file to the insecure world via this channel. Upon receiving the encrypted firmware file, the secure world verifies its integrity and signature. If the firmware content is complete and its source is reliable, the secure world decrypts the encrypted firmware file and writes it to the secure world. The secure world loads and runs the decrypted firmware file and performs collaborative initialization and parameter calibration on the laser driver circuit, photodiode receiver module, and temperature compensation unit within the optical module. The secure world then calls the optical module's digital diagnostic monitoring interface to monitor its operational status parameters in real time and determines compatibility between the upgraded firmware file and the current hardware environment. The upgrade is considered successful only if the upgraded firmware file is compatible with the current hardware environment. Furthermore, the host computer encrypts the distributed firmware file using a preset cryptographic algorithm and sends the encrypted firmware file to the insecure world via an encrypted communication channel. The secure world only decrypts the encrypted firmware file after verifying its integrity and reliability. The decrypted firmware file is then used for firmware upgrades in the secure world. This ensures the security and reliability of the firmware file at multiple levels, including transmission, storage, and operation, effectively preventing irreversible damage to the optical module caused by upgrade errors. Simultaneously, before the optical module undergoes a firmware upgrade, the laser driver circuit, photodiode receiver module, and temperature compensation unit within the optical module are collaboratively initialized and their parameters calibrated based on the decrypted firmware file. During the upgrade process, the real-time operating status of the optical module is monitored through a digital diagnostic monitoring interface to ensure compatibility between the firmware upgrade process and the optical module's hardware operating environment. This improves the security and reliability of firmware file transmission, ensures the reliability of the firmware file source, and reduces the memory footprint of the firmware file. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the structure of an optical module provided in an embodiment of this application; Figure 2 A flowchart illustrating the first optical module firmware upgrade method provided in this application embodiment; Figure 3 A flowchart illustrating the second optical module firmware upgrade method provided in this application embodiment; Figure 4 A flowchart illustrating the third optical module firmware upgrade method provided in this application embodiment; Figure 5 A flowchart illustrating the fourth optical module firmware upgrade method provided in this application embodiment; Figure 6 This application provides a schematic diagram of the structure of a secure world as an embodiment of the present application. Figure 7 A flowchart illustrating the fifth optical module firmware upgrade method provided in this application embodiment; Figure 8 A flowchart of the sixth optical module firmware upgrade method provided in the embodiments of this application.
[0021] Reference numerals: 10: Optical module; 101: Microprocessor; 1011: Secure world; 111: Specific isolation partition; 112: Secure memory; 1012: Unsecured world; 102: Laser driver circuit; 103: Photodiode receiver module; 104: Temperature compensation unit; 105: Digital diagnostic monitoring interface. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0024] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0025] Currently, firmware files are frequently transmitted via HTTP, FTP, or unencrypted general-purpose serial buses. However, these methods lack encryption and firmware origin verification, making them vulnerable to man-in-the-middle attacks that could steal or tamper with the firmware. Attackers can also inject malicious firmware, leading to hijacking of the optical module's communication link, data leaks, or hardware damage. Furthermore, in traditional optical module firmware upgrades, the optical module directly writes the received firmware file to an unencrypted storage area without verifying its integrity, relying only on simple cyclic redundancy check (CRUD). CRUD is easily bypassed, allowing attackers to implant backdoors into the firmware file, thereby gaining long-term control of the optical module or disrupting the communication network.
[0026] Furthermore, traditional optical module firmware upgrades are based on insecure processors. This means that if an optical module needs security upgrades, the hardware processor must be replaced, increasing production costs and hindering security feature upgrades. Therefore, traditional optical module firmware upgrades lack encryption protection and code integrity verification, resulting in low security and reliability.
[0027] To address this, this application provides a method for upgrading the firmware of an optical module. The microprocessor divides its internal space into a secure world and a non-secure world based on a preset security architecture, enabling hardware resource isolation. The non-secure world receives an upgrade request from a host computer and establishes an encrypted communication channel with the host computer. The host computer sends the encrypted firmware file to the non-secure world via this channel. The secure world performs integrity and reliability checks on the received encrypted firmware file. After both checks pass, the secure world decrypts the firmware file and writes it to a specific isolated partition. The secure world loads and runs the decrypted firmware file from the isolated partition. Simultaneously, based on the decrypted firmware file, it performs collaborative initialization and parameter calibration on the laser driver circuit, photodiode receiver module, and temperature compensation unit within the optical module. The secure world calls a digital diagnostic monitoring interface to monitor the real-time operating status of the optical module. Based on this status, it determines whether the upgraded firmware file is compatible with the current hardware environment of the optical module. Only when the upgraded firmware file is compatible with the hardware environment is the firmware upgrade considered successful. This can improve the security and reliability of firmware file transmission, ensure the reliability of firmware file sources, and reduce the memory usage of firmware files.
[0028] It is worth noting that the microprocessor of the optical module used in this application has hardware-level resource isolation function. The firmware file transmitted from the host computer to the optical module is an encrypted firmware file. Moreover, the encrypted firmware file is transmitted to the insecure world of the optical module's microprocessor in an encrypted communication channel. In this way, it can prevent the firmware file from being invaded or tampered with by external attackers during the transmission process.
[0029] Furthermore, the optical module provided in this application receives upgrade requests from the host computer via the insecure world within the microprocessor, and also receives encrypted firmware files via the insecure world. This significantly reduces the hardware resource consumption of the secure world. The secure world performs integrity and reliability checks on the encrypted firmware files received by the insecure world. Only when the encrypted firmware files are complete and reliable will the secure world decrypt the encrypted firmware files and write them to the specific isolation partition corresponding to the secure world, thereby ensuring the validity of the firmware files written to the secure world. While the microprocessor loads and runs the new version firmware files normally and stably, the old version firmware files with faults or vulnerabilities are deleted, thereby reducing firmware file redundancy.
[0030] In addition, once the secure world verifies that the encrypted firmware file is complete and reliable, it decrypts the encrypted firmware file and writes it to a specific isolation area of the secure world. However, if the firmware program temporarily stored in the specific isolation area of the secure world fails to start normally, the secure world will also delete the new version of the firmware file in a timely manner, thereby reducing the hardware resource consumption of the microprocessor by the faulty firmware file that cannot start.
[0031] In summary, compared to traditional optical module firmware upgrade methods, the optical module firmware upgrade method provided in this application not only adds an encrypted firmware file transmission function but also performs integrity and reliability verification on the received encrypted firmware file, thereby ensuring the security and reliability of the optical module firmware upgrade. Furthermore, the optical module firmware upgrade method provided in this application only decrypts the encrypted firmware file and writes it to a specific isolated partition after successful verification. The old version of the firmware file is only deleted when the decrypted firmware content can be loaded and run normally, and the laser driver circuit, photodiode receiving module, and temperature compensation unit in the optical module are all operating normally during the normal loading and running process. Alternatively, the new version of the firmware file is deleted when the decrypted firmware content fails to boot normally. This effectively reduces the hardware memory usage of invalid or vulnerable firmware content.
[0032] The following description, in conjunction with the accompanying drawings, provides a detailed explanation of the optical module firmware upgrade method and the optical module provided in the embodiments of this application.
[0033] Figure 1 A schematic diagram of the structure of an optical module provided in this application is shown below. Figure 1 The optical module 10 provided in this application embodiment includes a microprocessor 101. The microprocessor 101 is an embedded processor with hardware resource isolation built based on a preset security architecture. The internal space of the microprocessor 101 is divided into a secure world 1011 and a non-secure world 1012 based on the preset security structure. The secure world 1011 refers to the isolated and protected area within the microprocessor 101, mainly used for running security monitoring programs and critical security operations, such as signature verification and integrity verification. The non-secure world 1012 refers to the isolated but unprotected area within the microprocessor 101, mainly used for running some common upgrade programs, such as sending upgrade requests and handling vulnerability failures. This application does not specifically limit this area.
[0034] Specifically, the microprocessor 101 can be implemented using an embedded processor that supports TrustZone or TFM. This embedded processor features hardware resource isolation, uses hidden protection for temporary resource isolation, and employs an encryption engine for secure storage. TrustZone System-Wide Hardware Isolation Technology (TrustZone) is a security extension technology for the ARM architecture that provides temporary resource isolation between the secure and insecure worlds through hardware isolation. Trusted Firmware-M (TFM) is secure firmware built by ARM for the microprocessor, providing a trusted execution environment based on TrustZone. The Trusted Execution Environment (TEE) can protect the critical code and data of the firmware file from interference by ordinary programs in the insecure world through hardware isolation. Therefore, the microprocessor 101 can be implemented using any embedded processor that supports TrustZone or TFM; this application does not impose any specific limitations on this.
[0035] Optionally, the microprocessor 101 can perform functions such as signature verification, decryption and integrity verification, anti-rollback control and lightweight security protocol stack implementation on the received encrypted firmware file through the secure world 1011. The microprocessor 101 can run the main business logic of the optical module 10 and provide upgrade interfaces through the non-secure world 1012. This application does not make specific limitations in this regard.
[0036] The signature verification is mainly used to determine whether the source of the firmware file is reliable, that is, the received encrypted firmware file has not been tampered with and is the real firmware file issued by the host computer; the integrity verification is mainly used to determine whether the received firmware file is complete, that is, the received encrypted firmware file has not been deleted or lost; decryption is the process of decrypting the encrypted firmware file after both integrity verification and reliability verification have passed, in order to obtain the firmware content contained in the encrypted firmware file; the anti-rollback control is mainly used to prevent the firmware from being downgraded to a firmware version with vulnerabilities, that is, to prevent the received firmware file from having vulnerabilities, which can effectively avoid attacks based on known vulnerabilities; the lightweight security protocol stack is usually implemented by trimming mbedTLS or TF-M, which can trim some unimportant data or code to reduce memory usage; the main business logic refers to the processing program for photoelectric conversion of the optical module, such as the CMIS protocol processing logic; the upgrade interface refers to the interface used to receive upgrade commands, such as receiving upgrade commands through the CDB command of the CMIS protocol, etc., which are not specifically limited in this application.
[0037] In addition, the optical module 10 also deploys hardware resources such as a laser driver circuit 102, a photodiode receiver module 103, and a temperature compensation unit 104. The laser driver circuit 102, the photodiode receiver module 103, and the temperature compensation unit 104 are all connected to the microprocessor 101. While the optical module 10 loads and runs the new version of the firmware file, the microprocessor 101 controls the coordinated initialization and parameter calibration of the laser driver circuit 102, the photodiode receiver module 103, and the temperature compensation unit 104, so that the initial operating state and initial operating parameters of the laser driver circuit 102, the photodiode receiver module 103, and the temperature compensation unit 104 match the new version of the firmware file.
[0038] Furthermore, the secure world in the microprocessor 101 calls the digital diagnostic monitoring interface 105 to monitor the actual operating data of the laser driver circuit 102, photodiode receiving module 103, and temperature compensation unit 104 to obtain the real-time working status of the optical module 10. Based on the real-time working status of the optical module 10, it determines whether the currently loaded firmware file is compatible with the hardware resources such as the laser driver circuit 102, photodiode receiving module 103, and temperature compensation unit 104. Only when the laser driver circuit 102, photodiode receiving module 103, and temperature compensation unit 104 are running normally during the current firmware file loading and running process is the optical module 10 considered to have successfully completed the firmware upgrade.
[0039] Figure 2 A flowchart illustrating a firmware upgrade method for an optical module provided in this application is shown. This method is applied to the microprocessor 101 in the aforementioned optical module 10. See also... Figure 2 This application provides a method for upgrading the firmware of an optical module, comprising: S201. The host computer sends an upgrade request to the optical module. The insecure world establishes an encrypted communication channel with the host computer based on the upgrade request.
[0040] Optionally, the upgrade command is an upgrade instruction sent by the user to the optical module to instruct the optical module to perform a firmware upgrade. The upgrade command can be an upgrade instruction initiated by the user to the optical module based on vulnerabilities in the currently running firmware program, an upgrade instruction initiated by the user to the optical module based on the latest version of the firmware file currently available on the host computer, or an upgrade instruction initiated by the user to the optical module based on vulnerability logs reported by the optical module. This application does not specifically limit the specific type of instruction.
[0041] Furthermore, the upgrade command sent by the user to the optical module can either instruct the fixing of vulnerabilities in the firmware currently running on the optical module, or it can instruct the optimization of the firmware currently running on the optical module. This application does not make any specific limitations on this.
[0042] Optionally, the microprocessor receives the upgrade command issued by the user via an insecure world and responds by sending an upgrade request to the host computer. The upgrade request instructs the host computer to send the latest version of the firmware file or a firmware file that fixes known vulnerabilities. The host computer refers to the host device that sends the latest version of the firmware file or the firmware file that fixes known vulnerabilities to the optical module. The host computer can be implemented by a switch, router, or other devices, or by a local server and local tools; this application does not specifically limit its implementation.
[0043] It is worth noting that regardless of whether the microprocessor in the optical module undergoes a firmware upgrade, the optical module maintains a physical connection with the host computer. However, the encrypted communication channel between the insecure world in the microprocessor and the host computer is only activated when the microprocessor undergoes a firmware upgrade, or an encrypted communication channel is established between the insecure world in the microprocessor and the host computer. Only then can the insecure world in the microprocessor receive the encrypted firmware file sent by the host computer through the encrypted communication channel.
[0044] Optionally, the encrypted communication channel can be a communication channel established based on the Hypertext Transfer Protocol Secure (HTTPS), or it can be a communication channel established based on other secure communication protocols. This application does not make any specific limitations on this.
[0045] It should also be noted that encrypted communication channels can effectively prevent man-in-the-middle attacks from stealing or tampering with encrypted firmware files issued by the host computer, which can greatly improve the security of optical module firmware upgrades.
[0046] S202. The insecure world receives the encrypted firmware file sent by the host computer through the encrypted communication channel. The encrypted firmware file includes: encrypted firmware content, firmware signature, preset hash value and target version number.
[0047] The host computer uses a preset cryptographic algorithm to encrypt the latest version of the firmware file or the firmware file that fixes known vulnerabilities, to obtain the corresponding encrypted firmware file. The encrypted firmware file includes: encrypted firmware content, firmware signature, preset hash value, and target version number. The encrypted firmware content refers to the complete firmware program code contained in the firmware file; the firmware signature is the electronic signature of the firmware file sent by the host computer, mainly used to indicate the origin of the firmware file; the preset hash value is the hash value calculated by the host computer based on a hash algorithm for the current version of the firmware file; and the target version number is the version identifier of the current firmware file issued by the host computer.
[0048] Optionally, the encrypted firmware file refers to the file package obtained by encrypting the latest version of the firmware file or the firmware file without vulnerabilities using a preset cryptographic algorithm by the host computer. The preset cryptographic algorithm can be an asymmetric cryptographic algorithm or other types of cryptographic algorithms, and this application does not specifically limit it.
[0049] Optionally, after the insecure world in the microprocessor establishes an encrypted communication channel with the host computer, the host computer sends the encrypted firmware file to the insecure world in the microprocessor through the encrypted communication channel.
[0050] S203. The secure world performs integrity verification and signature verification on the encrypted firmware file in the insecure world. If the verification passes, the encrypted firmware file is decrypted to obtain the decrypted firmware file.
[0051] Optionally, integrity verification refers to verifying the integrity of the firmware content contained in the encrypted firmware file, that is, verifying whether there is packet loss during the transmission of the encrypted firmware file; signature verification refers to verifying the source of the encrypted firmware file, that is, determining whether the encrypted firmware file has a reliable source and whether the encrypted firmware file is a firmware file issued by the host device equipped with the optical module.
[0052] Optionally, the secure world performs integrity and signature verification on the encrypted firmware files temporarily stored in the insecure world. Only when the encrypted firmware file temporarily stored in the insecure world is complete and its source is reliable (i.e., the firmware content is complete and the file source is reliable), will the secure world decrypt the encrypted firmware file and write the decrypted firmware file into the secure world. Conversely, if the encrypted firmware file temporarily stored in the insecure world contains incomplete firmware content or its source is unreliable, the secure world will not decrypt the encrypted firmware file, and the insecure world will simultaneously delete the encrypted firmware file.
[0053] S204, Secure World loads and runs the decrypted firmware file, and performs collaborative initialization and parameter calibration on the laser driver circuit, photodiode receiver module and temperature compensation unit in the optical module.
[0054] Optionally, the decrypted firmware file refers to the complete and reliable firmware program issued by the host computer. The decrypted firmware file includes firmware execution code, and SecureWorld loads and runs the decrypted firmware file.
[0055] Meanwhile, based on the decrypted firmware file currently being loaded and run in the secure world, the microprocessor performs coordinated initialization processing on the laser driver circuit, photodiode receiver module, and temperature compensation unit in the optical module, and performs parameter calibration on the laser driver circuit, photodiode receiver module, and temperature compensation unit based on the decrypted firmware file currently being loaded and run in the secure world, so that the initial operating state of the laser driver circuit, photodiode receiver module, and temperature compensation unit matches the firmware content loaded and run in the secure world.
[0056] The laser driver circuit is responsible for emitting optical signals according to the received instructions; the photodiode receiving module is responsible for receiving optical signals; and the temperature compensation unit is an intelligent temperature control component that ensures that the laser driver circuit can emit optical signals stably under different environments.
[0057] Optionally, the microprocessor can write configuration register values to the laser driver circuit via a digital bus (such as an SPI bus) to set the bias current and modulation current of the laser driver circuit; the photodiode receiving module converts the received optical signal into a voltage signal, and amplifies and shapes the converted voltage signal to obtain the corresponding digital signal output to the microprocessor; the temperature compensation unit can monitor the junction temperature of the laser in real time and convert it into temperature data to be transmitted to the microprocessor.
[0058] Furthermore, when the secure world in the microprocessor begins to load and run the new firmware file, the microprocessor initializes the laser driver circuit, photodiode receiver module, and temperature compensation unit according to the new firmware file. At the same time, it reconfigures the operating parameters of the laser driver circuit, photodiode receiver module, and temperature compensation unit according to the new firmware file, so that the laser driver circuit, photodiode receiver module, and temperature compensation unit can operate according to the hardware environment matched with the new firmware file.
[0059] S205. By calling the digital diagnostic monitoring interface of the optical module through the secure world, the working status parameters of the optical module are monitored in real time, and based on the working status parameters, it is determined whether the upgraded firmware file matches the hardware environment of the optical module.
[0060] Optionally, the digital diagnostic monitoring interface is used to monitor the real-time operating status of the laser driver circuit, photodiode receiver module, and temperature compensation unit in the optical module, and feeds back the monitoring results as the working status of the optical module to the microprocessor. Based on the real-time operating parameters of the optical module, it determines whether the upgraded firmware file of the optical module matches the actual operating process of the laser driver circuit, photodiode receiver module, and temperature compensation unit in the optical module.
[0061] In other words, when the secure world loads and runs the upgraded firmware file, it is also necessary to monitor the real-time operating status of the laser driver circuit, photodiode receiver module, and temperature compensation unit in the optical module.
[0062] S206. If yes, then complete the firmware upgrade.
[0063] Optionally, the optical module is considered to have successfully completed the firmware upgrade only when the upgraded firmware file is stably loaded and running in the secure world, and the laser driver circuit, photodiode receiver module, and temperature compensation unit are all operating normally.
[0064] Conversely, if the secure world cannot start or run the decrypted firmware file normally, it means that the optical module firmware upgrade has failed. The secure world will then delete the decrypted firmware file and continue running the previously running firmware program to maintain the underlying logic of the optical module.
[0065] Similarly, even if the secure world can run the decrypted firmware file normally, if any one of the laser driver circuit, photodiode receiver module, or temperature compensation unit in the optical module has a malfunction, it also indicates that the optical module firmware upgrade has failed. The secure world will simultaneously delete the decrypted firmware file and perform a rollback operation to rerun the firmware file before the upgrade in order to maintain the underlying logic of the optical module.
[0066] In this embodiment, the microprocessor in the optical module has a trusted hardware resource isolation function. The microprocessor divides its internal space into a secure world and a non-secure world based on a preset security architecture. Edge programs in the optical module firmware upgrade are executed in the non-secure world, and key programs in the optical module firmware upgrade process are executed in the secure world, thereby improving the security and reliability of the optical module firmware upgrade. The process involves the optical module receiving an upgrade request from a host computer and establishing an encrypted communication channel. The host computer then sends an encrypted firmware file to the insecure world via this channel. Upon receiving the encrypted firmware file, the secure world verifies its integrity and signature. If the firmware content is complete and its source is reliable, the secure world decrypts the encrypted firmware file and writes it to the secure world. The secure world loads and runs the decrypted firmware file and performs collaborative initialization and parameter calibration on the laser driver circuit, photodiode receiver module, and temperature compensation unit within the optical module. The secure world then calls the optical module's digital diagnostic monitoring interface to monitor its operational status parameters in real time and determines compatibility between the upgraded firmware file and the current hardware environment. The upgrade is considered successful only if the upgraded firmware file is compatible with the current hardware environment. Furthermore, the host computer encrypts the distributed firmware file using a preset cryptographic algorithm and sends the encrypted firmware file to the insecure world via an encrypted communication channel. The secure world only decrypts the encrypted firmware file after verifying its integrity and reliability. The decrypted firmware file is then used for firmware upgrades in the secure world. This ensures the security and reliability of the firmware file at multiple levels, including transmission, storage, and operation, effectively preventing irreversible damage to the optical module caused by upgrade errors. Simultaneously, before the optical module undergoes a firmware upgrade, the laser driver circuit, photodiode receiver module, and temperature compensation unit within the optical module are collaboratively initialized and their parameters calibrated based on the decrypted firmware file. During the upgrade process, the real-time operating status of the optical module is monitored through a digital diagnostic monitoring interface to ensure compatibility between the firmware upgrade process and the optical module's hardware operating environment. This improves the security and reliability of firmware file transmission, ensures the reliability of the firmware file source, and reduces the memory footprint of the firmware file.
[0067] In one alternative implementation, see [link to implementation details]. Figure 3 The specific operation of step S203 above can be as follows: S301. Calculate the hash value of the encrypted firmware file, and determine whether the encrypted firmware file is complete based on the comparison result between the hash value and the preset hash value.
[0068] Optionally, the secure world calculates the hash value of the encrypted firmware file temporarily stored in the insecure world based on a hash algorithm or hash function, and determines whether the encrypted firmware file is complete based on the comparison result between the hash value calculated in real time and the preset hash value contained in the encrypted firmware file, that is, whether the encrypted firmware file has lost packets or been tampered with by others during transmission.
[0069] S302. If so, use the preset public key to verify the firmware signature of the encrypted firmware file to determine whether the encrypted firmware file is from a reliable source.
[0070] Optionally, the pre-set public key refers to a trusted public key that is set in advance before the optical module undergoes firmware upgrade. The pre-set public key can be stored in the trusted storage space of the secure world in advance, or it can be issued to the secure world by the host computer through a digital certificate or secure channel. This application does not make specific limitations on this.
[0071] Optionally, when the secure world determines that the encrypted firmware file received by the insecure world contains complete firmware content, the secure world calls a preset public key to verify the firmware signature of the encrypted firmware file in order to determine whether the encrypted firmware file comes from a host device that matches the optical module, so as to determine whether the source of the encrypted firmware file is reliable.
[0072] S303. If the encrypted firmware file is complete and its source is reliable, then the verification is successful.
[0073] Optionally, only when the integrity verification and signature verification of the encrypted firmware file pass, is the encrypted firmware file considered a reliable and secure firmware file package issued by the host computer, and only then will the secure world decrypt the encrypted firmware file to obtain the firmware content contained in the encrypted firmware file.
[0074] In one alternative implementation, see [link to implementation details]. Figure 4 The operation of "determining whether the encrypted firmware file is complete based on the comparison result between the hash value and the preset hash value" in step S301 above can be specifically as follows: S401. If the hash value is equal to the preset hash value, then the encrypted firmware file is confirmed to be complete.
[0075] Optionally, the firmware content contained in the encrypted firmware file received by the insecure world through the encrypted communication channel is considered complete only when the hash value of the encrypted firmware package calculated in real time by the secure world using a hash function is equal to the preset hash value of the encrypted firmware package calculated by the host computer using a hash function.
[0076] S402. If the hash value is not equal to the preset hash value, the encrypted firmware file is determined to be incomplete.
[0077] Optionally, when the hash value of the encrypted firmware package calculated in real time by the secure world using a hash function is not equal to the preset hash value of the encrypted firmware package calculated by the host computer using a hash function, it is determined that the firmware content contained in the encrypted firmware file received by the insecure world through the encrypted communication channel is incomplete. That is, the encrypted firmware file received by the insecure world may be tampered with or maliciously injected by external attackers, or packet loss may occur. This application does not make specific limitations on this.
[0078] In other words, the firmware content contained in the encrypted firmware file temporarily stored in the insecure world at this time may not be able to fix the currently known vulnerabilities of the optical module, and may even cause new damage to the optical module.
[0079] In one alternative implementation, see [link to implementation details]. Figure 5 The specific steps of "using a preset public key to verify the firmware signature of the encrypted firmware file" in step S302 above can be as follows: S501. Use a preset public key to decrypt the firmware signature of the encrypted firmware file to obtain the preset hash value corresponding to the firmware signature. Optionally, SecureWorld obtains the firmware signature from the encrypted firmware file and decrypts the firmware signature using a preset public key. If the preset public key can successfully decrypt the firmware signature, the corresponding claim digest can be obtained, that is, the preset hash value corresponding to the firmware signature.
[0080] It is worth noting that the host computer uses a hash algorithm or hash function to calculate the preset hash value of the encrypted firmware file, and calls the preset private key to encrypt the preset hash value, thus obtaining the firmware signature of the encrypted firmware file.
[0081] S502. Compare the preset hash value obtained from decryption with the actual hash value to determine whether the encrypted firmware file is from a reliable source.
[0082] Optionally, the secure world uses the same hash algorithm or hash function as the host computer to calculate the hash value of the actually received encrypted firmware file, and compares the calculated hash value with the preset hash value obtained from decryption. If they are the same, it indicates that the encrypted firmware file source is reliable. Otherwise, it indicates that the encrypted firmware file source is unreliable.
[0083] Figure 6 A structural diagram of a secure world provided for this application is shown below. Figure 6 The secure world 1011 in the microprocessor 101 of the optical module 10 provided in this application embodiment includes: a specific isolation partition 111 and a secure memory 112.
[0084] Optionally, the specific isolation partition 111 is used to indicate the secure isolation area in the secure world 1011, mainly used to store firmware programs to ensure the security and reliability of firmware program operation. Meanwhile, the secure memory 112 refers to the memory used to store the version number corresponding to the firmware program, and the secure memory 112 automatically obtains the version number corresponding to the firmware program based on a hidden security engine.
[0085] In one optional implementation, after the step of "decrypting the encrypted firmware file to obtain the decrypted firmware file", the method further includes: The decrypted firmware file is swapped into a specific isolated partition in the secure world, and the target version number of the decrypted firmware file is stored in secure storage.
[0086] Optionally, writing the decrypted firmware file to a specific isolated partition in the secure world can effectively prevent physical attacks (such as probe attacks) by external attackers, thereby avoiding the theft of firmware content.
[0087] In one alternative implementation, see [link to implementation details]. Figure 7 The specific operation of step S204 above can be as follows: S701, Secure World retrieves the current version number of the currently running firmware from the secure storage and compares the current version number with the target version number.
[0088] Optionally, the current version number refers to the version number of the firmware file currently running in the secure world, that is, the version number of the firmware file that the secure world was running before loading and running the encrypted firmware file received from the host computer.
[0089] Optionally, the secure world compares the version number of the currently running firmware stored in the secure storage with the target version number of the firmware to be run, in order to determine whether the firmware file corresponding to the target version number has known vulnerabilities, thereby preventing the optical module from being downgraded to a firmware version with known vulnerabilities.
[0090] S702: If the target version number is later than the current version number, the decrypted firmware file is loaded and run, and the power consumption data and latency of the microprocessor are monitored in real time during the loading and running process.
[0091] Optionally, when the target version number is newer than the firmware currently running in the secure world, that is, when the firmware corresponding to the target version number can fix the vulnerabilities existing in the currently running firmware, the secure world loads and runs the decrypted firmware file.
[0092] Optionally, power consumption data refers to the energy consumed in the process of loading and running the decrypted firmware file in the secure world of the microprocessor, and latency time refers to the time taken in the process of loading and running the decrypted firmware file in the secure world of the microprocessor.
[0093] S703 determines whether the decrypted firmware file runs successfully based on power consumption data and delay time.
[0094] Optionally, based on the power consumption data of the microprocessor, it can be determined whether loading and running the decrypted firmware file in the secure world exceeds the optical module's strict heat dissipation and power budget; based on the microprocessor's latency, it can be determined whether loading and running the decrypted firmware file in the secure world affects the optical module's ability to process real-time network data.
[0095] S704, if so, delete the old version of firmware files in the specific isolated partition.
[0096] Optionally, after decrypting the encrypted firmware file, the secure world loads and runs the decrypted firmware file in a specific isolated partition. At this time, if the power consumption data of the microprocessor does not exceed the heat dissipation capacity and power budget of the optical module, and the delay time of the microprocessor meets the real-time network data transmission of the optical module, it can be determined that the secure world has successfully loaded and run the decrypted firmware file, and the old version of the firmware file in the specific isolated partition is deleted.
[0097] S705. If not, perform a rollback operation to restore to the old firmware version.
[0098] Optionally, after decrypting the encrypted firmware file, the secure world loads and runs the decrypted firmware file in a specific isolated partition. At this point, if the power consumption of the microprocessor exceeds the heat dissipation capacity and power budget of the optical module, or if the delay time of the microprocessor affects the real-time network data transmission of the optical module, it can be determined that the secure world has failed to load and run the decrypted firmware file. In this case, the new version of the firmware file written to the specific isolated partition is deleted, and the secure world continues to execute the old version of the firmware file.
[0099] The older firmware file can be a firmware file with known vulnerabilities, or it can be a well-maintained firmware file that is older than the newer firmware file. This application does not make any specific restrictions on this.
[0100] It should be noted that SecureWorld will only delete the old version of the firmware file in a specific isolated partition if SecureWorld successfully loads and runs the decrypted firmware file; otherwise, it will delete the decrypted firmware file that failed to load and run.
[0101] Optionally, a rollback operation refers to the operation of SecureWorld to roll back the execution of an older version of the firmware file when the decrypted firmware file fails to load and run successfully.
[0102] In an optional implementation, the specific operation of "coordinated initialization and parameter calibration of the laser driver circuit, photodiode receiving module, and temperature compensation unit in the optical module" in step S204 above can be as follows: Based on the decrypted firmware file, the modulation parameters of the laser driver circuit are reconfigured, the sensitivity threshold of the photodiode receiver module is calibrated, and the configuration parameters of the temperature compensation unit are optimized.
[0103] Among them, modulation parameters refer to the initial operating parameters of the laser driver circuit, which can be parameters such as bias current, modulation current, and output optical power; sensitivity threshold refers to the sensing sensitivity of the photodiode receiving module to the optical signal; configuration parameters refer to the temperature monitoring configuration parameters of the temperature compensation unit.
[0104] Optionally, the microprocessor reconfigures modulation parameters such as modulation current, output optical power, and bias current for the laser drive circuit based on the decrypted firmware file, calibrates the photoelectric sensitivity threshold of the photodiode receiving module, and configures new temperature monitoring parameters for the temperature compensation unit, so that the hardware parameters of the laser drive circuit, photodiode receiving module, and temperature compensation unit match the decrypted firmware file.
[0105] In one alternative implementation, see [link to implementation details]. Figure 8 The specific operation of step S205 above can be as follows: S801 monitors in real time the bias current and output optical power of the laser driver circuit in the optical module, the bit error rate and signal jitter range of the photodiode receiver module, and the actual temperature value of the temperature compensation unit.
[0106] Among them, bias current refers to the DC current supplied to the laser by the laser driver circuit when there is no data signal input. The bias current is used to pre-bias the laser at or slightly above the threshold current point to ensure that the laser can generate a good laser signal; output optical power refers to the intensity of the optical signal actually emitted by the laser under the drive of the laser driver circuit; bit error rate refers to the ratio of the number of erroneous symbols in the optical signal received by the photodiode receiver module to the total number of received symbols. The bit error rate of the photodiode receiver module is caused by noise, signal distortion, timing errors, etc.; signal jitter range refers to the amplitude of the time offset between the optical signals received by the photodiode receiver module. The signal jitter range is used to measure the working capability of the photodiode receiver module under various signal environments; actual temperature value refers to the actual temperature value collected by the temperature compensation unit from the laser.
[0107] Optionally, when the secure world loads and runs the decrypted firmware file, it monitors the bias current and output optical power of the laser drive circuit, the bit error rate and signal jitter range of the photodiode receiver module, and the actual temperature value of the temperature compensation unit through the digital diagnostic monitoring interface.
[0108] S802. Determine whether any of the following parameters exceeds the corresponding preset threshold: bias current, output optical power, bit error rate, signal jitter range, and actual temperature value.
[0109] Optionally, the preset threshold is a safety limit set by the user for bias current, output optical power, bit error rate, signal jitter range and actual temperature value respectively. When any one of the bias current, output optical power, bit error rate, signal jitter range and actual temperature value exceeds the corresponding safety limit, the corresponding hardware device is considered to be malfunctioning.
[0110] S803. If yes, then it is determined that the upgraded firmware file is incompatible with the hardware environment of the optical module.
[0111] In an optional implementation, after step S803, the method further includes: If the upgraded firmware file is incompatible with the hardware environment of the optical module, a rollback operation is performed to restore the old firmware file. At the same time, the original parameter configurations of the laser driver circuit, photodiode receiver module, and temperature compensation unit are restored based on historical data from the digital diagnostic monitoring interface.
[0112] Historical data refers to the working parameters of the hardware environment recorded by the digital diagnostic monitoring interface when the old firmware file is running. The historical data includes the modulation parameters of the laser driver circuit corresponding to the old firmware file, the sensitivity threshold of the photodiode receiver module corresponding to the old firmware file, and the configuration parameters of the temperature compensation unit corresponding to the old firmware file.
[0113] Optionally, if any one of the laser driver circuit, optical module receiver module, or temperature compensation unit in the optical module fails to operate properly when the secure world loads and runs the decrypted firmware file, it is considered that the upgraded firmware file is incompatible with the hardware environment of the optical module. In this case, a rollback operation needs to be performed to rerun the old version of the firmware file. At the same time, the modulation parameters of the laser driver circuit, the sensitivity threshold of the photodiode receiver module, and the configuration parameters of the temperature compensation unit need to be restored based on the historical data of the digital diagnostic monitoring interface.
[0114] In one optional implementation, the process of the host computer generating the encrypted firmware file includes: A firmware signature is generated based on a pre-set private key, and the firmware file is encrypted using a preset encryption algorithm to obtain an encrypted firmware file.
[0115] Optionally, the firmware file's preset hash value is encrypted based on a preset private key to obtain the firmware signature corresponding to the firmware file. SecureWorld verifies the signature based on the paired preset public key, which can ensure the traceability of the file source during firmware file transmission, thereby improving the firmware file's anti-tampering capability.
[0116] Optionally, the optical module firmware upgrade method provided in this application relies on the microprocessor's built-in secure boot and encryption engine, which can effectively prevent malicious code injection by external attackers. Furthermore, the microprocessor's isolated execution environment prevents attackers from bypassing security monitoring programs to tamper with the optical module's upgrade process, thereby greatly improving the security of the optical module firmware upgrade.
[0117] It should also be noted that the optical module firmware upgrade method provided in this application relies on the hardware resource isolation of the microprocessor, so that key operations such as firmware signature verification and firmware encryption and decryption are performed in a trusted execution environment. The secure boot of the microprocessor provides a trusted root for the optical module firmware upgrade, which can effectively prevent malicious code injection and firmware tampering, and provide full hardware protection for the optical module firmware upgrade.
[0118] In addition, using a lightweight security protocol for optical module firmware upgrades can greatly reduce resource consumption and computational waste during the upgrade process. By prohibiting unnecessary encryption suites, it can effectively reduce power consumption and latency during the upgrade process, ensuring the security of the optical module firmware upgrade while meeting the real-time and low-power requirements of the optical module.
[0119] It should also be noted that ordinary software upgrades target application software or system services running on a general-purpose operating system, and are performed in a relatively open and standardized software environment. In contrast, the optical module firmware upgrade provided in this application targets the low-level dedicated firmware of the microprocessor within the optical module. This low-level dedicated firmware directly controls the logical functions of the physical layer and link layer, such as laser driving, photodiode reception, temperature compensation, and digital diagnostic monitoring. The optical module firmware upgrade is a program deeply bound to specific hardware. Furthermore, the purpose of ordinary software upgrades is usually to add new functions, improve performance, and fix logical vulnerabilities at the software functional level; while optical module firmware upgrades typically fix hardware vulnerabilities, optimize the processing algorithm for fine-tuning signals, and add monitoring items. The key purpose of the optical module upgrade is to improve the quality of physical signal generation, enhance the electrical stability of the link, and repair microprocessor faults.
[0120] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0121] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. An optical module firmware upgrade method, characterized by, The method is applied to a microprocessor in an optical module, the microprocessor is divided into a secure world and an insecure world based on a preset security framework, and the method comprises the following steps: A host computer sends an upgrade request to the optical module, and the insecure world establishes an encrypted communication channel with the host computer based on the upgrade request; The insecure world receives an encrypted firmware file issued by the host computer through the encrypted communication channel, and the encrypted firmware file comprises an encrypted firmware content, a firmware signature, a preset hash value and a target version number; The secure world performs integrity verification and signature verification on the encrypted firmware file in the insecure world, and if the verification is passed, the encrypted firmware file is decrypted to obtain a decrypted firmware file; The secure world loads and runs the decrypted firmware file, and cooperatively initializes and calibrates a laser driver circuit, a photodiode receiving module and a temperature compensation unit in the optical module; The secure world calls a digital diagnostic monitoring interface of the optical module to monitor working state parameters of the optical module in real time, and determines whether the upgraded firmware file matches the hardware environment of the optical module according to the working state parameters; if yes, the firmware upgrade is completed.
2. The optical module firmware upgrade method according to claim 1, wherein The integrity verification and signature verification of the secure world on the encrypted firmware file in the insecure world comprise the following steps: The hash value of the encrypted firmware file is calculated, and the completeness of the encrypted firmware file is determined based on the comparison result of the hash value and the preset hash value; If yes, the firmware signature of the encrypted firmware file is verified by using a preset public key to determine whether the encrypted firmware file is reliable; If the encrypted firmware file is complete and reliable, it is determined that the verification is passed.
3. The optical module firmware upgrade method according to claim 2, wherein The completeness of the encrypted firmware file is determined based on the comparison result of the hash value and the preset hash value, comprising the following steps: If the hash value is equal to the preset hash value, it is determined that the encrypted firmware file is complete; If the hash value is not equal to the preset hash value, it is determined that the encrypted firmware file is not complete.
4. The optical module firmware upgrade method according to claim 2, wherein The signature verification of the firmware signature of the encrypted firmware file by using the preset public key comprises the following steps: The firmware signature of the encrypted firmware file is decrypted by using a preset public key to obtain a preset hash value corresponding to the firmware signature; The decrypted preset hash value is compared with the actual hash value to determine whether the encrypted firmware file is reliable.
5. The optical module firmware upgrade method according to claim 1, wherein The secure world comprises a specific isolated partition and a secure memory, and after the encrypted firmware file is decrypted to obtain a decrypted firmware file, the following steps are further included: The decrypted firmware file is exchanged and written into the specific isolated partition of the secure world, and the target version number of the decrypted firmware file is stored in the secure memory.
6. The optical module firmware upgrade method according to claim 5, wherein The secure world loads and runs the decrypted firmware file, comprising the following steps: The secure world obtains a current version number of the currently running firmware from the secure memory, and compares the current version number with the target version number; If the target version number is later than the current version number, the decrypted firmware file is loaded and run, and the power consumption data and latency of the microprocessor are monitored in real time during the loading and running process. Based on the power consumption data and the delay time, determine whether the decrypted firmware file runs successfully; If so, delete the old version of the firmware file in the specific isolated partition; If not, a rollback operation will be performed to restore the firmware file to the old version.
7. The optical module firmware upgrade method according to claim 1, wherein The coordinated initialization and parameter calibration of the laser driving circuit, photodiode receiving module, and temperature compensation unit in the optical module includes: Based on the decrypted firmware file, the modulation parameters of the laser driver circuit are reconfigured, the sensitivity threshold of the photodiode receiving module is calibrated, and the configuration parameters of the temperature compensation unit are optimized.
8. The optical module firmware upgrade method according to claim 1, wherein, The step of calling the digital diagnostic monitoring interface of the optical module through the secure world, monitoring the working status parameters of the optical module in real time, and determining whether the upgraded firmware file matches the hardware environment of the optical module based on the working status parameters includes: Real-time monitoring of the bias current and output optical power of the laser driving circuit in the optical module, the bit error rate and signal jitter range of the photodiode receiving module, and the actual temperature value of the temperature compensation unit; Determine whether any one of the following parameters—the bias current, the output optical power, the bit error rate, the signal jitter range, and the actual temperature value—exceeds the corresponding preset threshold. If so, it indicates that the upgraded firmware file is incompatible with the hardware environment of the optical module.
9. The optical module firmware upgrade method according to claim 8, wherein, After determining that the upgraded firmware file is incompatible with the hardware environment of the optical module, the process includes: If the upgraded firmware file does not match the hardware environment of the optical module, a rollback operation is performed to restore the old firmware file. At the same time, the original parameter configurations of the laser driver circuit, photodiode receiver module, and temperature compensation unit are restored based on historical data from the digital diagnostic monitoring interface.
10. The optical module firmware upgrade method according to claim 1, wherein, The process by which the host computer generates the encrypted firmware file includes: A firmware signature is generated based on a preset private key, and the firmware file is encrypted using a preset encryption algorithm to obtain the encrypted firmware file.
11. An optical module characterized by comprising: The optical module is used to perform the steps of the optical module firmware upgrade method according to any one of claims 1-10.