A power supply data acquisition method, system, readable storage medium and program product

CN119025172BActive Publication Date: 2025-02-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411481687.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-25
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

In the prior art, the server relies on the substrate management controller when obtaining power data, which leads to the inability to obtain power data when the substrate management controller is down, and the topology structure is complex, occupies physical pins, and the power supply hot-swap information cannot be timely. renew.

Method used

By introducing microcontrollers into the server, using the microcontroller to obtain power supply data in power-on timing, and passing power supply data to the substrate management controller and basic input and output system through the data acquisition channel, the topology is simplified and physics is avoided Pin occupation and timely update of power supply information.

Benefits of technology

It realizes that power supply data can still be obtained when the substrate management controller is down, simplifies the topology structure, avoids physical pin occupation, timely updates power supply hot-swap information, and improves system reliability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025172B_ABST
    Figure CN119025172B_ABST
Patent Text Reader

Abstract

The present invention discloses a power data acquisition method, system, readable storage medium and program product, which relates to the field of computer application technology, including: controlling a microcontroller and a baseboard management controller to enter a power-on sequence by powering on a server; when the microcontroller is started, the microcontroller is used to acquire current power data; after the baseboard management controller is started, the baseboard management controller is used to acquire current power data from the microcontroller through a first data acquisition channel; when the input-output system in the server is in the startup process, the input-output system is used to acquire current power data from the microcontroller through a second data acquisition channel. The power data acquisition method provided by the present invention avoids the problem of occupying physical pins, simplifies the topological structure, and realizes the timely acquisition of hot-swap information of the power supply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a power supply data acquisition method, system, computer-readable storage medium and computer program product. Background Art

[0002] The server's Basic Input Output System (BIOS) and Baseboard Management Controller (BMC) both require power supply unit (PSU) information. There are two common methods for obtaining power data. The first is for the BMC to obtain power information and send it to the BIOS. The second is to mount the power supply to the Inter-Integrated Circuit (I2C) bus under the BIOS and BMC.

[0003] However, both of the above two methods for obtaining power data have their own shortcomings. First, when the baseboard management controller has problems, the basic input and output system will not be able to obtain power data. Secondly, the second method increases the complexity of the circuit. In order to avoid the risk of multiplexer control abnormality due to competition between the two, the general purpose input and output interface (GPIO) pin information is used to mark whether the other party is currently accessing and occupying the physical pin. In addition, both methods cannot update the hot plug information of the power supply to the system in a timely manner.

[0004] In summary, how to effectively solve the problems of failure to obtain power data, complex topology, physical pin occupation, and failure to timely update power hot plug information to the system are problems that technicians in this field urgently need to solve. Summary of the invention

[0005] An object of the present invention is to provide a power supply data acquisition method, which avoids the problem of occupying physical pins, simplifies the topological structure, and realizes timely acquisition of hot plug information of the power supply; another object of the present invention is to provide a power supply data acquisition system, a computer-readable storage medium and a computer program product.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] A power supply data acquisition method, comprising:

[0008] By powering on the server to control the microcontroller and baseboard management controller to enter the power-on sequence;

[0009] When the microcontroller is started up, the microcontroller is used to obtain current power supply data;

[0010] After the baseboard management controller is started, using the baseboard management controller to obtain the current power data from the microcontroller through a first data acquisition channel;

[0011] When the basic input and output system in the server is in the process of starting up, the basic input and output system is used to obtain the current power data from the microcontroller through the second data acquisition channel.

[0012] In a specific implementation of the present invention, using the microcontroller to obtain current power supply data includes:

[0013] The microcontroller is used to obtain the current power data through a power management bus protocol.

[0014] In a specific implementation manner of the present invention, after obtaining the current power supply data by using the microcontroller, the method further includes:

[0015] When it is determined that the original power data in the microcontroller needs to be updated, the original power data is updated using the current power data.

[0016] In a specific implementation of the present invention, when it is determined that the original power data in the microcontroller needs to be updated, the original power data is updated using the current power data, including:

[0017] When it is determined that there is a power-on restart and / or a power-on signal changes, it is determined that the original power data in the microcontroller needs to be updated;

[0018] The original power data is updated using the current power data.

[0019] In a specific implementation manner of the present invention, updating the original power data using the current power data includes:

[0020] Detecting whether there is currently communication between the microcontroller and the baseboard management controller and / or between the microcontroller and the basic input and output system;

[0021] If yes, obtaining a data area in the microcontroller that is not pointed to by the current data pointer;

[0022] The current power data is updated to a data area not pointed to by the current data pointer.

[0023] In a specific implementation manner of the present invention, after updating the current power data to the data area not pointed to by the current data pointer, the method further includes:

[0024] When the communication is detected to be completed, a soft interrupt is triggered;

[0025] The data pointer is switched from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer.

