Network card hot-plug configuration method, apparatus, and system, and storage medium

By acquiring the network card configuration information supported by the CPU, and using the BIOS to connect to the CPLD simulator pins, the network card access information is scanned, a structure is generated, the network card location and bandwidth are identified, and hot-swap attributes are configured. This solves the adaptation problem of OCP network cards in multiple scenarios in servers, and realizes flexible use and improved reliability of network cards.

WO2026067060A1PCT designated stage Publication Date: 2026-04-02INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In existing server designs, the hot-swappable configuration of OCP network cards cannot meet the needs of multiple scenarios, resulting in poor BIOS compatibility, inability to accurately control the power-on and power-off of the network card, risk of damage, and inability to recognize multiple connection methods, which limits the flexible use of the network card.

Method used

By obtaining the network card configuration information supported by the CPU, and using the BIOS to connect to the CPLD simulator pins, the network card access information is scanned, a structure is generated, the network card location and bandwidth are identified, hot-swap attributes are configured, the power-on and power-off of the network card are controlled, and dynamic adaptation of multiple connection methods is supported.

Benefits of technology

It enables flexible configuration of OCP network cards in different application scenarios, avoids damage to network cards and motherboards, improves system reliability and scalability, supports hot-swapping of multiple connection methods, and meets diverse customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025120745_02042026_PF_FP_ABST
    Figure CN2025120745_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a network card hot-plug configuration method, apparatus, and system, and a storage medium. The method is applied to a BIOS, the BIOS being connected to a CPU via a simulator pin of a CPLD. The method comprises: acquiring a first structure of a network card configuration supported by the CPU; in an initialization phase, scanning and acquiring access information of at least one network card connected to the simulator pin of the CPLD; adapting a CPU position of an inserted network card and a cable extension bandwidth to the first structure, and generating a second structure; respectively configuring hot-plug attributes for at least one network card managed by the CPU and the CPLD; and according to an identification function of the second structure and the configured hot-plug attributes, in a driver execution phase, on the basis of a hot-plug operation performed by a user on any one of the at least one network card, controlling power-on and power-off of the network card. The present method solves the problem of limited available configuration space when an OCP network card is fixed in a slot, which fails to meet general customer requirements.
Need to check novelty before this filing date? Find Prior Art

Description

A network card hot plug configuration method, device, system and storage medium

[0001] Cross-reference of related applications

[0002] The present application claims priority to the Chinese patent application No. 202411356829.5, filed on September 27, 2024, and entitled "A network card hot plug configuration method, device, system and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0003] The present application relates to the technical field of servers, in particular to a network card hot plug configuration method, device, system and storage medium. BACKGROUND

[0004] With the gradual maturity of server whole machine design, the compatibility of server whole machine to components is paid more and more attention, BIOS (Basic Input Output System) will grab PCIe (Peripheral Component Interconnect Express) device information through IO (Input / Output) access mode, so as to deliver the corresponding information to BMC (Baseboard Management Controller) and write into OS (Operating System).

[0005] OCP network card (Open Compute Project Network Card) is a kind of server network interface card launched by Open Compute Project (Open Compute Project). It is designed to meet the needs of high performance, high reliability and low power consumption of data center, and the OCP network card supports "hot plug".

[0006] For the phenomenon of hot plug, in the version of the first generation server CPU (Central Processing Unit), hardware only designs one kind of OCP network card configuration, such as only one X8 slot is reserved on the CPU side of the mainboard to connect the OCP network card, at this time the configuration only needs to be directly written into BIOS and CPLD (Complex Programmable Logic Device) to adapt to this configuration, only one kind of OCP network card is adapted, other OCP network cards are not adapted, which leads to the use space of hot plug configuration OCP network card in different application scenarios is greatly reduced, BIOS adaptability is poor, and customer demand cannot be met. SUMMARY

[0007] In a first aspect, the application provides a network card hot plug configuration method, which is applied to a basic input / output system (BIOS). The BIOS is connected to a central processing unit (CPU) through emulator pins of a complex programmable logic device (CPLD). The method comprises the following steps:

[0008] obtaining a first structure of network card configurations supported by the CPU, the first structure being used to indicate network card configuration conditions that can be supported by the CPU;

[0009] in an initialization stage, scanning and obtaining access information of at least one network card connected to the emulator pins of the CPLD, the access information comprising: a position of a CPU where the inserted network card is located and a cable expansion bandwidth;

[0010] adapting the position of the CPU where the inserted network card is located and the cable expansion bandwidth to the first structure to generate a second structure, the second structure being used to identify configuration conditions and slot identifications of the network card currently inserted into the CPU;

[0011] configuring hot plug attributes for the at least one network card managed by the CPU and the CPLD, respectively; and

[0012] based on the identification function of the second structure and the configured hot plug attributes, in a driver program execution stage, controlling power-on and power-off of the network card based on a hot plug operation of any network card in the at least one network card by a user.

[0013] In combination with the first aspect, in a possible implementation, the first structure of network card configurations supported by the CPU is obtained by the following steps:

[0014] obtaining a system software and hardware interface document, the system software and hardware interface document comprising interface configuration information supported by a mainboard;

[0015] determining relevant information of each interface of the CPU on a slot of the mainboard according to the system software and hardware interface document, the relevant information of the slot comprising: a number of channels of the slot and a bandwidth capacity of the slot; and

[0016] generating the first structure according to the number of channels of the slot and the bandwidth capacity of the slot, the first structure being used to store one or more of the following: a bandwidth of the current slot, a rate, a start channel, an end channel, a position ID of the slot, and a position of a CPU.

[0017] In combination with the first aspect, in another possible implementation, in the initialization stage, the access information of the at least one network card connected to the emulator pins of the CPLD is obtained by the following steps:

[0018] in the initialization stage, scanning the access information of the at least one network card connected to the emulator pins of the CPLD by using an I2C link.

[0019] The access information of the at least one network card is used to identify the position information of the currently accessed network card by the CPLD, simulate into a simulator pin, and transmit to the BIOS; the access information at least includes: a first field and a second field, the first field is used to indicate the position of the CPU where the inserted network card is located, and the second field is used to indicate whether the inserted network card has bandwidth expansion through a cable.

[0020] In combination with the first aspect, in another possible implementation, the position of the CPU where the inserted network card is located and the cable expansion bandwidth are adapted to the first structure to generate a second structure, including:

[0021] The insertion condition of the at least one network card is dynamically determined according to the first field and the second field, and it is determined whether the first field and the second field are both valid fields;

[0022] In response to the first field and the second field being both valid fields, the second structure is generated according to one or more of the first structure, the start channel in the first structure, the end channel, the position ID of the slot and the position of the CPU where the network card is located.

[0023] In combination with the first aspect, in another possible implementation, the hot plug attribute is configured for the at least one network card managed by the CPU and the CPLD, including:

[0024] The hot plug type of the entire PCIe link is configured for the CPU, and the first instruction is issued, the hot plug type includes: two types of violent hot plug and switch hot plug; the first instruction is used to instruct the CPU to configure the current hot plug type on the PCIe link one by one according to the position ID of the slot of the network card; and

[0025] The hot plug type is configured for the at least one network card managed by the CPLD, and the I2C identifier, the position ID of the slot and the device address of the network card corresponding to each network card.

[0026] In combination with the first aspect, in another possible implementation, after the hot plug attribute is configured, the method further includes:

[0027] The position of the at least one network card inserted into the CPU is matched with the hot plug attribute configured for the at least one network card managed by the CPLD; and

[0028] The connection mode of the target network card inserted into the slot is determined according to the matching result.

[0029] The connection mode includes: the connection mode of the network card on the CPU side and the connection mode of connecting two or more CPUs through a cable.

[0030] With reference to the first aspect, in a further possible implementation form of the first aspect, the matching according to the position of the at least one network card inserted into the CPU and the hot plug attribute configured for the at least one network card managed by the CPLD comprises:

[0031] In response to the at least one inserted network card being the first network card and the second network card, and the first Slot ID corresponding to the first network card and the second Slot ID corresponding to the second network card both being the same as the two Slot IDs in the configured hot plug attribute, it is determined that the currently inserted first network card and the second network card are connected to the two CPUs through the cables respectively.

[0032] With reference to the first aspect, in a further possible implementation form of the first aspect, in the driver execution stage, the power-on and power-off of the network card is controlled based on the hot plug operation of the user on any of the at least one network card, comprising:

[0033] In response to detecting the target network card being inserted into the slot, the hot plug attribute of the target network card is adapted according to the position ID of the slot in the driver execution stage; and

[0034] After the BIOS and the CPLD are adapted according to the agreed channel, the light on the target network card is automatically lit, and the target network card enters the operating system, and the information of the inserted target network card is displayed under the operating system.

[0035] With reference to the first aspect, in a further possible implementation form of the first aspect, after entering the operating system, the power-on and power-off of the network card is controlled, comprising:

[0036] The switch Button hot plug type selected by the user on the target network card is determined;

[0037] In response to the operation of the switch Button hot plug type of the user, the indicator light is flashed and then extinguished, and it is indicated that the target network card is pulled out, and the target network card is controlled to complete power-off; and

[0038] In response to the target network card being reinserted into the slot, in response to the operation of the switch hot plug type of the user, the indicator light is re-flashed and then constantly lit, and the target network card is controlled to complete power-on.

[0039] With reference to the first aspect, in a further possible implementation form of the first aspect, the hot plug attribute configured for the at least one network card managed by the CPLD comprises:

[0040] The configuration information is delivered to the CPLD through the I2C switching chip to configure the hot plug attribute for the at least one network card managed by the CPLD, and the configuration information comprises address information of the I2C switching chip.

[0041] With reference to the first aspect, in a possible implementation form of the first aspect, the first structure is used to represent the number of CPUs, port information of each CPU, and relevant information of a network card connected to each CPU.

[0042] The relevant information of the network card connected to each CPU includes a connection mode of a port of the network card of each CPU, and the connection mode of the port of the network card includes single-path connection and multi-path connection.

[0043] With reference to the first aspect, in a possible implementation form of the first aspect, the network card configuration supported by the CPU includes two multi-path connection configurations and four single-path connection configurations.

[0044] With reference to the first aspect, in a possible implementation form of the first aspect, the multi-path connection configuration information includes one or more of the following: two network cards connected to two CPUs, the network card being an Open Compute Project (OCP) network card, an address of an I2C switching chip, and an address of an emulator.

[0045] With reference to the first aspect, in a possible implementation form of the first aspect, the first structure is adapted to different configuration bandwidths according to different start channels and end channels.

[0046] With reference to the first aspect, in a possible implementation form of the first aspect, the first field is an OCP_CPU_ADDR field, and the second field is an OCP_CABLE_PRSNT field.

[0047] The second aspect provides a network card hot plug configuration device, and the device comprises:

[0048] The obtaining module is configured to obtain a first structure of a network card configuration supported by a central processing unit (CPU), the first structure being used to indicate a network card configuration supported by the CPU.

[0049] The processing module is configured to, in an initialization stage, scan and obtain access information of at least one network card connected to an emulator pin of a complex programmable logic device (CPLD), the access information including a position of a CPU in which the network card is inserted and cable expansion bandwidth.

[0050] The adapting module is configured to adapt the position of the CPU in which the network card is inserted and the cable expansion bandwidth to the first structure to generate a second structure, the second structure being used to identify a configuration of the network card of the current inserted CPU and a slot identification.

[0051] The configuring module is configured to respectively configure a hot plug attribute for the CPU and at least one network card managed by the CPLD.

[0052] The execution module is configured to, based on the identification function of the second structure and the configured hot plug attribute, control power-on and power-off of the network card based on a hot plug operation of the user on any of the at least one network card in the driver execution stage.

[0053] In a third aspect, the present application further provides a network card hot plug configuration system, comprising a mainboard and at least one network card, wherein the mainboard comprises at least one central processing unit (CPU), a basic input / output system (BIOS) module, a complex programmable logic device (CPLD), an I2C switching chip and at least one slot.

[0054] The at least one CPU is connected to the CPLD through the I2C switching chip; the CPLD comprises an emulator pin, which is configured to be connected to the BIOS module; the BIOS module is further connected to the I2C switching chip; the at least one slot is configured to insert the at least one network card; and the BIOS module is configured to execute the network card hot plug configuration method according to the first aspect or any one of the implementation manners of the first aspect when the at least one network card is inserted into the at least one slot.

[0055] Optionally, the at least one network card is an open computing project (OCP) network card.

[0056] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions for causing a computer to execute the network card hot plug configuration method according to the first aspect or any one of the implementation manners thereof.

[0057] In addition, the present application provides a computer program product comprising computer instructions for causing a computer to execute the network card hot plug configuration method according to the first aspect or any one of the implementation manners thereof. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0059] FIG. 1 is a structural schematic diagram of a server mainboard according to one or more embodiments of the present application;

[0060] FIG. 2 is a flow schematic diagram of a network card hot plug configuration method according to one or more embodiments of the present application;

[0061] FIG. 3 is a flow schematic diagram of another network card hot plug configuration method according to one or more embodiments of the present application;

[0062] Fig. 4 is a flow diagram of another network card hot plug configuration method according to one or more embodiments of the present application;

[0063] Fig. 5 is a flow diagram of another network card hot plug configuration method according to one or more embodiments of the present application;

[0064] Fig. 6 is a structural block diagram of a network card hot plug configuration apparatus according to one or more embodiments of the present application;

[0065] Fig. 7 is a structural diagram of a network card hot plug configuration system according to one or more embodiments of the present application. DETAILED DESCRIPTION

