Secure boot method and related equipment for server motherboard based on eSPI

Through the eSPI-based server motherboard secure boot method, using components such as root of trust chips and trusted platform modules, the problems of interface complexity and redundancy in the DC-SCM specification are solved, compatibility and security are improved, and costs are reduced. And provide hardware-level protection during server secure boot.

CN118427147BActive Publication Date: 2024-09-13RIVAI TECH (SHENZHEN) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410896104.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-13
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The design of the motherboard and DC-SCI interfaces in the DC-SCM specification is complex and redundant, resulting in high layout and wiring costs, poor compatibility, and high learning and development costs. In addition, there are interoperability issues with the interface requirements of different server manufacturers.

Method used

The eSPI-based server motherboard secure boot method is adopted, and the enhanced serial peripheral interface is used for signaling through components such as the root of trust chip, the baseboard management controller chip, the trusted platform module security chip, and the management engine serial peripheral interface flash memory chip. transmission, enabling firmware integrity checking, security verification and initialization, reducing interface complexity and redundancy.

Benefits of technology

It improves the integration and compatibility of the security control module, reduces motherboard design and manufacturing costs, saves software developers’ learning costs, and provides hardware-level protection during the server secure startup process to ensure firmware integrity and system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427147B
    Figure CN118427147B
Patent Text Reader

Abstract

The present invention is applicable to the technical field of computer security boot, and in particular, to a secure boot method and related equipment for a server motherboard based on eSPI. Compared with the prior art, the present invention solves the problems of complex and redundant interfaces, high layout and wiring costs, poor compatibility, and high learning and development costs in the DC-SCM solution by means of multi-channel low-speed signal communication of the eSPI bus; efficient time-sharing multiplexing of low-speed signals is achieved only through simple modification and design of the eSPI bus driver; the motherboard processor secure boot solution created and implemented by the present invention can detect defective firmware before startup, recover from defective firmware during startup, and protect all firmware from attacks during the internal system update process during operation, achieving hardware-level secure boot. While ensuring security, the cost of motherboard design and manufacturing is saved as much as possible, and the learning cost of software developers is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention is applicable to the technical field of computer secure booting, and in particular relates to a secure booting method for a server motherboard based on eSPI and related equipment. Background Art

[0002] The eSPI (enhanced Serial Peripheral Interface) bus is a communication bus launched by Intel in 2016. It is mainly used for communication between x86 CPU platforms and peripherals. The eSPI bus is designed to improve the traditional LPC (Low Pin Count) bus. Compared with the LPC bus, the eSPI bus is widely used because of its fewer pins, lower power consumption and higher speed.

[0003] DC-SCM2.0 (Datacenter Secure Control Module Specification) is a standard designed to improve the security control capabilities of server data centers. The DC-SCM standard supports the design combination of different hardware platforms, improving the scalability and service life of the data center platform. The modular security control solution of DC-SCM 2.0 provides a relatively complete server security control hardware design and firmware startup solution. However, there are still some potential defects in its design, because:

[0004] The DC-SCI interface designed by the DC-SCM specification to connect to the motherboard is relatively complex. The introduction of the LTPI IP core (LVDS Tunneling Protocol & Interface) significantly increases the cost of motherboard design and layout wiring, and also increases the time cost of software developers to learn and maintain the IP. More importantly, different server vendors may have different interface requirements in actual deployment. This may lead to interoperability issues. In addition, the interfaces including SPI / I2C / I3C introduced in the DC-SCI interface have a certain degree of redundancy with the LTPI core in design.

[0005] Therefore, there is an urgent need for a new secure boot method and related equipment for a server motherboard based on eSPI to solve the above problems. Summary of the invention

[0006] The present invention provides a secure boot method and related equipment for a server motherboard based on eSPI, aiming to improve the shortcomings of DC-SCM in motherboard design, overcome the shortcomings of complex DC-SCM interface and redundant design, improve the integration and compatibility of the security control module, and further overcome the hidden dangers of server motherboard and firmware security.

[0007] In a first aspect, the present invention provides a secure boot method for a server motherboard based on eSPI, wherein the server motherboard comprises a host processor module and a security control module, wherein the host processor module and the security control module are connected via an enhanced serial peripheral interface; the host processor module comprises a CPU, a first memory, a hard disk, and a chipset, wherein the chipset comprises a plurality of controllers for managing signal transmission, the security control module comprises a baseboard management controller chip, a trusted root chip, a trusted platform module security chip, a management engine serial peripheral interface flash memory chip, a BIOS serial peripheral interface flash memory chip, and a second memory, and the secure boot method comprises the following steps:

[0008] S1, the trusted root chip is powered on and started, and the integrity of the firmware in each chip connected to the serial peripheral interface bus is checked through the trusted root chip. If the firmware in each chip is complete, step S2 is performed;

[0009] S2, the baseboard management controller chip is powered on and started, and the firmware of the baseboard management controller chip is read;

[0010] S3, the host processor module is powered on and started, the firmware code of the built-in read-only memory in the CPU is executed, the driver in the chipset is initialized for the first time, the firmware code initiates a firmware read request to the management engine serial peripheral interface flash memory chip through a first preset path, the firmware program of the management engine serial peripheral interface flash memory chip is returned according to the first preset path, and the firmware program is loaded into the random access register of the management engine serial peripheral interface flash memory chip for execution;