[0026] In a specific embodiment of the present invention, it also includes:

[0027] When it is determined that there is no communication between the microcontroller and the baseboard management controller and between the microcontroller and the basic input and output system, the current power data is updated to the data area pointed to by the current data pointer in the microcontroller.

[0028] In a specific implementation manner of the present invention, after obtaining the current power supply data by using the microcontroller, the method further includes:

[0029] When it is determined that there is no power-on restart and the power-on signal does not change, it is determined that there is no need to update the original power data in the microcontroller.

[0030] In a specific embodiment of the present invention, it also includes:

[0031] When power data communication exists between the baseboard management controller and the microcontroller and between the basic input and output system and the microcontroller, obtaining a preset interrupt priority;

[0032] The baseboard management controller and the basic input and output system are controlled to sequentially obtain the current power supply data from the microcontroller according to the interrupt priority.

[0033] In a specific implementation of the present invention, using the basic input and output system to obtain the current power data from the microcontroller through the second data acquisition channel includes:

[0034] The basic input and output system is used to obtain the current power data from the microcontroller through a second data acquisition channel based on a system management bus protocol.

[0035] In a specific implementation of the present invention, using the baseboard management controller to obtain the current power data from the microcontroller through the first data acquisition channel includes:

[0036] Encrypting the current power data to obtain ciphertext power data;

[0037] The baseboard management controller is used to obtain the encrypted power supply data from the microcontroller through the first data acquisition channel.

[0038] A power supply data acquisition system, comprising:

[0039] The microcontroller is used to enter the power-on sequence when the server is powered on; when the startup is completed, it obtains the current power supply data;

[0040] The baseboard management controller is used to enter the power-on sequence when the server is powered on; after the startup is completed, the current power supply data is obtained from the microcontroller through the first data acquisition channel;

[0041] The basic input and output system is used to enter the power-on sequence when the server is powered on; during the startup process, the current power supply data is obtained from the microcontroller through the second data acquisition channel.

[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the power supply data acquisition method described above are implemented.

[0043] A computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the power supply data acquisition method described above are implemented.

[0044] The power data acquisition method provided by the present invention powers on the server to control the microcontroller and the baseboard management controller to enter the power-on sequence; when the microcontroller is started, the microcontroller is used to acquire the current power data; after the baseboard management controller is started, the baseboard management controller is used to acquire the current power data from the microcontroller through a first data acquisition channel; when the basic input and output system in the server is in the process of starting, the basic input and output system is used to acquire the current power data from the microcontroller through a second data acquisition channel.

[0045] It can be seen from the above technical solution that by adding a microcontroller, the problem of the basic input and output system relying on the baseboard management controller to obtain power data is solved. At the same time, the microcontroller usually has a relatively rich communication port and a large number of general input and output interfaces. When the communication port is insufficient, the general input and output interface can also be used through the program to realize the function of the analog communication port. It has a very high degree of freedom in expandability, avoiding the problem of occupying physical pins caused by connecting the basic input and output system and the baseboard management controller to the power supply in the form of a bus. The basic input and output system and the baseboard management controller access the power data through their respective data acquisition channels, simplifying the topology structure and solving the problem of the baseboard management controller crashing and failing to obtain power data. Since the microcontroller does not need to load the system, it will prioritize starting and executing the power data collection process in a short time, realizing the timely acquisition of hot-swap information of the power supply and updating it to the system in a timely manner.

[0046] Correspondingly, the present invention also provides a power data acquisition device, a computer-readable storage medium and a computer program product corresponding to the above-mentioned power data acquisition method, which have the above-mentioned technical effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A flowchart of a method for acquiring power data in an embodiment of the present invention;

[0049] Figure 2 Another implementation flow chart of the power data acquisition method in an embodiment of the present invention;

[0050] Figure 3 This is a flowchart of a microcontroller in an embodiment of the present invention when acquiring power data;

[0051] Figure 4 It is a structural block diagram of a power data acquisition device in an embodiment of the present invention;

[0052] Figure 5 It is a structural block diagram of a power data acquisition system in an embodiment of the present invention;

[0053] Figure 6 The figure is a schematic diagram of the topological structure of a power supply data acquisition system in an embodiment of the present invention.

[0054] The reference numerals are as follows:

[0055] 1- Microcontroller, 2- Baseboard Management Controller, 3- Basic Input Output System. DETAILED DESCRIPTION

[0056] There are two common methods for obtaining power data: the first is to obtain power information from the baseboard management controller and send it to the basic input and output system. The second is to mount the power supply to the integrated circuit bus under the basic input and output system and the baseboard management controller.

[0057] The above two methods of power data acquisition have their own shortcomings. First, in the method where the baseboard management controller obtains power information and sends it to the basic input and output system, the basic input and output system depends on the baseboard management controller to obtain power data. If there is a problem with the baseboard management controller, the basic input and output system will not be able to obtain power data. By mounting the power supply to the integrated circuit bus under the basic input and output system and the baseboard management controller, the basic input and output system and the baseboard management controller can both access real-time power data. This solution can effectively improve the problem that the basic input and output system and the baseboard management controller cannot be decoupled for power data acquisition. However, for some models of central processing units (CPUs), there are no extra pins available in the use plan of the general input and output interface pins, so this solution cannot be used well.

[0058] To this end, the power data acquisition method provided in the present application avoids the problem of occupying physical pins, simplifies the topology structure, and realizes the timely acquisition of hot-swap information of the power supply.

[0059] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0060] See also Figure 1 , Figure 1 This is a flow chart of an implementation of a method for acquiring power data in an embodiment of the present invention. The method may include the following steps:

[0061] S101: Power on the server to control the microcontroller and baseboard management controller to enter a power-on sequence.

[0062] The server is powered on. A microcontroller unit (MCU) and a baseboard management controller are deployed in the server. The microcontroller and the baseboard management controller are controlled to enter a power-on sequence by powering on the server.

[0063] S102: When the microcontroller is started up, the microcontroller is used to obtain current power data.

[0064] S103: After the baseboard management controller is started, the baseboard management controller is used to obtain current power data from the microcontroller through a first data acquisition channel.

[0065] A first data acquisition channel is provided between the baseboard management controller and the microcontroller. After the baseboard management controller is started, the baseboard management controller is used to acquire current power supply data from the microcontroller through the first data acquisition channel.

[0066] S104: When the basic input and output system in the server is in the process of starting up, the basic input and output system is used to obtain current power data from the microcontroller through the second data acquisition channel.

[0067] A second data acquisition channel is provided between the basic input / output system and the microcontroller. When the basic input / output system in the server is in the process of starting up, the basic input / output system is used to obtain the current power data from the microcontroller through the second data acquisition channel, without any interaction with the baseboard management controller, so that the basic input / output system can quickly obtain the current power data. Since the microcontroller does not need to load the system, its power-on initialization is extremely fast, and it will preferentially complete the startup and start executing the power data collection process within a few seconds. The first round of data collection can be completed within a few seconds after the server is powered on. Therefore, even if the basic input / output system is turned on immediately after the mainboard is powered on, when it runs to the power data acquisition stage program, the microcontroller has successfully obtained the power data.

[0068] It should be noted that the first and the second in the first data acquisition channel and the second data acquisition channel have no difference in size or order, and are only used to distinguish the data acquisition channel between the baseboard management controller and the microcontroller and the data acquisition channel between the basic input and output system and the microcontroller.

[0069] It can be seen from the above technical solution that by adding a microcontroller, the problem of the basic input and output system relying on the baseboard management controller to obtain power data is solved. At the same time, the microcontroller usually has a relatively rich communication port and a large number of general input and output interfaces. When the communication port is insufficient, the general input and output interface can also be used through the program to realize the function of the analog communication port. It has a very high degree of freedom in expandability, avoiding the problem of occupying physical pins caused by connecting the basic input and output system and the baseboard management controller to the power supply in the form of a bus. The basic input and output system and the baseboard management controller access the power data through their respective data acquisition channels, simplifying the topology structure and solving the problem of the baseboard management controller crashing and failing to obtain power data. Since the microcontroller does not need to load the system, it will prioritize starting and executing the power data collection process in a short time, realizing the timely acquisition of hot-swap information of the power supply and updating it to the system in a timely manner.

[0070] It should be noted that, based on the above embodiment, the embodiment of the present invention also provides corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.

[0071] In a specific implementation of the present invention, after obtaining the current power supply data by using the microcontroller, the method may further include the following steps:

[0072] When it is determined that the original power data in the microcontroller needs to be updated, the original power data is updated using the current power data.

[0073] After using the microcontroller to obtain the current power data, it is detected whether the original power data in the microcontroller needs to be updated, such as by detecting whether the power is powered on and restarted to determine whether the original power data in the microcontroller needs to be updated, and it can also be determined by detecting whether the power in place signal changes to determine whether the original power data in the microcontroller needs to be updated. When it is determined that the original power data in the microcontroller needs to be updated, the original power data is updated using the current power data, thereby realizing the timely update of the power data in the microcontroller and ensuring the consistency of the power data in the microcontroller with the power data at the power supply end.

[0074] In a specific implementation of the present invention, when it is determined that the original power data in the microcontroller needs to be updated, updating the original power data using the current power data may include the following steps:

[0075] Step 1: When it is determined that there is a power-on restart and / or a power-on signal changes, it is determined that the original power data in the microcontroller needs to be updated;

[0076] Step 2: Use the current power data to update the original power data.

