Trust root mirror image updating method and device, computer readable medium and equipment

By using the temporary memory of the basic input and output system to update the trust root image, the problem of no interruption and no perception in the trust root image update process in the prior art is solved, and the stable update of the trust root image is achieved, ensuring the system's Reliability and stability.

CN119311298APending Publication Date: 2025-01-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310855515.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The lack of effective trust root image update scheme in the prior art makes it difficult to achieve uninterrupted and unaware background updates during the trust root image update process.

Method used

By using the temporary storage memory of the basic input and output system, the trust root mirror is updated, and the in-band data update path of the trust root mirror is opened. There is no need to introduce additional data update paths, and the temporary storage memory is used for checksum writing of the mirror file. to ensure that the update process is unaware when the trust root is running.

Benefits of technology

The unaware background update of the trust root mirror is realized, ensuring the stability of the trust root operation and the reliability of the system, and avoiding the impact of the update process on the host system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311298A_ABST
    Figure CN119311298A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a trust root mirror image updating method and device, a computer readable medium and equipment. The method comprises the following steps: receiving an update request for a trust root mirror image initiated by a mainboard management control unit; starting a write-in permission of a temporary storage of the basic input / output system, so that the mainboard management control unit writes the updated mirror image file of the trust root into the temporary storage; after the mainboard management control unit writes the updated mirror image file into the temporary storage, verifying the updated mirror image file; and if the updated mirror image file passes the verification, writing the updated mirror image file into the trust root memory from the temporary memory so as to load the updated mirror image file after restarting. According to the technical scheme provided by the embodiment of the invention, an extra data updating path does not need to be introduced, an in-band data updating path of the trust root mirror image is opened, and a non-perception background updating process during running of the trust root is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and communication technology, and in particular to a method, apparatus, computer-readable medium and device for updating a trusted root image. Background Art

[0002] The root of trust (RoT) is a source that can always be trusted in the cryptographic system. As the trust basis of the server, RoT has gradually evolved into the basic configuration of the server. The RoT system usually includes a hardened hardware module for verifying, updating, and read-write protection of the server's image. The RoT image (i.e., RoT Image) is an executable file of the code running on the RoT system. When the RoT image is updated in an out-of-band manner, that is, the update transmission process of the RoT image is separated from the control information transmission process of the host (i.e., Host) system, it can be ensured that there is no impact on the host system. At the same time, the operation of RoT needs not to be interrupted during the RoT image update process. However, no effective RoT image update solution has been proposed in the relevant technology. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, computer-readable medium and device for updating a trusted root image, which can implement the update of the trusted root image with the help of a temporary storage memory of a basic input and output system, without introducing an additional data update path, opening up an in-band data update path for the trusted root image, and realizing an imperceptible background update process when the trusted root is running.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] According to one aspect of an embodiment of the present application, a method for updating a trusted root image is provided, comprising: receiving an update request for a trusted root image initiated by a mainboard management and control unit; enabling write permission for a temporary storage memory of a basic input and output system, so that the mainboard management and control unit writes an updated image file of the trusted root into the temporary storage memory, wherein the temporary storage memory is used to store the image update file of the basic input and output system; after the mainboard management and control unit writes the updated image file into the temporary storage memory, verifying the updated image file; if the updated image file is verified to be passed, writing the updated image file from the temporary storage memory into a trusted root memory, so as to load the updated image file after restarting.

[0006] According to one aspect of an embodiment of the present application, a method for updating a trusted root image is provided, comprising: initiating an update request for a trusted root image to a trusted root device; after the trusted root device enables write permission for a temporary storage memory of a basic input / output system, writing an updated image file of the trusted root into the temporary storage memory; after the updated image file is written into the temporary storage memory, sending a notification message of completion of the update image file transmission to the trusted root device, so that the trusted root device writes the updated image file from the temporary storage memory into a trusted root memory corresponding to the trusted root device after the updated image file is verified.

[0007] According to one aspect of an embodiment of the present application, a trusted root image update device is provided, comprising: a receiving unit, configured to receive an update request for a trusted root image initiated by a mainboard management and control unit; a control unit, configured to enable write permission for a temporary storage memory of a basic input and output system, so that the mainboard management and control unit writes an updated image file of the trusted root into the temporary storage memory, wherein the temporary storage memory is used to store the image update file of the basic input and output system; a verification unit, configured to verify the updated image file after the mainboard management and control unit writes the updated image file into the temporary storage memory; and a processing unit, configured to write the updated image file from the temporary storage memory into a trusted root memory if the update image file is verified to pass, so as to load the updated image file after restarting.