[0011] S4, initializing the static random access memory in the CPU, and initiating a firmware read request to the BIOS serial peripheral interface flash memory chip according to a second preset path, to obtain a U-Boot-SPL component in the BIOS firmware of the BIOS serial peripheral interface flash memory chip;

[0012] S5. Obtain the security certificate stored in the trusted platform module security chip through the firmware code via a third preset path, and perform security verification on the U-Boot-SPL component according to the security certificate. If the security verification passes, pass the security certificate to the U-Boot-SPL component;

[0013] S6, running the U-Boot-SPL component in the static random access memory, initializing the first memory, and initializing the driver of the chipset for the second time, and obtaining the EDK2 firmware of the UEFI system from the BIOS serial peripheral interface flash chip;

[0014] S7, the U-Boot-SPL component performs security verification on the EDK2 firmware through the security certificate. If the security verification passes, the EDK2 firmware is executed to complete the initialization of the UEFI system to the boot device selection stage;

[0015] S8. Connect the EDK2 firmware to the hard disk, execute the operating system loader, and start the server mainboard through the operating system loader.

[0016] Preferably, step S1 also includes the following steps: in the server mainboard, before the remaining processors other than the trusted root chip are started, the trusted root chip performs security verification on the firmware update packages of the remaining processors in the server mainboard; if it is detected that the firmware update package is damaged or maliciously tampered with, the firmware of the processor corresponding to the damaged or maliciously tampered firmware update package is restored from the most original available firmware version.

[0017] Preferably, when data is transmitted between the host processor module and the security control module through the out-of-band channel in the enhanced serial peripheral interface, data transmission is performed according to a preset rule, and the preset rule is:

[0018] S10, adding a sequence number and a total number of segments for describing data segmentation information to the data packet to be transmitted, and segmenting the data packet to be transmitted according to the sequence number and the total number of segments to obtain a plurality of second data packets to be transmitted;

[0019] S20, the host processor module initiates a status query to the security control module to inquire whether the status of the security control module is suitable for data transmission. If so, the security control module feeds back a ready signal to the host processor module;

[0020] S30, after receiving the ready signal, the host processor module transmits the single second data packet to be transmitted to the security control module according to the sequence number;

[0021] S40, after receiving the second data packet to be transmitted, the security control module feeds back processing status data of the second data packet to be transmitted to the host processor module;

[0022] S50, determine whether all the second data packets to be transmitted have completed transmission. If so, the security control module integrates all the second data packets to be transmitted into complete command data for processing, and feeds back an end signal to the host processor module; if not, return to step S20.

[0023] Preferably, in step S8, the operating system loader includes a first program for confirming the security certificate and a second program for guiding the server mainboard to start up.

[0024] Preferably, step S8 includes the following sub-steps:

[0025] The EDK2 firmware passes the security certificate to the first program, and the first program performs security verification on the Linux distribution system through the security certificate, and jumps to the second program after the security verification passes;

[0026] The required Linux distribution system is selected in the space of the hard disk through the second program, and the server mainboard is started according to the Linux distribution system.

[0027] Preferably, the first preset path is in the order of the chipset, the out-of-band channel in the enhanced serial peripheral interface, and the management engine serial peripheral interface flash memory chip.

[0028] Preferably, the order of the second preset path is the chipset, the flash memory access channel in the enhanced serial peripheral interface, and the BIOS serial peripheral interface flash memory chip.

[0029] Preferably, the order of the third preset path is the chipset, the out-of-band channel in the enhanced serial peripheral interface, and the trusted platform module security chip.

[0030] In a second aspect, the present invention also provides a computer device, comprising: a memory, a processor, and a secure boot program for a server motherboard based on eSPI stored in the memory and runnable on the processor, wherein when the processor executes the secure boot program for the server motherboard based on eSPI, the steps in the secure boot method for the server motherboard based on eSPI as described in any one of the above embodiments are implemented.

[0031] In a third aspect, the present invention also provides a computer-readable storage medium, on which a secure boot program for a server motherboard based on eSPI is stored. When the secure boot program for the server motherboard based on eSPI is executed by a processor, the steps in the secure boot method for the server motherboard based on eSPI as described in any one of the above embodiments are implemented.

[0032] Compared with the prior art, the present invention solves the problems of complex and redundant interfaces, high layout and wiring costs, poor compatibility, and high learning and development costs in the DC-SCM solution by means of multi-channel low-speed signal communication of the eSPI bus; the efficient time-sharing multiplexing of low-speed signals is achieved only by simple modification and design of the eSPI bus driver; the motherboard processor security boot scheme created by the present invention comprehensively considers the server security scenarios from original equipment manufacturers, system integrators, hacker intrusions during transportation, and virus attacks on the equipment during operation, and can detect defective firmware before startup, recover from defective firmware during startup, and protect all firmware from attacks during the system internal update process during operation. Hardware-level security boot. While ensuring safety, it saves the cost of motherboard design and manufacturing as much as possible, saves the learning cost of software developers, and reduces the mental burden of server administrators in actual work. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The present invention will be described in detail below in conjunction with the accompanying drawings. The above and other aspects of the present invention will become clearer and easier to understand through the detailed description made in conjunction with the following drawings. In the accompanying drawings:

[0034] Figure 1 It is a flowchart of a secure boot method for a server motherboard based on eSPI provided by an embodiment of the present invention;

[0035] Figure 2 It is a schematic diagram of the structure of a server mainboard of a secure boot method of a server mainboard based on eSPI provided by an embodiment of the present invention;