[0077] For the convenience of description, the above two steps can be combined for explanation.

[0078] The power-on restart signal and the power-in-place signal change are detected. When only the power-on restart is detected, it is determined that the original power data in the microcontroller needs to be updated; when only the power-in-place signal change is detected, it is determined that the original power data in the microcontroller needs to be updated; when both the power-on restart and the power-in-place signal change are detected, it is determined that the original power data in the microcontroller needs to be updated, and the original power data is updated using the current power data. By detecting the power-on restart signal and the power-in-place signal change, it is determined whether the original power data in the microcontroller needs to be updated, and whether the power data needs to be updated is quickly and accurately identified.

[0079] In a specific implementation of the present invention, updating the original power data using the current power data may include the following steps:

[0080] Step 1: Detect whether there is communication between the current microcontroller and the baseboard management controller and / or between the microcontroller and the basic input and output system. If not, execute step 2; if yes, execute step 3;

[0081] Step 2: Update the current power data to the data area pointed to by the current data pointer in the microcontroller.

[0082] Step 3: Get the data area not pointed to by the current data pointer in the microcontroller;

[0083] Step 4: Update the current power data to the data area not pointed to by the current data pointer;

[0084] Step 5: When the communication is detected to be completed, a soft interrupt is triggered;

[0085] Step 6: Switch the data pointer from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer.

[0086] For the convenience of description, the above six steps can be combined for explanation.

[0087] Two data areas are pre-set in the microcontroller, and the data pointer points to one of the data areas currently used for data communication. When the original power data is updated using the current power data, the communication status between the current microcontroller and the baseboard management controller is detected, and the communication status between the microcontroller and the basic input and output system is detected. When it is determined that there is no communication between the current microcontroller and the baseboard management controller and between the microcontroller and the basic input and output system, the current power data is updated to the data area pointed to by the current data pointer in the microcontroller, so that the latest power data is directly obtained from the data area pointed to by the current data pointer when the power data is obtained next time, without the need to switch the data area, which is simple and easy to operate. The data area for storing power data in the microcontroller can be a non-volatile data area.

[0088] When it is determined that there is currently only communication between the microcontroller and the baseboard management controller, or when it is determined that there is currently only communication between the microcontroller and the basic input-output system, or when it is determined that there is currently communication between the microcontroller and the baseboard management controller and there is also communication between the microcontroller and the basic input-output system, it means that the power data cannot be updated in the data area pointed to by the current data pointer in the microcontroller, the data area not pointed to by the current data pointer in the microcontroller is obtained, and the current power data is updated to the data area not pointed to by the current data pointer. When the communication is detected to be completed, a soft interrupt is triggered, and the data pointer is switched from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer. When this data communication is completed, the data pointer is switched from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer, so that the baseboard management controller and the basic input-output system can obtain the latest power data when they obtain power data next time. By pre-setting two data areas in the microcontroller in advance, power data update is realized during the operation of the microcontroller, avoiding the impact on normal communication tasks.

[0089] See also Figure 2 , Figure 2 This is another implementation flow chart of the method for acquiring power data in an embodiment of the present invention. The method may include the following steps:

[0090] S201: Power on the server to control the microcontroller and baseboard management controller to enter a power-on sequence.

[0091] S202: When the microcontroller is started up, the microcontroller is used to obtain current power data through a power management bus protocol.

[0092] The microcontroller and the power supply are pre-set to communicate through the Power Management Bus (PMBus) protocol. When the microcontroller is started, the microcontroller polls the corresponding power supply through the power supply in place signal. When the power supply is in place, the microcontroller uses the power management bus protocol to obtain the current power supply data. The advantages of the power management bus protocol such as flexibility and scalability, easy use and configuration, and efficient and reliable data transmission are fully utilized.

[0093] S203: When it is determined that there is no power-on restart and the power-on signal does not change, it is determined that there is no need to update the original power data in the microcontroller.

[0094] When it is determined that there is no power-on restart and the power-in-place signal does not change, it means that no new power data is generated, and it is determined that there is no need to update the original power data in the microcontroller, thereby realizing rapid identification of whether the power data needs to be updated.

[0095] S204: When it is determined that the original power data in the data area of ​​the microcontroller needs to be updated, the original power data is updated using the current power data.

[0096] When it is determined that the original power data in the data area of ​​the microcontroller needs to be updated, the original power data is updated using the current power data, so that the baseboard management controller and the basic input and output system can obtain the latest power data the next time they obtain power data, thereby ensuring the validity of the power data obtained by the baseboard management controller and the basic input and output system next time.

[0097] S205: After the baseboard management controller is started, the current power data is encrypted to obtain ciphertext power data.