[0008] In some embodiments of the present application, based on the aforementioned scheme, the control unit is configured to: upon receiving the update request, detect the occupancy status of the temporary storage memory; if it is detected that the temporary storage memory is not occupied by other data update processes, enable the write permission of the temporary storage memory of the basic input and output system.

[0009] In some embodiments of the present application, based on the aforementioned scheme, the control unit is further configured to: if it is detected that the temporary storage memory is not occupied by other data update processes, send a notification message to the mainboard management control unit to allow the trusted root image to be updated.

[0010] In some embodiments of the present application, based on the aforementioned scheme, the processing unit is further configured to: after writing the updated image file from the temporary storage memory to the trusted root memory, verify the updated image file written in the trusted root memory; after the updated image file written in the trusted root memory is verified and passed, send an indication of the verification passing to the mainboard management control unit.

[0011] In some embodiments of the present application, based on the aforementioned scheme, a mailbox area is set in the trusted root device running the trusted root image; the receiving unit is configured to: perform handshake communication with the mainboard management control unit through the mailbox area; after the handshake between the mailbox area and the mainboard management control unit is successful, receive the update request sent by the mainboard management control unit through the mailbox area.

[0012] In some embodiments of the present application, based on the aforementioned scheme, the temporary storage memory is connected to a trusted root device running the trusted root image, and a control unit is provided in the trusted root device; the control unit is configured to: send configuration information to the temporary storage memory through the control unit to enable write permission for the temporary storage memory.

[0013] In some embodiments of the present application, based on the aforementioned scheme, the control unit is further configured to: after enabling the write permission of the temporary storage memory, if a notification message of completion of the update image file transmission sent by the mainboard management control unit is received, it is determined that the mainboard management control unit has written the update image file into the temporary storage memory.

[0014] In some embodiments of the present application, based on the aforementioned scheme, a control unit is provided in the trusted root device that runs the trusted root image; the processing unit is configured to: write the updated image file from the temporary storage memory to the trusted root memory based on a direct memory access mechanism through the control unit.

[0015] In some embodiments of the present application, based on the aforementioned solution, the mainboard management control unit is arranged on a main control board, and the trusted root device running the trusted root image is connected to the main control board via a connecting line.

[0016] In some embodiments of the present application, based on the aforementioned solution, the trusted root memory is disposed in the trusted root device, or the trusted root memory is connected to the trusted root device via a connecting line.

[0017] According to one aspect of an embodiment of the present application, there is provided an updating device for a trusted root image, comprising: a sending unit, configured to initiate an update request for a trusted root image to a trusted root device; a writing unit, configured to write an updated image file of the trusted root into the temporary storage memory after the trusted root device enables the write permission of the temporary storage memory of a basic input / output system; and a processing unit, configured to send a notification message of completion of the transmission of the updated image file to the trusted root device after the updated image file is written into the temporary storage memory, so that the trusted root device writes the updated image file from the temporary storage memory into the trusted root memory corresponding to the trusted root device after the updated image file is verified.

[0018] In some embodiments of the present application, based on the aforementioned scheme, the processing unit is further configured to: receive verification pass indication information sent by the trusted root device, the verification pass indication information is sent by the trusted root device after the updated image file written into the trusted root memory is verified and passed; trigger a system restart instruction based on the verification pass indication information, so as to enable the trusted root device to load the updated image file after the system is restarted.

[0019] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for updating the trusted root image as described in the above embodiment is implemented.

[0020] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the method for updating the trusted root image as described in the above embodiments.

[0021] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the method for updating the trusted root image provided in the above-mentioned various optional embodiments.

[0022] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a mainboard management control unit, which is arranged on a main control board; and a trusted root device, which is connected to the main control board via a connecting line.

[0023] In the technical solutions provided in some embodiments of the present application, the trusted root device enables the write permission of the temporary storage memory of the basic input / output system upon receiving an update request for the trusted root image initiated by the mainboard management control unit, so that the mainboard management control unit writes the updated image file of the trusted root into the temporary storage memory, and then after the mainboard management control unit writes the updated image file into the temporary storage memory, verifies the updated image file, and after the updated image file is verified, writes the updated image file from the temporary storage memory to the trusted root memory corresponding to the trusted root device, so as to load the updated image file after restarting, so that the trusted root image can be updated with the help of the temporary storage memory of the basic input / output system, without introducing an additional data update path, opening up the in-band data update path of the trusted root image, and realizing the imperceptible background update process when the trusted root is running.

[0024] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0026] Figure 2 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0027] Figure 3 A flow chart of a method for updating a trusted root image according to an embodiment of the present application is shown;

[0028] Figure 4 A flow chart of a method for updating a trusted root image according to an embodiment of the present application is shown;

[0029] Figure 5 A schematic diagram of an update process of a trusted root image according to an embodiment of the present application is shown;