[0036] Figure 3 It is a schematic diagram of the structure of a second data packet to be transmitted in the secure boot method of a server motherboard based on eSPI provided in an embodiment of the present invention;

[0037] Figure 4 It is a logic diagram of preset rules of a secure boot method for a server motherboard based on eSPI provided in an embodiment of the present invention;

[0038] Figure 5 It is a structural schematic diagram of a secure boot system of a server motherboard based on eSPI provided in an embodiment of the present invention;

[0039] Figure 6 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0041] Embodiment 1

[0042] Please refer to Figure 1-Figure 4 In a first aspect, the present invention provides a secure boot method for a server motherboard based on eSPI, wherein the server motherboard comprises a host processor module (Host Processor Module, HPM) and a secure control module (Secure Control Module, SCM), wherein the host processor module and the secure control module are connected via an enhanced serial peripheral interface (enhanced Serial Peripheral Interface, eSPI), wherein the host processor module comprises a CPU, a first memory, a hard disk and a chipset, wherein the chipset comprises a plurality of controllers for managing signal transmission, specifically, the chipset is a south bridge chipset, and covers various controllers associated with low-speed signals on the CPU and the motherboard, such as a power management controller (Power Management Control), a peripheral interface (Peripheral), a serial peripheral interface flash controller (SPI Flash Controller), a serial peripheral interface trusted platform module controller (SPITrusted Platform Module Controller), and the like.

[0043] The security control module includes a baseboard management controller chip (Baseboard Management Controller, BMC), a root of trust chip (Root of Trust, RoT), a trusted platform module security chip (Trusted Platform Module, TPM), a management engine serial peripheral interface flash chip (Management Engine SPIFlash), a BIOS serial peripheral interface flash chip (BIOS SPI Flash) and a second memory.

[0044] Specifically, the Trusted Platform Module security chip is a microchip used to store and manage encryption keys, verify the integrity of the system startup process, and protect the confidentiality of user data. Its goal is to provide basic security-related functions, and its functions mainly cover:

[0045] 1. Key management: TPM can create encryption keys and encrypt them, ensuring that only TPM can decrypt these keys.

[0046] 2. Sealing function: TPM can bind keys to specific platform measurements, and these keys can only be decrypted if the platform measurement values ​​match.

[0047] 3. Measured boot: TPM records the integrity of the boot process, detects anomalies or tampering during the process, and prevents malware attacks.

[0048] 4. Virtual smart card: TPM can be used to emulate traditional smart card functions, improving security and reducing management costs.

[0049] 5. Certificate storage: TPM protects certificates and RSA, helps establish a chain of trust, and ensures the identity and data integrity of both communicating parties.

[0050] The Root of Trust chip is an architectural solution for establishing a trusted security foundation. It plays a key role in the cryptographic system to verify and authorize any changes in the stack and remain flexible enough to adapt to new vulnerabilities and enable security applications. Currently, the RoT chip mainly meets the three security requirements of Platform Firmware Resiliency proposed by NIST, namely:

[0051] 1. Mechanisms need to be provided to ensure that platform firmware code and critical data maintain integrity and prevent corruption, such as processes to ensure the authenticity and integrity of firmware updates;

[0052] 2. A mechanism needs to be provided for detecting when platform firmware code and critical data are corrupted or otherwise altered from an authorized state.

[0053] 3. A mechanism to restore the platform firmware code and critical data to an intact state when any such firmware code or critical data is detected to be corrupted or forced to recover through an authorized mechanism. Recovery is limited to the ability to restore firmware code and critical data.

[0054] A NIST-compliant RoT device must perform the above operations in its firmware before booting and without any other external components. A hardware RoT solution must have the following characteristics:

[0055] 1. Scalable: RoT devices must implement protection, detection, and recovery functions through external SPI mirroring, while having nanosecond response speeds. This requires dedicated processing and I / O interfaces to ensure that server performance is not affected.

[0056] 2. Non-bypassable: Unauthorized firmware cannot bypass the RoT device, making it impossible to boot the server from the compromised firmware.

[0057] 3. Self-protection: RoT devices must dynamically respond to the ever-changing attack surface (all the nodes in the device or system that can be accessed by unauthorized users) and protect themselves from external attacks.

[0058] 4. Self-detection: RoT devices must be able to detect unauthorized firmware using a non-bypassable cryptographic hardware module.

[0059] 5. Self-recovery: When an unauthorized firmware is detected on the device, the RoT device must be able to automatically switch to the previous golden firmware image to ensure that the server continues to operate.

[0060] The secure boot method comprises the following steps:

[0061] S1. The trusted root chip is powered on and started, and the integrity of the firmware in each chip connected to the serial peripheral interface bus is checked through the trusted root chip. If the firmware in each chip is complete, step S2 is performed.

[0062] In an embodiment of the present invention, step S1 also includes the following steps: in the server motherboard, before the remaining processors other than the trusted root chip are started, the trusted root chip performs security verification on the firmware update packages of the remaining processors in the server motherboard, and if it is detected that the firmware update package is damaged or maliciously tampered with, the firmware of the processor whose firmware update package is damaged or maliciously tampered with is restored from the most original available firmware version. Specifically, the remaining processors refer to baseboard management controller chips, trusted platform module security chips, management engine serial peripheral interface flash memory chips, BIOS serial peripheral interface flash memory chips, etc. in the security control module of the server motherboard.

[0063] S2. The baseboard management controller chip is powered on and started, and the firmware of the baseboard management controller chip is read.