[0098] After the baseboard management controller is started, the current power data is encrypted to obtain the ciphertext power data. For example, an asymmetric encryption algorithm for encrypting the power data between the microcontroller and the baseboard management controller can be pre-set, and the power data is encrypted using the pre-set asymmetric encryption algorithm. By encrypting the power data using the asymmetric encryption algorithm, the security of the power data during transmission is guaranteed.

[0099] S206: Utilize the baseboard management controller to obtain encrypted power data from the microcontroller through the first data acquisition channel.

[0100] The baseboard management controller is used to obtain the encrypted power data from the microcontroller through the first data acquisition channel. The power data to be transmitted between the baseboard management controller and the microcontroller is encrypted in advance, thereby ensuring the security of data transmission between the baseboard management controller and the microcontroller.

[0101] S207: When the basic input and output system in the server is in the process of starting up, the basic input and output system is used to obtain current power data from the microcontroller via a second data acquisition channel based on the system management bus protocol.

[0102] The basic input and output system and the microcontroller are pre-set to communicate through the system management bus (SMBus) protocol. When the basic input and output system in the server is in the startup process, the basic input and output system is used to obtain the current power data from the microcontroller through the second data acquisition channel based on the system management bus protocol. The advantages of the system management bus protocol, such as simplicity, flexibility, scalability, reliability, stability, and node resources, are fully utilized.

[0103] Microcontrollers do not rely on platform characteristics and are feasible for cross-platform porting. Microcontrollers have a reliable recovery mechanism when using bare metal code, which greatly reduces the probability of hanging and inaccessible phenomena. Since the microcontroller on-chip system inherits almost all key operating components, it does not require a separate flash memory (Flash) for program storage, and has a complete program protection mechanism, so it has a higher security protection to avoid data code and program code leakage. At the same time, depending on the choice of microcontroller model, it usually has a relatively rich communication port and a large number of general input and output interfaces. When the general input and output interfaces are insufficient, the function of the analog communication port can also be realized through the program for the general input and output interfaces, which has a very high degree of freedom in expandability. Microcontrollers have low hardware costs. As a data collection component, the minimum operating circuit requirement of the system is very small, and usually because the internal hardware structures such as ADC (Analog-to-Digital Converter), sensors, and communication interfaces have been integrated, the required motherboard area overhead is also relatively small. Power supply data acquisition through microcontrollers fully utilizes the advantages of microcontrollers in safety and reliability, stable operation, rich interfaces, good programmability, and simple external circuit construction.

[0104] In a specific embodiment of the present invention, the method may further include the following steps:

[0105] Step 1: when there is power data communication between the baseboard management controller and the microcontroller and between the basic input and output system and the microcontroller, obtaining a preset interrupt priority;

[0106] Step 2: Control the baseboard management controller and the basic input and output system to obtain current power data from the microcontroller in sequence according to the interrupt priority.

[0107] For the convenience of description, the above two steps can be combined for explanation.

[0108] The interrupt priority is pre-set when there is power data communication between the baseboard management controller and the microcontroller and between the basic input-output system and the microcontroller, and the baseboard management controller and the basic input-output system are controlled to obtain the current power data from the microcontroller in sequence according to the interrupt priority. For example, the power data acquisition priority of the basic input-output system can be set higher than the power data acquisition priority of the baseboard management controller. When there is power data communication between the baseboard management controller and the microcontroller and between the basic input-output system and the microcontroller, the power data is synchronized to the basic input-output system first. By setting the interrupt priority when there is power data communication between the baseboard management controller and the microcontroller and between the basic input-output system and the microcontroller, the power data is acquired in the order of the interrupt priority, thereby avoiding the risk of abnormal multiplexer control caused by the baseboard management controller and the basic input-output system competing for access to power data.

[0109] Corresponding to the above method embodiment, the present invention further provides a power data acquisition device. The power data acquisition device described below and the power data acquisition method described above can be referred to each other.

[0110] See also Figure 4 , Figure 4 This is a structural block diagram of a power data acquisition device in an embodiment of the present invention, and the device may include:

[0111] A power-on sequence entry control module 41 is used to control the microcontroller and the baseboard management controller to enter a power-on sequence by powering on the server;

[0112] A first power data acquisition module 42 is used to acquire current power data using the microcontroller when the microcontroller is started up;

[0113] A second power data acquisition module 43 is used to acquire current power data from the microcontroller via the first data acquisition channel using the baseboard management controller after the baseboard management controller is started;

[0114] The third power data acquisition module 44 is used to acquire current power data from the microcontroller via the second data acquisition channel using the basic input and output system when the basic input and output system in the server is in the startup process.