[0030] Figure 6 A schematic diagram of an update process of a trusted root image according to an embodiment of the present application is shown;

[0031] Figure 7 A schematic diagram of an update process of a trusted root image according to an embodiment of the present application is shown;

[0032] Figure 8 A schematic diagram of an update process of a trusted root image according to an embodiment of the present application is shown;

[0033] Fig. 9 A block diagram of a trusted root image update device according to an embodiment of the present application is shown;

[0034] Fig.10 A block diagram of a trusted root image update device according to an embodiment of the present application is shown;

[0035] Fig.11 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] The exemplary embodiments are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to these examples; on the contrary, the purpose of providing these embodiments is to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0037] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, those skilled in the art will appreciate that when implementing the technical scheme of the present application, all the detailed features in the embodiments may not be needed, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0040] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0041] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.

[0042] like Figure 1 As shown, an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied may include a mainboard 101 and an IO (Input Output) board 102 connected to the mainboard. The IO board 102 is used to carry the RoT, and the IO board 102 carrying the RoT is an optional configuration. If the IO board 102 carrying the RoT is selected, the IO board 102 carrying the RoT can be connected to the mainboard 101 through a gold finger, or the IO board 102 can be connected to the mainboard 101 through other connection methods such as card connection.

[0043] In some optional embodiments, the mainboard 101 may include one or more CPUs (Central Processing Units), wherein Figure 1In the example of two CPUs (i.e., CPU1 and CPU2), the motherboard 101 also includes a PCH (Platform Controller Hub) connected to the CPU, a BMC (Baseboard Management Controller) communicating with the PCH, and a CPLD (Complex Programmable Logic Device) connected to the BMC.

[0044] Among them, BMC is responsible for the signal collection, processing, and storage of various sensors, as well as the detection and management of the operating status of various devices. For example, by detecting the system's temperature, voltage, fan, power supply, etc., and making corresponding adjustments, the system is kept in a healthy state; if the system does not work properly, it can also be restarted by resetting the system. At the same time, BMC can also be responsible for recording various hardware information and log records, which are used to prompt users and locate subsequent problems, and other functions.

[0045] The IO board 102 carries a RoT device, and a MailBox (mailbox area) is integrated in the RoT device. The BMC on the main board 101 can communicate with the MailBox on the IO board 102. Among them, MailBox can be used as a hardware mechanism for process synchronization and data exchange between processors. The MailBox method is mainly used to transmit control information for multi-processor communication. According to system requirements, different Mails can be defined to implement system behavior. For example, data transmission with a fixed flow rate can be defined, and data transmission with a fixed block can also be defined. Using the MailBox method, the data transmission between the two parties belongs to on-chip parallel data transmission, so it has good real-time performance and fast speed.

[0046] like Figure 1 As shown in the figure, the RoT device is connected to two BMC Flashes, namely BMC Flash0 and BMC Flash1, which are used to store BMC-related data. At the same time, the RoT device is also connected to a BIOS (Basic Input Output System) Flash and a BIOS Staging Flash. Among them, the BIOS Staging Flash is used to store the update files of the BIOS image or other data that needs to be updated.

[0047] RoT Flash is used to store RoT images. Depending on the implementation of RoT, RoT Flash can be Figure 1As shown, it is placed outside the RoT chip, or it can be placed outside the RoT chip. Figure 2 As shown, it is placed inside the RoT sheet and connected to the RoT device.

[0048] In one embodiment of the present application, when the RoT image needs to be updated, the BMC can initiate an update request for the trusted root image to the RoT device, and then the RoT device can enable the write permission of the temporary storage memory (i.e., Staging Flash) of the BIOS, and then the BMC can write the updated image file of the RoT into the temporary storage memory. After writing the updated image file of the RoT into the temporary storage memory, the BMC can send a notification message of the completion of the transmission of the updated image file to the RoT device, and then the RoT device can verify the updated image file, and after the updated image file is verified, write the updated image file from the temporary storage memory to the trusted root memory (i.e., RoT Flash) corresponding to the trusted root device, then the updated image file can be loaded after the system is restarted, thereby completing the update of the RoT image.

[0049] It can be seen that in the embodiment of the present application, the trusted root image can be updated with the help of the temporary storage memory of the basic input and output system without introducing an additional data update path, thus opening up the in-band data update path of the trusted root image and realizing the imperceptible background update process when the trusted root is running.

[0050] It should be noted that the IO board 102 carrying the RoT can be adapted to various platforms of the motherboard 101 as an independent component, such as the Intel platform, AMD platform and ARM platform, as well as other foreseeable platforms such as the RISC-V platform.