[0064] In the embodiment of the present invention, when the baseboard management controller chip is started, the firmware of the baseboard management controller chip protected by the trusted root chip is read from the serial peripheral interface monitor on the trusted root chip connected to the serial peripheral interface controller of the baseboard management controller chip. After the baseboard management controller chip is started, the eSPI connection device (eSPITarget) driver on the security control module side is ready.

[0065] S3, the host processor module is powered on and started, the firmware code (Rom Code) of the read-only memory built into the CPU is executed, the driver program (SPI controller driver and eSPI controller driver) in the chipset is initialized for the first time, the firmware code initiates a firmware read request to the management engine serial peripheral interface flash memory chip through a first preset path, the firmware program of the management engine serial peripheral interface flash memory chip is returned according to the first preset path, and the firmware program is loaded into the random access register of the management engine serial peripheral interface flash memory chip for execution.

[0066] In an embodiment of the present invention, the first preset path is, in order of paths: management engine flash chip serial peripheral interface controller (ME Flash SPI Controller), chipset eSPI controller (Chipset eSPIController), eSPI bus out-of-band channel (eSPI OOB Channel), baseboard management controller chip eSPI controller (BMC eSPI Controller), baseboard management controller chip serial peripheral interface flash controller (BMCSPI Flash Controller), root of trust serial peripheral interface monitor (RoT SPI Monitor), management engine serial peripheral interface flash chip (ME SPI Flash).

[0067] On the premise of confirming that the firmware of the management engine serial peripheral interface flash chip is safe and complete, the root of trust chip returns the firmware program along the original path and loads it into the internal random access register of the management engine serial peripheral interface flash chip for execution, thereby completing its initialization work; after that, the management engine serial peripheral interface flash chip can simulate the SMBus (System Management Bus) bus through the out-of-band channel in the eSPI bus and transmit MCTP (Management Component Transport Protocol) data packets.

[0068] S4. Initialize the static random access memory in the CPU, and initiate a firmware read request to the BIOS serial peripheral interface flash memory chip according to a second preset path to obtain the U-Boot-SPL component in the BIOS firmware of the BIOS serial peripheral interface flash memory chip.

[0069] In the embodiment of the present invention, the root-of-trust chip returns the U-Boot-SPL part in the BIOS firmware along the original path on the premise of confirming that the BIOS firmware is safe and complete.

[0070] The second preset path is in the order of paths: chipset serial peripheral interface flash controller (Chipset SPI Flash Controller), chipset eSPI controller (Chipset eSPI Controller), flash access channel (eSPI Flash Access Channel) in the eSPI bus, eSPI controller of baseboard management controller chip (BMC eSPI Controller), serial peripheral interface flash controller (BMCSPI Flash Controller) in the baseboard management controller chip, root of trust serial peripheral interface monitor (RoT SPI Monitor), BIOS serial peripheral interface flash chip (BIOS SPI Flash).

[0071] S5. Obtain the security certificate stored in the trusted platform module security chip through the firmware code via a third preset path, and perform security verification on the U-Boot-SPL component according to the security certificate. If the security verification passes, pass the security certificate to the U-Boot-SPL component.

[0072] In the embodiment of the present invention, the security certificate is a security certificate from an original equipment manufacturer.

[0073] The second preset path is in the order of: chipset serial peripheral interface trusted platform module controller (Chipset SPI TPM Controller), chipset eSPI controller (Chipset eSPI Controller), eSPI bus out-of-band channel (eSPI OOB Channel), baseboard management controller chip eSPI controller (BMC eSPIController), serial peripheral interface trusted platform module controller (BMC SPI TPMController) in the baseboard management controller chip, and trusted platform module security chip.

[0074] S6. Run the U-Boot-SPL component in the static random access memory, initialize the first memory, initialize the chipset driver for a second time, and obtain the EDK2 firmware of the UEFI system from the BIOS serial peripheral interface flash chip.

[0075] In an embodiment of the present invention, after obtaining the U-Boot-SPL component, the firmware code uses the security certificate obtained from the trusted platform module security chip to verify its signature, and by moving it to the internal SRAM space, starts to execute the secure boot (Secure Boot) called the first stage boot loader (First Stage Bootloader).

[0076] Among them, UEFI stands for Unified Extensible Firmware Interface. The UEFI specification defines a new model for the interface between the operating system and the platform firmware. The interface consists of a data table containing platform-related information and boot and runtime service calls available to the operating system and its loader. Together, they provide a standard environment for booting the operating system and running pre-boot applications.

[0077] S7. The U-Boot-SPL component performs security verification on the EDK2 firmware through the security certificate. If the security verification passes, the EDK2 firmware is executed to complete the initialization of the UEFI system to the boot device selection stage.

[0078] In an embodiment of the present invention, the U-Boot-SPL component uses the security certificate passed from the firmware code to verify the EDK2 firmware, and then loads it into the random access register of the first memory and jumps to the startup point of EDK2 for execution. The EDK2 firmware compiles OpenSBI into a library, and with the help of the SBI library, completes the initialization process of four stages: security verification (Security Phase, SEC), EFI pre-initialization (Pre-EFI Initialization Phase, PEI), driver execution environment (Driver Execution Environment Phase, DXE), and boot device selection phase (Boot Device Selection Phase, BDS). During the process, since the flash memory chip used as non-volatile storage (Non-volatile Storage) on the security control module side will still be accessed to read and write firmware configuration information, it is necessary to implement the driver startup in the chipset (SPI controller driver and eSPI controller driver).