[0066] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0067] The technical solutions provided by the embodiments of the present application can be applied to the technical field of server design, and are particularly suitable for the technical problems generated in the network card hot plug process. First, the application scenarios and technical terms involved in the technical solutions of the present application are introduced.

[0068] The technical solutions of the present application can be applied to a server product, specifically, can be applied to all AMD X86 architecture server products, which are understood as: the processor products produced by AMD (Advanced Micro Devices) company and adopting X86 architecture.

[0069] Among them, the SP architecture of AMD includes but is not limited to SP5 architecture, SP3 architecture. The next generation of server CPU under SP5 architecture is named Genoa (meaning the Italian city of Genoa), and the server CPU under SP3 architecture is named Milan (meaning the Italian city of Milan).

[0070] OCP, Open Compute Project, is a type of expansion card in computer hardware. OCP network cards are usually designed for data centers or large-scale computing environments, emphasizing modularity, replaceability, and high compatibility. OCP network cards usually do not follow the traditional PCI standard, but use a custom interface to optimize performance, power consumption, and heat dissipation design. OCP network cards are designed to meet the high performance, high reliability, and low power consumption requirements of data centers. OCP network cards have the characteristics of open standards, scalability, and high performance, making them an ideal choice for server network solutions.

[0071] The high-performance advantages of OCP network cards mainly include the following aspects:

[0072] High bandwidth: can meet the data transmission needs of data centers and improve overall performance;

[0073] Low latency: can provide faster data transmission speed, reduce latency, and improve user experience;

[0074] High density: can meet the needs of large data centers and high-performance computing environments;

[0075] Energy saving and environmental protection: helps reduce operating costs and reduce environmental impact;

[0076] Support for hot swapping: OCP network cards support hot swapping, making it easy to maintain after sale.

[0077] Users can easily replace or upgrade network cards without shutting down the server, improving system reliability and ease of maintenance.

[0078] For the support of hot swapping, most of the current server manufacturers require support for this attribute on NVME (Non-Volatile Memory Express) and SATA (Serial Advanced Technology Attachment). NVME and SATA are commonly used storage devices, generally used to install customer systems or store important data, and are essential devices for server systems. For network cards, hot swapping is generally not supported, and only OCP network cards support hot swapping, which makes OCP network cards stand out among many network cards, making it easy to replace and maintain. The configuration of the OCP network card hot swapping attribute is therefore crucial.

[0079] Hot Swap, i.e. hot plugging, refers to plugging or unplugging a module or a board into or out of a system without turning off the power supply of the system, so as to improve the reliability, rapid repairability, redundancy and timely recovery ability to disaster of the system, etc. For a high-power modular power supply system, the hot plugging technology can replace the faulty power supply module while maintaining the voltage of the entire power supply system, and ensure the normal operation of other power supply modules in the modular power supply system.

[0080] In the current server design, the compatibility of the server to the components is paid more and more attention. For the conventional components, as long as the bandwidth is divided by the BIOS, there is no problem in identification. The BIOS system will capture the information of the PCIe device through the IO access mode, so as to deliver the corresponding information to the BMC and write into the OS.

[0081] At present, the OCP hot plugging scheme of the Milan platform has the following disadvantages:

[0082] 1. In the surprise (brute force) hot plugging process, there is a problem that the power-on and power-off of the network card cannot be effectively controlled. In the case that the network card is not ready or the hot plugging attribute is not fully adapted, sudden hot plugging may cause the machine to crash, and more seriously, may cause the network card circuit to short circuit, the motherboard to be damaged, etc. Since a network card and a motherboard are expensive, the violent hot plugging causes great economic loss.

[0083] 2. In the Milan platform, only one kind of OCP network card configuration is designed, for example, only one X8 slot is reserved on the CPU0 side of the motherboard to connect the OCP network card. At this time, the BIOS and CPLD only need to be directly written to adapt to the current configuration. If there are other configurations, the OCP network card cannot be used, because in the use process of most customers, the OCP is required to be connected in different positions and support expansion through cables. However, the OCP network card on the Milan platform currently only supports being connected in one position, and the bandwidth is fixed, which cannot meet the multi-scene needs of customers, and the product lacks competitiveness.

[0084] 3、For Genoa platform compared with Milan platform, although there are more configuration application scenarios, and the number of OCP slots is more than one, the use of OCP is more flexible and variable, and the configuration of the fixed adaptation scheme is not feasible, so for the configuration of still only designing one OCP network card, it is not possible to display the current accurate configuration. For example, if a port of an x8 server is inserted into an x16 or x4 PCIe device, it will display its bandwidth as x8. At this time, the customer sees that this is a performance of bandwidth reduction, and needs to modify the BIOS to increase the use of this configuration to display no exception, otherwise it will cause misunderstanding, so in the application, the OCP insertion method cannot be dynamically identified, and the resource configuration of the current OCP network card insertion method is performed.

[0085] In addition, in the Milan platform, the adaptation of the OCP network card only supports Single host, and does not support Multi host configuration. In the Genoa platform, both OCP Multi host configuration and OCP Single host configuration need to be supported, and both configurations need to support hot plug. Therefore, the original scheme cannot be applied.

[0086] In summary, the technical scheme provided by the method embodiment can solve the problems of the above-mentioned: the problem that the violent hot plug cannot accurately control the power-on and power-off of the network card, the problem of BIOS flexible adaptation of the Genoa platform OCP network card in multiple application scenarios, and the problem of OCP network card Mutli host and Single host identification and hot plug adaptation in the Genoa platform.

[0087] In order to solve the above technical problems, the embodiment of the present application provides a network card hot plug configuration method, device and system. As shown in FIG. 1, it is a structural schematic diagram of a server mainboard according to the embodiment of the present application.

[0088] The mainboard includes at least one central processing unit CPU, such as CPU 0, CPU 1, I2C switching chip, basic input and output system BIOS, complex programmable logic device CPLD and at least one network card interface. For example, two network card interfaces are included in FIG. 1, which are OCP network card interface 1 and OCP network card interface 2. It should be understood that the mainboard or the mainboard circuit in the embodiment can also include more or fewer modules, units, circuits, and the embodiment does not limit this.

[0089] It is noted that the steps shown in the flowcharts of the drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0090] In this embodiment, a network card hot plug configuration method is provided, which can be used for the BIOS execution described above. As shown in FIG. 1, the BIOS is connected to the CPU through the simulator pin of the CPLD. The BIOS can be composed of software, hardware or a combination of software and hardware modules / units. FIG. 2 is a flowchart of a network card hot plug configuration method according to an embodiment of the present application. As shown in FIG. 2, the method comprises the following steps:

[0091] In step S101, a first structure of a network card configuration supported by a CPU is obtained.

[0092] The first structure is used to indicate the network card configuration supported by the CPU. For example, there are several CPUs on the motherboard, the port number of each CPU, and the related information of the connectable network card. That is, it is understood that how many kinds of port connection (OCP network card) the current CPU has. For example, as shown in Table 1 below, the configuration of multi-host or single-host connection on at least one CPU is shown.