[0051] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0052] Figure 3 A flow chart of a method for updating a root of trust image according to an embodiment of the present application is shown. The method for updating a root of trust image can be executed by a RoT device, which is a chip or system that implements the RoT function. Figure 3 As shown, the updating method of the trusted root image includes at least steps S310 to S340, which are described in detail as follows:

[0053] In step S310, a request for updating the trusted root image initiated by the mainboard management control unit is received.

[0054] In some optional embodiments, when the operation and maintenance personnel need to update the trusted root image, they can initiate an update request for the trusted root image through the mainboard management control unit (ie, BMC).

[0055] Optionally, a mailbox area (MailBox) may be provided in the trusted root device, and the MailBox may perform handshake communication with the mainboard management control unit. After the handshake between the mailbox area and the mainboard management control unit is successful, the mainboard management control unit may send an update request to the MailBox.

[0056] In some optional embodiments, the motherboard management control unit is arranged on the main control board, and the trusted root device is connected to the main control board via a connecting line. That is, in the embodiments of the present application, the trusted root device and the main control board can be designed separately, so that the trusted root device can be used as an optional configuration, and the trusted root device can be connected to the main control board via a gold finger, or the trusted root device can be connected to the main control board via other connection methods such as card connection.

[0057] In some optional embodiments, the root-of-trust memory may be provided in a root-of-trust device (eg, Figure 2 ), or the trusted root memory is connected to the trusted root device through a connection line (such as Figure 1 as shown in ).

[0058] In step S320, the write permission of the temporary storage of the basic input and output system is enabled so that the mainboard management control unit writes the updated image file of the trusted root into the temporary storage, which is used to store the image update file of the basic input and output system.

[0059] In some optional embodiments, since the temporary storage memory (i.e., BIOS Staging Flash) is used to store update files of the BIOS image or other data that needs to be updated, in order to avoid affecting other data update processes, when the RoT device receives an update request for the trusted root image initiated by the motherboard management control unit, it can detect the occupancy of the temporary storage memory. If it is detected that the temporary storage memory is not occupied by other data update processes, the write permission of the temporary storage memory of the basic input and output system is enabled.

[0060] In some optional embodiments, when the RoT device detects that the temporary storage memory is not occupied by other data update processes, it can also send a notification message to the mainboard management control unit to allow the trusted root image to be updated, and then the mainboard management control unit can start the transmission process of the update image file to write the update image file to the temporary storage memory.

[0061] In some optional embodiments, the temporary storage device is connected to the RoT device (such as Figure 1 and Figure 2 As shown), and a control unit may also be provided in the trusted root device, the RoT device may send configuration information to the temporary storage memory through the control unit to enable write permission for the temporary storage memory.

[0062] Optionally, the RoT image and update image files are both code executable files running on the RoT. If the RoT is implemented in the form of FPGA (Field Programmable Gate Array), then the RoT image and update image files may include the FPGA bitstream and the Fireware (firmware) running the system; if the RoT is in the form of an ASIC (Application Specific Integrated Circuit) chip, then the RoT image and update image files mainly include Fireware.

[0063] In step S330, after the mainboard management control unit writes the update image file into the temporary storage memory, the update image file is verified.

[0064] In some optional embodiments, after writing the update image file into the temporary storage memory, the mainboard management control unit may send a notification message of the completion of the update image file transfer to the trusted root device. If the RoT device receives the notification message of the completion of the update image file transfer sent by the mainboard management control unit, it can be determined that the mainboard management control unit has written the update image file into the temporary storage memory, and then the update image file can be verified to ensure the legitimacy of the update image file.

[0065] In step S340, if the update image file is verified to be passed, the update image file is written from the temporary storage memory to the trusted root memory, so that the update image file is loaded after restarting.

[0066] In some optional embodiments, after the RoT device writes the updated image file from the temporary storage memory to the trusted root memory, it can also verify the updated image file written in the trusted root memory, which can also ensure the legitimacy of the updated image file written in the trusted root memory. After the RoT device verifies the updated image file written in the trusted root memory, it can send an indication of the verification passing to the mainboard management control unit, and then the mainboard management control unit can control the system to restart based on the indication information to complete the update of the RoT image.

[0067] Optionally, a control unit may be provided in the trusted root device, and the trusted root device may write the updated image file from the temporary memory to the trusted root memory through the control unit based on a direct memory access (DMA) mechanism. The DMA mechanism is to copy data from one address space to another address space, which enables data to be sent directly from an attached device (such as a disk drive) to the memory of the computer motherboard, such as moving a block of external memory to a faster memory area inside the chip.

[0068] Figure 3 The following is an explanation of the technical solution of the embodiment of the present application from the perspective of the RoT device. Figure 4 The implementation details of the technical solution of the embodiment of the present application are described from the perspective of the mainboard management control unit BMC:

[0069] Figure 4 The flowchart of the method for updating the trusted root image according to an embodiment of the present application is shown. The method for updating the trusted root image can be executed by the mainboard management control unit BMC. Figure 4 As shown, the updating method of the trusted root image includes at least steps S410 to S430, which are described in detail as follows:

[0070] In step S410, an update request for the trusted root image is initiated to the trusted root device.

[0071] In some optional embodiments, when the operation and maintenance personnel need to update the trusted root image, they can initiate an update request for the trusted root image to the trusted root device through the mainboard management control unit (ie, BMC).

[0072] Optionally, a mailbox area (MailBox) may be provided in the root-of-trust device, and the mainboard management control unit may perform handshake communication with the MailBox. After the mainboard management control unit successfully handshakes with the mailbox area, the mainboard management control unit may send an update request to the MailBox.

[0073] In step S420, after the trusted root device enables the write permission of the temporary storage memory of the basic input and output system, the updated image file of the trusted root is written into the temporary storage memory.

[0074] In some optional embodiments, since the temporary storage memory (i.e., BIOS Staging Flash) is used to store the update file of the BIOS image or other data that needs to be updated, in order to avoid affecting other data update processes, when the RoT device receives the update request for the trusted root image initiated by the motherboard management control unit, it can detect the occupancy of the temporary storage memory, and if it is detected that the temporary storage memory is not occupied by other data update processes, the write permission of the temporary storage memory of the basic input and output system is enabled. Then, a notification message allowing the trusted root image to be updated is sent to the motherboard management control unit, and then the motherboard management control unit can start the transmission process of the updated image file to write the updated image file to the temporary storage memory.

[0075] In step S430, after writing the updated image file into the temporary storage memory, a notification message of completion of the updated image file transmission is sent to the trusted root device, so that the trusted root device writes the updated image file from the temporary storage memory into the trusted root memory corresponding to the trusted root device after verifying the updated image file.

[0076] In some optional embodiments, after the RoT device writes the updated image file from the temporary storage memory to the trusted root memory, it can also verify the updated image file written in the trusted root memory, which can also ensure the legitimacy of the updated image file written in the trusted root memory. After the RoT device verifies the updated image file written in the trusted root memory, it can send an indication of the verification passing to the mainboard management control unit, and then the mainboard management control unit can trigger a system restart instruction based on the indication information, so that the trusted root device loads the updated image file after the system restarts to complete the update of the RoT image.

[0077] The technical solution of the embodiment of the present application can use the temporary storage memory of the basic input and output system to update the trusted root image without introducing an additional data update path, opening up the in-band data update path of the trusted root image and realizing the imperceptible background update process when the trusted root is running.

[0078] The following combination Figures 5 to 8 The implementation details of the technical solution of the embodiment of the present application are described in detail with specific application scenarios:

[0079] like Figure 5 and Figure 6As shown, in one embodiment of the present application, the IO board carries a RoT device, and a MailBox is integrated in the RoT device. The RoT device is connected to two BMC Flashes, namely BMC Flash0 and BMC Flash1, and the BMC Flash is used to store BMC related data. At the same time, the RoT device is also connected to a BIOS Flash and a BIOS Staging Flash. Among them, the BIOS Staging Flash is used to store update files of the BIOS image or other data that needs to be updated. In addition, the RoT Flash used to store the RoT image can be as follows: Figure 5 As shown, it can be placed outside the RoT chip and connected to the RoT device; it can also be placed outside the RoT chip and connected to the RoT device as shown. Figure 6 As shown, it is placed inside the RoT sheet.