[0079] S8. Connect the EDK2 firmware to the hard disk, execute the operating system loader, and start the server mainboard through the operating system loader.

[0080] In the embodiment of the present invention, in the embodiment of the present invention, in step S8, the operating system loader includes a first program for confirming the security certificate and a second program for guiding the server mainboard to start up.

[0081] The EDK2 firmware passes the security certificate to the first program (Shim), and the first program performs security verification on the Linux distribution system through the security certificate, and jumps to the second program (Grub2) after the security verification is passed; specifically, the EDK2 firmware will initialize the hard disk connected to the server motherboard in the previous process, and will jump to the first user-level EFI program: the operating system loader (OS Loader) for execution after the boot device selection phase. For the Linux system, the operating system loader is a combination of Shim + Grub2 (i.e., the first program and the second program);

[0082] The second program selects the required distribution system in the space of the hard disk (the space of the hard disk includes multiple Linux versions), and jumps to the startup point of the distribution system kernel for execution; after the Linux kernel completes a series of initializations in the server motherboard environment, it jumps to the distribution file system, completing the entire secure boot process from power-on to entering the system user interface.

[0083] In an embodiment of the present invention, when data is transmitted between the host processor module and the security control module through the out-of-band channel in the enhanced serial peripheral interface, data transmission is performed according to a preset rule, and the preset rule is:

[0084] S10, adding a sequence number and a total number of segments for describing data segmentation information to the data packet to be transmitted, and segmenting the data packet to be transmitted according to the sequence number and the total number of segments to obtain a plurality of second data packets to be transmitted;

[0085] S20, the host processor module initiates a status query to the security control module to inquire whether the status of the security control module is suitable for data transmission. If so, the security control module feeds back a ready signal to the host processor module;

[0086] S30, after receiving the ready signal, the host processor module transmits the single second data packet to be transmitted to the security control module according to the sequence number;

[0087] S40, after receiving the second data packet to be transmitted, the security control module feeds back processing status data of the second data packet to be transmitted to the host processor module;

[0088] S50, determine whether all the second data packets to be transmitted have completed transmission. If so, the security control module integrates all the second data packets to be transmitted into complete command data for processing, and feeds back an end signal to the host processor module; if not, return to step S20.

[0089] Specifically, taking the out-of-band channel of the eSPI bus to transmit the serial peripheral interface bus data required by the trusted platform module security chip as an example, a complete eSPI command usually includes a command CMD field, an optional header HDR field, and an optional data DATA field; the command CMD field occupies one byte and is used to indicate the specific type of the current command. Its specific definition is determined by the eSPI protocol. In this example, the CMD value is PUT_OOB (00000110), that is, data is sent to the eSPI connected device through the out-of-band channel; and the HDR field contains a single-byte Cycle Type segment to indicate the actual type of the data packet, a half-byte Tag segment to carry additional information, such as data priority, data stream identification, etc., and a 12-bit length segment to describe the actual length of the data payload. It can be seen that the maximum payload of a single eSPI OOB data packet is 4k bytes.

[0090] On the other hand, the data packet of the Trusted Platform Module of the TCG (Trusted Computing Group) standard is divided into three pre-fields: a two-byte long Tag segment is used to specify the authorized session type of the command, a 4-byte long CMD / RSPSize segment is used to describe the actual length of the entire data packet, and a four-byte long CMD / RSP Code segment is used to describe the specific behavior of the TPM command / response, which is officially formulated by the TCG. After the pre-field is the data segment directly associated with the command / response, and the actual length of the data segment is determined by the Size segment.

[0091] From the above description, it can be seen that a single eSPI data packet may not be able to fully transmit a message of the trusted platform module, so the data packet of the trusted platform module needs to be decomposed and then transmitted in sequence. At this time, it is necessary to add fields TPM Seq and TPM Num to the data packet of the eSPI out-of-band channel to describe the trusted platform module data segmentation information. They respectively represent the sequence number of the current TPM data segment and the total number of TPM data segments. After calculation, the Seq field with a length of 20 bits can meet the design requirements. Based on this, the basic packet format designed by the present invention to transmit TPM SPI data using the eSPI out-of-band channel is as follows: Figure 3 As shown, Figure 3 : is a schematic diagram of the structure of a second data packet to be transmitted in a secure boot method for a server motherboard based on eSPI provided in an embodiment of the present invention, wherein Figure 3A is the format of the data packet in the CMD Size segment, and B is the format of the data packet in the RSP Size segment. To ensure the compatibility of the data packets, the HDR field of the out-of-band channel data and the Seq segment of the DATA field use the big-endian byte order as specified by the eSPI protocol, while the TPM data packet in the DATA field uses the little-endian byte order as specified by the TCG TPM standard.

[0092] Please refer to Figure 4 , Figure 4 It is a schematic diagram of the preset rule logic of the secure boot method of the server motherboard based on eSPI provided by an embodiment of the present invention; after the data packet format design is completed, the data interaction logic is defined according to the status register definition and the out-of-band channel operation rule in the eSPI bus as follows:

[0093] 1. The SPI bus of the host processor module receives the TPM command from the CPU and passes it to the eSPI bus driver. The eSPI driver then disassembles the TPM data (i.e., the first data packet to be transmitted) and packages it into a fixed-length eSPI out-of-band data packet (i.e., the second data packet to be transmitted).

