Communication control method and apparatus based on hardware partition system, and server
By running multiple operating systems on the multi-core processor of the substrate management controller and configuring the target communication interface to enable it to communicate with the hardware partition system, the problem of poor effectiveness of monitoring multi-partition systems in the server hardware partition system is solved, and independent management and effective monitoring of each partition system is achieved.
Patent Information
- Application Number
- PCT/CN2024/095002
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-10
- Filing Date
- 2024-05-23
- Publication Date
- 2025-04-17
AI Technical Summary
In the server hardware partition system, the multi-partition system cannot be effectively monitored by the server management unit, resulting in poor monitoring effectiveness.
Run at least two operating systems on the multi-core processor of the substrate management controller and configure the target communication interface to one of the operating systems so that it can communicate with various hardware partition systems in the host system through the target communication bus and communicate with other operating systems within the substrate management controller.
It realizes effective monitoring of each partition system in the host system hardware partition scenario, achieves the effect of independent management of each partition system, and solves the problem of poor monitoring of multi-partition systems.
Smart Images

Figure CN2024095002_17042025_PF_FP_ABST
Abstract
Description
Communication control method, device and server based on hardware partition system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on October 10, 2023, with application number 202311307559.4, and application name "Communication control method, device and server based on hardware partition system", all contents of which are incorporated by reference in this application. Technical Field
[0003] The embodiments of the present application relate to the field of computers, and in particular, to a communication control method, device, and server based on a hardware partitioning system. Background Art
[0004] In the server industry, hardware computing resource sharing and increased utilization of multi-core processors can be achieved through hardware partitioning of host system computing resources. This allows a single server to be divided into two or more physical host systems, each independently hosting and providing services. To ensure long-term stable and efficient server operation, the server system must be able to effectively monitor each partitioned system.
[0005] In related technologies, the management unit used by the server (i.e., server management unit) is usually a baseboard management controller (BMC). The server management unit can obtain the server's operating status and fault status information through its corresponding link interface, providing guarantees for the server system's health status monitoring, fault analysis and location.
[0006] However, in the scenario of a server hardware partition system, each partition system runs in parallel. Using the above-mentioned server status monitoring method cannot guarantee effective monitoring of each partition system. Therefore, the related art method of using the server management unit to monitor the server system status has the problem of poor monitoring effectiveness for multi-partition systems.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a communication control method, device and server based on a hardware partition system, so as to at least solve the problem in the related art of poor monitoring effectiveness of multi-partition systems by monitoring the status of a server system through a server management unit.
[0009] According to one aspect of an embodiment of the present application, a communication control method based on a hardware partitioning system is provided, which is applied to a server including a baseboard management controller and a host system, wherein the baseboard management controller and the host system communicate with each other via a target communication bus, at least two operating systems are running on a multi-core processor of the baseboard management controller, the host system is divided into multiple hardware partitioning systems, one of the at least two operating systems is used to monitor the running status of at least one hardware partitioning system in the multiple hardware partitioning systems, a target communication interface of the baseboard management controller is configured for a first operating system of the at least two operating systems, and the target communication interface is a communication interface corresponding to the target communication bus. The method includes: obtaining, through the first operating system, command data to be sent of a second operating system, wherein the second operating system is any operating system of the at least two operating systems other than the first operating system; reorganizing, through the first operating system, the command data to be sent to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partitioning system corresponding to the second operating system; and sending the target command message to the target communication bus via the target communication interface of the first operating system, so that the target hardware partitioning system receives the target command message on the target communication bus via the target communication interface of the target hardware partitioning system.
[0010] According to another aspect of an embodiment of the present application, a communication control device based on a hardware partitioning system is provided, which is applied to a server including a baseboard management controller and a host system, wherein the baseboard management controller and the host system communicate with each other via a target communication bus, at least two operating systems running on a multi-core processor of the baseboard management controller, the host system being divided into multiple hardware partitioning systems, one of the at least two operating systems being used to monitor the operating status of at least one of the multiple hardware partitioning systems, a target communication interface of the baseboard management controller being configured for a first operating system of the at least two operating systems, the target communication interface being a communication interface corresponding to the target communication bus, and the device comprising: an acquisition unit configured to acquire, via the first operating system, command data to be sent from a second operating system, wherein the second operating system is any operating system of the at least two operating systems other than the first operating system; a reassembly unit configured to reassemble, via the first operating system, the command data to be sent, to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; and a sending unit configured to send the target command message to the target communication bus via the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus via the target communication interface of the target hardware partition system.
[0011] According to another aspect of an embodiment of the present application, a server is further provided, comprising: a host system, a baseboard management controller, and a target communication bus between the host system and the baseboard management controller, at least two operating systems running on a multi-core processor of the baseboard management controller, the host system being divided into multiple hardware partition systems, one of the at least two operating systems being used to monitor the operating status of at least one hardware partition system among the multiple hardware partition systems, a target communication interface of the baseboard management controller being configured to a first operating system among the at least two operating systems, the target communication interface being a communication interface corresponding to the target communication bus, wherein the first operating system is configured to obtain command data to be sent of a second operating system, wherein the second operating system is any one of the at least two operating systems other than the first operating system; the command data to be sent is reorganized to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; the target command message is sent to the target communication bus through the target communication interface of the first operating system; the target hardware partition system is configured to receive the target command message on the target communication bus through the target communication interface of the target hardware partition system.
[0012] According to another aspect of the embodiments of the present application, a baseboard management controller is also provided. At least two operating systems are run on a multi-core processor of the baseboard management controller. One of the at least two operating systems is used to monitor the operating status of at least one hardware partition system among multiple hardware partition systems into which a host system is divided. The baseboard management controller communicates with the host system via a target communication bus. The target communication interface of the baseboard management controller is configured for a first operating system among the at least two operating systems. The target communication interface is a communication interface corresponding to the target communication bus. The at least two operating systems also include a second operating system. The first operating system is configured to obtain command data to be sent from the second operating system. The second operating system is any operating system of the at least two operating systems other than the first operating system. The command data to be sent is reorganized to obtain a target command message corresponding to the command data to be sent. The target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system. The target command message is sent to the target communication bus via the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus via the target communication interface of the target hardware partition system.
[0013] According to another aspect of the embodiments of the present application, a non-volatile readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0014] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
[0015] Through the embodiment of the present application, at least two operating systems are run on the multi-core processor of the baseboard management controller, and the communication interface of the baseboard management controller is configured to one of the operating systems. The baseboard management controller and the host system communicate through a target communication bus. At least two operating systems are run on the multi-core processor of the baseboard management controller, and one operating system is used to monitor the operating status of at least one hardware partition system into which the host system is divided. The target communication interface of the baseboard management controller is configured to the first operating system of the at least two operating systems, and the target communication interface is a communication interface corresponding to the target communication bus; the first operating system obtains the command data to be sent by the second operating system, and the second operating system is any operating system other than the first operating system; the command data to be sent is reorganized to obtain the target command data. The target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; the target command message is sent to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system. Since the communication with each hardware partition system in the host system and the communication with other operating systems in the baseboard management controller are realized by the designated operating system, the above design can realize effective monitoring of each partition system in the hardware partition scenario of the host system, and achieve the effect of independent management of each partition system, thereby solving the problem of poor monitoring effectiveness of multi-partition systems in the method of monitoring the server system status through the server management unit in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] FIG1 is a block diagram of the hardware structure of an optional computer terminal according to an embodiment of the present application;
[0017] FIG2 is a flow chart of an optional communication control method based on a hardware partitioning system according to an embodiment of the present application;
[0018] FIG3 is a schematic diagram of an optional system architecture according to an embodiment of the present application;
[0019] FIG4 is a schematic diagram of an optional PECI command according to an embodiment of the present application;
[0020] FIG5 is a schematic diagram of an optional Ping command according to an embodiment of the present application;
[0021] FIG6 is a schematic diagram of memory distribution of an optional data structure according to an embodiment of the present application;
[0022] 7 is a flow chart of another optional communication control method based on a hardware partitioning system according to an embodiment of the present application;
[0023] FIG8 is a schematic diagram of memory distribution of another optional data structure according to an embodiment of the present application;
[0024] FIG9 is a flow chart of another optional communication control method based on a hardware partitioning system according to an embodiment of the present application;
[0025] FIG10 is a structural block diagram of a communication control device based on a hardware partitioning system according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0027] With the rapid development of the semiconductor industry and integrated circuit technology, processors have become essential computing units in fields such as cloud computing, artificial intelligence, and big data. To enable hardware computing resource sharing and improve the utilization of multi-core processors, virtualization technology can be introduced. This involves creating multiple virtual machines (VMs) based on the processor hardware platform, each running an independent operating system. However, VM-based operating systems generally cannot meet the real-time requirements of services due to the added overhead of VM management. Therefore, operating systems are often run directly on dedicated physical machines. This "bare metal" processor approach can significantly reduce service processing latency.
[0028] In the server industry, hardware partitioning is a technology that uses the host system's CPU (Central Processing Unit, the computing core of a computer system, and the final execution unit for information processing and program execution) to partition computing resources. This allows a single server to be divided into two or more physical host systems (i.e., hardware partition systems), each independently hosting and providing services. To ensure long-term, stable, and efficient server operation, the server system must be able to effectively monitor each partitioned system. This creates new monitoring requirements for the design of the server management unit to ensure effective monitoring of the operation of each partitioned system.
[0029] The server management unit can be a BMC or other management unit. Taking the BMC as an example, the BMC can obtain server CPU temperature, power consumption, and fault status information of key unit modules, providing strong support for server system health status monitoring, fault analysis, and location. The above-mentioned key unit modules may include but are not limited to at least one of the following: CPU, UPI (Ultra Path Interconnect) link, memory controller, PCIe (Platform Environment Control Interface, configured to exchange information between the server BMC and Intel architecture CPU) link, etc.
[0030] However, since the server is usually only equipped with one BMC management unit, that is, there is only one communication interface, in the scenario of the server hardware partition system, there will be a problem that each hardware partition system cannot use the communication interface independently, which in turn affects the independence of the fault management functions of different partition systems on the same server platform. In order to deal with the above problems, a solution that can be adopted is to upgrade the CPU architecture of the BMC, that is, to redesign the communication interface module (for example, the PECI interface module) for the host multi-hardware partition system. However, the above solution will bring two challenges: first, the upgrade of the BMC CPU architecture requires hardware partitioning design inside the BMC, which significantly increases the design complexity and will inevitably lead to a substantial increase in chip costs; second, the BMC CPU architecture upgrade chip design, tape-out, manufacturing, debugging and other links will take up a lot of time, which will have a serious impact on the application and promotion of the host system hardware partitioning technology, and is not conducive to the rapid promotion and application of new technologies.
[0031] To at least partially address the aforementioned issues, at least two operating systems running on a multi-core processor of a baseboard management controller are used to monitor the hardware partition systems of the host system. A communication interface of the baseboard management controller is assigned to a designated operating system among the at least two operating systems, thereby enabling the designated operating system to communicate with the hardware partition systems in the host system, as well as communicate with other operating systems within the baseboard management controller. This design allows for effective monitoring of each partition system in a host system hardware partitioning scenario, thereby achieving independent management of each partition system.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking operation on a computer terminal as an example, FIG1 is a hardware structure block diagram of an optional computer terminal in an embodiment of the present application. As shown in FIG1 , the computer terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the communication control method based on the hardware partition system in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. Optional examples of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a NIC (Network Interface Controller), which can be connected to other network devices via a base station to communicate with the Internet. In another embodiment, the transmission device 106 may be an RF (Radio Frequency) module, which is used to communicate with the Internet wirelessly.
[0035] According to one aspect of an embodiment of the present application, a communication control method based on a hardware partitioning system is provided. Taking the communication control method based on a hardware partitioning system in this embodiment as an example, FIG2 is a flow diagram of an optional communication control method based on a hardware partitioning system according to an embodiment of the present application. As shown in FIG2 , the flow includes the following steps:
[0036] Step S202: Acquire command data to be sent by the second operating system through the first operating system.
[0037] The communication control method based on the hardware partition system in this embodiment can be applied to a scenario in which a baseboard management controller is used to perform communication control on multiple hardware partition systems in a hardware partition scenario of a host system, and can realize effective monitoring (for example, fault monitoring) of each partition system in a hardware partition scenario of a host system. The server includes a host system and a corresponding baseboard management controller. The host system performs hardware partitioning to obtain multiple hardware partition systems (or partition systems). The baseboard management controller has a multi-core processor, at least two operating systems running on the multi-core processor, and one operating system of the at least two operating systems is used to monitor the operating status of at least one hardware partition system in the multiple hardware partition systems. Here, the corresponding relationship between the operating system and the hardware partition system can be a one-to-one relationship or a one-to-many relationship. The baseboard management controller communicates with the host system through a target communication bus. The target communication interface of the baseboard management controller is configured to a first operating system. The first operating system can use the target communication interface to interact with the host system side and interact with other operating systems in at least two operating systems to realize independent management of each hardware partition system by the baseboard management controller.
[0038] Optionally, the hardware partitioning of the host system can be implemented based on the CPU or other processing units. The hardware resources of the host system are divided into multiple hardware partitions, each hardware partition corresponds to at least one CPU processor, which is equivalent to splitting the host system into multiple hardware partition systems. Each hardware partition contains the computing, storage, network and IO (Input / Output) required for the operation of its own system. Each operating system can run independently, and can be a Linux system (full name GNU / Linux, a set of freely distributable Unix-like operating systems), or other operating systems and combinations. Here, the Linux system is a multi-user, multi-tasking operating system based on POSIX (Portable Operating System Interface), which supports multi-threading and multi-CPU.
[0039] In an exemplary embodiment, the link used for communication between the baseboard management controller and the host system may be a PECI link. In the PECI link, the target communication bus is a PCIe bus, the target communication interface is a PECI interface, and the PECI interface is controlled by a corresponding interface controller (e.g., a PECI controller). The communication interface on the baseboard management controller side and the communication interface of the corresponding hardware partition system may match, for example, using the same communication address, or other communication control methods may be used.
[0040] Here, according to the PECI-related protocols, the PECI interface can be divided into Host devices and Client devices. Each communication is initiated by the Host device, and the Host device obtains the corresponding information through different PECI commands. In the server system, the BMC is the Host device, and each CPU processor on the Host side is the Client device. Correspondingly, the communication between each operating system and the hardware partition system corresponding to each operating system is initiated by each operating system as the host host device to the hardware partition system corresponding to each operating system as the client device. By allowing only the first operating system to access the PECI interface controller of the baseboard management controller, the PECI interface of the baseboard management controller is allocated to the first operating system.
[0041] For example, a virtual expansion solution for PECI links in a hardware partitioning system can be adopted. The host side is divided into N hardware partitions based on the number of CPU units, each partition corresponding to a CPU processor. This is equivalent to splitting the entire host system into N independent server systems, where N is a positive integer greater than 1. To achieve independent monitoring and management of each independent server system, the BMC multi-core processor is divided into N core partitions based on the core unit, corresponding to Core 1, Core 2, ..., Core N. Each core partition runs a Linux system. In this case, the BMC with the multi-core processor hard core runs multiple Linux systems: Linux System 1, Linux System 2, ..., Linux System N. These N Linux systems run independently and are responsible for monitoring and managing the N hardware partitions on the host side, as shown in Figure 3.
[0042] Here, each independent server system on the host side has a PECI interface (a PECI interface controlled by a PECI controller). Since the BMC only has one PECI controller, to enable PECI communication between the BMC and each hardware partition on the host, the BMC assigns access rights to the PECI controller to Linux system 1, meaning that only Linux system 1 can access the PECI controller. Through this configuration, each of the N partitions on the BMC processor has only one physical PECI interface (located in the Core 1 partition). The BMC-side PECI interface connects to the PECI interfaces in each hardware partition system on the host side via the PECI bus: the Core 1 partition's PECI interface connects to the PECI interfaces of each partition system on the host side via the bus, while the remaining Core partitions exchange data with the Core 1 partition via shared memory or other means. Furthermore, each BMC-side partition runs the Linux operating system, responsible for monitoring and managing each independent server system on the host side. Data sharing and transmission between BMC-side partitions is achieved through inter-core communication.
[0043] To achieve virtual expansion of the PECI link within the hardware partition system, the communication principle within the aforementioned system architecture is as follows: First, the PECI controller of Linux system 1 communicates with the hardware partition system on the host side to obtain information such as the CPU temperature, power consumption, and fault registers of each host-side partition system. Then, Linux system 1 distributes this acquired information to the corresponding Linux system on the BMC side via inter-core communication, based on the PECI addresses corresponding to the CPUs of each host-side hardware partition system. Thus, from a system architecture perspective, a PECI communication link is established between each host-side hardware partition system and the Linux system on the BMC side. Since these links do not physically exist, this effectively completes the virtual expansion of the PECI link within the hardware partition system, enabling the BMC to independently manage each host hardware partition system.
[0044] Here, under the above system architecture, an access mechanism based on the PECI link is designed between different Core partitions of the BMC management unit and the hardware partition system on the Host side, and a virtual PECI link is established between the BMC and the Host under the hardware partition system, realizing the virtual extension of the PECI link. Without considering the upgrade of the BMC architecture, each partition under the hardware partition system can independently enjoy the function of the PECI link, which is conducive to the rapid application of the hardware partitioning technology of the host system, avoids the increase in chip cost caused by the upgrade of the BMC processor architecture, and thus reduces the design cost of the server system, and finally achieves the goal of significantly reducing the cost of the entire hardware partition system and improving the computing performance of the host system and BMC system.
[0045] When sending command data, the first operating system can obtain the command data to be sent by the second operating system, that is, the command data to be sent by the second operating system to the corresponding hardware partition system. The command data here can be a packaged command message or the data required to generate the command message (the command message generation is performed by the first operating system). The method for obtaining the command data to be sent can be any method for transmitting data between different operating systems running on the same baseboard management controller. The second operating system can be any one of the at least two operating systems.
[0046] Step S204: reorganize the command data to be sent through the first operating system to obtain a target command message corresponding to the command data to be sent.
[0047] After obtaining the command data to be sent of the second operating system, the first operating system can reorganize the command data to be sent to obtain a command message corresponding to the command data to be sent, that is, a target command message. The target command message may include a target address and other information. The target address may be the communication address of the target hardware partition system corresponding to the second operating system, for example, a PECI address. The above-mentioned target command message may be any PECI command, including but not limited to: Ping command, GetDIB, GetTemp, RdIAMSR, WrIAMSR, etc. The command formats corresponding to different commands are slightly different, but the command formats of different commands all contain fields such as the target address and write length.
[0048] For example, the transmission format of the PECI command can be as shown in Figure 4. First is the address rate negotiation bit, which can be two bits of 0, used to determine the transmission rate before transmitting address information between the Host device and the Client device of the PECI bus. Secondly, the target address field, the bit width can be 8 bits (bits), used to specify the PECI address of the Client device, followed by the message rate negotiation bit, which can be 1 bit of 0, used to determine the transmission rate before transmitting message information between the Host device and the Client device of the PECI bus, and then the write length field, the bit width is 8 bits, used to identify the number of valid bytes to be written subsequently.
[0049] Taking the Ping command as an example, the Ping command is used by the Host device on the PECI bus to confirm whether the Client device exists. The command message transmission format is shown in Figure 5.
[0050] Step S206: Send the target command message to the target communication bus through the target communication interface of the first operating system.
[0051] Since the first operating system has an accessible PECI physical interface, and other operating systems do not have accessible PECI physical interfaces, after obtaining the target command message corresponding to the command data to be sent, the first operating system can send the target command message to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system can receive the target command message on the target communication bus through the target communication interface of the target hardware partition system. The target communication interface can be PECI or other interfaces. The target communication bus can be a PECI bus or other buses.
[0052] For example, when the BMC sends a ping command to the host, there are two scenarios: the first scenario is when Core 1 sends a ping command with the target address being CPU 1 on the host. The second scenario is when Core 2 through Core N send a ping command with the target address being CPU 2 through CPU N on the host.
[0053] For the first case, the Linux system of the Core 1 partition of the BMC sends data to the PECI bus shown in Figure 3 through the PECI interface of the partition according to the message transmission format of Figure 5. The target address is filled with the PECI address of CPU 1. Here, the PECI protocol usually supports 8 PECI addresses, namely 0x30 to 0x37. In order to adapt to the above PECI addresses, the number of partitions on the host side does not exceed 8. 0x30 corresponds to the hardware partition 1 on the host side, 0x31 corresponds to the hardware partition 2 on the host side, ..., and so on. The write length and read length are both 0x00.
[0054] For the second scenario, let's take the Core 2 partition sending a Ping command to CPU 2 as an example. Since the Core 2 partition does not have an accessible PECI physical interface, it cannot directly send the corresponding Ping command to CPU 2 on the host side. Therefore, information forwarding is used to complete this function. That is, the Linux system in the Core 2 partition first sends the corresponding target address, command code (i.e., Ping command), write length, read length, and other information to the Linux system in the Core 1 partition. The Core 1 partition then parses the data to be sent and repackages it into a Ping command message that complies with Figure 5 and is sent to the PECI bus.
[0055] Here, the BMC processor is divided into core partitions, with only Core 1 having access to the PECI controller. Each Core partition runs an independent Linux system and is logically responsible for independently monitoring and managing the host's hardware partition system. When other Core partitions (other than Core 1) need to access the corresponding hardware partition system on the host through PECI, direct PECI communication cannot be achieved due to the lack of an actual physical link.
[0056] By using shared memory between each Core and Core 1, the corresponding hardware partition system on the Host side can be indirectly accessed through the PECI controller of Core 1. In this way, from the perspective of the system architecture, the PECI virtual link between each Core partition on the BMC side and each hardware partition system on the Host side is expanded. The number of PECI communication channels of the BMC architecture under the hardware partition system can be significantly expanded, which has good adaptability to the hardware partition system, avoids the problem of increased costs caused by upgrading the BMC architecture to cope with the hardware partition system, effectively improves the computing performance of the host system and the BMC management unit, and helps promote the development and application of hardware partitioning technology in the host system.
[0057] Through the above steps, the command data to be sent of the second operating system is obtained through the first operating system, wherein the second operating system is any one of the at least two operating systems except the first operating system; the command data to be sent is reorganized by the first operating system to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; the target command message is sent to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system, thereby solving the problem of poor monitoring effectiveness of multi-partition systems in the related art of monitoring the status of the server system through the server management unit, and improving the effectiveness of monitoring the multi-partition system.
[0058] In an exemplary embodiment, obtaining, by the first operating system, command data to be sent by the second operating system includes:
[0059] S11 , when it is determined that the second operating system has command data to be sent, obtain the command data to be sent from the first shared memory through the first operating system.
[0060] In this embodiment, the command data to be sent can be sent to the first operating system via a first shared memory. The first shared memory is a shared memory of the at least two operating systems described above, and can be used to store command data to be sent by operating systems other than the first operating system in the at least two operating systems. Each of the at least two operating systems is allowed to access the shared memory, and the operating permissions of different operating systems for the first shared memory can be the same or different. For example, the first operating system can have read permission for the first shared memory, while the other operating systems have read and write permission for the first shared memory.
[0061] If the second operating system has command data to be sent (i.e., command data to be sent), it can write the command data to be sent to the first shared memory. If it is determined that the second operating system has command data to be sent, the first operating system can obtain the command data to be sent by the second operating system from the first shared memory, thereby obtaining the command data to be sent.
[0062] For example, the Linux system in the Core 2 partition stores the corresponding target address, command code (i.e., Ping command), write length, read length, and other information into the shared memory. When the Linux system in the Core 1 partition determines that the Linux system in the Core 2 partition has a command message to send, it can retrieve the data stored by the Linux system in the Core 2 partition from the shared memory.
[0063] According to this embodiment, data is transmitted between different operating systems of the same baseboard management controller through shared memory, which can improve the flexibility of data transmission and reduce the demand for real-time data transmission.
[0064] In an exemplary embodiment, when it is determined that the second operating system has command data to be sent, obtaining the command data to be sent from the first shared memory by the first operating system includes:
[0065] S21 : When it is determined that the second operating system has command data to be sent, the first operating system obtains the command data to be sent from a first data structure of the first shared memory according to the system identifier of the second operating system.
[0066] In this embodiment, command data to be sent by other operating systems can be stored in a first data structure in the first shared memory. The special design of this data structure can indicate to which operating system (e.g., Core partition) different command data belongs. For example, the special design of the data structure in the shared memory can indicate command data to be sent by the Core 2 partition. The first data structure can be used to store command data to be sent by other operating systems using at least one command parameter according to the system identifier of the other operating system. The command data to be sent by the other operating system includes parameter information of at least one command parameter corresponding to the other operating system.
[0067] Here, at least one command parameter can be one or more parameters that are pre-set and can adapt to different types of command messages. In order to avoid wasting storage space due to too many set parameters, at least one command parameter can include common parameters in various command messages and a parameter that adapts to other non-common parameters. Exemplarily, at least one command parameter includes at least one of the following: write length, read length, command code, write parameter; in the first data structure, parameter information of at least one command parameter corresponding to the same other operating system is stored sequentially and continuously; or, in the first data structure, parameter information of the same command parameter in at least one command parameter corresponding to multiple other operating systems is stored sequentially and continuously. In addition, the first data structure can store a system identifier or not, and only include parameter information of at least one command parameter, as long as the corresponding relationship between each operating system and the storage location (for example, starting location, space size, etc.) of the command data to be sent by each operating system is configured.
[0068] For example, the data structure definition of data sent by Core 2 to Core 8 on the BMC side can be shown in Table 1:
[0069] Table 1
[0070] The write parameters of the PECI command may allow writing of one or more parameters, ie, other parameters except the write length, the read length, and the command code.
[0071] The distribution of the above data structure in the memory may be as shown in FIG6 , which shows two possible distribution modes. In addition to the distribution mode shown in FIG6 , other distribution modes may also be possible, which are not listed here one by one.
[0072] If the second operating system has command data to be sent, the first operating system may obtain the command data to be sent from a first data structure in the first shared memory based on the system identifier of the second operating system. The obtaining method may be: based on the system identifier of the second operating system, the first operating system may read parameter information of at least one command parameter corresponding to the second operating system from the first data structure to obtain the command data to be sent.
[0073] According to this embodiment, the accuracy of data transmission can be improved by indicating to which operating system the command data belongs through a special design of the data structure.
[0074] In an exemplary embodiment, the number of other operating systems is multiple, that is, at least two operating systems include multiple other operating systems (operating systems to which communication interfaces are not assigned) in addition to the first operating system; the system identifiers of at least two operating systems are set continuously, and for a scenario in which each operating system runs on a core partition, the serial number of the core partition can be used as the system identifier of the running operating system, and in the first data structure, the command data to be sent by multiple other operating systems are stored in sequence according to the order of the system identifiers of the multiple other operating systems (the command data to be sent by some operating systems may be empty), for example, as shown in distribution method 1 in Figure 6.
[0075] Correspondingly, when it is determined that the second operating system has command data to be sent, obtaining the command data to be sent from the first data structure of the first shared memory according to the system identifier of the second operating system by the first operating system includes:
[0076] S31 , when it is determined that the second operating system has command data to be sent, the first operating system obtains the command data to be sent from a storage location corresponding to the system identifier of the second operating system in the first data structure.
[0077] In the case where the command data to be sent by each other operating system is stored sequentially according to the order of the system identifiers of multiple other operating systems, the storage location of the command data to be sent by each other operating system is fixed. In this case, the storage location of the command data to be sent by the second operating system can be determined by traversing the first data structure (for example, after finding the system identifier of the second operating system, the command data to be sent by the second operating system is determined based on the relationship between at least one command parameter and the storage location of the system identifier), or the command data to be sent can be directly obtained from the storage location corresponding to the system identifier of the second operating system in the first data structure.
[0078] Through this embodiment, the stored command data is directly acquired based on the correspondence between the system identifier and the storage location of the corresponding command data, which can improve the efficiency of data acquisition.
[0079] In an exemplary embodiment, obtaining, by the first operating system, command data to be sent by the second operating system includes:
[0080] S41: Receive, through the first operating system, a first inter-core communication request sent by the second operating system, wherein the first inter-core communication request carries command data to be sent.
[0081] In this embodiment, an existing inter-core communication request or a newly defined inter-core communication request can also be used to transmit the command data to be sent. Here, the newly defined inter-core communication request can be an inter-core communication request based on an existing inter-core communication protocol or an inter-core communication request based on a new inter-core communication protocol. This embodiment does not limit this, as long as the command data to be sent can be transmitted through the inter-core communication request.
[0082] For the command data to be sent by the second operating system, the second operating system may send a first inter-core communication request to the first operating system, where the inter-core communication request carries the command data to be sent by the second operating system, ie, the command data to be sent.
[0083] According to this embodiment, by using inter-core communication to request transmission of response data, the timeliness of response data delivery can be improved.
[0084] In an exemplary embodiment, similar to the aforementioned embodiment, the number of other operating systems in the at least two operating systems can be multiple. In this case, a second data structure can be predefined, in which a send ready flag (send Ready flag, or send data ready flag) corresponding to each other operating system can be set to identify whether the corresponding operating system has command data to be sent, wherein when the send ready flag is a first value (for example, 1 or 0), it indicates that the corresponding operating system has command data to be sent, and when the receive ready flag is a second value (for example, 0 or 1), it indicates that the corresponding operating system does not have command data to be sent. The first operating system determines whether the other operating systems have command data to be sent based on the send ready flags corresponding to each other operating system, so as to facilitate the knowledge of whether the other operating systems have command data to be sent.
[0085] For example, the data structure definition of sending the Ready flag of the Core 2 to Core 8 partitions on the BMC side is shown in Table 2.
[0086] Table 2
[0087] Correspondingly, before obtaining the command data to be sent by the second operating system through the first operating system, the above method further includes:
[0088] S51, sequentially detecting, by the first operating system, a send-ready flag corresponding to each other operating system in a second data structure of the second shared memory;
[0089] S52: When it is detected that the send-ready flag corresponding to the second operating system is the first value, determine that the second operating system has command data to be sent.
[0090] After the second operating system writes the command data to be sent into the first shared memory, it can set the send-ready flag corresponding to the second operating system in the second data structure of the second shared memory to the first value to indicate that the command data to be sent in the first shared memory is valid (i.e., the second operating system has the command data to be sent). Writing to the first shared memory can be done by writing to the first data structure in the first shared memory, which has been described above and will not be repeated here.
[0091] The first operating system can detect the receive-ready flag corresponding to each other operating system (including the second operating system) in the second data structure. The detection method can be a polling method or other detection methods. If the send-ready flag corresponding to the second operating system is detected to be the first value, the first operating system determines that the second operating system has command data to be sent. For example, the command data corresponding to the system identifier of the second operating system stored in the first data structure is valid. At this time, the first operating system can execute an operation to obtain the command data to be sent by the second operating system.
[0092] For example, the Linux system of the Core 2 partition sets the Send Ready flag of the Core 2 partition to 1 (the flag is stored in a specific area of shared memory), and the Linux system of the Core 1 partition detects the Send Ready flag of each Core partition in turn. When the flag is detected to be 1, the data is read, and then the read data is parsed and repackaged, converted into a Ping command message and sent to the PECI bus.
[0093] Through this embodiment, the sending flag in the specific data structure is set to indicate to the corresponding operating system that there is command data to be sent, which can improve the convenience of information transmission.
[0094] In an exemplary embodiment, after obtaining the command data to be sent of the second operating system through the first operating system, the method further includes:
[0095] S61: Setting the send-ready flag corresponding to the second operating system to a second value through the first operating system, wherein the second value is used to indicate that the corresponding operating system has no command data to be sent.
[0096] After obtaining the command data to be sent of the second operating system, since the value of the send-ready flag corresponding to the second operating system in the second data structure is the first value, in order to avoid information processing errors caused by repeated reading of the same command data, the first operating system can set the send-ready flag corresponding to the second operating system in the second data structure to the second value after obtaining the command data to be sent of the second operating system.
[0097] Here, in the second data structure, the send ready flag corresponding to each operating system is set to the first value by the operating system and to the second value by the first operating system, which can improve the accuracy and timeliness of setting the send ready flag and avoid information processing errors.
[0098] For example, the Linux system partition of Core 1 parses the read data and repackages it, converts it into a Ping command message and sends it to the PECI bus. The Linux system of the Core 1 partition eliminates the above flag and waits for the next data transmission.
[0099] Through this embodiment, after the command data is read, the designated operating system modifies the value of the corresponding receive ready flag, which can improve the accuracy and timeliness of setting the send ready flag and avoid information processing errors.
[0100] In an exemplary embodiment, the first operating system reorganizes the command data to be sent to obtain a target command message corresponding to the command data to be sent, including:
[0101] S71, determining a command type corresponding to the command data to be sent, and obtaining a target command type, wherein the target command type is a command type of a preset command used to send the command data to be sent;
[0102] S72 , reorganize the command data to be sent according to a command format corresponding to the target command type to obtain a target command message corresponding to the command data to be sent.
[0103] Different command types have different corresponding command formats. In order to adapt to different command types, the first operating system can determine the command type corresponding to the command data to be sent and obtain the target command type. The target command type is the command type of the preset command used to send the command data to be sent. The method for determining the command type corresponding to the command data to be sent can be based on the command type identifier extracted from the command data to be sent, or it can be determined by other methods. This is not limited in this embodiment.
[0104] After determining the target command type, the command data to be sent is reorganized according to the command format corresponding to the target command type, and a target command message corresponding to the command data to be sent can be obtained. Here, the data reorganization can be performed by the interface controller of the target communication interface (for example, the PECI controller) or by the first operating system. In addition, the command data to be sent itself can also be a command message that can be sent on the target communication bus, and by performing the command message reorganization operation in the first operating system (or the interface controller of the target communication interface of the first operating system), the processing requirements for different operating systems can be reduced.
[0105] Through this embodiment, by executing the reorganization of command data into command messages according to the command type in a designated operating system or an interface controller of a designated operating system, the processing requirements for different operating systems can be reduced. In an exemplary embodiment, the number of other operating systems other than the first operating system in at least two operating systems is multiple. The command data to be sent can directly carry the destination address (for example, the communication address of the target hardware partition system). In order to reduce the amount of data required to be transmitted between operating systems, only the system identifier of the operating system can be transmitted between the operating systems, and the first operating system determines the destination address based on the system identifier. In this regard, the difference between the communication address of the hardware partition system corresponding to each other operating system and the communication address of the hardware partition system corresponding to the first operating system can be configured, and has a specified corresponding relationship with the difference between the system identifier of each other operating system and the system identifier of the first operating system, so that the destination address can be determined directly based on the system identifier. Correspondingly, before the command data to be sent is reorganized by the first operating system, the above method also includes:
[0106] S91, determining, by the first operating system, a communication address of a target hardware partition system corresponding to the second operating system based on a specified correspondence, a difference between a system identifier of the first operating system and a system identifier of the second operating system, and a communication address of the hardware partition system corresponding to the first operating system.
[0107] When reorganizing the command data to be sent, the first operating system can determine the communication address of the target hardware partition system based on the specified corresponding relationship, the difference between the system identifier of the first operating system and the system identifier of the second operating system, and the communication address of the hardware partition system corresponding to the first operating system. The specified corresponding relationship here can be an equality relationship or other relationship, which is not limited here.
[0108] For example, the PECI address of the Core 1 partition is 0x30, and the partition to which the command message is to be sent is the Core 2 partition. The destination address is determined to be: 0x30 plus (partition number - 1).
[0109] Through this embodiment, the destination address is determined based on the system identifier, which can reduce the amount of data required to transmit command data between systems and improve the efficiency of data transmission.
[0110] The following describes an optional example of how to send a command message based on the system architecture shown in FIG3. In this optional example, the PECI command is a Ping command. Correspondingly, as shown in FIG7, the Ping command sending process may include the following steps:
[0111] Step S701: The Linux system in the Core 1 partition determines whether the current Ping command comes from the Core 1 partition. If so, step S702 is executed; otherwise, step S706 is executed.
[0112] Step S702, determining the target address is 0x30;
[0113] Step S703, determine that the write length is 0x00;
[0114] Step S704, determine that the read length is 0x00;
[0115] Step S705, sending data to the PECI bus in the Ping command message format;
[0116] Step S706, determining the target address is 0x30+partition number-1;
[0117] Step S707, determine that the write length is 0x00;
[0118] Step S708, determine that the read length is 0x00;
[0119] Step S709: The Linux systems of the other Core partitions except the Core 1 partition put the data to be sent into the shared memory;
[0120] Step S710, set the corresponding sending Ready flag to 1;
[0121] Step S711: The Linux system of the Core 1 partition detects the send ready flag in a round-robin manner to confirm that there is data to be sent from other Core partitions (Core partitions other than the Core 1 partition) in the shared memory;
[0122] Step S712: After confirming that there is data to be sent from other Core partitions in the shared memory, the data in the shared memory is reorganized;
[0123] Step S713, sending data to the PECI bus according to the Ping command message format;
[0124] In step S714, the Linux system of the Core 1 partition clears the corresponding send Ready flag and waits for the next round of data transmission.
[0125] This optional example provides the PECI command sending process in a hardware partitioning system, as well as the design of sending a Ready flag based on shared memory and the definition of a sending data structure. This can enable different Core partitions of the BMC management unit to send PECI commands.
[0126] In an exemplary embodiment, after sending the target command message to the target communication bus through the target communication interface of the first operating system, the method further includes:
[0127] S91, receiving, through the first operating system, a target response message on a target communication bus, wherein the target response message is response data returned by the target hardware partition system in response to the target command message, and the target response message carries a communication address of the target hardware partition system;
[0128] S92: Determine, by the first operating system, according to the communication address of the target hardware partition system, that the target response message is a response message to be sent to the second operating system, and distribute the target response message to the second operating system by the first operating system.
[0129] In this embodiment, the target command message may be a command message instructing the target hardware partition system to perform a specific operation, for example, a command for the baseboard management controller as a host device on the target communication bus to confirm whether the corresponding hardware partition system as a client device exists, such as a Ping command. Here, the Ping command is a command for the host device on the PECI bus to confirm whether the corresponding client device exists. After receiving the target command message, the target hardware partition system may respond to the target command message and return a response message to the target command message to the second operating system, i.e., a target response message. The target response message is sent by the target hardware partition system to the target communication bus.
[0130] For example, in the process of receiving and distributing PECI data, after the PECI controller of each partition system on the Host side receives the command data on the PECI bus, it performs address information comparison. When the PECI address on the PECI bus (i.e., the PECI address in the command data) matches itself, it receives the command and sends the response data to the PECI bus.
[0131] Taking the Ping command as an example, in the first case (BMC Core 1 partition sending PECI data), the PECI controller of the CPU in hardware partition 1 on the host side (PECI 1 in Figure 3) successfully matches the target address on the PECI bus and sends an FCS (Frame Check Sequence, used by the client device on the PECI bus to respond to the host device for verification information) sequence as response data to the PECI bus. In the second case (BMC Core 2 partition sending PECI data), the PECI controller of the CPU in hardware partition 2 on the host side (PECI 2 in Figure 3) successfully matches the target address on the PECI bus and sends an FCS sequence as response data to the PECI bus.
[0132] It should be noted that, based on the type of command message, whether a response message is returned and the type of the returned message may also be different. For example, for a command message that obtains one or several operating parameters, a response message carrying the corresponding parameter information is returned. For a command message that instructs the hardware partition system to perform a certain system operation, no response message may be returned, or a response message carrying the result of the operation execution may be returned. The optional command messages and corresponding response messages can refer to relevant technologies and will not be elaborated in this embodiment.
[0133] On the baseboard management controller side, since the target communication interface is configured for the first operating system, the first operating system can process response messages on the target communication bus, not only the response messages returned to itself, but also the response messages returned to other operating systems on the same baseboard management controller. For target response messages, the first operating system can receive the target response message on the target communication bus, which carries the communication address of the target hardware partition system. Based on the communication address of the target hardware partition system, the first operating system determines that the target response message is a response message sent to the second operating system. At this time, the first operating system can distribute the target response message to the second operating system.
[0134] Alternatively, the communication address of an operating system and the communication address of the corresponding hardware partition system can be the same, and the communication address of the hardware partition system can be used as the communication address of the corresponding operating system. In addition, a corresponding communication address can be virtualized for an operating system other than the first operating system. In this case, the target address (i.e., the communication address of the operating system) carried in the target response message is the virtual communication address of the second operating system.
[0135] For example, the PECI controller in Core 1 on the BMC side can receive response data on the PECI bus. If the PECI address corresponds to Core 1, the Linux system in Core 1 processes the response data. If the PECI address corresponds to Core 2 through Core N, the Linux system in Core 1 can distribute the response data to the Linux systems in the corresponding Core partitions.
[0136] Taking the Ping command as an example, in the first case, the Linux system in the Core 1 partition on the BMC side first receives the FCS sequence on the bus through its PECI interface. It then determines the value of the PECI address and finds it is 0x30 (the target address in the first case is 0x30), indicating that the FCS sequence is the response data sent by the hardware partition 1 on the host side to the Core 1 partition on the BMC side. At this time, the Linux system in the Core 1 partition compares the FCS sequence with the locally calculated FCS sequence. If they are equal, it indicates that the Ping command returns successfully. Otherwise, it indicates an abnormality.
[0137] In the second case, the Linux system of the Core 1 partition on the BMC side first receives the FCS sequence on the bus through its PECI interface, and then determines the value of the PECI address and finds it is 0x31 (the target address in the second case is 0x31), indicating that the FCS sequence is the response data sent by the hardware partition 2 on the Host side to the Core 2 partition on the BMC side. At this time, the Linux system of the Core 1 partition will distribute data for the FCS sequence.
[0138] It should be noted that the first operating system can distribute the target response message directly to the second operating system, or it can distribute part of the data in the target response message (for example, valid data) to the second operating system. The method of distributing the response data can be inter-core communication or other methods that can enable data interaction between operating systems on different processor cores of the same baseboard management controller. This is not limited in this embodiment.
[0139] Through this embodiment, the operating system assigned by the communication interface of the baseboard management controller executes the reception and distribution of the response message, thereby improving the accuracy and success rate of the message interaction.
[0140] In an exemplary embodiment, distributing the target response message to the second operating system by the first operating system includes:
[0141] S101: Write target response data in a target response message into a third shared memory through a first operating system, so that a second operating system reads the target response data from the third shared memory.
[0142] In this embodiment, the response message can be distributed to the corresponding operating system through the third shared memory. The third shared memory is the shared memory of the at least two operating systems mentioned above, which can be used to store response data sent to the other operating systems in the at least two operating systems except the first operating system. Each of the at least two operating systems is allowed to access the shared memory, and the operating permissions of different operating systems for the third shared memory can be the same or different. For example, the first operating system can have read and write permissions for the third shared memory, while other operating systems only have read permissions for the third shared memory. Optionally, the third shared memory can be the same as or different from the above-mentioned first shared memory and / or second shared memory, which is not limited in this embodiment.
[0143] For the target response message, the first operating system can write the target response message or the target response data in the target response message into the third shared memory, and the second operating system can read the target response data from the third shared memory by accessing the third shared memory, thereby completing the distribution of the target response message.
[0144] For example, the Linux system in the Core 1 partition can write the response data from the other Core 1 partition to the shared memory, so that the Linux system in the corresponding Core partition can read the response data from the shared memory. Taking the Ping command as an example, in the second case, the Linux system in the Core 1 partition writes the FCS sequence to the shared memory.
[0145] According to this embodiment, data is transmitted between different operating systems of the same baseboard management controller through shared memory, which can improve the flexibility of data transmission and reduce the demand for real-time data transmission.
[0146] In an exemplary embodiment, writing, by the first operating system, target response data in the target response message into the third shared memory includes:
[0147] S111 , writing target response data into a third data structure of a third shared memory according to a system identifier of the second operating system through the first operating system.
[0148] In this embodiment, response data sent to other operating systems can be stored in a third data structure in a third shared memory. The special design of this data structure can indicate to which operating system (e.g., Core partition) the response data belongs. For example, the special design of the data structure in the shared memory can indicate that the response data is sent to the Core 2 partition. In the third data structure, response data sent to other operating systems can be stored using at least one specified parameter based on the system identifier of the other operating system. The response data sent to other operating systems includes parameter information of at least one specified parameter corresponding to the other operating system.
[0149] Here, the at least one specified parameter may be one or more parameters that are pre-set and can adapt to different types of response data. In order to avoid wasting storage space due to too many set parameters, the at least one specified parameter may include common parameters in various response data and a parameter that adapts to other non-common parameters. Exemplarily, the at least one specified parameter includes at least one of the following: a check sequence generated by the hardware partition system that sends the response data, valid data in the response data, and a check sequence received by the hardware partition system that sends the response data. In addition, the third data structure may not store the system identifier, but only include at least one specified parameter, as long as the corresponding relationship between each operating system and the storage location (for example, starting location, space size, etc.) of the response data sent to each operating system is configured.
[0150] Optionally, the storage order of the parameter information of at least one specified parameter can be pre-configured and adjustable based on the configuration. In the third data structure, the response data sent to each operating system can be stored in a variety of ways, including but not limited to at least one of the following storage methods: the parameter information of at least one specified parameter corresponding to the same other operating system is stored sequentially and continuously; or, in the third data structure, the parameter information of the same specified parameter in at least one specified parameter corresponding to multiple other operating systems is stored sequentially and continuously. Other storage methods are also possible, and are not limited to this in this embodiment.
[0151] For example, the data structure definition of the data received by Core 2 to Core 8 on the BMC side can be shown in Table 3:
[0152] Table 3
[0153] The check sequence for sending data is the check sequence carried in the command message received by the partition system (this variable is optional), and the check sequence for receiving data is the check sequence generated by the partition system.
[0154] The distribution of the above data structure in the memory may be as shown in FIG8 , which shows two possible distribution modes. In addition to the distribution mode shown in FIG8 , other distribution modes may also be possible, which are not listed here one by one.
[0155] The first operating system may write the target response data into a third data structure of the third shared memory based on the system identifier of the second operating system. The writing may be performed by determining parameter information for each of the at least one specified parameter based on the target response data, determining a storage location in the third data structure for the parameter information corresponding to the second operating system based on the system identifier of the second operating system, and writing the determined parameter information for each specified parameter into the corresponding storage location.
[0156] According to this embodiment, the accuracy of data transmission can be improved by indicating to which operating system the response data belongs through a special design of the data structure.
[0157] In an exemplary embodiment, there are multiple other operating systems, and the system identifiers of each operating system in at least two operating systems are set continuously. For a scenario in which each operating system runs on a core partition, the serial number of the core partition can be used as the system identifier of the running operating system. In the third data structure, the response data sent to the multiple other operating systems are stored in sequence according to the order of the system identifiers of the multiple other operating systems, for example, as shown in distribution method 1 in Figure 8.
[0158] Correspondingly, writing the target response data into the third data structure of the third shared memory by the first operating system according to the system identifier of the second operating system includes:
[0159] S121, write the target response data into the third data structure, in a storage location corresponding to the system identifier of the second operating system, through the first operating system.
[0160] In the case where the response data sent to each other operating system is stored sequentially according to the order of the system identifiers of multiple other operating systems, the storage location of the response data sent to each other operating system is fixed. In this case, the storage location of the target response data can be determined by traversing the third data structure (for example, after finding the system identifier of the second operating system, the storage location of the target response data is determined based on the relationship between at least one specified parameter and the storage location of the system identifier), or the target response data can be directly written to the storage location corresponding to the system identifier of the second operating system in the third data structure, thereby improving the efficiency of data writing.
[0161] Through this embodiment, the response data is directly stored based on the correspondence between the system identifier and the storage location of the corresponding response data, which can improve the efficiency of data storage.
[0162] In an exemplary embodiment, similar to the aforementioned embodiment, the number of other operating systems in the at least two operating systems can be multiple. In this case, a fourth data structure can be predefined, in which a receive ready flag (receive Ready flag, or receive data Ready flag) corresponding to each other operating system can be set to identify whether there is response data sent to the corresponding operating system, wherein when the receive ready flag is a third value (for example, 1 or 0), it indicates that there is response data sent to the corresponding operating system, and when the receive ready flag is a fourth value (for example, 0 or 1), it indicates that there is no response data sent to the corresponding operating system, and the first operating system sends the response message based on the received response data to the receive ready flag corresponding to the operating system to facilitate informing the operating system that there is response data sent to the operating system.
[0163] For example, the data structure definition of the receive Ready flag of the Core 2 to Core 8 partitions on the BMC side is shown in Table 4.
[0164] Table 4
[0165] Here, the data structures of Table 2 and Table 4 may be the same data structure, that is, the same data structure stores variable information of two variables, Tx_Rdy_Flg and Rx_Rdy_Flg.
[0166] Correspondingly, after the target response data in the target response message is written into the third shared memory through the first operating system, the method further includes:
[0167] S131, using the first operating system, setting a receive ready flag corresponding to the second operating system in a fourth data structure of the fourth shared memory to a third value;
[0168] S132, detecting, by the second operating system, a receive-ready flag corresponding to the second operating system in the fourth data structure;
[0169] S133: When it is detected that the receive ready flag corresponding to the second operating system is a third value, the target response data is read from the third shared memory through the second operating system.
[0170] For the target response data, the first operating system may set the receive ready flag position corresponding to the second operating system in the fourth data structure of the fourth shared memory to a third value. Here, the fourth shared memory and the aforementioned first shared memory, second shared memory and / or third shared memory may be the same shared memory or different shared memories, and the fourth data structure and the second data structure may be the same data structure or different data structures, which is not limited in this embodiment.
[0171] The second operating system can detect the receive-ready flag corresponding to the second operating system in the fourth data structure. The detection method can be polling or other detection methods. If the receive-ready flag corresponding to the second operating system is detected to be the third value, the second operating system determines that there is response data sent to the second operating system. For example, the response data corresponding to the system identifier of the second operating system stored in the third data structure is valid. At this time, the second operating system can read the target response data from the third shared memory. The method for reading the target response data from the third shared memory is similar to that in the aforementioned embodiment and will not be described in detail here.
[0172] For example, the received data Ready flag corresponding to the Core partition can be set to 1, and the Linux system of each Core partition detects the data Ready flag in round-robin mode (the Linux systems of different Core partitions detect the data Ready flag corresponding to themselves respectively). If the flag corresponding to this partition is found to be set to 1, the corresponding response data is read from the shared memory.
[0173] Taking the Ping command as an example, in the second case, after data is written, the Core 1 partition sets the Receive Ready flag corresponding to the Core 2 partition to 1. The Linux system in the Core 2 partition checks its own Receive Ready flag in turn. If it finds it is 1, it reads the data from the corresponding shared memory.
[0174] Through this embodiment, the reception flag in the specific data structure is set to indicate to the corresponding operating system that there is response data sent to the operating system, which can improve the convenience of information transmission.
[0175] In an exemplary embodiment, after the target response data is read from the third shared memory by the second operating system, the method further includes:
[0176] S141: Setting, by the second operating system, a receive-ready flag corresponding to the second operating system in the fourth data structure to a fourth value.
[0177] After reading the target response data from the third shared memory, since the value of the receive ready flag corresponding to the second operating system in the fourth data structure is the third value, in order to avoid information processing errors caused by repeated reading of the same response data, the second operating system can set the receive ready flag corresponding to the second operating system in the fourth data structure to the fourth value after reading the target response data.
[0178] Here, in the fourth data structure, the receive ready flag corresponding to each operating system is set to the third value by the first operating system and to the fourth value by the operating system, which can improve the accuracy and timeliness of setting the receive ready flag and avoid information processing errors.
[0179] For example, after the Linux system of a certain Core partition completes reading data, it clears the above flag (i.e., sets the flag to 0), and finally the Linux system further processes the read data. Taking the Ping command as an example, for the second case, after the data is written, the Core 1 partition sets the Ready flag for receiving data corresponding to the Core 2 partition to 1. The Linux system of the Core 2 partition checks the flag in turn. If it finds that the flag is 1, it reads the data from the corresponding shared memory. After reading the data, it clears the above flag and further compares the FCS sequence in the data with the locally calculated sequence. If they are equal, it indicates that the Ping command has returned successfully. Otherwise, it indicates that an abnormality has occurred.
[0180] Through this embodiment, after the response data is read, the operating system to which the response data is sent modifies the value of the corresponding receive ready flag, which can improve the accuracy and timeliness of setting the receive ready flag and avoid information processing errors.
[0181] In an exemplary embodiment, distributing the target response message to the second operating system by the first operating system includes:
[0182] S151: Send a second inter-core communication request to the second operating system through the first operating system, wherein the second inter-core communication request carries target response data in the target response message.
[0183] In this embodiment, response data can also be transmitted using an existing inter-core communication request or a newly defined inter-core communication request. The newly defined inter-core communication request can be an inter-core communication request based on an existing inter-core communication protocol or an inter-core communication request based on a new inter-core communication protocol. This embodiment does not limit this, as long as the response data can be transmitted through the inter-core communication request.
[0184] For the target response message or the target response data in the target response message, the first operating system may send a second inter-core communication request to the second operating system, where the inter-core communication request carries the target response message or the target response data in the target response message.
[0185] In this embodiment, by using inter-core communication to request transmission of response data, the timeliness of response data delivery can be improved.
[0186] The following describes the method for receiving and distributing command messages based on the system architecture shown in FIG9 , using an optional example. In this optional example, the PECI command is a Ping command. Correspondingly, as shown in FIG9 , the process for receiving and distributing the Ping command may include the following steps:
[0187] Step S901: Each hardware partition on the host side performs PECI address comparison;
[0188] Step S902: Determine whether PECI 1 in hardware partition 1 on the Host side correctly matches the target address on the PECI bus. If so, execute step S903; otherwise, execute step S907.
[0189] Step S903: Hardware partition 1 returns the FCS sequence as response data and sends it to the PECI bus.
[0190] Step S904: The Linux system in the Core 1 partition receives the FCS sequence on the PECI bus through its PECI interface.
[0191] Step S905: Determine the value of the PECI address and find it is 0x30, indicating that the FCS sequence is the response data sent by the hardware partition 1 on the host side to the Core 1 partition on the BMC side.
[0192] Step S906: The Linux system of the Core 1 partition compares the FCS sequence with the locally calculated sequence;
[0193] Step S907: PECI 2 in hardware partition 2 successfully matches the target address on the PECI bus and returns an FCS sequence as response data to the PECI bus.
[0194] Step S908: The Linux system in the Core 1 partition receives the FCS sequence on the bus through the PECI interface.
[0195] In step S909, the Linux system of the Core 1 partition determines the value of the PECI address and finds it is 0x31, indicating that the FCS sequence is the response data sent by the hardware partition 2 on the host side to the Core 2 partition on the BMC side.
[0196] Step S910: The Linux system of the Core 1 partition writes the PECI data into the shared memory.
[0197] Step S911: After data writing is completed, the Core 1 partition sets the data receiving Ready flag corresponding to the Core 2 partition to 1;
[0198] Step S912: The Linux system of the Core 2 partition checks the flag in a round-robin manner and finds that the flag is 1;
[0199] Step S913: Core 2 partition reads data from the corresponding shared memory;
[0200] Step S914: After the data is read, the Core 2 partition clears the data Ready flag.
[0201] Step S915, Core 2 partition aligns the FCS sequence with the locally calculated sequence;
[0202] Step S916: Determine whether the FCS values are consistent. If yes, execute step S917; otherwise, execute step S918. Here, step S916 is executed after step S906 or step S915.
[0203] Step S917: Ping command returns success;
[0204] Step S918: The Ping command returns an exception.
[0205] This optional example provides the PECI command reception and distribution process under the hardware partition system, as well as the design of the receive Ready flag based on shared memory and the definition of the receive data structure, which can realize the function of receiving PECI commands in different Core partitions of the BMC management unit.
[0206] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.
[0207] According to another aspect of the embodiment of the present application, a communication control device based on a hardware partitioning system is also provided. The device can be applied to a server including a baseboard management controller and a host system. The baseboard management controller and the host system communicate via a target communication bus. At least two operating systems are running on the multi-core processor of the baseboard management controller. The host system is divided into multiple hardware partitioning systems. One of the at least two operating systems is used to monitor the operating status of at least one hardware partitioning system in the multiple hardware partitioning systems. The target communication interface of the baseboard management controller is configured to the first operating system in the at least two operating systems. The target communication interface is a communication interface corresponding to the target communication bus. Optionally, the device is used to implement the communication control method based on the hardware partitioning system provided in the above embodiment. What has been explained will not be repeated here. As used below, the term "module" can implement 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 conceived.
[0208] Figure 10 is a structural block diagram of a communication control device based on a hardware partition system according to an embodiment of the present application. As shown in Figure 10, the device includes: an acquisition unit 1002, which is configured to acquire the command data to be sent of the second operating system through the first operating system, wherein the second operating system is any one of at least two operating systems other than the first operating system; a reorganization unit 1004, which is configured to reorganize the command data to be sent through the first operating system to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; a sending unit 1006, which is configured to send the target command message to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system.
[0209] Through the embodiments of the present application, the command data to be sent of the second operating system is obtained through the first operating system, wherein the second operating system is any one of at least two operating systems other than the first operating system; the command data to be sent is reorganized by the first operating system to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; the target command message is sent to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system, thereby solving the problem of poor monitoring effectiveness of multi-partition systems in the related art of monitoring the status of server failure servers through a server management unit, and improving the effectiveness of partition system monitoring.
[0210] In an exemplary embodiment, the acquisition unit includes: an acquisition module, which is configured to obtain the command data to be sent from the first shared memory through the first operating system when it is determined that the second operating system has command data to be sent, wherein the first shared memory is used for command data to be sent by other operating systems in at least two operating systems except the first operating system.
[0211] In an exemplary embodiment, the acquisition module includes: an acquisition sub-unit, which is configured to obtain the command data to be sent from a first data structure of a first shared memory through the first operating system according to the system identifier of the second operating system when it is determined that the second operating system has command data to be sent, wherein the first data structure is used to store the command data to be sent by other operating systems using at least one command parameter according to the system identifier of the other operating system, and the command data to be sent by the other operating system includes parameter information of at least one command parameter corresponding to the other operating system.
[0212] In an exemplary embodiment, there are multiple other operating systems, and the system identifier of each operating system is set continuously. The first data structure is used to store the command data to be sent by each other operating system in sequence according to the system identifiers of the multiple other operating systems, and the storage space occupied by the command data to be sent by each other operating system is pre-specified; correspondingly, the acquisition sub-unit includes: an acquisition sub-module, which is configured to obtain the command data to be sent from the storage location corresponding to the system identifier of the second operating system in the first data structure through the first operating system when it is determined that the second operating system has command data to be sent.
[0213] In an exemplary embodiment, at least one command parameter includes at least one of the following: write length, read length, command code, write parameter; in the first data structure, a system identifier corresponding to another operating system and at least one command parameter are stored consecutively in sequence; or, in the first data structure, the system identifiers of multiple other operating systems are stored consecutively in sequence, and each command parameter of multiple other operating systems is stored consecutively in sequence.
[0214] In an exemplary embodiment, the acquiring unit includes: a first receiving unit configured to receive a first inter-core communication request sent by the second operating system through the first operating system, wherein the first inter-core communication request carries command data to be sent.
[0215] In an exemplary embodiment, among at least two operating systems, the number of other operating systems other than the first operating system is multiple; the above-mentioned device also includes: a first detection unit, which is configured to detect the send ready flag corresponding to each other operating system in the second data structure of the second shared memory in sequence through the first operating system before obtaining the command data to be sent of the second operating system through the first operating system, wherein the send ready flag is used to identify whether the corresponding operating system has command data to be sent; a first determination unit, which is configured to determine whether the second operating system has command data to be sent when detecting that the send ready flag corresponding to the second operating system is a first value, wherein the first value is used to indicate that the corresponding operating system has command data to be sent.
[0216] In an exemplary embodiment, the above-mentioned device also includes: a first execution unit, which is configured to set the send ready flag corresponding to the second operating system to a second value through the first operating system after obtaining the command data to be sent of the second operating system through the first operating system, wherein the second value is used to indicate that there is no command data to be sent for the corresponding operating system.
[0217] In an exemplary embodiment, the reassembly unit includes: a determination module, configured to determine the command type corresponding to the command data to be sent, and obtain a target command type, wherein the target command type is a command type of a preset command used to send the command data to be sent; and a reassembly module, configured to reassemble the command data to be sent according to the command format corresponding to the target command type, and obtain a target command message corresponding to the command data to be sent.
[0218] In an exemplary embodiment, among at least two operating systems, there are multiple operating systems other than the first operating system, and the difference between the communication address of the hardware partition system corresponding to each other operating system and the communication address of the hardware partition system corresponding to the first operating system has a specified corresponding relationship with the difference between the system identifier of each other operating system and the system identifier of the first operating system; the above-mentioned device also includes: a second determination unit, which is configured to determine the communication address of the target hardware partition system corresponding to the second operating system through the first operating system based on the specified corresponding relationship, the difference between the system identifier of the first operating system and the system identifier of the second operating system, and the communication address of the hardware partition system corresponding to the first operating system before reorganizing the command data to be sent through the first operating system.
[0219] In an exemplary embodiment, the above-mentioned device also includes: a second receiving unit, which is configured to receive a target response message on the target communication bus through the first operating system after sending the target command message to the target communication bus through the target communication interface of the first operating system, wherein the target response message is response data returned by the target hardware partition system in response to the target command message, and the target response message carries the communication address of the target hardware partition system; a second execution unit, which is configured to determine through the first operating system that the target response message is a response message sent to the second operating system based on the communication address of the target hardware partition system, and distribute the target response message to the second operating system through the first operating system.
[0220] In an exemplary embodiment, the second execution unit includes: an execution module, which is configured to write the target response data in the target response message into a third shared memory through the first operating system, so that the second operating system can read the target response data from the third shared memory, wherein the third shared memory is used to store response data sent to other operating systems among at least two operating systems except the first operating system.
[0221] In an exemplary embodiment, the execution module includes: a writing sub-unit, which is configured to write the target response data into a third data structure of a third shared memory through a first operating system according to a system identifier of a second operating system, wherein the third data structure is used to store response data sent to other operating systems using at least one specified parameter according to the system identifier of the other operating system, and the response data sent to other operating systems includes parameter information of at least one specified parameter corresponding to the other operating systems.
[0222] In an exemplary embodiment, there are multiple other operating systems, and the system identifiers of at least two operating systems are set continuously. The third data structure is used to store the response data sent to the multiple other operating systems in sequence according to the order of the system identifiers of the multiple other operating systems; the writing sub-unit includes: a writing sub-module, which is configured to write the target response data into the third data structure through the first operating system, in the storage location corresponding to the system identifier of the second operating system.
[0223] In an exemplary embodiment, at least one specified parameter includes at least one of the following: a check sequence generated by the hardware partition system that sends the response data, valid data in the response data, and a check sequence received by the hardware partition system that sends the response data; in a third data structure, parameter information of at least one specified parameter corresponding to the same other operating system is stored continuously in sequence; or, in the third data structure, parameter information of the same specified parameter in at least one specified parameter corresponding to multiple other operating systems is stored continuously in sequence.
[0224] In an exemplary embodiment, among at least two operating systems, the number of other operating systems is multiple; the above-mentioned device also includes: a third execution unit, which is configured to, after writing the target response data in the target response message into the third shared memory through the first operating system, set the receive ready flag corresponding to the second operating system in the fourth data structure of the fourth shared memory to a third value through the first operating system, wherein the receive ready flag is used to identify whether there is response data sent to the corresponding operating system, and the third value is used to indicate the existence of response data sent to the corresponding operating system; a second detection unit, which is configured to detect the receive ready flag corresponding to the second operating system in the fourth data structure through the second operating system; and a reading unit, which is configured to read the target response data from the third shared memory through the second operating system when detecting that the receive ready flag corresponding to the second operating system is the third value.
[0225] In an exemplary embodiment, the above-mentioned device also includes: a fourth execution unit, which is configured to, after reading the target response data from the third shared memory through the second operating system, set the receive ready flag corresponding to the second operating system in the fourth data structure to a fourth value through the second operating system, wherein the fourth value is used to indicate that there is no response data sent to the corresponding operation and distribute the target response message to the second operating system through the first operating system.
[0226] In an exemplary embodiment, the second execution unit includes: a sending module configured to send a second inter-core communication request to the second operating system through the first operating system, wherein the second inter-core communication request carries target response data in the target response message.
[0227] In an exemplary embodiment, the target communication bus is a PECI bus, and the target communication interface is a PECI interface; the communication between one of at least two operating systems and a hardware partition system corresponding to one operating system is initiated by one operating system as a host device to the hardware partition system corresponding to one operating system as a client device, and the PECI interface of the baseboard management controller is allocated to the first operating system by allowing only the first operating system to access the PECI interface controller of the baseboard management controller.
[0228] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0229] According to another aspect of the embodiment of the present application, a server is also provided, which can be used to execute the communication control method based on the hardware partition system in the aforementioned embodiment, which has been explained and will not be repeated here.
[0230] In this embodiment, the server includes: a host system, a baseboard management controller, and a target communication bus between the host system and the baseboard management controller. At least two operating systems run on a multi-core processor of the baseboard management controller. The host system is divided into multiple hardware partition systems. One of the at least two operating systems is used to monitor the operating status of at least one hardware partition system in the multiple hardware partition systems. The target communication interface of the baseboard management controller is configured for the first operating system of the at least two operating systems. The target communication interface is a communication interface corresponding to the target communication bus.
[0231] The first operating system is configured to obtain command data to be sent from a second operating system, wherein the second operating system is any one of the at least two operating systems other than the first operating system; reorganize the command data to be sent to obtain a target command message corresponding to the command data to be sent, wherein a target address in the target command message is a communication address of a target hardware partition system corresponding to the second operating system; and send the target command message to a target communication bus via a target communication interface of the first operating system;
[0232] The target hardware partition system is configured to receive a target command message on a target communication bus through a target communication interface of the target hardware partition system.
[0233] In some exemplary embodiments, at least two operating systems and multiple hardware partition systems may cooperate to perform the steps of any of the above method embodiments.
[0234] According to another aspect of the embodiments of the present application, a baseboard management controller is also provided. The baseboard management controller can be used to execute the communication control method based on the hardware partition system in the aforementioned embodiment, which has been explained and will not be repeated here.
[0235] In this embodiment, at least two operating systems are run on the multi-core processor of the baseboard management controller, one of the at least two operating systems is used to monitor the operating status of at least one hardware partition system among the multiple hardware partition systems into which the host system is divided, the baseboard management controller communicates with the host system via a target communication bus, a target communication interface of the baseboard management controller is configured for a first operating system of the at least two operating systems, the target communication interface is a communication interface corresponding to the target communication bus, and the at least two operating systems also include a second operating system, wherein,
[0236] A first operating system is configured to obtain command data to be sent from a second operating system, wherein the second operating system is any one of at least two operating systems other than the first operating system; reorganize the command data to be sent to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is the communication address of the target hardware partition system corresponding to the second operating system; and send the target command message to a target communication bus through a target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system.
[0237] In some exemplary embodiments, at least two operating systems may cooperate to execute the steps of any of the above method embodiments.
[0238] According to another aspect of the embodiments of the present application, a non-volatile readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0239] In an exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a ROM (Read-Only Memory), a RAM (Random Access Memory), a mobile hard disk, a magnetic disk, or an optical disk.
[0240] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
[0241] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0242] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.
[0243] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present application can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented using program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0244] The above are merely optional embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application may be modified and varied in various ways. Any modifications, equivalent replacements, improvements, etc. made within the principles of the embodiments of the present application shall be included in the scope of protection of the embodiments of the present application.
Claims
1. A communication control method based on a hardware partition system, characterized in that: The method is applied to a server including a baseboard management controller and a host system, wherein the baseboard management controller communicates with the host system via a target communication bus, at least two operating systems are run on a multi-core processor of the baseboard management controller, the host system is divided into a plurality of hardware partition systems, one of the at least two operating systems is used to monitor the running status of at least one hardware partition system among the plurality of hardware partition systems, a target communication interface of the baseboard management controller is configured for a first operating system among the at least two operating systems, and the target communication interface is a communication interface corresponding to the target communication bus; the method comprises: Acquiring, by means of the first operating system, command data to be sent by a second operating system, wherein the second operating system is any one of the at least two operating systems except the first operating system; Reorganizing the command data to be sent through the first operating system to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is a communication address of a target hardware partition system corresponding to the second operating system; The target command message is sent to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system.
2. The method according to claim 1, characterized in that: The acquiring, through the first operating system, the command data to be sent by the second operating system includes: When it is determined that the second operating system has command data to be sent, the command data to be sent is obtained from a first shared memory through the first operating system, wherein the first shared memory is used to store command data to be sent by other operating systems among the at least two operating systems except the first operating system.
3. The method according to claim 2, characterized in that The method of obtaining the command data to be sent from the first shared memory by the first operating system when it is determined that the second operating system has command data to be sent includes: When it is determined that the second operating system has command data to be sent, the first operating system obtains the command data to be sent from a first data structure of the first shared memory according to the system identifier of the second operating system, wherein the first data structure is used to store the command data to be sent by the other operating system using at least one command parameter according to the system identifier of the other operating system, and the command data to be sent by the other operating system includes parameter information of the at least one command parameter corresponding to the other operating system.
4. The method according to claim 3, characterized in that: There are multiple other operating systems, the system identifiers of the at least two operating systems are set continuously, and the first data structure is used to sequentially store the command data to be sent by the multiple other operating systems in the order of the system identifiers of the multiple other operating systems; The method of, when it is determined that the second operating system has command data to be sent, obtaining the command data to be sent from the first data structure of the first shared memory according to the system identifier of the second operating system by the first operating system, includes: When it is determined that the second operating system has command data to be sent, the first operating system obtains the command data to be sent from a storage location corresponding to the system identifier of the second operating system in the first data structure.
5. The method according to claim 4, characterized in that The at least one command parameter includes at least one of the following: write length, read length, command code, write parameter; in the first data structure, parameter information of the at least one command parameter corresponding to the same other operating system is stored in sequence and continuously; or, in the first data structure, parameter information of the same command parameter among the at least one command parameter corresponding to multiple other operating systems is stored in sequence and continuously.
6. The method according to claim 1, characterized in that The acquiring, through the first operating system, the command data to be sent by the second operating system includes: A first inter-core communication request sent by the second operating system is received through the first operating system, wherein the first inter-core communication request carries the command data to be sent.
7. The method according to claim 1, characterized in that Among the at least two operating systems, there are multiple operating systems other than the first operating system; before obtaining the command data to be sent of the second operating system through the first operating system, the method further includes: sequentially detecting, by the first operating system, a send-ready flag corresponding to each of the other operating systems in a second data structure of the second shared memory, wherein the send-ready flag is used to identify whether the corresponding operating system has command data to be sent; When it is detected that the send-ready flag corresponding to the second operating system is a first value, it is determined that the second operating system has command data to be sent, wherein the first value is used to indicate that the corresponding operating system has command data to be sent.
8. The method according to claim 7, characterized in that After acquiring the to-be-sent command data of the second operating system through the first operating system, the method further includes: The send-ready flag corresponding to the second operating system is set to a second value through the first operating system, wherein the second value is used to indicate that there is no command data to be sent by the corresponding operating system.
9. The method according to claim 1, characterized in that: The step of reorganizing the command data to be sent by the first operating system to obtain a target command message corresponding to the command data to be sent includes: Determine a command type corresponding to the command data to be sent, and obtain a target command type, wherein the target command type is a command type of a preset command used to send the command data to be sent; The command data to be sent are reorganized according to a command format corresponding to the target command type to obtain the target command message corresponding to the command data to be sent.
10. The method according to claim 1, characterized in that Among the at least two operating systems, there are multiple operating systems other than the first operating system, and a difference between a communication address of a hardware partition system corresponding to each of the other operating systems and a communication address of a hardware partition system corresponding to the first operating system has a specified corresponding relationship with a difference between a system identifier of each of the other operating systems and a system identifier of the first operating system; Before reorganizing the command data to be sent by the first operating system, the method further includes: The first operating system determines the communication address of the target hardware partition system corresponding to the second operating system according to the specified corresponding relationship, the difference between the system identifier of the first operating system and the system identifier of the second operating system, and the communication address of the hardware partition system corresponding to the first operating system.
11. The method according to claim 1, characterized in that After sending the target command message to the target communication bus through the target communication interface of the first operating system, the method further includes: Receiving, through the first operating system, a target response message on the target communication bus, wherein the target response message is response data returned by the target hardware partition system in response to the target command message, and the target response message carries a communication address of the target hardware partition system; The first operating system determines, according to the communication address of the target hardware partition system, that the target response message is a response message sent to the second operating system, and distributes the target response message to the second operating system through the first operating system.
12. The method according to claim 11, characterized in that The distributing the target response message to the second operating system through the first operating system includes: The target response data in the target response message is written into a third shared memory by the first operating system, so that the target response data can be read from the third shared memory by the second operating system, wherein the third shared memory is used to store response data sent to other operating systems among the at least two operating systems except the first operating system.
13. The method according to claim 12, characterized in that The step of writing the target response data in the target response message into the third shared memory through the first operating system includes: The target response data is written into a third data structure of a third shared memory through the first operating system according to the system identifier of the second operating system, wherein the third data structure is used to store the response data sent to the other operating system using at least one specified parameter according to the system identifier of the other operating system, and the response data sent to the other operating system includes parameter information of the at least one specified parameter corresponding to the other operating system.
14. The method according to claim 13, characterized in that The number of the other operating systems is multiple, the system identifiers of the at least two operating systems are set continuously, and the third data structure is used to sequentially store the response data sent to the multiple other operating systems according to the order of the system identifiers of the multiple other operating systems; The step of writing the target response data into a third data structure of a third shared memory according to the system identifier of the second operating system by the first operating system includes: The target response data is written into the third data structure, via the first operating system, in a storage location corresponding to the system identifier of the second operating system.
15. The method according to claim 14, characterized in that The at least one specified parameter includes at least one of the following: a check sequence generated by the hardware partition system that sends the response data, valid data in the response data, and a check sequence received by the hardware partition system that sends the response data; in the third data structure, parameter information of the at least one specified parameter corresponding to the same other operating system is stored in sequence and continuously; or, in the third data structure, parameter information of the same specified parameter among the at least one specified parameter corresponding to multiple other operating systems is stored in sequence and continuously.
16. The method according to claim 12, characterized in that Among the at least two operating systems, the number of the other operating systems is multiple; after writing the target response data in the target response message into the third shared memory through the first operating system, the method further includes: By means of the first operating system, a receive-ready flag position corresponding to the second operating system in a fourth data structure of the fourth shared memory is set to a third value, wherein the receive-ready flag position is used to identify whether there is response data sent to the corresponding operating system, and the third value is used to indicate whether there is response data sent to the corresponding operating system; Detecting, by the second operating system, the receive-ready flag corresponding to the second operating system in the fourth data structure; When it is detected that the receive-ready flag corresponding to the second operating system is the third value, the target response data is read from the third shared memory through the second operating system.
17. The method according to claim 16, characterized in that After the target response data is read from the third shared memory by the second operating system, the method further includes: The receive-ready flag position corresponding to the second operating system in the fourth data structure is set to a fourth value through the second operating system, wherein the fourth value is used to indicate that there is no response data sent to the corresponding operating system.
18. The method according to claim 11, characterized in that The distributing the target response message to the second operating system through the first operating system includes: A second inter-core communication request is sent to the second operating system through the first operating system, wherein the second inter-core communication request carries the target response data in the target response message.
19. The method according to any one of claims 1 to 18, characterized in that The target communication bus is a platform environment control interface PECI bus, and the target communication interface is a PECI interface; the communication between one of the at least two operating systems and the hardware partition system corresponding to the one operating system is initiated by the one operating system as a host Host device to the hardware partition system corresponding to the one operating system as a client Client device, and the PECI interface of the baseboard management controller is allocated to the first operating system by allowing only the first operating system to access the PECI interface controller of the baseboard management controller.
20. A communication control device based on a hardware partitioning system, characterized in that: The invention is applied to a server including a baseboard management controller and a host system, wherein the baseboard management controller communicates with the host system via a target communication bus, at least two operating systems are run on a multi-core processor of the baseboard management controller, the host system is divided into a plurality of hardware partition systems, one of the at least two operating systems is used to monitor the running status of at least one hardware partition system among the plurality of hardware partition systems, a target communication interface of the baseboard management controller is configured to a first operating system among the at least two operating systems, and the target communication interface is a communication interface corresponding to the target communication bus, and the device comprises: an acquiring unit, configured to acquire, through the first operating system, command data to be sent of a second operating system, wherein the second operating system is any one of the at least two operating systems except the first operating system; a reorganization unit, configured to reorganize the command data to be sent through the first operating system to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is a communication address of a target hardware partition system corresponding to the second operating system; The sending unit is configured to send the target command message to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system.
21. A server, characterized in that: include: A host system, a baseboard management controller, and a target communication bus between the host system and the baseboard management controller, at least two operating systems are running on a multi-core processor of the baseboard management controller, the host system is divided into multiple hardware partition systems, one of the at least two operating systems is used to monitor the running status of at least one hardware partition system in the multiple hardware partition systems, the target communication interface of the baseboard management controller is configured to the first operating system in the at least two operating systems, and the target communication interface is a communication interface corresponding to the target communication bus, wherein, The first operating system is configured to obtain command data to be sent of a second operating system, wherein the second operating system is any one of the at least two operating systems except the first operating system; reorganize the command data to be sent to obtain a target command message corresponding to the command data to be sent, wherein a target address in the target command message is a communication address of a target hardware partition system corresponding to the second operating system; and send the target command message to the target communication bus through the target communication interface of the first operating system; The target hardware partition system is configured to receive the target command message on the target communication bus through the target communication interface of the target hardware partition system.
22. A baseboard management controller, characterized in that: At least two operating systems are running on the multi-core processor of the baseboard management controller, one of the at least two operating systems is used to monitor the running status of at least one hardware partition system among the multiple hardware partition systems divided by the host system, the baseboard management controller communicates with the host system through a target communication bus, the target communication interface of the baseboard management controller is configured to the first operating system of the at least two operating systems, the target communication interface is a communication interface corresponding to the target communication bus, and the at least two operating systems also include a second operating system, wherein, The first operating system is configured to obtain command data to be sent of a second operating system, wherein the second operating system is any one of the at least two operating systems except the first operating system; reorganize the command data to be sent to obtain a target command message corresponding to the command data to be sent, wherein the target address in the target command message is a communication address of a target hardware partition system corresponding to the second operating system; and send the target command message to the target communication bus through the target communication interface of the first operating system, so that the target hardware partition system receives the target command message on the target communication bus through the target communication interface of the target hardware partition system.
23. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program implements the steps of any one of the methods of claims 1 to 19 when executed by a processor.
24. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 19 are implemented.
Citation Information
Patent Citations
System operation method of baseboard management controller and baseboard management controller
CN116627520A
Method and device for monitoring hardware partition of server host system
CN116719700A
Interface communication method and device and server
CN116795752A
Server management method, equipment and device, storage medium and electronic equipment
CN117032812A
Communication control method and device based on hardware partition system and server
CN117056275A
Cited By
Host partition management method and framework
CN120407495A