[0115] It can be seen from the above technical solution that by adding a microcontroller, the problem of the basic input and output system relying on the baseboard management controller to obtain power data is solved. At the same time, the microcontroller usually has a relatively rich communication port and a large number of general input and output interfaces. When the communication port is insufficient, the general input and output interface can also be used through the program to realize the function of the analog communication port. It has a very high degree of freedom in expandability, avoiding the problem of occupying physical pins caused by connecting the basic input and output system and the baseboard management controller to the power supply in the form of a bus. The basic input and output system and the baseboard management controller access the power data through their respective data acquisition channels, simplifying the topology structure and solving the problem of the baseboard management controller crashing and failing to obtain power data. Since the microcontroller does not need to load the system, it will prioritize starting and executing the power data collection process in a short time, realizing the timely acquisition of hot-swap information of the power supply and updating it to the system in a timely manner.

[0116] In a specific implementation of the present invention, the first power data acquisition module 42 is specifically a module that uses a microcontroller to acquire current power data through a power management bus protocol.

[0117] In a specific embodiment of the present invention, the device may further include:

[0118] The power data updating module is used to update the original power data by using the current power data after obtaining the current power data by using the microcontroller, when it is determined that the original power data in the microcontroller needs to be updated.

[0119] In a specific implementation of the present invention, the power data updating module includes:

[0120] A power data update determination submodule is used to determine that the original power data in the microcontroller needs to be updated when it is determined that there is a power restart and / or a power in place signal changes;

[0121] The power data updating submodule is used to update the original power data using the current power data.

[0122] In a specific implementation of the present invention, the power data updating submodule includes:

[0123] A communication detection unit, used to detect whether there is communication between the current microcontroller and the baseboard management controller and / or between the microcontroller and the basic input and output system;

[0124] The unpointed data area acquisition unit is used to acquire the data area not pointed to by the current data pointer in the microcontroller when it is determined that there is communication between the current microcontroller and the baseboard management controller and / or between the microcontroller and the basic input and output system;

[0125] The first power data updating unit is used to update the current power data to a data area not pointed to by the current data pointer.

[0126] In a specific embodiment of the present invention, the device may further include:

[0127] A soft interrupt trigger module is used to trigger a soft interrupt when the communication is detected to be completed after the current power supply data is updated to the data area not pointed to by the current data pointer;

[0128] The pointer points to a switching module, which is used to switch the data pointer from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer.

[0129] In a specific implementation of the present invention, the power data updating submodule may further include:

[0130] The second power data updating unit is used to update the current power data to the data area pointed to by the current data pointer in the microcontroller when it is determined that there is no communication between the microcontroller and the baseboard management controller and between the microcontroller and the basic input and output system.

[0131] In a specific embodiment of the present invention, the device may further include:

[0132] The power data update-free determination module is used to determine that the original power data in the microcontroller does not need to be updated after the microcontroller obtains the current power data, when it is determined that there is no power-on restart and the power-on signal does not change.

[0133] In a specific embodiment of the present invention, the device may further include:

[0134] An interrupt priority acquisition module, used to acquire a preset interrupt priority when power data communication exists between the baseboard management controller and the microcontroller and between the basic input and output system and the microcontroller;

[0135] The fourth power data acquisition module is used to control the baseboard management controller and the basic input and output system to sequentially acquire current power data from the microcontroller according to the interrupt priority.

[0136] In a specific implementation of the present invention, the third power data acquisition module 44 is specifically a module that uses the basic input and output system to acquire current power data from the microcontroller through the second data acquisition channel based on the system management bus protocol.

[0137] In a specific implementation of the present invention, the second power data acquisition module 43 includes:

[0138] The ciphertext power data acquisition submodule is used to encrypt the current power data to obtain the ciphertext power data;

[0139] The second power data acquisition submodule is used to acquire the encrypted power data from the microcontroller via the first data acquisition channel using the baseboard management controller.

[0140] See also Figure 5 , Figure 5 This is a structural block diagram of a power data acquisition system in an embodiment of the present invention. The system may include:

[0141] Microcontroller 1, used to enter the power-on sequence when the server is powered on; when the startup is completed, obtain the current power data;

[0142] The baseboard management controller 2 is used to enter the power-on sequence when the server is powered on; after the startup is completed, the current power supply data is obtained from the microcontroller 1 through the first data acquisition channel;

[0143] The basic input and output system 3 is used to enter the power-on sequence when the server is powered on; during the startup process, the current power data is obtained from the microcontroller 1 through the second data acquisition channel.

[0144] It can be seen from the above technical solution that by adding a microcontroller, the problem of the basic input and output system relying on the baseboard management controller to obtain power data is solved. At the same time, the microcontroller usually has a relatively rich communication port and a large number of general input and output interfaces. When the communication port is insufficient, the general input and output interface can also be used through the program to realize the function of the analog communication port. It has a very high degree of freedom in expandability, avoiding the problem of occupying physical pins caused by connecting the basic input and output system and the baseboard management controller to the power supply in the form of a bus. The basic input and output system and the baseboard management controller access the power data through their respective data acquisition channels, simplifying the topology structure and solving the problem of the baseboard management controller crashing and failing to obtain power data. Since the microcontroller does not need to load the system, it will prioritize starting and executing the power data collection process in a short time, realizing the timely acquisition of hot-swap information of the power supply and updating it to the system in a timely manner.