[0094] 2. The eSPI controller initiates a status query to the eSPI connected device. If the status register shows a ready signal (OOB_FREE signal), it means that the eSPI connected device is ready to receive data from the out-of-band channel. At this time, the eSPI controller initiates a PUT_OOB command, sends a single second data packet to be transmitted, and sends the split data packets one by one to the eSPI connected device. The eSPI connected device then informs the eSPI controller side of the processing status of the data by initiating processing status data (Alert signal).

[0095] 3. If the status register of the eSPI connection device still displays the ready signal, it means that the eSPI connection device side has received and saved the transmitted data segments, and the eSPI controller side should continue to send the remaining segments; if the status register displays the complete acceptance signal (OOB_AVAIL signal), it means that the eSPI connection device side has completely received all the data segments of the second data packet to be transmitted and assembled them into a complete TPM SPI command (i.e., command data) and sent it to the TPM chip, and at this time the TPM chip has also prepared the response data packet and disassembled it into segments and returned it to the eSPI driver of the eSPI connection device. As for the specific content of the response, it is not within the scope of consideration of the present invention.

[0096] 4. The eSPI controller continuously initiates the data request command (GET_OOB) to obtain the second data packet to be transmitted until the Seq sequence number in the data segment of the second data packet to be transmitted is equal to the total number of data segments. At this time, the eSPI connection device should initiate an end signal to the eSPI controller side, which means that the response is over. At this time, the host processor module side continues to read the status register and should read the fully accepted signal (!OOB_AVAIL signal), which means that this complete eSPI TPM command / response interaction is over. The driver of the eSPI controller will send the assembled TPM SPI response data packet to the CPU side through the SPI bus on the host processor module side, ending an SPI TPM chip access. As for the specific content of the access, it depends entirely on the internal definition of the data packet.

[0097] The present invention only adds a new Cycle Type to the out-of-band channel in the eSPI driver and designs the packing / unpacking logic of the CycleType, that is, it completes the time-sharing multiplexing of different low-speed buses SMBus and SPI that originally occupied different IO pins and address spaces. By extension, all scenarios in the chipset that need to use the SPI bus to interact with the baseboard management controller chip, such as the behavior of the management engine chip loading its firmware from the SCM side SPI Flash chip, can also be completed with the help of the out-of-band channel. The only difference is that the data field in the eSPI command and response data packets is determined by the design logic of the chip itself.

[0098] In the embodiment of the present invention, the reliability and credibility of the server motherboard startup process are mainly reflected in the following aspects:

[0099] 1. With the firmware protection function of the root of trust chip, it is possible to prevent unauthorized writing to the serial peripheral interface flash protection area on the module or clearing all or part of the firmware, thereby ensuring that the firmware of each component on the motherboard is in a stable state. In some cases, even data reading operations on the protection area are not allowed.

[0100] 2. With the firmware detection function of the root of trust chip, the firmware update package from the original equipment manufacturer can be securely verified before each processor on the motherboard starts from the firmware. If the firmware is detected to be damaged or unauthorized, the recovery process will be initiated.

[0101] 3. With the firmware recovery function of the root of trust chip, if the firmware is detected to be tampered with or damaged, the processors of the motherboard can be started from the previous trusted firmware version (the so-called golden image), or the new firmware can be obtained through the trusted process to start the system recovery process.

[0102] 4. With the hardware encryption and decryption function of the Trusted Platform Module security chip, motherboard equipment manufacturers can sign the firmware at each stage of the motherboard processor startup process, and complete the signature verification one by one at startup to ensure its credibility. At the same time, the baseboard management controller chip can also sign the UEFI / ME firmware to be updated through the Trusted Platform Module security chip to ensure the continuity of the trust link during the update process. In addition, the administrator of the server equipment can use the Trusted Platform Module security chip to complete the work more reliably in any work scenario that requires encryption and decryption.

[0103] 5. In addition, a redundant BIOS flash chip can be designed so that when a hardware failure occurs in the BIOS chip, the backup chip can take over the boot process to ensure that each processor system on the motherboard can start normally.

[0104] Compared with the prior art, the present invention solves the problems of complex and redundant interfaces, high layout and wiring costs, poor compatibility, and high learning and development costs in the DC-SCM solution by means of multi-channel low-speed signal communication of the eSPI bus; the efficient time-sharing multiplexing of low-speed signals is achieved only by simple modification and design of the eSPI bus driver; the motherboard processor security boot scheme created by the present invention comprehensively considers the server security scenarios from original equipment manufacturers, system integrators, hacker intrusions during transportation, and virus attacks on the equipment during operation, and can detect defective firmware before startup, recover from defective firmware during startup, and protect all firmware from attacks during the system internal update process during operation. Hardware-level security boot. While ensuring safety, it saves the cost of motherboard design and manufacturing as much as possible, saves the learning cost of software developers, and reduces the mental burden of server administrators in actual work.

[0105] Embodiment 2

[0106] The embodiment of the present invention also provides a secure boot system for a server motherboard based on eSPI, please refer to Figure 5 , Figure 5 200 is a structural diagram of a secure boot system 200 of a server motherboard based on eSPI provided in an embodiment of the present invention, wherein the server motherboard includes a host processor module and a security control module, wherein the host processor module and the security control module are connected via an enhanced serial peripheral interface, wherein the host processor module includes a CPU, a first memory, a hard disk, and a chipset, wherein the chipset includes a plurality of controllers for managing signal transmission, wherein the security control module includes a baseboard management controller chip, a trusted root chip, a trusted platform module security chip, a management engine serial peripheral interface flash memory chip, a BIOS serial peripheral interface flash memory chip, and a second memory, and wherein the secure boot system of the server motherboard based on eSPI further includes:

[0107] 201, a trusted root chip module, the trusted root chip is powered on and started, and the integrity of the firmware in each chip connected to the serial peripheral interface bus is checked through the trusted root chip. If the firmware in each chip is complete, jump to 202 baseboard management controller chip module;

[0108] 202. A baseboard management controller chip module, wherein the baseboard management controller chip is powered on and started, and the firmware of the baseboard management controller chip is read;

[0109] 203. A host processor startup module, wherein the host processor module is powered on and started, and the firmware code of the built-in read-only memory in the CPU is executed to initialize the driver in the chipset for the first time, wherein the firmware code initiates a firmware read request to the management engine serial peripheral interface flash memory chip through a first preset path, returns the firmware program of the management engine serial peripheral interface flash memory chip according to the first preset path, and loads the firmware program into a random access register of the management engine serial peripheral interface flash memory chip for execution;

[0110] 204. Initialize the CPU module, initialize the static random access memory in the CPU, and initiate a firmware read request to the BIOS serial peripheral interface flash memory chip according to the second preset path to obtain the U-Boot-SPL component in the BIOS firmware of the BIOS serial peripheral interface flash memory chip;

[0111] 205. A security certificate acquisition module, which acquires the security certificate stored in the trusted platform module security chip through the firmware code via a third preset path, and performs security verification on the U-Boot-SPL component according to the security certificate. If the security verification passes, the security certificate is delivered to the U-Boot-SPL component;

[0112] 206. A firmware acquisition module runs the U-Boot-SPL component in the static random access memory, initializes the first memory, initializes the driver of the chipset for the second time, and acquires the EDK2 firmware of the UEFI system from the BIOS serial peripheral interface flash memory chip;

[0113] 207, UEFI system startup module, the U-Boot-SPL component performs security verification on the EDK2 firmware through the security certificate, and if the security verification passes, the EDK2 firmware is executed to complete the initialization of the UEFI system to the startup device selection stage;

[0114] 208. A server mainboard startup module connects the EDK2 firmware to the hard disk, executes an operating system loader, and starts the server mainboard through the operating system loader.

[0115] The secure boot system 200 for the server motherboard based on eSPI can implement the steps in the secure boot method for the server motherboard based on eSPI in the above embodiment, and can achieve the same technical effects. Please refer to the description in the above embodiment, which will not be repeated here.

[0116] Embodiment 3

[0117] The embodiment of the present invention also provides a computer device, please refer to Figure 6 , Figure 6 300 is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device 300 includes: a memory 302, a processor 301, and a secure boot program based on an eSPI server motherboard stored in the memory 302 and executable on the processor 301.

[0118] The processor 301 calls the secure boot program of the server motherboard based on eSPI stored in the memory 302 to execute the steps of the secure boot method of the server motherboard based on eSPI provided in the embodiment of the present invention. Figure 1 , specifically including the following steps:

[0119] S1, the trusted root chip is powered on and started, and the integrity of the firmware in each chip connected to the serial peripheral interface bus is checked through the trusted root chip. If the firmware in each chip is complete, step S2 is performed;

[0120] S2, the baseboard management controller chip is powered on and started, and the firmware of the baseboard management controller chip is read;

[0121] S3, the host processor module is powered on and started, the firmware code of the built-in read-only memory in the CPU is executed, the driver in the chipset is initialized for the first time, the firmware code initiates a firmware read request to the management engine serial peripheral interface flash memory chip through a first preset path, the firmware program of the management engine serial peripheral interface flash memory chip is returned according to the first preset path, and the firmware program is loaded into the random access register of the management engine serial peripheral interface flash memory chip for execution;

[0122] S4, initializing the static random access memory in the CPU, and initiating a firmware read request to the BIOS serial peripheral interface flash memory chip according to a second preset path, to obtain a U-Boot-SPL component in the BIOS firmware of the BIOS serial peripheral interface flash memory chip;

[0123] S5, the firmware code obtains the security certificate stored in the trusted platform module security chip through a third preset path, and performs security verification on the U-Boot-SPL component according to the security certificate. If the security verification passes, the security certificate is passed to the U-Boot-SPL component;

[0124] S6, running the U-Boot-SPL component in the static random access memory, initializing the first memory, and initializing the driver of the chipset for the second time, and obtaining the EDK2 firmware of the UEFI system from the BIOS serial peripheral interface flash chip;

[0125] S7, the U-Boot-SPL component performs security verification on the EDK2 firmware through the security certificate. If the security verification passes, the EDK2 firmware is executed to complete the initialization of the UEFI system to the boot device selection stage;

[0126] S8. Connect the EDK2 firmware to the hard disk, execute the operating system loader, and start the server mainboard through the operating system loader.

[0127] The computer device 300 provided in the embodiment of the present invention can implement the steps in the method in the above embodiment and can achieve the same technical effects. Please refer to the description in the above embodiment and will not be repeated here.

[0128] Embodiment 4

