Device information acquisition method and device, electronic equipment and medium
By obtaining the target protocol information between the target device and the platform path controller, and using the preset channel of the preset protocol to generate information and obtain data packets, the problem of inaccurate acquisition of electronic device information in the prior art is solved, and the need for customized BMC is required, and convenient and accurate device information acquisition is achieved.
Patent Information
- Application Number
- CN202311273450.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is not accurate enough when acquiring electronic device information, and requires customization of the baseboard management controller (BMC) to obtain device information, and may not obtain authorization for the protocol used for processor communication.
By obtaining the target protocol information between the target device and the platform path controller, the data packet is generated based on the data packet format corresponding to the preset channel of the preset protocol, and accessing it to the target device through the platform path controller, thereby obtaining the target information.
It realizes the convenient and accurate acquisition of device information without the need for customized hardware or software, reduces the cost of information acquisition, and accurately obtains the real information of the device.
Smart Images

Figure CN119728660A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, electronic device and medium for acquiring device information. Background Art
[0002] At present, with the development of science and technology, the functional forms of various electronic devices are becoming increasingly rich, and the requirements for performance are also increasing. While the requirements for the performance of electronic devices are increasing, the requirements for volume have not been relaxed, but the volume of electronic devices continues to be optimized. Under the above requirements, it is necessary to obtain the information of electronic devices to monitor and adjust the indicators of electronic devices to ensure performance. For example, for the processor, the heat dissipation system needs to quickly obtain the temperature of the processor in order to specify a suitable heat dissipation solution to dissipate the heat of the processor and ensure the performance of the processor.
[0003] The current information acquisition solution is to detect the environmental information around the device to reflect the device information, but it is not accurate enough. Another solution is to obtain device information through a specific controller, such as obtaining processor temperature information through BMC (Baseboard Management Controller), but the BMC needs to be customized to obtain the temperature, and the BMC may not have obtained the authorization of the protocol used for processor communication and cannot use the specified protocol to communicate. There is also a solution for the platform path controller to transmit information to the BMC, but the BMC still needs to be customized to obtain the temperature. Summary of the invention
[0004] The embodiments of the present application provide a device information acquisition method, apparatus, electronic device and medium, so as to conveniently and accurately acquire device information without customized hardware or software.
[0005] According to one aspect of the present application, a method for acquiring device information is provided, the method comprising:
[0006] Acquire target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol used by the target device to communicate with the platform path controller;
[0007] Based on the data packet format corresponding to the preset channel of the preset protocol, generate an information acquisition data packet for the target device according to the target protocol information, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol;
[0008] The preset channel of the preset protocol is a protocol channel capable of transparently transmitting commands of the target protocol;
[0009] The target device is accessed by the platform path controller according to the information acquisition data packet, and target information is acquired from the target device.
[0010] According to one aspect of the present application, a device for acquiring device information is provided, the device comprising:
[0011] A target protocol information acquisition module, used to acquire target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol used by the target device to communicate with the platform path controller;
[0012] An information acquisition data packet generation module, configured to generate an information acquisition data packet for a target device according to the target protocol information based on a data packet format corresponding to a preset channel of a preset protocol, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol;
[0013] The preset channel of the preset protocol is a protocol channel capable of transparently transmitting commands of the target protocol;
[0014] The forwarding module is used to access the target device according to the information acquisition data packet through the platform path controller, and obtain target information from the target device.
[0015] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the device information acquisition method of any embodiment of the present application.
[0019] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device information acquisition method of any embodiment of the present application when executed.
[0020] The technical solution of the embodiment of the present application is to obtain the target protocol information of the target protocol between the target device and the platform path controller; wherein the target protocol is the protocol used by the target device to communicate with the platform path controller; based on the data packet format corresponding to the preset channel of the preset protocol, an information acquisition data packet for the target device is generated according to the target protocol information, and the information acquisition data packet is sent to the platform path controller based on the preset channel of the preset protocol; wherein the preset channel of the preset protocol is a protocol channel that can transparently transmit the commands of the target protocol; the platform path controller accesses the target device according to the information acquisition data packet, and obtains the target information from the target device. The above scheme can transparently transmit the commands of the target protocol to the target device through the preset channel of the preset protocol, thereby eliminating the need for customized hardware or software to support specific interfaces or specific functions, and more conveniently obtains the target information of the target device, reduces the cost of information acquisition, and can accurately obtain the real information of the target device.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a device information acquisition method provided according to Embodiment 1 of the present application;
[0024] Figure 2 This is a schematic diagram of the information acquisition structure provided according to the first embodiment of the present application;
[0025] Figure 3 is a flow chart of a device information acquisition method provided according to Embodiment 2 of the present application;
[0026] Figure 4 This is a schematic diagram of obtaining a data packet format according to the information provided in Example 2 of the present application;
[0027] Figure 5 is a flow chart of a device information acquisition method provided according to Embodiment 3 of the present application;
[0028] Figure 6 A first structural diagram is obtained according to the information provided in the third embodiment of the present application;
[0029] Figure 7 A second structural diagram is obtained according to the information provided in the third embodiment of the present application;
[0030] Figure 8 It is a schematic diagram of describing the status of the status register provided according to the third embodiment of the present application;
[0031] Fig. 9 This is a schematic diagram of the format of the information return data packet provided in Example 3 of the present application;
[0032] Fig.10 is a structural schematic diagram of a device information acquisition apparatus provided according to Embodiment 4 of the present application;
[0033] Fig.11 It is a structural schematic diagram of an electronic device provided according to Embodiment 5 of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", "third", "fourth", "actual", "preset", etc. in the specification and claims 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. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] Figure 1This is a flowchart of a device information acquisition method provided in the first embodiment of the present application. The present embodiment of the present application can be applied to the case of acquiring information of a target device. Typically, it can be applied to the case of acquiring information such as the temperature and power of a processor. The method can be executed by a device information acquisition device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0038] S110, obtaining target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol adopted by the target device to communicate with the platform path controller.
[0039] Among them, the target device can be a device that can generate target information and the target information can be acquired. The target device can be a processor, and the target information can be information such as temperature and frequency. The platform path controller is a device that can connect interfaces with different data transmission rates for communication. The interface rates of the target device and the information acquisition device may be different, and they cannot be directly connected for communication. The platform path controller can be used as an intermediate device to connect target devices and information acquisition devices with different interface rates for communication. The target protocol is the protocol used for communication between the target device and the platform path controller. For example, when the target device is a processor, the target protocol is the PECI (Platform Environment Control Interface) protocol. The target protocol information may include information such as the type of the target protocol, data format, message interpretation, and event occurrence order.
[0040] Exemplarily, the target protocol information of the target protocol between the target device and the platform path controller can be obtained, so as to access the target device through the target protocol command to obtain the target information. The platform path controller can send a target protocol information acquisition request to the target device to obtain the target protocol information of the target protocol, and the platform path controller sends the target protocol request to the information acquisition device. The target protocol information can also be input by the user to the information acquisition device.
[0041] In the embodiment of the present application, the process of obtaining the target protocol information can be performed once when the target device and the platform path controller are initialized, and the acquisition process is no longer performed in the subsequent process, and only the target protocol information is applied, that is, only S120-S130 is performed. S110 can also be performed to obtain the target protocol information at a preset frequency. S110 can also be performed to obtain the target protocol information when the target information needs to be obtained.
[0042] S120, based on the data packet format corresponding to the preset channel of the preset protocol, generate an information acquisition data packet for the target device according to the target protocol information, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol. The preset channel of the preset protocol is a protocol channel that can transparently transmit commands of the target protocol.
[0043] The preset protocol may be a communication protocol supported by both the platform path controller and the information acquisition device, and the preset channel of the preset protocol may be a protocol channel capable of transparently transmitting commands of the target protocol. For example, the preset protocol may be an ESPI (Enhanced Serial Peripheral Interface) protocol, and the preset channel may be an OOB (Out Of Band) channel.
[0044] For example, the information acquisition structure diagram is as follows: Figure 2 As shown, the information acquisition device and the platform path controller are transmitted through a preset protocol, and a data packet for communicating with the platform path controller can be generated based on the preset protocol. The information acquisition device needs to obtain data from the target device, so there is also a command for accessing the target device based on the target protocol. The information acquisition device cannot communicate directly with the target device, so the information acquisition device generates an information acquisition data packet carrying a command of the target protocol based on the preset protocol, and sends the information acquisition data packet to the platform path controller so that the platform path controller sends the command for accessing the target device based on the target protocol to the target device. Specifically, a command of the target protocol for the target device can be generated based on the target protocol information, and the data packet format corresponding to the preset channel of the preset protocol can be used to package the data including the command of the target protocol to generate an information acquisition data packet for the target device. The information acquisition data packet is sent to the platform path controller based on the preset channel of the preset protocol.
[0045] S130 , accessing the target device according to the information acquisition data packet through the platform path controller, and acquiring target information from the target device.
[0046] Exemplarily, the information acquisition data packet is an access data packet for the target device generated according to the target protocol. The target device is accessed according to the information acquisition data packet by the platform path controller to obtain the target information in the target device, and the target information is returned to the information acquisition device, thereby achieving the acquisition of the target information of the target device. According to the above scheme, the target information of the target device is obtained. Since the preset channel of the preset protocol can transparently transmit the commands of the target protocol, the target device can be accessed by carrying the commands of the target protocol through the platform path controller, without the need for the information acquisition device to customize the functions and interfaces related to information acquisition, etc., which reduces the cost of information acquisition and can obtain the real target information from the target device itself.
[0047] Specifically, after receiving the information acquisition data packet, the platform path controller parses the information acquisition data packet, obtains the target protocol command therein, and forwards the target protocol command to the target device, so that the target device responds to the target protocol command and returns the target information. The platform path controller receives the target information returned by the target device and sends the target information to the information acquisition device. In the process of returning the target information, the target device and the platform path controller still communicate based on the target protocol, and the platform path controller and the information acquisition device still communicate based on the preset channel of the preset protocol, that is, the target device packages the target information based on the target protocol and sends it to the platform path controller. The platform path then packages the target information based on the data packet format corresponding to the preset channel of the preset protocol and sends it to the information acquisition device.
[0048] The technical solution of the embodiment of the present application is to obtain the target protocol information of the target protocol between the target device and the platform path controller; wherein the target protocol is the protocol used by the target device to communicate with the platform path controller; based on the data packet format corresponding to the preset channel of the preset protocol, an information acquisition data packet for the target device is generated according to the target protocol information, and the information acquisition data packet is sent to the platform path controller based on the preset channel of the preset protocol; wherein the preset channel of the preset protocol is a protocol channel that can transparently transmit the commands of the target protocol; the platform path controller accesses the target device according to the information acquisition data packet, and obtains the target information from the target device. The above scheme can transparently transmit the commands of the target protocol to the target device through the preset channel of the preset protocol, thereby eliminating the need for customized hardware or software to support specific interfaces or specific functions, and more conveniently obtains the target information of the target device, reduces the cost of information acquisition, and can accurately obtain the real information of the target device.
[0049] Embodiment 2
[0050] Figure 3This is a flow chart of a device information acquisition method provided in the second embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 3 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0051] S210, obtaining target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol adopted by the target device to communicate with the platform path controller.
[0052] S220: Determine a command code of a target protocol, an access address of a target device, and an access command of the target information according to the target protocol information.
[0053] Exemplarily, the command code is an identifier representing the target protocol, the access address is a logical address for accessing the target device, and the access command is an access command for the target information. Different types of target information have different access commands. For example, when the types of target information are temperature and power, the corresponding access commands are different.
[0054] In an embodiment of the present application, the command code of the target protocol, the access address of the target device, and the access command of the target information can be determined based on the target protocol information. The information acquisition device predetermines the information required to access the target device so that the platform path controller can quickly access the target information based on the information required to access the target device.
[0055] For example, in the case where the target protocol is the PECI protocol, it can be determined according to the preset protocol that the command code representing the target protocol is 01h, and the access address of the target device is an address starting from 30h. If there is only one target device, the access address of the target device is 30h. If there are three target devices, the access address of the first target device is 30h, the access address of the second target device is 31h, and the access address of the third target device is 32h, and so on. According to the provisions of the preset protocol, if the target information to be obtained is temperature, the corresponding access command is 1h, and if the target information to be obtained is power, the corresponding access command is a1h.
[0056] S230 , based on the data packet format of the preset channel of the preset protocol, the data including the command code of the target protocol, the access address of the target device and the access command of the target information are packaged to generate an information acquisition data packet for the target device.
[0057] Exemplarily, the information acquisition device communicates with the platform path controller through a preset channel of a preset protocol, so a data packet is generated based on the data packet format of the preset channel of the preset protocol. Specifically, based on the data packet format of the preset channel of the preset protocol, data containing the command code of the target protocol, the access address of the target device, and the access command of the target information are packaged to transparently transmit the command code of the target protocol, the access address of the target device, and the access command of the target information. In addition, the information acquisition data packet also needs to include basic information such as the data packet type, the target receiving address (the receiving address of the platform path controller), and the source sending address (the sending address of the information acquisition device).
[0058] For example, when the target protocol is PECI protocol and the preset protocol is ESPI protocol, the format of the information acquisition data packet is as follows: Figure 4 As shown, eSPI Cycle Type: OOB Message = 21h indicates that the channel used by the ESPI protocol is the OOB channel, and the type of the information acquisition data packet is an OOB data packet. Dest Slave ADDR[7:1] = 10h (PCH) indicates that the target receiving address is 10h, that is, the platform path controller. Command Code = 01h (PECI Command) indicates that the command code is 01h, which is a PECI command. Source Slave ADDR[7:1] = 07h (Espi Slave0) indicates that the source sending address is 07h, that is, the information acquisition device. PECI Target Address = 30h (CPU0) indicates that the target device address to be accessed is 30h, that is, the first processor. Command = 1h (GetTemp Commend) indicates that the access command is 1h, and the target information to be accessed is temperature.
[0059] S240: Send the information acquisition data packet to the platform path controller based on a preset channel of a preset protocol.
[0060] S250: Parse the information acquisition data packet through the platform path controller to obtain a command code of a target protocol, an access address of a target device, and an access command of target information.
[0061] Exemplarily, after receiving the information acquisition data packet, the platform path controller parses the information acquisition data packet to obtain information about accessing the target device, including the command code of the target protocol, the access address of the target device, and the access command of the target information.
[0062] S260: Determine a target protocol according to the command code, send an access command for target information to an access address of a target device based on the target protocol, and obtain target information from the target device.
[0063] Exemplarily, the target protocol adopted for communication is determined according to the command code, and a target information access command is sent to the access address of the target device based on the target protocol, thereby forwarding the target information access command through the platform path controller, accessing the target device, and obtaining the target information in the target device.
[0064] In an embodiment of the present application, obtaining target information from the target device includes:
[0065] The target information returned by the target device is received by the platform path controller, and based on the data packet format of the preset channel of the preset protocol, the command code of the target protocol and the data of the target information are packaged to generate an information return data packet;
[0066] An information return data packet sent by the platform path controller is received, and the information return data packet is parsed to obtain target information.
[0067] Exemplarily, the target device packages the target information based on the target protocol and sends it to the platform path controller. The platform path controller receives the target information returned by the target device, and packages the data containing the command code of the target protocol and the target information based on the data packet format of the preset channel of the preset protocol to generate an information return data packet. In addition to the command code of the target protocol and the target information, the information return data packet also includes basic information such as the data packet type, the target receiving address (the sending address of the information acquisition device), and the source sending address (the receiving address of the platform path controller). Send an information return data packet to the information acquisition device. The information acquisition device receives the information return data packet sent by the platform path controller, and parses the information return data packet to obtain the target information.
[0068] The embodiment of the present application provides a device information acquisition method, which determines the command code of the target protocol, the access address of the target device, and the access command of the target information according to the target protocol information. Based on the data packet format of the preset channel of the preset protocol, the data containing the command code of the target protocol, the access address of the target device, and the access command of the target information are packaged to generate an information acquisition data packet for the target device, so that the commands of the target protocol required to access the target device are packaged and transparently transmitted through the preset protocol, thereby realizing access between different interfaces. The information acquisition data packet is parsed by the platform path controller to obtain the command code of the target protocol, the access address of the target device, and the access command of the target information. The target protocol is determined according to the command code, and the access command of the target information is sent to the access address of the target device based on the target protocol, and the target information is obtained from the target device, so that the access information of the target device is forwarded through the platform path controller, and access between different interface devices is realized without customizing the information acquisition device.
[0069] Embodiment 3
[0070] Figure 5 This is a flow chart of a device information acquisition method provided in the third embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 5 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0071] S310: Receive an enable status query instruction for the status register of the preset channel sent by the platform path controller, and return an enable status to the platform path controller in response to the enable status query instruction.
[0072] Exemplarily, after the target device, the platform path controller, and the information acquisition device are powered on and initialized, the platform path controller sends an enable state query instruction to the status register of the preset channel in the information acquisition device, and the information acquisition device returns the enable state to the platform path controller in response to the enable state query instruction. If the enable state returned by the information acquisition device to the platform path controller is a disabled state, when the platform path controller receives that the enable state is a disabled state, the platform path controller generates an enable state setting instruction and sends the enable state setting instruction to the information acquisition device to set the status register to an enabled state.
[0073] S320, receiving an enable state setting instruction for a status register of the preset channel sent by the platform path controller, and setting the status register to an enabled state in response to the enable state setting instruction. The enable state setting instruction is generated when the platform path controller detects that the received enable state is a disabled state.
[0074] Exemplarily, the information acquisition device receives an enable state setting instruction sent by the platform path controller, and in response to the enable state setting instruction, sets the status register to the enabled state. After sending the enable state setting instruction, the platform path controller continues to send an enable state query instruction to the information acquisition device. If the status register is not set to the enabled state, the disabled state is returned to the platform path controller, and the platform path controller waits for the status register to be set. If the status register has been set to the enabled state, the enabled state is returned to the platform path controller, and the platform path controller starts to read the target information of the target device.
[0075] S330, obtaining target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol adopted by the target device to communicate with the platform path controller.
[0076] S340, based on the data packet format corresponding to the preset channel of the preset protocol, generate an information acquisition data packet for the target device according to the target protocol information, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol. The preset channel of the preset protocol is a protocol channel that can transparently transmit commands of the target protocol.
[0077] S350: Access the target device according to the information acquisition data packet through the platform path controller, and acquire target information from the target device.
[0078] In an embodiment of the present application, the method further includes:
[0079] Sending the target information to the adjustment device so that the adjustment device performs a corresponding method according to the target information to adjust the information of the target device; or,
[0080] sending the target information to a target device so that the target device controls the regulating device or processes the target information according to the target information; or
[0081] The target information is sent to a display device so that the display device displays the target information.
[0082] Exemplarily, after acquiring the target information, the information acquisition device may continue to apply the target information. For example, the target information may be sent to the adjustment device so that the adjustment device performs a corresponding method according to the target information to adjust the information of the target device, for example, Figure 6 As shown, the processor temperature can be sent to the fan system, and the fan system adjusts the wind speed according to the temperature to dissipate the heat of the processor. The target information can also be sent to other target devices so that the target devices can perform other applications according to the target information. For example, Figure 7 As shown, the information acquisition device can be connected to the BMC (Baseboard Management Controller) to send the target information to the BMC for subsequent applications, such as adjusting the fan system to dissipate heat for the processor. Figure 7 In this scheme, the BMC can communicate with the platform path controller through a conventional protocol to obtain conventional data. The target information is obtained from the information acquisition device. In this scheme, the BMC does not need to be customized. The information acquisition device can also send the target information to the display device so that the display device can display the target information.
[0083] The embodiment of the present application provides a device information acquisition method, receiving an enable state query instruction for the status register of the preset channel sent by the platform path controller, and returning the enable state to the platform path controller in response to the enable state query instruction, receiving an enable state setting instruction for the status register of the preset channel sent by the platform path controller, and setting the status register to an enabled state in response to the enable state setting instruction. The above scheme can set the enable state of the status register, so that the platform path controller and the information acquisition device can communicate through the preset channel of the preset protocol, and realize the transparent transmission of the target protocol command.
[0084] Embodiment 4
[0085] The embodiment of the present application provides a specific implementation method of a device information post-acquisition method, which is optimized based on the above embodiment. The scheme not described in detail in the embodiment of the present application can be found in the above embodiment. The method of the embodiment of the present application specifically includes the following steps: wherein, the target device is a CPU (Central Processing Unit), a PCH (Platform Controller Hub), the information acquisition device is a CPLD (Complex Programmable Logic Device), the target protocol is a PECI protocol, the preset protocol is an ESPI protocol, and the preset channel is an OOB Channel. CPLD supports the ESPI interface.
[0086] Power on the CPU, PCH, and CPLD and wait for power-on completion.
[0087] Initialize the CPU, PCH and CPLD and wait for initialization to complete.
[0088] PCH sends the Get Configuration (21h) command to address 30h (the OOB Channel status register of the CPLD) to obtain the data at address 30h. The definitions of bit0 and bit1 are as follows: Figure 8 As shown. If the bit0 of the OOB Channel status register is 0, it means that the OOB Channel is enabled. At this time, send the Set Configuration command to address 30h, set the bit0 to 1, and enable the OOB Channel status register. The board sends the Get Configuration command to address 30h again to obtain the data at address 30h. If the bit1 of the 00B Channel status register is 0, it means that the 00B Channel is not ready, and continue to wait for initialization to complete. If the bit1 of the OOB Channel status register is 1, it means that the OOB Channel has been set to the enabled state and can start reading the temperature.
[0089] CPLD sends ESPI data packets to PCH through the ESPI interface. The format of the ESPI data packet is as follows: Figure 4 As shown. The type of ESPI data packet is OOB message packet, the target receiving address is 10h (PCH), the command code is 01h (PECI command), the source sending address is 07h (ESPI Slave0 device, i.e. CPLD), the target address of PECI command is 30h (CPU0), and the command is 1h (get temperature instruction). The target address of PECI command can be 30h-33h, corresponding to CPU0-CPU3, and the corresponding address can be adjusted as needed.
[0090] After PCH receives and parses the ESPI data packet sent by CPLD, it forwards the corresponding PECI command to CPU0 to obtain the current core temperature of CPU0 and returns the EPSI data packet to CPLD. The data packet format is as follows: Fig. 9 The type of the EPSI data packet sent back is an OOB message packet, the target receiving address is 07h (ESPI Slave0 device, i.e. CPLD), the command code is 01h (PECI command), the source sending address is 10h (PCH), FCS is the CRC checksum of the relevant bits of the data packet, and TEMP is the returned temperature value. Figure 4 and Fig. 9 The other data in are general settings and will not be described in detail.
[0091] The embodiment of the present application has the same technical effect as any of the above embodiments.
[0092] Embodiment 5
[0093] Fig.10 This is a schematic diagram of the structure of a device information acquisition device provided in Embodiment 5 of the present application. The device can execute the device information acquisition method provided in any embodiment of the present application and has the corresponding functional modules and beneficial effects of the execution method. Fig.10 As shown, the device comprises:
[0094] The target protocol information acquisition module 410 is used to acquire the target protocol information of the target protocol between the target device and the platform path controller; wherein the target protocol is the protocol used by the target device to communicate with the platform path controller;
[0095] An information acquisition data packet generation module 420 is used to generate an information acquisition data packet for a target device according to the target protocol information based on a data packet format corresponding to a preset channel of a preset protocol, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol;
[0096] The preset channel of the preset protocol is a protocol channel capable of transparently transmitting commands of the target protocol;
[0097] The forwarding module 430 is used to access the target device according to the information acquisition data packet through the platform path controller, and obtain target information from the target device.
[0098] In the embodiment of the present application, the information acquisition data packet generation module 420 includes:
[0099] A target protocol command generating unit, used to determine a command code of the target protocol, an access address of the target device and an access command of the target information according to the target protocol information;
[0100] The data packet generating unit is used to pack data including a command code of a target protocol, an access address of a target device and an access command of target information based on a data packet format of a preset channel of a preset protocol, and generate an information acquisition data packet for the target device.
[0101] In the embodiment of the present application, the forwarding module 430 includes:
[0102] A parsing unit, used to parse the information acquisition data packet through the platform path controller to obtain a command code of a target protocol, an access address of a target device, and an access command of target information;
[0103] The sending unit is used to determine the target protocol according to the command code, and send an access command of the target information to the access address of the target device based on the target protocol.
[0104] In the embodiment of the present application, the forwarding module 430 includes:
[0105] A return unit, configured to receive target information returned by the target device through the platform path controller, and to package the command code of the target protocol and the data of the target information based on the data packet format of the preset channel of the preset protocol to generate an information return data packet;
[0106] The receiving unit is used to receive the information return data packet sent by the platform path controller, and parse the information return data packet to obtain target information.
[0107] In the embodiment of the present application, the device further includes:
[0108] A first sending module is used to send the target information to the adjustment device, so that the adjustment device performs a corresponding method according to the target information to adjust the information of the target device; or
[0109] A second sending module is used to send the target information to a target device, so that the target device controls the adjustment device or processes the target information according to the target information; or
[0110] The third sending module is used to send the target information to the display device, so that the display device displays the target information.
[0111] In the embodiment of the present application, the device further includes:
[0112] a query instruction receiving module, configured to receive an enable status query instruction for the status register of the preset channel sent by the platform path controller, and return an enable status to the platform path controller in response to the enable status query instruction;
[0113] a setting instruction receiving module, configured to receive an enable state setting instruction for a state register of the preset channel sent by the platform path controller, and set the state register to an enabled state in response to the enable state setting instruction;
[0114] The enable state setting instruction is generated when the platform path controller detects that the received enable state is a disabled state.
[0115] In an embodiment of the present application, the target device includes a processor, the target protocol includes a PECI protocol, the preset protocol includes an ESPI protocol, and the preset channel includes an out-of-band channel.
[0116] A device information acquisition apparatus provided in an embodiment of the present application can execute a device information acquisition method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
[0117] Embodiment 6
[0118] Fig.11 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0119] like Fig.11 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0120] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0121] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a device information acquisition method.
[0122] In some embodiments, the device information acquisition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the device information acquisition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the device information acquisition method in any other appropriate manner (e.g., by means of firmware).
[0123] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device information acquisition device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0128] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0129] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the information expected by the technical solution of this application can be achieved, and this document is not limited here.
[0130] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A device information acquisition method, characterized in that: The method comprises: Acquire target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol used by the target device to communicate with the platform path controller; Based on the data packet format corresponding to the preset channel of the preset protocol, generate an information acquisition data packet for the target device according to the target protocol information, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol; The preset channel of the preset protocol is a protocol channel capable of transparently transmitting commands of the target protocol; The target device is accessed by the platform path controller according to the information acquisition data packet, and target information is acquired from the target device.
2. The method according to claim 1, characterized in that Based on the data packet format corresponding to the preset channel of the preset protocol, an information acquisition data packet for the target device is generated according to the target protocol information, including: Determining a command code of a target protocol, an access address of a target device, and an access command of the target information according to the target protocol information; Based on the data packet format of the preset channel of the preset protocol, data including the command code of the target protocol, the access address of the target device and the access command of the target information are packaged to generate an information acquisition data packet for the target device.
3. The method according to claim 2, characterized in that Accessing the target device by acquiring a data packet according to the information through the platform path controller includes: Parsing the information acquisition data packet through the platform path controller to obtain a command code of a target protocol, an access address of a target device, and an access command of target information; A target protocol is determined according to the command code, and an access command for target information is sent to an access address of a target device based on the target protocol.
4. The method according to claim 1, characterized in that Acquiring target information from the target device includes: Receiving target information returned by the target device through the platform path controller, and packaging the command code of the target protocol and the data of the target information based on the data packet format of the preset channel of the preset protocol to generate an information return data packet; An information return data packet sent by the platform path controller is received, and the information return data packet is parsed to obtain target information.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Sending the target information to the adjustment device so that the adjustment device performs a corresponding method according to the target information to adjust the information of the target device; or, sending the target information to a target device so that the target device controls the regulating device or processes the target information according to the target information; or The target information is sent to a display device so that the display device displays the target information.
6. The method according to claim 1, characterized in that Based on the data packet format corresponding to the preset channel of the preset protocol, before generating the information acquisition data packet for the target device according to the target protocol information, the method further includes: receiving an enable status query instruction for the status register of the preset channel sent by the platform path controller, and returning an enable status to the platform path controller in response to the enable status query instruction; receiving an enable state setting instruction for a state register of the preset channel sent by the platform path controller, and setting the state register to an enabled state in response to the enable state setting instruction; The enable state setting instruction is generated when the platform path controller detects that the received enable state is a disabled state.
7. The method according to claim 1, characterized in that The target device includes a processor, the target protocol includes a PECI protocol, the preset protocol includes an ESPI protocol, and the preset channel includes an out-of-band channel.
8. A device for acquiring device information, characterized in that: The device comprises: A target protocol information acquisition module, used to acquire target protocol information of a target protocol between a target device and a platform path controller; wherein the target protocol is a protocol used by the target device to communicate with the platform path controller; An information acquisition data packet generation module, configured to generate an information acquisition data packet for a target device according to the target protocol information based on a data packet format corresponding to a preset channel of a preset protocol, and send the information acquisition data packet to the platform path controller based on the preset channel of the preset protocol; The preset channel of the preset protocol is a protocol channel capable of transparently transmitting commands of the target protocol; The forwarding module is used to access the target device according to the information acquisition data packet through the platform path controller, and obtain target information from the target device.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device information acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device information acquisition method according to any one of claims 1 to 7 when executed.