Communication Method, Device, BMC Chip, Computer Device, Storage Medium and Program Product Applied to BMC Chip
By deploying a virtual network card in the BMC chip and using the PCIe bus for data transmission, the inconvenience of data transmission between the BMC chip and the BIOS firmware is solved, and efficient communication and system management are achieved.
Patent Information
- Application Number
- CN202411268879.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-09-11
AI Technical Summary
In the prior art, BMC chips need to process before storing data into shared memory, resulting in inconvenient data transmission to BIOS firmware and affecting communication efficiency.
The first virtual network card and the second virtual network card are deployed in the BMC chip, and the data is encapsulated and decapsulated through preset network protocols, and data transmission is carried out using the PCIe bus to ensure efficient communication between the BMC chip and the BIOS firmware.
It realizes efficient data transmission between the BMC chip and the BIOS firmware, improves the efficiency of system management and monitoring functions, and ensures accurate data transmission and system reliability.
Smart Images

Figure CN119155174B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a communication method, device, BMC chip, computer device, storage medium, and program product applied to a BMC chip. Background Art
[0002] In data center products, it is necessary to set up the Basic Input / Output System (BIOS) firmware and the Baseboard Management Controller (BMC) chip. For example, in a computer device, it is necessary to set up the BIOS firmware and the BMC chip. Communication is required between the BMC chip and the BIOS firmware.
[0003] In the prior art, the data to be transmitted to the BIOS firmware is stored in the shared memory of the BMC chip. The BIOS firmware reads the data in the shared memory of the BMC chip.
[0004] However, in the above method, before storing the data in the memory of the BMC chip, the memory needs to be processed, which causes inconvenience in storing the data and is not conducive to transmitting the data to the BIOS firmware. Summary of the Invention
[0005] Embodiments of this application provide a communication method, device, BMC chip, computer device, storage medium, and program product applied to a BMC chip, so as to achieve two-way communication between the BMC chip and the BIOS firmware and reuse a common network protocol, with a high degree of reuse.
[0006] In a first aspect, this application provides a communication method applied to a BMC chip. The method is applied to the BMC chip, and a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the BMC chip. The method includes:
[0007] Encapsulate the initial data based on a preset network protocol to obtain the data to be transmitted.
[0008] Transmit the data to be transmitted to the second virtual network card through the first virtual network card.
[0009] Send the data to be transmitted to the BIOS firmware based on the second virtual network card.
[0010] In a possible implementation, transmitting the data to be transmitted to the second virtual network card through the first virtual network card includes:
[0011] Transmit the data to be transmitted to the first virtual network card according to the IP address of the first virtual network card.
[0012] Based on the first virtual network card, transmit the data to be transmitted to the second virtual network card according to the IP address of the second virtual network card.
[0013] In a possible implementation manner, transmitting the data to be transmitted to the BIOS firmware based on the second virtual network card includes:
[0014] Based on the second virtual network card, de-encapsulate the data to be transmitted according to the preset network protocol to obtain the de-encapsulated data to be transmitted.
[0015] Based on the second virtual network card, send the de-encapsulated data to be transmitted to the BIOS firmware.
[0016] In a possible implementation manner, sending the de-encapsulated data to be transmitted to the BIOS firmware based on the second virtual network card includes:
[0017] Based on the second virtual network card, send the de-encapsulated data to be transmitted to the BIOS firmware through the PCIe bus.
[0018] In a possible implementation manner, the method further includes:
[0019] Based on the second virtual network card, receive a data acquisition request sent by the BIOS firmware; and based on the second virtual network card, encapsulate the data acquisition request according to the preset network protocol to obtain an encapsulated data acquisition request.
[0020] Based on the second virtual network card, send the encapsulated data acquisition request to the BMC chip through the first virtual network card.
[0021] In a possible implementation manner, the first virtual network card and the second virtual network card are deployed in the PCIe bus controller of the BMC chip.
[0022] In a possible implementation manner, the method further includes:
[0023] Perform initialization processing on the first virtual network card and the first virtual network card.
[0024] Install a network protocol on the first virtual network card; wherein, a network protocol is installed in the second virtual network card.
[0025] Set an IP address and a subnet mask corresponding to the first virtual network for the first virtual network card; wherein, the second virtual network card is set with an IP address and a subnet mask corresponding to the second virtual network.
[0026] In a possible implementation, the IP address corresponding to the first virtual network and the IP address corresponding to the second virtual network belong to the same local area network; the subnet mask corresponding to the first virtual network and the subnet mask corresponding to the second virtual network are the same.
[0027] In a possible implementation, the initialization process includes one or more of the following:
[0028] Allocate network card resources, set the MAC address, and set the interaction interface.
[0029] In a second aspect, an embodiment of the present application provides a communication device applied to a BMC chip. The device is applied to the BMC chip, and a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the BMC chip. The device includes:
[0030] An encapsulation module, configured to encapsulate initial data based on a preset network protocol to obtain data to be transmitted.
[0031] A transmission module, configured to transmit the data to be transmitted to the second virtual network card through the first virtual network card.
[0032] A sending module, configured to send the data to be transmitted to the BIOS firmware based on the second virtual network card.
[0033] In a possible implementation, the transmission module includes:
[0034] A first transmission module, configured to transmit the data to be transmitted to the first virtual network card according to the IP address of the first virtual network card.
[0035] A second transmission module, configured to transmit the data to be transmitted to the second virtual network card based on the first virtual network card according to the IP address of the second virtual network card.
[0036] In a possible implementation, the sending module is specifically configured to:
[0037] A de-encapsulation module, configured to de-encapsulate the data to be transmitted based on the second virtual network card according to the preset network protocol to obtain the de-encapsulated data to be transmitted.
[0038] A first sending module, configured to send the decapsulated data to be transmitted to the BIOS firmware based on the second virtual network card.
[0039] In a possible implementation manner, the first sending module includes:
[0040] A second sending module, configured to send the decapsulated data to be transmitted to the BIOS firmware through a PCIe bus based on the second virtual network card.
[0041] In a possible implementation manner, the device further includes:
[0042] A receiving module, configured to receive a data acquisition request sent by the BIOS firmware based on the second virtual network card;
[0043] A first encapsulation module, configured to encapsulate the data acquisition request according to a preset network protocol based on the second virtual network card to obtain an encapsulated data acquisition request.
[0044] A third sending module, configured to send the encapsulated data acquisition request to the BMC chip through the first virtual network card based on the second virtual network card.
[0045] In a possible implementation manner, the device further includes:
[0046] A deployment module, where the first virtual network card and the second virtual network card are deployed in a PCIe bus controller of the BMC chip.
[0047] In a possible implementation manner, the device further includes:
[0048] An initialization module, configured to perform initialization processing on the first virtual network card and the first virtual network card.
[0049] An installation module, configured to install a network protocol for the first virtual network card; wherein, a network protocol is installed in the second virtual network card.
[0050] A setting module, configured to set an IP address and a subnet mask corresponding to the first virtual network for the first virtual network card; wherein, an IP address and a subnet mask corresponding to the second virtual network are set for the second virtual network card.
[0051] In a possible implementation manner, the IP address corresponding to the first virtual network and the IP address corresponding to the second virtual network belong to the same local area network; the subnet mask corresponding to the first virtual network and the subnet mask corresponding to the second virtual network are the same.
[0052] In a possible implementation, the initialization module includes one or more of the following: allocating network card resources, setting the MAC address, and setting the interaction interface.
[0053] In a third aspect, an embodiment of the present application provides a BMC chip, in which a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed. The BMC chip is used to implement the method provided in the first aspect and any implementation manner of the first aspect.
[0054] In a possible implementation, the BMC chip includes a PCIe bus controller, and the first virtual network card and the second virtual network card are deployed in the PCIe bus controller.
[0055] In a fourth aspect, an embodiment of the present application provides a computer device, in which a BIOS firmware and the method provided in the first aspect and any implementation manner of the first aspect are set.
[0056] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method provided in the first aspect and any implementation manner of the first aspect.
[0057] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method provided in the first aspect and any implementation manner of the first aspect. Description of the Drawings
[0058] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0059] Figure 1 It is a schematic structural diagram of a server provided by an embodiment of the present application;
[0060] Figure 2 It is a schematic flowchart of a communication method applied to a BMC chip provided by an embodiment of the present application Figure 1 ;
[0061] Figure 3 It is a schematic flowchart of a communication method applied to a BMC chip provided by an embodiment of the present application Figure 2 ;
[0062] Figure 4 It is a schematic structural diagram of a communication device applied to a BMC chip provided by an embodiment of the present application Figure 1 ;
[0063] Figure 5 Structural schematic of a communication device applied to a BMC chip provided by an embodiment of the present application Figure 2 ;
[0064] Figure 6 Schematic diagram of the structure of a BMC chip provided by an embodiment of the present application;
[0065] Figure 7 Schematic diagram of the structure of a computer device provided by an embodiment of the present application.
[0066] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0067] Here, exemplary embodiments will be described in detail, and their examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0068] Figure 1 Schematic diagram of the structure of a server provided by an embodiment of the present application, as Figure 1 shown, the server includes a BMC chip, the BIOS firmware of the Host side, and the BMC chip and the BIOS firmware of the Host side are connected through a PCIe bus; a PCIe bus controller is deployed in the BMC chip, and a first virtual network card and a second virtual network card are deployed in the PCIe bus controller.
[0069] A BMC chip is an embedded management microcontroller that allows system administrators to remotely manage and monitor the hardware status of computing devices such as servers. The functions of the BMC chip include but are not limited to: monitoring parameters such as temperature, voltage, and current of hardware components such as the CPU, memory, hard disk, and power supply, as well as fan speed, to ensure the stable operation of the system; recording events such as system startup, shutdown, and hardware failures to help administrators diagnose problems; allowing administrators to remotely turn on, turn off, or restart the server; supporting remote update of the BIOS firmware of the server, etc., reducing the need for on-site maintenance.
[0070] BIOS firmware is the firmware in a computer system, responsible for system startup and hardware initialization. BIOS is the first program executed after the computer is powered on, responsible for converting the system from a hardware state to a software state; performing a Power-On Self Test (POST) to check whether computer hardware (such as the CPU, memory, hard drive, etc.) is working properly and initializing this hardware; loading and starting the bootloader, usually by reading from the Master Boot Record (MBR) of the hard drive or the Unified Extensible Firmware Interface (UEFI) partition.
[0071] The communication between the BMC chip and the BIOS firmware includes but is not limited to the following: Through communication, the BMC chip can provide real-time data on the hardware state to the BIOS firmware to help the BIOS firmware better manage the system; when the BMC chip detects a hardware fault or anomaly, it sends an alert or control instruction to the BIOS firmware through the communication mechanism; during remote management, the communication between the BIOS firmware and the BMC chip is the key to implementing operations such as remote startup, restart, and configuration update; through communication with the BMC chip, the BIOS firmware can ensure that these configuration information is consistent in the system and avoid problems caused by configuration conflicts or inconsistencies.
[0072] In one example, the BMC chip and the BIOS firmware can communicate through the Inter-Integrated Circuit (IIC) and the Keyboard Controller Style (KCS). However, this technology has a slow transmission speed and is not suitable for data transmission with a large amount of data or high real-time requirements; the line load capacity is limited, and the signal attenuation is serious during long-distance transmission. Based on the LAN over USB communication solution, although the transmission speed is fast, it supports high-speed data transmission, the USB interface has a high penetration rate and is easy to integrate, but there are stability problems, such as device hanging leading to channel failure, affecting system reliability; and the security may be insufficient, especially when multiple devices share the USB channel. Based on the H2B technology, direct communication using the PCIe bus, although the transmission speed is fast, can directly access the memory and reduce the CPU burden, but the application layer compatibility and scalability are poor, may be limited by the implementation of the BIOS and BMC chips, and have high requirements for hardware and firmware support, with high deployment and maintenance costs.
[0073] A communication method, device, BMC chip, computer device, storage medium, and program product applied to the BMC chip provided by this application are used to solve the above problems.
[0074] The following uses specific embodiments to elaborate in detail on the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below in conjunction with the accompanying drawings.
[0075] Figure 2 Flow schematic of a communication method applied to a BMC chip provided by an embodiment of this application Figure 1 , such as Figure 2 shown, this method is applied to a BMC chip, and a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the BMC chip. The method includes:
[0076] S201. Encapsulate the initial data based on a preset network protocol to obtain data to be transmitted.
[0077] In one example, the BIOS firmware determines which hardware information needs to be obtained from the BMC chip, such as temperature, voltage, fan speed, etc. The BIOS firmware constructs a request message, which usually contains the type of the requested information and other possible required parameters. The BMC chip receives the request message sent by the BIOS firmware. The BMC chip parses the request message to understand the type of hardware information required by the BIOS firmware. The BMC chip collects the required information from the data stored internally or by directly accessing the hardware sensors. Among them, this information may include but is not limited to temperature sensor readings, voltage sensor readings, fan speed, etc. The collected hardware information data needs to be encapsulated according to the requirements of the preset network protocol. Among them, the preset network protocol includes but is not limited to: Hypertext Transfer Protocol (HTTP), Hypertext Transfer Protocol Secure (HTTPS), IPMI over LAN, Restful API, Redfish, etc. For each requested hardware information item, the BMC chip creates a response data packet, which contains the actual hardware information value and possible additional information (such as unit, threshold, etc.). The response data packets of each hardware information item are further combined into a complete response message. This response message contains all the requested hardware information.
[0078] S202. Transmit the data to be transmitted to the second virtual network card through the first virtual network card.
[0079] In one example, a PCIe bus controller is deployed in the BMC chip, and the PCIe bus controller is provided with a first virtual network card and a second virtual network card. The BMC chip initializes the first virtual network card and the second virtual network card. The initialization operations include, but are not limited to: allocating and initializing resources related to the network card (memory buffer, interrupt, etc.), setting the Media Access Control (MAC) address of the network card, implementing the logic for data reception and transmission, processing interrupts, and providing an interface to the user space so that the application can interact with the network card. The BMC chip manages the first virtual network card and sets an Internet Protocol (IP) address for the first virtual network card; the BIOS firmware manages the second virtual network card and sets an IP address for the second virtual network card, where the IP addresses of the first virtual network card and the second virtual network card are within the same local area network.
[0080] The BMC chip first encapsulates the data to be transmitted into one or more IP data packets. This encapsulation process includes adding necessary information such as the source IP address (the IP address of the first virtual network card), the destination IP address (the IP address of the second virtual network card), and the TCP / UDP header (according to the transport layer protocol). The encapsulated data packets are sent into the transmission queue of the first virtual network card, and the first virtual network card sends the data packets to the local area network through its physical network interface (which can be a physical port shared with other network interfaces on the server motherboard, or can be an independent physical port, not required in this embodiment). In the local area network, the data packets are routed to the second virtual network card according to the IP address. This usually involves the participation of a switch or a router, which will determine the transmission path of the data packets according to the destination IP address and MAC address of the data packets. The second virtual network card receives the data packets through its physical network interface.
[0081] S203. Send the data to be transmitted to the BIOS firmware based on the second virtual network card.
[0082] In one example, the second virtual network card receives the data packets from the first virtual network card through its network interface. And perform IP layer decapsulation on the data packets, verify the source IP address (the IP of the first virtual network card) and the destination IP address (the IP of the second virtual network card), and confirm the validity of the data packets. The second virtual network card sends the data to be transmitted to the BIOS firmware on the host side through the PCIe bus. The PCIe bus is a high-speed serial connection used to transmit data between various components inside the computer. The BIOS firmware receives the data packets through the PCIe interface; and performs corresponding decapsulation on the data packets, finally obtaining the initial data, and stores the initial data in the memory or writes it to a log file. The BIOS firmware uses these data to perform necessary operations, such as updating configurations and monitoring hardware status.
[0083] A communication method applied to a BMC chip provided by an embodiment of the present application realizes efficient communication between the BMC chip and the BIOS firmware by deploying two virtual network cards in the BMC chip, namely, a first virtual network card and a second virtual network card. The specific method includes: the BMC chip encapsulates the data to be transmitted using a preset network protocol to form a data packet to be transmitted; subsequently, the BMC chip sends the data packet to be transmitted to the second virtual network card according to the IP address of the second virtual network card through the first virtual network card; after receiving the data packet, the second virtual network card unpacks it to extract the original data and sends the data to the BIOS firmware through the PCIe bus. This communication method not only ensures the accurate transmission of data, but also multiplexes the general network protocol through the virtual network card, and at the same time utilizes the high-speed characteristics of the PCIe bus to improve the data transmission efficiency, thus effectively supporting the system management and monitoring functions.
[0084] Figure 3 Schematic flow of a communication method applied to a BMC chip provided by an embodiment of the present application Figure 2 , such as Figure 3 shown, this method is applied to a BMC chip, and a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the BMC chip. The method includes:
[0085] S301. The first virtual network card and the second virtual network card are deployed in the PCIe bus controller of the BMC chip.
[0086] In one example, the BMC chip is an independent microcontroller, usually embedded on the motherboard of the server. It is mainly responsible for the out-of-band management of the server, enabling the server to be monitored, configured, and troubleshot even when the server operating system is not running or the server power is off. The BMC chip communicates with the remote management system through specific interfaces (such as IPMI 2.0) to achieve functions such as remote power control, temperature monitoring, and logging. PCIe is a high-speed serial computer expansion bus standard used to connect the motherboard to various peripheral devices (such as graphics cards, network cards, solid-state drives, etc.). The PCIe bus controller is a key component of the PCIe interface, which is responsible for managing and controlling data transmission on the PCIe bus. Deploying a PCIe bus controller in the BMC means that the BMC chip can communicate efficiently with other devices on the server (such as memory, processors, storage devices, etc.) or additional PCIe devices (such as network adapters) through the PCIe bus. A virtual network card is a concept in virtualization technology that allows multiple logical interfaces to be created on the same physical network interface. These virtual network cards can work like physical network cards, supporting independent IP addresses, MAC addresses, and traffic management policies. In a server virtualization environment, virtual network cards enable virtual machines to communicate with the network independently of the physical network hardware.
[0087] Inside the BMC chip, it communicates with other components of the server through the PCIe bus controller. When the BMC chip needs to send data, it sends the data to the network through the PCIe controller. Similarly, the received data also arrives at the BMC chip through the PCIe controller and is processed. There is a PCIe bus controller deployed in the BMC chip, and two virtual network cards are defined on the PCIe bus controller, namely the first virtual network card and the second virtual network card. By deploying a PCIe bus controller inside the BMC chip and defining two virtual network cards on it, efficient management and monitoring of the server can be achieved, while ensuring network connectivity and management capabilities even in the event of a failure of the main operating system.
[0088] S302. Initialize the first virtual network card and the first virtual network card; where the initialization process includes one or more of the following: allocating network card resources, setting the MAC address, and setting the interaction interface.
[0089] In one example, during the server startup process, the BMC chip initializes the two virtual network cards defined inside it, where these two virtual network cards are the first virtual network card and the second virtual network card respectively.
[0090] The initialization process mainly includes the following aspects:
[0091] Allocate network card resources: The BMC chip first needs to identify the available resources on the PCIe bus controller, including memory space, I / O ports, interrupt numbers, etc.; allocate the necessary hardware resources for each virtual network card, which usually includes a continuous memory address space for data transmission and caching, and one or more interrupt numbers for responding to network card events; configure the relevant registers in the PCIe bus controller to reflect the resources allocated to the virtual network card.
[0092] Set the MAC address: The MAC address is a unique identifier for each network card, used to uniquely identify a network card below the network layer. The BMC chip can generate a unique MAC address for each virtual network card or allocate it from a predefined address pool. The MAC address is an important identifier for network devices to communicate at the network layer; program the generated MAC address into the hardware or firmware of the virtual network card. This usually involves modifying the configuration registers or memory mapping of the network card.
[0093] Set the interaction interface: Define how the virtual network card communicates with the BMC chip and other system components. Configure the virtual network card to support specific network protocols and interface types (such as Ethernet, InfiniBand, etc.). If the BMC chip uses an operating system or firmware to manage the virtual network card, the corresponding driver needs to be loaded. The driver is responsible for handling the interaction between the virtual network card and the operating system or firmware. Determine the communication protocol used by the virtual network card, such as the IPMI protocol or other specific management protocols. If necessary, set the port mapping rules to ensure that the network traffic of the virtual network card can be correctly routed to the BMC chip or the external network. Start the necessary services or daemon processes to support the functions of the virtual network card.
[0094] S303. Install network protocols for the first virtual network card; among them, network protocols are installed in the second virtual network card.
[0095] In one example, the first virtual network card is managed by the BMC chip, and the second virtual network card is managed by the BIOS firmware. The BMC chip installs network protocols for the first virtual network card; the BIOS firmware installs network protocols for the second virtual network card. The network protocols include but are not limited to: installing the Transmission Control Protocol / Internet Protocol (TCP / IP) at the transport layer, and multiple protocols can be deployed at the application layer, such as http, https, IPMI over Lan, Restsful, etc.
[0096] S304. Set the IP address and subnet mask corresponding to the first virtual network for the first virtual network card; wherein, the second virtual network card is set with the IP address and subnet mask corresponding to the second virtual network. Among them, the IP address corresponding to the first virtual network and the IP address corresponding to the second virtual network belong to the same local area network; the subnet mask corresponding to the first virtual network and the subnet mask corresponding to the second virtual network are the same.
[0097] In one example, in order for the BMC chip and the BIOS firmware to communicate through the network and ensure that they are in the same local area network, it is necessary to set the corresponding IP address and subnet mask for the first virtual network card and the second virtual network card respectively. The BMC chip sets the IP address and subnet mask corresponding to the first virtual network for the first virtual network card; the BIOS firmware sets the IP address and subnet mask corresponding to the second virtual network for the second virtual network card.
[0098] For example, the IP address set by the BMC chip for the first virtual network card is 169.254.0.17, and the IP address set by the BIOS firmware for the second virtual network card is 169.254.0.18. These two IP addresses belong to the same private address range 169.254.0.0 / 16. The subnet masks of the first virtual network card and the second virtual network card are both 255.255.0.0, which means they belong to the same subnet 169.254.0.0 / 16.
[0099] S305. Based on the second virtual network card, receive the data acquisition request sent by the BIOS firmware; and based on the second virtual network card, encapsulate the data acquisition request according to the preset network protocol to obtain the encapsulated data acquisition request; based on the second virtual network card, send the encapsulated data acquisition request to the BMC chip through the first virtual network card; wherein, according to the IP address of the first virtual network card, transmit the data to be transmitted to the first virtual network card.
[0100] In one example, a data acquisition request is generated inside the BIOS firmware. This request may be because the BIOS firmware needs to obtain certain hardware status information from the BMC chip or execute a certain management operation. The BIOS firmware encapsulates the data acquisition request according to a preset network protocol. Inside the second virtual network card, the data acquisition request is encapsulated into one or more IP data packets. This encapsulation process includes adding necessary information such as the source IP address (the IP address of the second virtual network card), the destination IP address (the IP address of the first virtual network card), and the TCP / UDP header (according to the transport layer protocol). The encapsulated data packets will be sent into the transmission queue of the second virtual network card. The second virtual network card sends the data packets to the local area network through its physical network interface (which can be a physical port shared with other network interfaces on the server motherboard or can be an independent physical port, and this embodiment does not make requirements). Inside the local area network, the data packets are routed to the first virtual network card according to the IP address.
[0101] The first virtual network card managed by the BMC chip monitors the data packets on the network. When it receives a data acquisition request from the BIOS firmware, it captures this data packet and performs IP layer decapsulation on the data packet, verifying the source IP address (the IP of the second virtual network card) and the destination IP address (the IP of the first virtual network card) to confirm the validity of the data packet. Since the first virtual network card is part of the BMC chip, the data packet after IP layer decapsulation will be passed to the BMC chip for processing. The firmware or driver in the BMC chip will decapsulate this data packet to understand the content of the BIOS firmware's request. According to the request of the BIOS firmware, the BMC chip will perform corresponding operations to collect firmware information. This may include retrieving firmware files from the storage of the BMC chip itself, querying the hardware status to generate a report, or communicating with other management components to obtain necessary data.
[0102] S306. Encapsulate the initial data based on a preset network protocol to obtain the data to be transmitted; based on the first virtual network card, transfer the data to be transmitted to the second virtual network card according to the IP address of the second virtual network card.
[0103] In one example, when the BMC chip collects the data information required by the BIOS firmware, it packs this data into a response data packet. The response data packet is encapsulated using a preset network protocol, which includes but is not limited to: http, https, IPMI over LAN, Restful API, Redfish, etc. The packet encapsulated with the preset network protocol is encapsulated into one or more IP packets through TCP / UDP data packets. This encapsulation process includes adding necessary information such as the source IP address (the IP address of the first virtual network card), the destination IP address (the IP address of the second virtual network card), and the TCP / UDP header (according to the transport layer protocol). The encapsulated packet is sent into the send queue of the first virtual network card, and the first virtual network card sends the packet to the local area network through its physical network interface; within the local area network, the packet is routed to the second virtual network card according to the IP address. This usually involves the participation of switches or routers, which determine the transmission path of the packet based on the destination IP address and MAC address of the packet. The second virtual network card receives the packet through its physical network interface.
[0104] S307. Based on the second virtual network card, perform de-encapsulation on the data to be transmitted according to the preset network protocol to obtain the de-encapsulated data to be transmitted; based on the second virtual network card, send the de-encapsulated data to be transmitted to the BIOS firmware.
[0105] In one example, based on the second virtual network card, send the de-encapsulated data to be transmitted to the BIOS firmware through the PCIe bus.
[0106] In one example, when the second virtual network card of the BIOS firmware receives a packet, it first performs IP layer de-encapsulation on the packet, verifies the source IP address (the IP of the first virtual network card) and the destination IP address (the IP of the second virtual network card), and confirms the validity of the packet. After confirming that the packet is valid and the destination is the BIOS firmware, the second virtual network card transmits the data part of the packet to the BIOS firmware through the PCIe bus. The PCIe bus, as a high-speed serial computer expansion bus standard, can efficiently transmit data between server internal components. When the packet reaches the BIOS firmware through the PCIe bus, the BIOS firmware performs corresponding network protocol de-encapsulation processing according to the network protocol type of the packet. This includes but is not limited to stripping the transport layer header to obtain information such as port number, sequence number, checksum, etc., and further de-encapsulating to the application layer data. After completing the network protocol de-encapsulation, the BIOS firmware extracts the application layer data, which usually contains the specific information or instructions required by the BIOS firmware. The BIOS firmware then parses and processes this data to perform corresponding operations, such as firmware update, status query, etc.
[0107] A communication method applied to a BMC chip provided by an embodiment of the present application deploys two virtual network cards in the BMC chip, namely, a first virtual network card and a second virtual network card, and defines their initial functions, including allocating network card resources, setting MAC addresses, setting interaction interfaces, etc. The BMC chip and the BIOS firmware respectively install a common network protocol for the virtual network cards they manage to ensure that both parties follow the same network communication rules. Further, IP addresses and subnet masks are configured for these two virtual network cards to ensure that the two virtual network cards are in the same local area network, thereby constructing a private and efficient internal communication network. In this architecture, the BIOS firmware encapsulates the data request according to the network protocol through the second virtual network card and sends it to the first virtual network card of the BMC chip through the IP addressing mechanism; after receiving the data packet, the BMC chip performs a decapsulation operation to extract the data request, then collects the necessary data according to the request content, and repackages it into a data packet, and sends it back to the second virtual network card of the BIOS firmware through the IP address. Finally, the second virtual network card directly transfers the data to the BIOS firmware using the PCIe bus to complete the entire communication process. This solution not only ensures the accurate transmission of data, but also enhances the isolation and security of the system through the virtual network environment. At the same time, it improves the data transmission efficiency by using the characteristics of the common network protocol and the virtual network environment, effectively supports the system management and monitoring functions, provides a solid foundation for the reliability and maintainability of the system, and realizes the efficient communication between the BMC chip and the BIOS firmware.
[0108] Figure 4 Schematic structure of a communication device applied to a BMC chip provided by an embodiment of the present application Figure 1 As Figure 4 shown, this device is applied to a BMC chip. In the BMC chip, a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed. A communication device 40 applied to a BMC chip provided by the present application includes:
[0109] An encapsulation module 41 encapsulates the initial data based on a preset network protocol to obtain data to be transmitted.
[0110] A transmission module 42 is used to transmit the data to be transmitted through the first virtual network card to the second virtual network card.
[0111] A sending module 43 is used to send the data to be transmitted to the BIOS firmware based on the second virtual network card.
[0112] A communication device applied to a BMC chip provided by this embodiment can execute the method provided by the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0113] Figure 5 Structural schematic of a communication device applied to a BMC chip provided by an embodiment of the present application Figure 2 , such as Figure 5 shown, this device is applied to a BMC chip, in which a first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed. A communication device 50 applied to a BMC chip provided by the present application includes:
[0114] An encapsulation module 51 that encapsulates initial data based on a preset network protocol to obtain data to be transmitted.
[0115] A transmission module 52 for transmitting the data to be transmitted to the second virtual network card through the first virtual network card.
[0116] A sending module 53 for sending the data to be transmitted to the BIOS firmware based on the second virtual network card.
[0117] In one example, the transmission module 52 includes:
[0118] A first transmission module 521 for transmitting the data to be transmitted to the first virtual network card according to the IP address of the first virtual network card.
[0119] A second transmission module 522 for transmitting the data to be transmitted to the second virtual network card based on the first virtual network card according to the IP address of the second virtual network card.
[0120] In one example, the sending module 53 includes:
[0121] A de-encapsulation module 531 for de-encapsulating the data to be transmitted based on the second virtual network card according to the preset network protocol to obtain the de-encapsulated data to be transmitted.
[0122] A first sending module 532 for sending the de-encapsulated data to be transmitted to the BIOS firmware based on the second virtual network card.
[0123] In one example, the first sending module 532 includes:
[0124] A second sending module 5321 for sending the de-encapsulated data to be transmitted to the BIOS firmware based on the second virtual network card through the PCIe bus.
[0125] In one example, the device provided by the embodiment of the present application further includes:
[0126] A receiving module 54 for receiving a data acquisition request sent by the BIOS firmware based on the second virtual network card;
[0127] The first encapsulation module 55 is configured to encapsulate a data acquisition request based on a second virtual network card according to a preset network protocol to obtain an encapsulated data acquisition request.
[0128] The third sending module 56 is configured to send the encapsulated data acquisition request to the BMC chip through the first virtual network card based on the second virtual network card.
[0129] In one example, the device provided in the embodiment of the present application further includes:
[0130] The deployment module 57 is configured to deploy the first virtual network card and the second virtual network card in the PCIe bus controller of the BMC chip.
[0131] In one example, the device provided in the embodiment of the present application further includes:
[0132] The initialization module 58 is configured to perform initialization processing on the first virtual network card and the first virtual network card.
[0133] The installation module 59 is configured to install a network protocol on the first virtual network card; wherein, a network protocol is installed in the second virtual network card.
[0134] The setting module 510 is configured to set an IP address and a subnet mask corresponding to the first virtual network for the first virtual network card; wherein, the second virtual network card is set with an IP address and a subnet mask corresponding to the second virtual network.
[0135] In one example, the setting module 510 includes: the IP address corresponding to the first virtual network and the IP address corresponding to the second virtual network, both belonging to the same local area network; the subnet mask corresponding to the first virtual network and the subnet mask corresponding to the second virtual network, both being the same.
[0136] In one example, the initialization module 58 includes one or more of the following: allocating network card resources, setting a MAC address, and setting an interaction interface.
[0137] A communication device applied to a BMC chip provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0138] Figure 6 It is a schematic structural diagram of a BMC chip provided in an embodiment of the present application. As Figure 6 shown, a BMC chip 60 provided in this embodiment includes: a first virtual network card 61 corresponding to the BMC chip 60 and a second virtual network card 62 corresponding to the BIOS firmware are deployed in the BMC chip 60.
[0139] The BMC chip 60 includes a PCIe bus controller 63, and the first virtual network card 61 and the second virtual network card 62 are deployed in the PCIe bus controller 63.
[0140] The BMC chip provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0141] Figure 7 It is a schematic structural diagram of a computer device provided in an embodiment of the present application. As Figure 7 shown, the electronic device 70 provided in this embodiment includes: a BIOS firmware 71 and a BMC chip 60, wherein the BIOS firmware 71 and the BMC chip 60 are connected through a bus 72.
[0142] In the above embodiment, it should be understood that the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0143] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0144] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above method is implemented.
[0145] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0146] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0147] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed between each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0150] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. And the aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0151] Those of ordinary skill in the art will understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0152] Finally, it should be noted that: after considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other embodiments of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A communication method applied to a BMC chip, characterized in that, The method is applied to a BMC chip. A first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the PCIe bus controller of the BMC chip. The method includes: Based on the second virtual network card, receiving a data acquisition request sent by the BIOS firmware; and based on the second virtual network card, encapsulating the data acquisition request according to a preset network protocol to obtain an encapsulated data acquisition request; Based on the second virtual network card, sending the encapsulated data acquisition request to the BMC chip through the first virtual network card; Encapsulating initial data according to a preset network protocol to obtain data to be transmitted; Transmitting the data to be transmitted to the second virtual network card through the first virtual network card; Based on the second virtual network card, sending the data to be transmitted to the BIOS firmware through the PCIe bus.
2. The method according to claim 1, characterized in that, Transmitting the data to be transmitted to the second virtual network card through the first virtual network card includes: Transmitting the data to be transmitted to the first virtual network card according to the IP address of the first virtual network card; Based on the first virtual network card, transmitting the data to be transmitted to the second virtual network card according to the IP address of the second virtual network card.
3. The method according to claim 1, wherein Sending the data to be transmitted to the BIOS firmware based on the second virtual network card includes: Based on the second virtual network card, decompressing the data to be transmitted according to the preset network protocol to obtain decompressed data to be transmitted; Based on the second virtual network card, sending the decompressed data to be transmitted to the BIOS firmware.
4. The method according to claim 3, wherein Sending the decompressed data to be transmitted to the BIOS firmware based on the second virtual network card includes: Based on the second virtual network card, sending the decompressed data to be transmitted to the BIOS firmware through the PCIe bus.
5. The method according to any one of claims 1-4, characterized in that, The first virtual network card and the second virtual network card are deployed in the PCIe bus controller of the BMC chip.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: Performing initialization processing on the first virtual network card and the second virtual network card; Installing a network protocol for the first virtual network card; wherein, a network protocol is installed in the second virtual network card; Setting an IP address and a subnet mask corresponding to the first virtual network for the first virtual network card; wherein, an IP address and a subnet mask corresponding to the second virtual network are set for the second virtual network card.
7. The method according to claim 6, wherein The IP address corresponding to the first virtual network and the IP address corresponding to the second virtual network belong to the same local area network; the subnet mask corresponding to the first virtual network and the subnet mask corresponding to the second virtual network are the same.
8. The method according to claim 6, characterized in that, The initialization processing includes one or more of the following: Allocating network card resources, setting the MAC address, and setting the interaction interface.
9. A communication device applied to a BMC chip, characterized in that, The device is applied to a BMC chip. A first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the PCIe bus controller of the BMC chip. The device includes: The encapsulation module receives a data acquisition request sent by the BIOS firmware based on the second virtual network card; and based on the second virtual network card, encapsulates the data acquisition request according to a preset network protocol to obtain an encapsulated data acquisition request; Based on the second virtual network card, the encapsulated data acquisition request is sent to the BMC chip through the first virtual network card; It is used to encapsulate initial data according to a preset network protocol to obtain data to be transmitted; The transmission module is used to transmit the data to be transmitted to the second virtual network card through the first virtual network card; The sending module is used to send the data to be transmitted to the BIOS firmware through the PCIe bus based on the second virtual network card.
10. A BMC chip, characterized in that, A first virtual network card corresponding to the BMC chip and a second virtual network card corresponding to the BIOS firmware are deployed in the BMC chip, and the BMC chip is used to implement the method according to any one of claims 1-8.
11. The BMC chip according to claim 10, characterized in that, The BMC chip includes a PCIe bus controller, and the first virtual network card and the second virtual network card are deployed in the PCIe bus controller.
12. A computer device, characterized in that, The computer device is provided with a BIOS firmware and the BMC chip according to claim 10 or 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1-8.
14. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1-8.
Citation Information
Patent Citations
Hybrid heterogeneous virtualization communication method and chip
CN112433826A
Data interaction method, device and system for BMC and BIOS
CN113238863A