[0145] In a specific implementation of the present invention, the microcontroller 1 is further configured to switch the power link to the baseboard management controller 2 via the general input and output interface of the microcontroller 1 when it is determined that link switching is required.

[0146] See also Figure 6 , Figure 6The topological structure diagram of a power data acquisition system in an embodiment of the present invention. With the microcontroller 1 as the core, it is connected to the power supply, the central processing unit, and the baseboard management controller 2 through three separate integrated circuit buses. Since the microcontroller 1 is programmable, the power management bus and the system management bus communication protocols can be implemented in the form of software, and can be set according to the communication protocol requirements of the connection end device. Usually, the time required for data transmission is short, and it can be run in the program, or the direct memory access (DMA) mode can be configured, and two independent direct memory access channels are used at the same time to transmit data from the microcontroller 1 to the baseboard management controller 2 and the basic input and output system 3, thereby improving the reliability of data transmission.

[0147] In the hardware link, link switching can be achieved by controlling the power integrated circuit bus through the universal input and output interface of the microcontroller 1. When the microcontroller 1 fails, the integrated circuit bus link can be connected to the baseboard management controller 2. The basic input and output system 3 obtains power data from the baseboard management controller 2, so that the power data can be obtained through the baseboard management controller 2 when the microcontroller 1 is abnormal, ensuring that the power data can be obtained. A data channel is pre-set between the microcontroller 1 and the power supply. For example, data communication between the microcontroller 1 and the power supply can be set through the integrated circuit bus. When the microcontroller 1 is started, the microcontroller 1 is used to obtain the current power data through the data channel between the microcontroller 1 and the power supply.

[0148] When the power supply is hot-plugged, the microcontroller 1 can obtain the power supply hot-plug event through the link connected to the complex programmable logic device (CPLD) through the universal input and output interface, trigger a single power supply data update, and ensure the real-time acquisition of power supply data. In addition to being able to access and obtain power supply data with the microcontroller 1 normally through the system management bus, the microcontroller 1 can also be mounted on the universal serial bus (USB) interface in the form of a simulated universal serial bus (USB) storage device, and provide data files to the operating system (OS), which can provide a data interface for more complex power information management strategies.

[0149] In a specific implementation of the present invention, the microcontroller 1 is specifically used to obtain the current power data by using the microcontroller 1 through a power management bus protocol.

[0150] In a specific implementation of the present invention, the microcontroller 1 is further configured to update the original power data using the current power data after acquiring the current power data when it is determined that the original power data in the microcontroller 1 needs to be updated.

[0151] In a specific implementation of the present invention, the microcontroller 1 is specifically used to determine that the original power data in the microcontroller 1 needs to be updated when it is determined that there is a power-on restart and / or a power-on signal changes.

[0152] In a specific embodiment of the present invention, the microcontroller 1 is specifically used to detect whether there is communication between the microcontroller 1 and the baseboard management controller 2 and / or between the microcontroller 1 and the basic input and output system 3; if so, obtain the data area not pointed to by the current data pointer in the microcontroller 1; and update the current power supply data to the data area not pointed to by the current data pointer.

[0153] In a specific embodiment of the present invention, the microcontroller 1 is also used to trigger a soft interrupt when the communication is detected to be completed after the current power supply data is updated to the data area not pointed to by the current data pointer; and switch the data pointer from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer.

[0154] In a specific embodiment of the present invention, the microcontroller 1 is also used to update the current power data to the data area pointed to by the current data pointer in the microcontroller 1 when it is determined that there is no communication between the microcontroller 1 and the baseboard management controller 2 and between the microcontroller 1 and the basic input and output system 3.

[0155] In a specific embodiment of the present invention, the microcontroller 1 is also used to determine that the original power data in the microcontroller 1 does not need to be updated after the microcontroller 1 is used to obtain the current power data, when it is determined that there is no power-on restart and the power-in-place signal does not change.

[0156] In a specific embodiment of the present invention, the microcontroller 1 is also used to obtain a preset interrupt priority when there is power data communication with both the baseboard management controller 2 and the basic input-output system 3; and control the baseboard management controller 2 and the basic input-output system 3 to obtain the current power data in sequence according to the interrupt priority.

[0157] In a specific implementation of the present invention, the basic input and output system 3 is specifically used to obtain the current power data from the microcontroller 1 through a second data acquisition channel based on the system management bus protocol.