[0080] PCH and BMC communicate with Mux (multiplexer) via SPI (Serial Peripheral Interface), and Mux communicates with RoT devices on the IO board via SPI. In one embodiment of the present application, the RoT image can use the image space of BIOS (i.e., BIOS Staging Flash) to complete the update of its own image. For example, when the operation and maintenance system wants to update the RoT image, BMC establishes a handshake with MailBox via SMBus (System Management Bus), and then BMC writes the RoT image update file to the BIOS Staging flash (i.e., Figure 5 and Figure 6 After the writing is completed, the RoT device writes the image update file from the BIOS Staging Flash to the space corresponding to the RoT Flash (as shown by the arrow 501 in FIG. 1 ). Figure 5 and Figure 6 Regardless of whether RoTFlash is Figure 5 The method shown is set outside the RoT chip, or as Figure 6 The method shown is placed in the RoT chip, and the RoT update process in the embodiment of the present application can be implemented, that is, the technical solution of the embodiment of the present application is not affected by the location of the RoT Flash.

[0081] In a specific implementation of the present application, Figure 7 and Figure 8As shown, the interaction between BMC and RoT is achieved through SPI and SMBus. The internal implementation of RoT includes FSM (Finite State Machine), Mailbox and DMA, among which FSM is used to implement the control flow of the entire system, that is, to realize the function of the control unit; Mailbox establishes a handshake mechanism with BMC through SMBus, and DMA is used to move data between Flash. The update process of RoT image is as follows: BMC initiates the RoT image update process, and sends the update request of RoT image to Mailbox in RoT device through SMBus; after receiving the update request of RoT image, if it is confirmed that it is not in the update process of BIOS Staging Flash (that is, BIOSStaging Flash is not occupied by other data update processes), then RoT device will allow RoT image to be updated. The signal is sent to BMC through SMbus, and then RoT device sends configuration information through FSM to open the write permission of BIOS Staging Flash to open the write channel (and Figure 7 and Figure 8 The BMC then transmits the image update file of the RoT through the write channel.

[0082] When the BMC completes the transmission of the image update file of the RoT, it sends the transmission completion signal of the image update file to the RoT device through the SMBus; after receiving the transmission completion signal sent by the BMC, the RoT device starts to verify the image update file in the BIOS Staging Flash and records the verification result. If the RoT device passes the verification of the image update file in the BIOS Staging Flash, the RoT device can configure DMA through FSM to move the image update file in the BIOS Staging Flash to the RoT Flash when the Host (host, such as the CPU of the server) is working normally. After the relocation is completed, the image update file in the RoT Flash is verified. After the RoT device verifies the content of the image update file in the RoT Flash, it sends the verification result to the BMC; then the BMC can select the appropriate time to trigger the system to restart to complete the update of the RoT image.

[0083] In some optional embodiments, if the RoT device fails to verify the image update file in the BIOS Staging Flash, or fails to verify the image update file in the RoT Flash, a notification message of update failure can be sent to the BMC so that the BMC can re-initiate the update process.

[0084] It should be noted that the PCH shown in the embodiment of the present application can be removed according to the evolution process of the X-86 platform, that is, Figure 1 , Figure 2 ,as well as Figures 5 to 8 The PCH in the embodiment can be omitted, and the technical solution of the embodiment of the present application is not only applicable to the X-86 platform, but also to the ARM platform, RISC platform, etc.

[0085] In summary, the technical solution of the embodiment of the present application uses part of the space of BIOS Staging Flash to update the RoT image, so that after the RoT is introduced into the server system, no additional update path is added, and it is integrated with the existing BIOS update path for behavioral consistency, opening up the data path for RoT update, and realizing imperceptible background update during RoT operation.

[0086] The following describes an apparatus embodiment of the present application, which can be used to execute the method for updating the trusted root image in the above embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the method for updating the trusted root image in the above embodiment of the present application.

[0087] Fig. 9 A block diagram of a trusted root image update device according to an embodiment of the present application is shown. The trusted root image update device is applied to a RoT device, which is a chip, system, etc. that implements the RoT function.

[0088] Reference Fig. 9 As shown, a trusted root image updating device 900 according to an embodiment of the present application includes: a receiving unit 902 , a control unit 904 , a verification unit 906 and a processing unit 908 .

[0089] Among them, the receiving unit 902 is configured to receive an update request for the trusted root image initiated by the motherboard management and control unit; the control unit 904 is configured to enable the write permission of the temporary storage memory of the basic input and output system, so that the motherboard management and control unit writes the updated image file of the trusted root into the temporary storage memory, and the temporary storage memory is used to store the image update file of the basic input and output system; the verification unit 906 is configured to verify the updated image file after the motherboard management and control unit writes the updated image file into the temporary storage memory; the processing unit 908 is configured to write the updated image file from the temporary storage memory to the trusted root memory if the update image file is verified, so as to load the updated image file after restarting.

[0090] In some embodiments of the present application, based on the aforementioned scheme, the control unit 904 is configured to: upon receiving the update request, detect the occupancy status of the temporary storage memory; if it is detected that the temporary storage memory is not occupied by other data update processes, enable the write permission of the temporary storage memory of the basic input and output system.

[0091] In some embodiments of the present application, based on the aforementioned scheme, the control unit 904 is further configured to: if it is detected that the temporary storage memory is not occupied by other data update processes, send a notification message to the mainboard management control unit to allow the trusted root image to be updated.

[0092] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 908 is further configured to: after writing the updated image file from the temporary storage memory to the trusted root memory, verify the updated image file written into the trusted root memory; after the updated image file written into the trusted root memory is verified and passed, send an indication message of verification passing to the mainboard management and control unit.

[0093] In some embodiments of the present application, based on the aforementioned scheme, a mailbox area is set in the trusted root device running the trusted root image; the receiving unit 902 is configured to: perform handshake communication with the mainboard management control unit through the mailbox area; after the handshake between the mailbox area and the mainboard management control unit is successful, receive the update request sent by the mainboard management control unit through the mailbox area.

[0094] In some embodiments of the present application, based on the aforementioned scheme, the temporary storage memory is connected to a trusted root device running the trusted root image, and a control unit is provided in the trusted root device; the control unit 904 is configured to: send configuration information to the temporary storage memory through the control unit to enable write permission for the temporary storage memory.

[0095] In some embodiments of the present application, based on the aforementioned scheme, the control unit 904 is also configured to: after enabling the write permission of the temporary storage memory, if a notification message of completion of the update image file transmission sent by the mainboard management control unit is received, it is determined that the mainboard management control unit has written the update image file into the temporary storage memory.

[0096] In some embodiments of the present application, based on the aforementioned scheme, a control unit is provided in the trusted root device that runs the trusted root image; the processing unit 908 is configured to: write the updated image file from the temporary storage memory to the trusted root memory based on a direct memory access mechanism through the control unit.

[0097] In some embodiments of the present application, based on the aforementioned solution, the mainboard management control unit is arranged on a main control board, and the trusted root device is connected to the main control board via a connecting line.

[0098] In some embodiments of the present application, based on the aforementioned solution, the trusted root memory is disposed in the trusted root device, or the trusted root memory is connected to the trusted root device via a connecting line.

[0099] Fig.10 A block diagram of a trusted root image update device according to an embodiment of the present application is shown, and the trusted root image update device is applied to a mainboard management control unit.

[0100] Reference Fig.10 As shown, a trusted root image updating device 1000 according to an embodiment of the present application includes: a sending unit 1002 , a writing unit 1004 and a processing unit 1006 .

[0101] Among them, the sending unit 1002 is configured to initiate an update request for the trusted root image to the trusted root device; the writing unit 1004 is configured to write the updated image file of the trusted root into the temporary storage memory after the trusted root device opens the write permission of the temporary storage memory of the basic input and output system; the processing unit 1006 is configured to send a notification message of the completion of the update image file transmission to the trusted root device after the update image file is written into the temporary storage memory, so that the trusted root device writes the update image file from the temporary storage memory to the trusted root memory corresponding to the trusted root device after the update image file is verified.

[0102] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 1006 is further configured to: receive verification pass indication information sent by the trusted root device, the verification pass indication information is sent by the trusted root device after the updated image file written into the trusted root memory is verified and passed; trigger a system restart instruction based on the verification pass indication information, so as to enable the trusted root device to load the updated image file after the system is restarted.

[0103] Fig.11 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application is shown. The electronic device may be the RoT device or the mainboard management control unit in the aforementioned embodiment.

[0104] It should be noted that Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0105] like Fig.11 As shown, the computer system 1100 may include a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103, such as executing the method described in the above embodiment. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, the ROM 1102 and the RAM 1103 are connected to each other through the bus 1104. The input / output (I / O) interface 1105 is also connected to the bus 1104.

[0106] The following components can be connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0107] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program is used to perform the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.