[0093] Specifically, single-host connection refers to OCP (expansion card type) connection on the CPU side only, without occupying the resources of another CPU. Multi-host connection refers to the need to provide part of the PCIe resources of both CPUs through a cable for OCP use.

[0094] Table 1, configuration table of single-host connection and multi-host connection of at least one OCP network card

[0095] As shown in Table 1 above, there are six kinds of network card configuration situations on the server motherboard, including two kinds of multi-host connection configuration and four kinds of single-host connection configuration. Among them, the information that can be read from the first multi-host connection configuration information includes: two network cards are connected to two CPUs, respectively connected to CPU1 and CPU0, connected by PCIe x8 slot, and the corresponding simulated network card is OCP0. The channel number of the transmission channel is CH2, and the access address has I2C (Inter-Integrated Circuit, Inter-Integrated Circuit) switching chip address 0xE0 and simulator address 0x42.

[0096] Since the CPU and the BIOS cannot communicate directly, the simulator pin or other pin inside the CPLD needs to be simulated to realize data transmission between the CPU and the BIOS.

[0097] Optionally, in this example, the CPLD internally simulates the simulator pin as a PCA9555 chip circuit. The CPLD can pass the data from the CPU to the CPLD, and pass the configuration information to the BIOS through the simulated PCA9555.

[0098] Further, the PCA9555 chip circuit is a 16-bit general-purpose input / output (GPIO) expander with interrupts and weak pull-up resistors, suitable for I2C bus or SMbus (System Management Bus) applications.

[0099] Step S102, in the initialization phase, scan and obtain the access information of at least one network card connected to the simulator pin of the CPLD.

[0100] The PEI phase at startup refers to the "Pre-EFI Initialization", that is, the pre-EFI initialization phase. It is an important phase in the UEFI (Unified Extensible Firmware Interface) startup process, which occurs after the SEC (Security Phase) and before the DXE (Driver Execution Environment) phase. The access information includes the location of the CPU where the inserted network card is located and the cable expansion bandwidth.

[0101] Further, the above step S102, in the initialization phase, scans and obtains the access information of at least one network card connected to the simulator pin of the CPLD, specifically including:

[0102] In the initialization phase, the access information of at least one network card connected to the simulator pin in the CPLD is scanned by using the I2C link. Among them, the access information of at least one network card is the position information of the CPLD recognizing the currently accessed network card, simulated as a simulator pin, and transmitted to the BIOS. The access information at least includes: a first field and a second field, the first field is used to indicate the location of the CPU where the inserted network card is located; the second field is used to indicate whether the inserted network card has bandwidth expansion through the cable. Optionally, the first field is OCP_CPU_ADDR field, and the second field is OCP_CABLE_PRSNT field.

[0103] Further, the BIOS scans the configuration of the PCA9555 through the I2C link to obtain the configuration information transmitted by the CPLD, and then dynamically identifies whether the current OCP is located at CPU0 or CPU1, whether the bandwidth is X8 or X16, whether the configuration is Multi host or Single host according to the OCP_CPU_ADDR and OCP_CABLE_PRSNT in the data.

[0104] The CPLD simulates the position information of the connected device according to the pin distribution of the PCA9555, and the BIOS reads the pin information of the PCA9555 bit by bit to obtain the OCP_CPU_ADDR and OCP_CABLE_PRSNT and other information, and transmits the information to the BIOS in the form of software and hardware interface documents, and the BIOS can adapt to the unique bandwidth allocation according to different values.

[0105] Then, the BIOS fills in the generated structure body using the Lane distribution interval of the PCIe port and the uniqueness of the Slotid to generate a second structure body containing the bandwidth, rate, start channel, end channel, position ID of the slot, and position of the CPU of the current slot. And in the PEI stage of starting, the OCPs on the machine are configured one by one through the initialization of the structure body.

[0106] In the first structure body and the second structure body, the structure body refers to a user-defined data type that combines multiple data elements of different types into an organic whole to facilitate unified management and operation of associated data. Developers can define the structure, field types and quantities of the structure body according to needs. Through the structure body, scattered related data can be centrally managed, simplifying the logic of parameter passing, data storage and access.

[0107] In step S103, the position of the CPU where the inserted network card is located and the cable expansion bandwidth are adapted to the first structure body to generate a second structure body.

[0108] The second structure body is used to identify the configuration of the network card inserted into the current CPU and the slot identification. Specifically, the BIOS judges the position of the OCP network card on the CPU side through the first field (OCP_CPU_ADDR). The BIOS judges whether the OCP network card has a cable expansion bandwidth through the second field (OCP_CABLE_PRSNT).

[0109] In step S104, the at least one network card managed by the CPU and the CPLD is configured with a hot plug attribute.

[0110] For the communication channel of the adaptive CPU and CPLD, that is, the hot plug attribute of the configured OCP, the CPU end and the OCP end need to be clearly distinguished. For the CPU end, the hot plug type of the entire PCIe link needs to be configured; for the OCP end, the BIOS needs to combine OCP CPU ADDR and OCP CABLE PRSNT to confirm the OCP card in different CPU positions, and then realize the hot plug of the OCP card in different positions.

[0111] Among them, the hot plug attribute includes two types of surprise hot plug and button hot plug. The surprise hot plug means unplanned and violent hot plug. The button hot plug means power-on by pressing the switch. The switch can be set on the OCP card.

[0112] The purpose of this step is to allocate and configure two types of recognizable plug-in on both ends of the CPU and the CPLD, so as to identify the hot plug type of the card in the subsequent hot plug process, and to control the power-on and power-off.

[0113] In step S105, according to the identification function of the second structure and the configured hot plug attribute, in the driver execution stage, based on the hot plug operation of the user on any one of the at least one card, the power-on and power-off of the card are controlled.

[0114] When the BIOS and the CPLD are adapted according to the agreed channel, if it is based on the switch button hot plug type, in the driver execution (DXE) stage, the indicator light is automatically controlled to flash or extinguish, so as to realize the power-on and power-off control of the OCP card, and avoid the damage of the card and the motherboard caused by abnormal power-on.

[0115] The card hot plug configuration method provided in the embodiment can obtain the card configuration supported by the CPU (the first structure), so that the system can clearly know which card configuration is feasible, which provides clear guidance for the selection and deployment of the subsequent card. In the initialization stage, the card access information (including card position and cable expansion bandwidth) is automatically scanned and adapted, and the position of the card in the CPU and the cable expansion bandwidth are adapted with the first structure to generate the second structure, realizing flexible configuration under different card insertion conditions, solving the problem that the available space is small when the OCP card is fixed in the slot and cannot meet the general needs of customers, and improving the flexibility and scalability of the system, which can meet the configuration needs in different application scenarios.

[0116] In addition, based on the identification function of the second structure and the configuration of the hot plug attribute, the user can obtain instant response and feedback when performing the network card hot plug operation, and control the network card to normally power on and off, thereby solving the problem that the violent hot plug scheme cannot effectively control the power on and off of the OCP network card, and avoiding the damage risk caused by abnormal power on of the network card and the motherboard.