[0158] In a specific embodiment of the present invention, the baseboard management controller 2 is specifically used to encrypt the current power data to obtain ciphertext power data; and the baseboard management controller 2 is used to obtain the ciphertext power data from the microcontroller 1 through the first data acquisition channel.

[0159] Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

[0160] The server is powered on to control the microcontroller and the baseboard management controller to enter the power-on sequence; when the microcontroller is started, the microcontroller is used to obtain the current power data; after the baseboard management controller is started, the baseboard management controller is used to obtain the current power data from the microcontroller through the first data acquisition channel; when the basic input and output system in the server is in the process of starting, the basic input and output system is used to obtain the current power data from the microcontroller through the second data acquisition channel.

[0161] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0162] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

[0163] Corresponding to the above method embodiment, the present invention further provides a computer program product, including a computer program, which implements the steps of the above power data acquisition method when executed by a processor.

[0164] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device, computer-readable storage medium, and computer program product disclosed in the embodiment, since they correspond to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0165] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the technical solution and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A method for acquiring power data, characterized in that: include: By powering on the server to control the microcontroller and baseboard management controller to enter the power-on sequence; When the microcontroller is started up, the microcontroller is used to obtain current power supply data; When it is determined that there is a power-on restart and / or a power-on signal changes, it is determined that the original power data in the microcontroller needs to be updated; Updating the original power data using the current power data; After the baseboard management controller is started, using the baseboard management controller to obtain the current power data from the microcontroller through a first data acquisition channel; When the basic input and output system in the server is in the process of starting up, the basic input and output system is used to obtain the current power data from the microcontroller through the second data acquisition channel.

2. The power data acquisition method according to claim 1, characterized in that: The microcontroller is used to obtain current power data, including: The microcontroller is used to obtain the current power data through a power management bus protocol.

3. The power data acquisition method according to claim 1, characterized in that: Updating the original power data using the current power data includes: Detecting whether there is currently communication between the microcontroller and the baseboard management controller and / or between the microcontroller and the basic input and output system; If yes, obtaining a data area in the microcontroller that is not pointed to by the current data pointer; The current power data is updated to a data area not pointed to by the current data pointer.

4. The power data acquisition method according to claim 3, characterized in that: After updating the current power data to the data area not pointed to by the current data pointer, the method further includes: When the communication is detected to be completed, a soft interrupt is triggered; The data pointer is switched from the data area pointed to by the current data pointer to the data area not pointed to by the current data pointer.

5. The power data acquisition method according to claim 3, characterized in that: Also includes: When it is determined that there is no communication between the microcontroller and the baseboard management controller and between the microcontroller and the basic input and output system, the current power data is updated to the data area pointed to by the current data pointer in the microcontroller.

6. The power data acquisition method according to claim 1, characterized in that: After obtaining the current power data by using the microcontroller, the method further includes: When it is determined that there is no power-on restart and the power-on signal does not change, it is determined that there is no need to update the original power data in the microcontroller.

7. The power data acquisition method according to any one of claims 1 to 6, characterized in that: Also includes: When power data communication exists between the baseboard management controller and the microcontroller and between the basic input and output system and the microcontroller, obtaining a preset interrupt priority; The baseboard management controller and the basic input and output system are controlled to sequentially obtain the current power supply data from the microcontroller according to the interrupt priority.

8. The power data acquisition method according to claim 1, characterized in that: Acquiring the current power data from the microcontroller via the second data acquisition channel using the basic input and output system includes: The basic input and output system is used to obtain the current power data from the microcontroller through a second data acquisition channel based on a system management bus protocol.

9. The power data acquisition method according to claim 1, characterized in that: Utilizing the baseboard management controller to obtain the current power data from the microcontroller through a first data acquisition channel includes: Encrypting the current power data to obtain ciphertext power data; The baseboard management controller is used to obtain the encrypted power supply data from the microcontroller through the first data acquisition channel.

10. A power data acquisition system, characterized in that: include: The microcontroller is used to enter the power-on sequence when the server is powered on; when the startup is completed, it obtains the current power supply data; After acquiring the current power data, when it is determined that there is a power restart and / or a power on signal changes, it is determined that the original power data in the microcontroller needs to be updated; The baseboard management controller is used to enter the power-on sequence when the server is powered on; after the startup is completed, the current power supply data is obtained from the microcontroller through the first data acquisition channel; Basic input and output system, used to enter the power-on sequence when the server is powered on; During the startup process, the current power data is acquired from the microcontroller through a second data acquisition channel.

11. The power supply data acquisition system according to claim 10, characterized in that: The microcontroller is also used to switch the power link to the baseboard management controller through the microcontroller general input and output interface when it is determined that link switching is required.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the power supply data acquisition method according to any one of claims 1 to 9 are implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the power supply data acquisition method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Server power supply information detection method and device, storage medium and electronic equipment

    CN118092624A