[0108] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a computer program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0109] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.

[0110] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.

[0111] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more computer programs, and when the above one or more computer programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0112] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0113] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable an electronic device to execute the method according to the implementation methods of the present application.

[0114] For example, an electronic device can be a RoT device, and the RoT device can perform Figure 3 The update method of the trusted root image shown in FIG. 1 is as follows; for another example, the electronic device may be a motherboard management control unit, and the motherboard management control unit may execute Figure 4 The update method of the root of trust image is shown.

[0115] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0116] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for updating a trusted root image, characterized in that: include: Receiving a request for updating the trusted root image initiated by the mainboard management control unit; Opening the write permission of the temporary storage memory of the basic input and output system so that the mainboard management control unit writes the updated image file of the trusted root into the temporary storage memory, and the temporary storage memory is used to store the image update file of the basic input and output system; After the mainboard management and control unit writes the update image file into the temporary storage memory, verifying the update image file; If the update image file is verified to be passed, the update image file is written from the temporary storage memory to the trusted root memory, so as to load the update image file after restarting.

2. The method for updating a trusted root image according to claim 1, characterized in that: The step of enabling the write permission of the temporary storage memory of the basic input and output system includes: Upon receiving the update request, detecting the occupancy of the temporary storage memory; If it is detected that the temporary storage memory is not occupied by other data update processes, the write permission of the temporary storage memory of the basic input and output system is enabled.

3. The method for updating the trusted root image according to claim 2, characterized in that: The updating method further comprises: If it is detected that the temporary storage memory is not occupied by other data update processes, a notification message allowing the trusted root image to be updated is sent to the mainboard management control unit.