[0117] In addition, the method provided in the embodiment also implements the dynamic hot plug function of the OCP Multi host configuration on the AMD existing platform, and provides technical support for the corresponding function development of subsequent projects.

[0118] In a possible implementation manner of the embodiment, as shown in FIG. 3, the step S101 of obtaining the first structure of the network card configuration supported by the CPU includes the following steps.

[0119] In the step S101-1, a system software and hardware interface document is obtained.

[0120] The system software and hardware interface document includes interface configuration information supported by the motherboard, such as the PCIe port number supported by the CPU. Specifically, after the OCP network card is inserted and powered on, the BIOS obtains a software and hardware interface document from the hardware when adapting to the OCP network card configuration, and the document includes all configuration information supported by the current model. Specifically, the configuration information content can refer to Table 1.

[0121] In the step S101-2, the related information of each interface of the CPU on the slot of the motherboard is determined according to the system software and hardware interface document, and the related information of the slot includes the number of channels and the bandwidth capacity of the slot.

[0122] The BIOS hardware will decompose the PCIe port supported by the CPU into slots with fixed bandwidth on the motherboard. Generally, the default bandwidth of different ports is different. For example, the slot P0 is a x4 slot (i.e., has 4 data channels) by default, the slot P1 is a x16 slot (i.e., has 16 data channels) by default, and the slot P2 is a x8 slot (i.e., has 8 data channels) by default, which can be adapted in the code according to the needs.

[0123] There are connector reserved pins on each slot, which are used to sense the change of the slot configuration on the current motherboard. The pin is connected to the CPLD, and the CPLD transmits the configuration data through the simulation PCA9555 chip (such as the simulator pin), and the BIOS can sense the configuration information through the I2C link.

[0124] In the step S101-3, the first structure is generated according to the number of channels and the bandwidth capacity of the slot.

[0125] The first structure is used to store one or more of bandwidth, rate, start channel, end channel, slot position ID and CPU position of the current slot.

[0126] In the PEI stage, the BIOS first constructs a dynamic identification configuration structure according to the PCIe Controller supported by the CPU, which is used to store the bandwidth, rate, start channel StartLane, end channel EndLane, Slotid and the position of the CPU of the current slot. The structure can adapt to different configuration bandwidths and Slotids according to the differences between StartLane and EndLane.

[0127] Among them, PCIe Controller (PCIe Controller) is used to define the protocol used inside PCIe. The slot position ID (such as Slotid) is used to identify the position of each PCIe slot on the motherboard to facilitate user identification and installation of expansion cards. StartLane is used to indicate the start channel of the channel occupied by the PCIe device and the CPU communication; EndLane is used to indicate the end channel of the channel occupied by the PCIe device and the CPU communication.

[0128] In the present embodiment, when the OCP network card / device is hot-plugged, since the BIOS cannot control the power-on and power-off of the network card, the BIOS can only adapt the hot-plug information and the channel through the BIOS, and the CPU transmits data to the CPLD to control the power-on and power-off of the network card through the CPLD.

[0129] In some possible implementations, the step S103 adapts the position of the CPU where the inserted network card is located and the cable expansion bandwidth to the first structure to generate a second structure, including:

[0130] According to the first field and the second field, the insertion of at least one network card is dynamically determined, and it is judged whether the first field and the second field are both valid fields; if both are valid fields, a second structure is generated according to one or more of the first structure, the start channel in the first structure, the end channel, the slot position ID and the CPU position.

[0131] Further, the step S104 configures the hot-plug attribute for at least one network card managed by the CPU and the CPLD, specifically including:

[0132] In one aspect, the BIOS configures the hot plug type of the entire PCIe link for the CPU and issues a first instruction. The hot plug type includes two types of violent hot plug and switch button hot plug; the first instruction is used to instruct the CPU to configure the current hot plug type to the PCIe link according to the position ID of the slot of the network card one by one.

[0133] Specifically, for the CPU side, the hot plug type of the entire PCIe link needs to be configured, and the CPU will configure the hot plug type to the PCIe link according to the Slotid of the OCP one by one. Different hot plug types will have different performances. The hot plug type will determine the selection of violent surprise hot plug and switch button hot plug, the selection of the register of the light position, the decision of the light stage, etc. Because different hot plug types will give different values to the register in the code, each register has its own type of identification, and the hot plug type needs to be configured in the CPU register according to the demand when selecting the hot plug type.

[0134] On the other hand, the BIOS configures the hot plug type of at least one network card managed by the CPLD and the I2C identifier, the position ID of the slot and the device address of the network card corresponding to each network card.

[0135] Because the address where the I2C switching chip, such as the I2C Switch chip circuit of PCA9545, is located needs to be explicitly indicated, the value of the network card connected to the CPU0 side and the CPU1 side is different. For the OCP side, the BIOS needs to confirm the OCP network card in different CPU positions by combining OCP_CPU_ADDR and OCP_CABLE_PRSNT, and then realize the hot plug of the OCP network card in different positions. Because the CPU transmits data to the CPLD through the I2C Switch PCA9545 chip, and there is more than one OCP network card on the motherboard, the CPLD needs to split the data to simulate two PCA9555 chips to operate the hot plug of the OCP, so the BIOS needs to pay attention to the configuration of the OCP hot plug.

[0136] In this embodiment, the hot plug type, I2CBusSegment(I2C BS), Slotid and Slave Address of the OCP side. The hot plug type of the OCP side is used one by one with the CPU side. Only in this way can the OCP side correctly analyze the hot plug.

[0137] Further, I2CBusSegment, for any PCA9545 device, a value needs to be reserved to identify the execution of the I2CGPIO device. The Slave Address (device address) can be one byte, such as the byte can be composed of 7-bit address and 1-bit R / W read-write bit, which is the address of the device.

[0138] Optionally, the specific process of configuring the hot plug attribute for the at least one network card managed by the CPLD by the BIOS includes: the BIOS transmits configuration information to the CPLD through the I2C switching chip to configure the hot plug attribute for the at least one network card managed by the CPLD, and the configuration information includes address information of the I2C switching chip; for example, the address information is PCA9545 address 0xE0.

[0139] In addition, in another possible implementation of the embodiment, after the step S104 of configuring the hot plug attribute, the method further includes: matching the position of the at least one network card inserted into the CPU with the hot plug attribute configured for the at least one network card managed by the CPLD; and determining the connection mode of the target network card inserted into the slot according to the matching result.

[0140] The connection mode includes: a connection mode of Single host on the side of the CPU and a connection mode of Multi host connecting two or more CPUs through a cable.

[0141] Optionally, in a specific implementation, the matching of the position of the at least one network card inserted into the CPU with the hot plug attribute configured for the at least one network card managed by the CPLD specifically includes:

[0142] If the inserted at least one network card is the first network card and the second network card, and the first Slot ID corresponding to the first network card and the second Slot ID corresponding to the second network card are both the same as the two Slot IDs in the configured hot plug attribute, it is determined that the first network card and the second network card currently inserted are respectively connected to two CPUs through a cable.

[0143] For example, for the I2CBusSegment and SlaveAddress information, the BIOS needs to match the position of the OCP and the two PCA9555 emulated by the CPLD in the code, otherwise the light will not be on. The matching refers to that the configuration information supported by the CPLD is matched with the information configured by the BIOS for the network card.

[0144] If the OCP is configured as Single host, that is, each OCP corresponds to a PCA9555 address; if the OCP is configured as Multi host, it will be recognized as two network cards of the same model and different positions by the BIOS and the OS, at this time the BIOS only needs to regard it as one network card to configure the I2CBusSegment. For Slotid, it needs to be strictly aligned with the Slotid of the bandwidth allocation (that is, the Slotid is the same), and the hot plug is implemented by searching the device through the Slotid.

[0145] It should be noted that in this embodiment, the Slotid of the two OCP network cards identified during the Multi host configuration needs to be configured the same; the rest of the OCP end configuration parameters and NVME hot plug are not different, and can be configured by reference.

[0146] After the above information matching, for the hot plug process of the OCP network card, the OCP Button light condition during the boot process can be used for judgment. When the corresponding OCP slot has an OCP network card, the BIOS will configure the hot plug attribute of the OCP network card according to the Slotid one by one in the DXE stage (driver execution environment) stage.

[0147] Specifically, as shown in FIG. 4, in the DXE stage, based on the hot plug operation of the user on any one of the at least one network card, the power-on and power-off of the network card is controlled, including:

[0148] Step S105-1, when the target network card is detected to be inserted into the slot, the hot plug attribute of the target network card is adapted according to the position ID of the slot set in advance in the DXE stage.

[0149] Step S105-2, after the BIOS and CPLD are adapted according to the agreed channel, the light on the target network card is automatically turned on, enters the OS system, and displays the information of the inserted target network card under the OS system.

[0150] In addition, after entering the OS system, the power-on and power-off of the network card is controlled, specifically including:

[0151] Step S105-3, determining the switch Button hot plug type selected by the user on the target network card. The hot plug type includes: violent hot plug and press the switch Button hot plug.

[0152] Step S105-4, in response to the operation of the switch Button hot plug type of the user, the indicator light flashes and then goes out, and indicates to pull out the target network card, and controls the target network card to complete power-off.

[0153] Step S105-5, when the target network card is reinserted into the slot, in response to the operation of the switch Button hot plug type of the user, the indicator light flashes and then always on, and controls the target network card to complete power-on.

[0154] Specifically, if the light on the Button key on the target network card automatically turns green in the DXE stage, at this time the machine will not appear any abnormality such as downtime, until the machine enters the OS, and the network card information can be seen under the lspci command in the OS, then the user can press the Button button for a short time, the green light will flash and then go out, at this time the OCP network card can be pulled out, and the hot removal is completed.

[0155] Then plug in the OCP network card, press the Button button again, the green light will flash a few times, and finally always on, at this time the hot plug of the OCP network card is completed, and the power-on ends.

[0156] The above lspci is a command line tool widely used in Linux systems, which is used to list all PCI (Peripheral Component Interconnect) bus devices and their detailed information in the system.

[0157] The method provided by the embodiment is based on the demand of OCP network card in Genoa platform multi-configuration, and the OCP network card dynamic identification scheme and the OCP network card Button hot plug scheme are developed in combination with OCP slot Single host and Multi host, which solves the problem that the available space of the fixed slot of the OCP network card is small and cannot meet the general demand of customers. In addition, the method also solves the problem that the violent hot plug scheme cannot effectively control the power-on and power-off of the OCP network card, and avoids the damage caused by the abnormal power-on of the network card and the motherboard.

[0158] In a specific embodiment, as shown in FIG. 5, the method provided by the embodiment comprises:

[0159] Step S201, BIOS obtains software and hardware interface documents, and starts the preparation work of adaptation.

[0160] Step S202, BIOS constructs a dynamic identification first structure in the PEI stage. For details, see the step S101 of the foregoing embodiment, which will not be repeated here.

[0161] Step S203, the access information of the CPLD is scanned and obtained by using the I2C link. This step corresponds to the step S102 of the foregoing embodiment, and see the description of the foregoing step S102.

[0162] Step S204, BIOS dynamically configures the OCP network card according to the read OCP_CPU_ADDR (first field) and OCP_CABLE_PRSNT (second field).

[0163] Step S205, whether OCP_CPU_ADDR and OCP_CABLE_PRSNT are both valid is judged.

[0164] Specifically, the validity of the two fields of OCP_CPU_ADDR and OCP_CABLE_PRSNT can be indicated by an indication, such as "1" or "0". Among them, "1" or "0" is used to indicate that the field is valid. In the embodiment, the indication of validity is "1". It can be generated by the system in advance.

[0165] If all are "1" valid, step S206 is performed; if one is "0" invalid, the process ends.

[0166] Step S206, if all are valid, fill in the PCIe port Lane interval and Slotid, and generate a second structure. For details, see step S103 of the foregoing embodiment, which will not be described here again.

[0167] Step S207, dynamically identify the OCP network card by using the second structure.

[0168] Step S208, configure the hot plug type, I2CBusSegment, Slotid, and SlaveAddress according to the position of the OCP network card.

[0169] Step S209, after the configuration is completed, power on, and determine whether the adaptation is completed according to the light of the Button. That is, step S210 is performed.

[0170] Step S210, determine whether the BIOS configuration is completed. If yes, step S211 is performed; if not, return to step S208.

[0171] Step S211, after the configuration is completed, light the green light in the DXE stage until the OS is entered, and then press the Button for a short time, and the green light flashes several times and then goes out.

[0172] Step S212, insert the OCP network card, press the Button again, and the green light will flash several times and then always be on.

[0173] When the corresponding OCP slot has the OCP network card, the BIOS will configure the hot plug attribute of the OCP network card according to the Slotid in the DXE stage, and after the BIOS and the CPLD are adapted according to the agreed channel, the light on the Button will automatically light the green light in the DXE stage, and the machine will not have any abnormality such as downtime, until the machine enters the OS, and the lspci in the OS can clearly see the network card information, and then the Button can be pressed for a short time, and the green light will flash several times and then go out, at this time the OCP card can be pulled out, and the hot removal is completed. When the OCP network card is inserted again, the green light will flash several times and then always be on, at this time the OCP network card is hot inserted, and the power on is completed. For details, see steps S105-1 to S105-5 of the foregoing embodiment, which will not be described here again.

[0174] The method provided in the embodiment dynamically configures the hot plug attribute of the OCP network card by means of the CPLD, realizes dynamic configuration of bandwidth, Slotid and the like, effectively distinguishes whether the connection mode configured by the OCP network card belongs to Single host or Multi host, and realizes effective control of power-on and power-off of the OCP network card in the case of surprise violent hot plug.