[0129] An embodiment of the present invention further provides a computer-readable storage medium, on which a secure boot program for a server motherboard based on eSPI is stored. When the secure boot program for a server motherboard based on eSPI is executed by a processor, each process and step in the secure boot method for a server motherboard based on eSPI provided in an embodiment of the present invention is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0131] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0133] The embodiments of the present invention are described above in conjunction with the accompanying drawings. What is disclosed is only the preferred embodiment of the present invention. However, the present invention is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is only illustrative rather than restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms and equivalent changes without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A secure boot method for a server motherboard based on eSPI, characterized in that: The server motherboard includes a host processor module and a security control module, and the host processor module and the security control module are connected via an enhanced serial peripheral interface; the host processor module includes a CPU, a first memory, a hard disk and a chipset, and the chipset includes a plurality of controllers for managing signal transmission; the security control module includes a baseboard management controller chip, a trusted root chip, a trusted platform module security chip, a management engine serial peripheral interface flash memory chip, a BIOS serial peripheral interface flash memory chip and a second memory, and the secure boot method includes the following steps: S1, the trusted root chip is powered on and started, and the integrity of the firmware in each chip connected to the serial peripheral interface bus is checked through the trusted root chip. If the firmware in each chip is complete, step S2 is performed; S2, the baseboard management controller chip is powered on and started, and the firmware of the baseboard management controller chip is read; S3, the host processor module is powered on and started, the firmware code of the built-in read-only memory in the CPU is executed, the driver in the chipset is initialized for the first time, the firmware code initiates a firmware read request to the management engine serial peripheral interface flash memory chip through a first preset path, the firmware program of the management engine serial peripheral interface flash memory chip is returned according to the first preset path, and the firmware program is loaded into the random access register of the management engine serial peripheral interface flash memory chip for execution; S4, initializing the static random access memory in the CPU, and initiating a firmware read request to the BIOS serial peripheral interface flash memory chip according to a second preset path, to obtain a U-Boot-SPL component in the BIOS firmware of the BIOS serial peripheral interface flash memory chip; S5. Obtain the security certificate stored in the trusted platform module security chip through the firmware code via a third preset path, and perform security verification on the U-Boot-SPL component according to the security certificate. If the security verification passes, pass the security certificate to the U-Boot-SPL component; S6, running the U-Boot-SPL component in the static random access memory, initializing the first memory, and initializing the driver of the chipset for the second time, and obtaining the EDK2 firmware of the UEFI system from the BIOS serial peripheral interface flash chip; S7, the U-Boot-SPL component performs security verification on the EDK2 firmware through the security certificate. If the security verification passes, the EDK2 firmware is executed to complete the initialization of the UEFI system to the boot device selection stage; S8. Connect the EDK2 firmware to the hard disk, execute the operating system loader, and start the server mainboard through the operating system loader.

2. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: Step S1 also includes the following steps: in the server mainboard, before the remaining processors other than the trusted root chip are started, the trusted root chip performs security verification on the firmware update packages of the remaining processors in the server mainboard; if it is detected that the firmware update package is damaged or maliciously tampered with, the firmware of the processor corresponding to the damaged or maliciously tampered firmware update package is restored from the most original available firmware version.

3. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: When data is transmitted between the host processor module and the security control module through the out-of-band channel in the enhanced serial peripheral interface, data transmission is performed according to a preset rule, and the preset rule is: S10, adding a sequence number and a total number of segments for describing data segmentation information to the data packet to be transmitted, and segmenting the data packet to be transmitted according to the sequence number and the total number of segments to obtain a plurality of second data packets to be transmitted; S20, the host processor module initiates a status query to the security control module to inquire whether the status of the security control module is suitable for data transmission. If so, the security control module feeds back a ready signal to the host processor module; S30, after receiving the ready signal, the host processor module transmits the single second data packet to be transmitted to the security control module according to the sequence number; S40, after receiving the second data packet to be transmitted, the security control module feeds back processing status data of the second data packet to be transmitted to the host processor module; S50, determining whether all the second data packets to be transmitted have completed transmission, and if so, the security control module integrates all the second data packets to be transmitted into complete command data for processing, and feeds back an end signal to the host processor module; If not, return to step S20.

4. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: In step S8, the operating system loader includes a first program for confirming the security certificate and a second program for guiding the server mainboard to start up.

5. The secure boot method of a server motherboard based on eSPI as claimed in claim 4, characterized in that: Step S8 includes the following sub-steps: The EDK2 firmware passes the security certificate to the first program, and the first program performs security verification on the Linux distribution system through the security certificate, and jumps to the second program after the security verification passes; The required Linux distribution system is selected in the space of the hard disk through the second program, and the server mainboard is started according to the Linux distribution system.

6. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: The order of the first preset path is the chipset, the out-of-band channel in the enhanced serial peripheral interface, and the management engine serial peripheral interface flash memory chip.

7. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: The order of the second preset path is the chipset, the flash memory access channel in the enhanced serial peripheral interface, and the BIOS serial peripheral interface flash memory chip.

8. The secure boot method of a server motherboard based on eSPI as claimed in claim 1, characterized in that: The order of the third preset path is the chipset, the out-of-band channel in the enhanced serial peripheral interface, and the trusted platform module security chip.

9. A computer device, characterized in that: include: A memory, a processor, and a secure boot program for a server motherboard based on eSPI stored in the memory and executable on the processor, wherein the processor implements the steps in the secure boot method for a server motherboard based on eSPI as described in any one of claims 1 to 8 when executing the secure boot program for the server motherboard based on eSPI.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a secure boot program for a server motherboard based on eSPI, and when the secure boot program for the server motherboard based on eSPI is executed by a processor, the steps in the secure boot method for a server motherboard based on eSPI are implemented as described in any one of claims 1 to 8.