4. The method for updating a trusted root image according to claim 1, characterized in that: The updating method further comprises: After writing the update image file from the temporary storage memory to the trusted root memory, verifying the update image file written into the trusted root memory; After the update image file written into the trusted root memory is verified to be passed, indication information indicating that the verification is passed is sent to the mainboard management control unit.

5. The method for updating a trusted root image according to claim 1, characterized in that: A mailbox area is provided in the trusted root device running the trusted root image; The receiving a request for updating the trusted root image initiated by the mainboard management control unit includes: Perform handshake communication with the mainboard management control unit through the mailbox area; After the mailbox area successfully shakes hands with the mainboard management control unit, the update request sent by the mainboard management control unit is received through the mailbox area.

6. The method for updating a trusted root image according to claim 1, characterized in that: The temporary storage memory is connected to a trusted root device running the trusted root image, and a control unit is provided in the trusted root device; The step of enabling the write permission of the temporary storage memory of the basic input and output system includes: The control unit sends configuration information to the temporary storage memory to enable the write permission of the temporary storage memory.

7. The method for updating a trusted root image according to claim 1, characterized in that: The updating method further comprises: After the write permission of the temporary storage memory is enabled, if a notification message of completion of transmission of the update image file sent by the mainboard management control unit is received, it is determined that the mainboard management control unit has written the update image file into the temporary storage memory.

8. The method for updating a trusted root image according to claim 1, characterized in that: A control unit is provided in the trusted root device running the trusted root image; Writing the update image file from the temporary storage memory into the trusted root memory includes: writing the update image file from the temporary storage memory into the trusted root memory based on a direct memory access mechanism by the control unit.

9. The method for updating a trusted root image according to any one of claims 1 to 8, characterized in that: The mainboard management control unit is arranged on the main control board, and the trusted root device running the trusted root image is connected to the main control board via a connecting line.

10. The method for updating the root of trust image according to claim 9, characterized in that: The trusted root memory is arranged in the trusted root device, or the trusted root memory is connected to the trusted root device via a connecting line.

11. A method for updating a trusted root image, characterized in that: include: Initiate a request to update the root of trust image to the root of trust device; After the trusted root device enables the write permission of the temporary storage memory of the basic input and output system, writing the updated image file of the trusted root into the temporary storage memory; After the update image file is written into the temporary storage memory, a notification message of completion of the update image file transmission is sent to the trusted root device, so that the trusted root device writes the update image file from the temporary storage memory into the trusted root memory corresponding to the trusted root device after the update image file is verified.

12. The method for updating the root of trust image according to claim 11, characterized in that: The updating method further comprises: receiving verification-pass indication information sent by the trusted root device, wherein the verification-pass indication information is sent by the trusted root device after the updated image file written into the trusted root memory is verified and passed; A system restart instruction is triggered based on the indication information that the verification has passed, so that the trusted root device loads the update image file after the system is restarted.

13. A trusted root image update device, characterized in that: include: A receiving unit configured to receive an update request for a trusted root image initiated by a mainboard management control unit; A control unit configured to enable write permission of a temporary storage memory of a basic input / output system so that the mainboard management control unit writes an updated image file of a trusted root into the temporary storage memory, wherein the temporary storage memory is used to store the image update file of the basic input / output system; a verification unit, configured to verify the update image file after the mainboard management and control unit writes the update image file into the temporary storage memory; The processing unit is configured to write the update image file from the temporary storage memory into the trusted root memory if the update image file is verified to be passed, so as to load the update image file after restarting.

14. A trusted root image update device, characterized in that: include: A sending unit, configured to initiate an update request for a root-of-trust image to a root-of-trust device; A writing unit, configured to write an updated image file of the trusted root into the temporary storage memory after the trusted root device enables the write permission of the temporary storage memory of the basic input and output system; The processing unit is configured to send a notification message of update image file transmission completion to the trusted root device after writing the update image file into the temporary storage memory, so that the trusted root device writes the update image file from the temporary storage memory into the trusted root memory corresponding to the trusted root device after verifying the update image file.

15. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for updating the trusted root image according to any one of claims 1 to 12 is implemented.

16. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the method for updating the trusted root image as described in any one of claims 1 to 12.

17. An electronic device, characterized in that: include: A mainboard management control unit, arranged on a main control board, wherein the mainboard management control unit is used to execute the method for updating the trusted root image according to claim 11 or 12; A trusted root device is connected to the main control board via a connecting line, and the trusted root device is used to execute the trusted root image update method according to any one of claims 1 to 10.

18. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the method for updating the trusted root image as described in any one of claims 1 to 12.