[0175] In the embodiment, a network card hot plug configuration device is also provided, which is used to implement the above-described embodiments and preferred embodiments and has been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation in hardware or a combination of software and hardware is also possible and is contemplated.

[0176] The embodiment provides a network card hot plug configuration device, as shown in FIG. 6, which comprises:

[0177] The acquisition module 610 is configured to acquire a first structure supported by a CPU for network card configuration, the first structure being used to indicate the network card configuration supported by the CPU.

[0178] The processing module 620 is configured to scan and acquire access information of at least one network card connected to the emulator pin of the CPLD in an initialization stage, the access information comprising: the position of the CPU where the inserted network card is located and the cable expansion bandwidth.

[0179] The adaptation module 630 is configured to adapt the position of the CPU where the inserted network card is located and the cable expansion bandwidth to the first structure, to generate a second structure, and the second structure is used to identify the configuration of the network card inserted into the CPU and the slot identification.

[0180] The configuration module 640 is configured to configure the hot plug attribute for at least one network card managed by the CPU and the CPLD, respectively.

[0181] The execution module 650 is configured to, according to the identification function of the second structure and the configured hot plug attribute, control the power-on and power-off of the network card based on the hot plug operation of the user on any one of the at least one network card in a driver execution stage.

[0182] The further function description of each module and unit described above is the same as that of the corresponding embodiment described above, and will not be described here.

[0183] The network card hot plug configuration device in the embodiment is in the form of a functional unit, and the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory for executing one or more software or fixed programs, and / or other devices that can provide the above functions.

[0184] The embodiment of the application further provides a network card hot plug configuration system having the network card hot plug configuration device shown in Figure 6.

[0185] Please refer to Figure 7, which is a structural schematic diagram of a network card hot plug configuration system according to an embodiment of the application. The system comprises a mainboard and at least one network card, wherein the mainboard comprises at least one CPU, a BIOS module, a CPLD, an I2C switching chip, and at least one slot.

[0186] In addition, the mainboard can further comprise a memory or a storage unit, a transceiver module, and other modules, which are not limited in the embodiment.

[0187] The at least one CPU is connected to the CPLD through the I2C switching chip; the CPLD comprises an emulator pin, which is used to connect the BIOS module.

[0188] The BIOS module is further connected to the I2C switching chip; and the at least one slot is used to insert the at least one network card.

[0189] The BIOS is a set of programs fixed to a ROM chip on a mainboard in a computer, which stores the most important basic input and output programs, self-checking programs after starting, and system self-starting programs, and can read and write specific information set by the system from the CMOS. The main function is to provide the most basic and most direct hardware settings and controls for the computer. In the embodiment, the BIOS module is used to execute the network card hot plug configuration method shown in Figures 2 to 5 when the at least one network card is inserted into the at least one slot.

[0190] Further, the connection relationship of the modules or devices on the mainboard can be the same as the structure shown in Figure 1. Please refer to the connection relationship of the modules or devices on the mainboard in Figure 1, which is not repeated here.

[0191] Optionally, the I2C switching chip can be an I2C Switch PCA9545 chip.

[0192] Optionally, the emulator pin in the CPLD can be a pin of a simulated PCA9555 chip.

[0193] Optionally, the at least one network card is an OCP network card.

[0194] It should be noted that the PCA9545 chip and the PCA9555 chip in the embodiment are examples, and other types of PCA chip circuits or modules can also be used, and the embodiment does not limit this.

[0195] In the mainboard structure shown in FIG. 1, any processor can be a central processing unit (CPU), a network processor, or a combination thereof. The CPU can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.

[0196] In the embodiment, the storage stores instructions executable by the at least one processor to cause the at least one processor to perform the network card hot plug configuration method shown in the above embodiment.

[0197] Further, the storage can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function. The data storage area can store data created according to the use of the computer device, etc. In addition, the storage can include a high-speed random access memory, and can also include a non-transitory storage, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some optional embodiments, the storage can include a storage remotely arranged with respect to the processor, and the remote storage can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0198] The storage can include a volatile memory, such as a random access memory; the storage can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the storage can also include a combination of the above types of memories.

[0199] The server mainboard further includes an input / output device. The processor, the storage, and the input / output device can be connected through a bus or other means. Specifically, the input device can receive input digital or character information, and generate key signal inputs related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device can include a display device, an auxiliary lighting device (such as an LED), a tactile feedback device (such as a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0200] The server motherboard further includes at least one communication interface (generally refers to various interfaces, including but not limited to slots, sockets, etc.), for the motherboard to communicate with other devices or communication networks. In FIG. 7, the server motherboard includes two slots, which are slot 1 and slot 2, for connecting external OCP network card 1 and OCP network card 2.

[0201] It should be understood that the server motherboard can further include more or less communication interfaces for connecting more or less OCP network cards.

[0202] The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware.

[0203] The storage medium can be a disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the above-mentioned card hot plug configuration method is realized.

[0204] The embodiments of the present application can also provide a computer program product including computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the above-mentioned method. The computer program product can be written in one or more programming languages for executing the operations of the embodiments of the present disclosure, and the programming languages include object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed completely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device and partially on a remote computing device, or completely on a remote computing device or server.

[0205] The foregoing embodiments are merely used to illustrate the technical solutions of the present application, but not to limit them; although the foregoing embodiments of the present application are explained in detail, those skilled in the art should understand: the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; and the modification or replacement does not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for hot-swappable network interface card (NIC) configuration, characterized in that, The method is applied to a basic input output system (BIOS) connected to a central processing unit (CPU) through emulator pins of a complex programmable logic device (CPLD), and the method comprises: obtaining a first structure of a network card configuration supported by the CPU, the first structure being used to indicate a network card configuration situation supportable by the CPU; in an initialization stage, scanning and obtaining access information of at least one network card connected to the emulator pins of the CPLD, the access information comprising: a position of the inserted network card on the CPU and a cable expansion bandwidth; adapting the position of the inserted network card on the CPU and the cable expansion bandwidth to the first structure to generate a second structure, the second structure being used to identify a configuration situation and a slot identification of the network card currently inserted into the CPU; respectively configuring hot plug attributes for at least one network card managed by the CPU and the CPLD; and based on a hot plug operation of a user on any network card in the at least one network card, controlling power-on and power-off of the network card in a driver program execution stage according to the identification function of the second structure and the configured hot plug attributes.

2. The method of claim 1, wherein, The obtaining of the first structure of the network card configuration supported by the CPU comprises: obtaining a system software and hardware interface document, the system software and hardware interface document comprising interface configuration information supported by a mainboard; determining relevant information of each interface of the CPU on a slot of the mainboard according to the system software and hardware interface document, the relevant information of the slot comprising: a channel number and a bandwidth capacity of the slot; and generating the first structure according to the channel number and the bandwidth capacity of the slot, the first structure being used to store one or more of a bandwidth, a rate, a start channel, an end channel, a position ID of a slot and a position of a CPU.

3. The method of claim 2, wherein, The scanning and obtaining of the access information of the at least one network card connected to the emulator pins of the CPLD in the initialization stage comprises: in the initialization stage, scanning the access information of the at least one network card connected to the emulator pins in the CPLD by using an I2C link; wherein the access information of the at least one network card is simulated into emulator pins after the CPLD identifies position information of the currently accessed network card, and is transmitted to the BIOS; the access information at least comprises: a first field and a second field, the first field being used to indicate a position of the inserted network card on the CPU, and the second field being used to indicate whether the inserted network card has a cable expansion bandwidth.

4. The method of claim 3, wherein, The adapting of the position of the inserted network card on the CPU and the cable expansion bandwidth to the first structure to generate the second structure comprises: dynamically determining an insertion situation of the at least one network card according to the first field and the second field, and judging whether the first field and the second field are both valid fields; and In response to the first field and the second field being valid fields, the second structure is generated according to one or more of the first structure, a start channel in the first structure, an end channel, a position ID of a slot, and a position of a CPU.

5. The method according to any one of claims 1 to 4, characterized in that, The at least one network card managed by the CPU and the CPLD is respectively configured with a hot plug attribute, including: The CPU is configured with a hot plug type of the entire PCIe link and a first instruction is issued, the hot plug type including two types of violent hot plug and switch hot plug; the first instruction is used to instruct the CPU to configure the current hot plug type to the PCIe link one by one according to the position ID of the slot of the network card; and The at least one network card managed by the CPLD is configured with the hot plug type, an I2C identifier corresponding to each network card, a position ID of a slot, and a device address of a network card.

6. The method of claim 5, wherein, After the hot plug attribute is configured, it further includes: According to the position of the at least one network card inserted into the CPU and the hot plug attribute configured for the at least one network card managed by the CPLD, matching is performed; and According to the matching result, the connection mode of the target network card inserted into the slot is determined; The connection mode includes the connection mode of the network card on the CPU side and the connection mode of connecting two or more CPUs through a cable.

7. The method of claim 6, wherein, The matching according to the position of the at least one network card inserted into the CPU and the hot plug attribute configured for the at least one network card managed by the CPLD includes: In response to the inserted at least one network card being a first network card and a second network card, and the first Slot ID corresponding to the first network card and the second Slot ID corresponding to the second network card both being the same as two Slot IDs in the configured hot plug attribute, it is determined that the first network card and the second network card currently inserted are connected to two CPUs through a cable.

8. The method of claim 5, wherein, In the driver execution stage, based on the hot plug operation of the user on any network card in the at least one network card, the power-on and power-off of the network card are controlled, including: In response to detecting a target network card inserted into a slot, the hot plug attribute of the target network card is adapted according to the pre-set position ID of the slot in the driver execution stage; and After the BIOS and the CPLD are adapted according to the agreed channel, the light on the target network card is automatically turned on, enters the operating system, and displays the information of the inserted target network card under the operating system.

9. The method of claim 8, wherein, After entering the operating system, the power-on and power-off of the network card are controlled, including: The type of the switch hot plug selected by the user on the target network card is determined; In response to the operation of the switch hot plug type of the user, the indicator light flashes and then goes out, indicating that the target network card is pulled out, and the power-off of the target network card is controlled; and In response to the target network card being reinserted into the slot, in response to the operation of the switch hot plug type of the user, the indicator light flashes again and then becomes constant, and the power-on of the target network card is controlled.

10. The method according to any one of claims 1 to 4, characterized in that, The at least one network card managed by the CPLD is configured with a hot plug attribute, including: The configuration information is transmitted to the CPLD through the I2C switching chip, and the hot plug attribute is configured for at least one network card managed by the CPLD, and the configuration information includes address information of the I2C switching chip.

11. The method of claim 10, wherein, The first structure is used to indicate the number of CPUs, port information of each CPU, and relevant information of a network card connected to each CPU. The relevant information of the network card connected to each CPU includes a connection mode of a port of the network card of each CPU, and the connection mode of the port of the network card includes single-channel connection and multi-channel connection.

12. The method of claim 11, wherein, The network card configuration supported by the CPU includes two multi-channel connection configurations and four single-channel connection configurations.

13. The method of claim 12, wherein, The multi-channel connection configuration information includes one or more of two network cards connected to two CPUs, the network card being an OCP network card, the address of the I2C switching chip, and the address of the simulator.

14. The method of claim 2, wherein, The first structure is adapted to different configuration bandwidths according to different start channels and end channels.

15. The method of claim 3, wherein, The first field is an OCP_CPU_ADDR field, and the second field is an OCP_CABLE_PRSNT field.

16. A network card hot-swappable configuration device, characterized in that, The device includes: The acquisition module is configured to acquire a first structure of a network card configuration supported by a central processing unit (CPU), the first structure being used to indicate a network card configuration supported by the CPU. The processing module is configured to, in an initialization stage, scan and acquire access information of at least one network card connected to a simulator pin of a complex programmable logic device (CPLD), the access information including a position of the inserted network card in the CPU and a cable expansion bandwidth. The adaptation module is configured to adapt the position of the inserted network card in the CPU and the cable expansion bandwidth to the first structure to generate a second structure, the second structure being used to identify a configuration of a network card of a currently inserted CPU and a slot identification. The configuration module is configured to configure a hot plug attribute for the CPU and at least one network card managed by the CPLD, respectively. The execution module is configured to, based on a hot plug operation of a user on any network card of the at least one network card, control power-on and power-off of the network card in a driver execution stage according to an identification function of the second structure and the configured hot plug attribute.

17. A network interface card (NIC) hot-swappable configuration system, characterized in that, The system includes a mainboard and at least one network card, wherein the mainboard includes at least one central processing unit (CPU), a basic input / output system (BIOS) module, a complex programmable logic device (CPLD), an I2C switching chip, and at least one slot. The at least one CPU is connected to the CPLD through the I2C switching chip. The CPLD includes a simulator pin, which is used to connect the BIOS module. The BIOS module is also connected to the I2C switching chip. The at least one slot is used to insert the at least one network card. The BIOS module is used to execute the network card hot plug configuration method in any one of claims 1 to 15 when the at least one network card is inserted into the at least one slot.

18. The system of claim 17, wherein, The at least one network card is an open computing project (OCP) network card.

19. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to execute the network card hot plug configuration method in any one of claims 1 to 15.

20. A computer program product, characterised in that, The computer readable storage medium stores computer instructions for causing a computer to execute the network card hot plug configuration method in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Adaptation control method, device, equipment and system for OCP NIC network card

    CN111901164A

  • Network card hot plug configuration method, device and system and storage medium

    CN118964263A

  • Method and system for conserving power by degrading network connection speed

    US20090086650A1