Control method and apparatus for indication apparatus, and server and medium
By detecting the CPLD update status and writing data under the substrate management controller, the problem of indicating the default status of the device after update is solved, and the accurate reflection of the device status and efficient utilization of resources are achieved.
Patent Information
- Application Number
- PCT/CN2024/122172
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-29
- Filing Date
- 2024-09-29
- Publication Date
- 2025-09-04
Smart Images

Figure CN2024122172_04092025_PF_FP_ABST
Abstract
Description
Control method, device, server and medium of indication device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 29, 2024, with application number 202410232080.7 and application name “A control method, device, server and medium for an indicating device”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application relates to a control method, device, server and medium of an indicating device. Background Art
[0004] Server hardware consists of a variety of boards, each of which can be plugged into various devices and displays that indicate their status. The baseboard management controller (BMC) indirectly controls these devices and their corresponding displays by reading and writing registers exposed by complex programmable logic devices (CPLDs).
[0005] As business needs increase, the CPLD's functionality may change. In this case, the board's CPLD needs to be updated to enable the new CPLD image. After the CPLD is updated, the values in all CPLD register tables return to their default values, and any functions indirectly controlled by writing to the CPLD via the BMC are restored to their default states. When an indicator device is in its default state (for example, an indicator light is off), users may misjudge or be unable to determine the device's operating status based on the indicator device's status.
[0006] Therefore, after the CPLD is updated, how to keep the indicator device in the state before the CPLD is updated so that the user can accurately understand the working state of the device through the indicator device is a technical problem that needs to be solved urgently by people in this field.
[0007] Summary of the Invention
[0008] According to an embodiment of the present application, in a first aspect, a method for controlling an indicator device is provided, which is applied to a baseboard management controller of a mainboard, comprising:
[0009] Obtain the current secondary setting state of the indicator device corresponding to the target device;
[0010] Obtaining the current refresh status and the previous refresh status of the complex programmable logic device of the target board; wherein the refresh status includes a non-refreshed state, a refreshing state, and a refresh completed state; the target board is the board to which the indicating device is connected, and the target device is the device set on the target board;
[0011] When it is detected that the current refresh state and the previous refresh state meet the preset requirements, determining that the complex programmable logic device of the target board has completed the update; and
[0012] When the baseboard management controller is working, the data corresponding to the current secondary state to be set is written into the complex programmable logic device of the target board, so that the complex programmable logic device of the target board controls the state of the indication device to be the current secondary state to be set.
[0013] According to an embodiment of the present application, in a second aspect, a control device for an indicator device is further provided, which is applied to a baseboard management controller of a mainboard, and includes:
[0014] A first acquisition module is used to acquire a current secondary setting state of an indicator device corresponding to a target device;
[0015] The second acquisition module is used to obtain the current refresh status and the previous refresh status of the complex programmable logic device of the target board; wherein the refresh status includes the unrefreshed state, the refreshing state, and the refresh completed state; the target board is the board to which the indicating device is connected, and the target device is the device set on the target board;
[0016] A detection and determination module, configured to determine that the complex programmable logic device of the target board has completed updating when detecting that the current refresh state and the previous refresh state meet preset requirements; and
[0017] The writing module is used to write data corresponding to the current state to be set into the complex programmable logic device of the target board when the baseboard management controller is working, so that the state of the indicator device is controlled by the complex programmable logic device of the target board to be the current state to be set.
[0018] According to an embodiment of the present application, in a third aspect, a server is further provided, including:
[0019] a memory for storing computer-readable instructions; and
[0020] The processor is configured to implement the steps of the above-mentioned method for controlling the indicating device when executing computer-readable instructions.
[0021] According to an embodiment of the present application, in a fourth aspect, the present application further provides a non-volatile computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the control method of the above-mentioned indicating device are implemented.
[0022] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.
[0024] FIG1 is a flow chart of a method for controlling an indicator device according to an embodiment of the present application;
[0025] FIG2 is a flow chart of a method for obtaining fan status according to an embodiment of the present application;
[0026] FIG3 is a flow chart of a method for updating a complex programmable logic device according to an embodiment of the present application;
[0027] FIG4 is a flow chart of a method for performing a refresh of a complex programmable logic device during a power cycle according to an embodiment of the present application;
[0028] FIG5 is a flow chart of a method for controlling a lighting module according to an embodiment of the present application;
[0029] FIG6 is an architectural diagram of maintaining the fan light status after updating the fan board complex programmable logic device according to an embodiment of the present application;
[0030] FIG7 is a schematic structural diagram of a control device of an indicator device provided in one or more embodiments of the present application;
[0031] FIG8 is a schematic diagram of the structure of a server provided in another embodiment or embodiments of the present application;
[0032] FIG9 is a schematic diagram of the structure of a non-volatile computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of this application.
[0034] The core of this application is to provide a control method, device, server and medium for an indicating device to solve the technical problem that after the CPLD is updated, the indicating device is in a default state, causing the user to misjudge or be unable to judge the working status of the device through the status of the indicating device.
[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The control method of the indicator device provided in the embodiment of the present application is applied to the baseboard management controller of the motherboard. Figure 1 is a flow chart of a control method of the indicator device provided in the embodiment of the present application. As shown in Figure 1, the method includes:
[0036] S10: Obtain the current secondary setting state of the indicator device corresponding to the target device;
[0037] S11: Acquire the current refresh status and the previous refresh status of the complex programmable logic device of the target board;
[0038] The refresh status includes the unrefreshed status, the refreshing status, and the refresh completed status.
[0039] S12: When it is detected that the current refresh state and the previous refresh state meet the preset requirements, it is determined that the complex programmable logic device of the target board has completed the update;
[0040] S13: When the baseboard management controller is working, the data corresponding to the current state to be set is written into the complex programmable logic device of the target board, so that the complex programmable logic device of the target board controls the state of the indication device to be the current state to be set.
[0041] Server hardware consists of various boards, such as the motherboard, fan board, power board, and input / output (IO) board. These boards are crucial components of a server and can accommodate various devices, such as the central processing unit (CPU), memory, hard drive, graphics processing unit (GPU), fan, and power supply modules. Each board also includes an indicator to indicate the device's status. These indicators typically include indicator lights and buzzers. For example, the fan board is a key component of these boards. It hosts a fan and controls its rotation, thereby reducing the server's temperature and preventing damage from overheating. The fan board also features a light-emitting diode (LED) to indicate the fan's status. The LED's on / off and color can be used to determine the fan's current status, such as whether it's plugged in, whether it's faulty, or whether its speed is too low.
[0042] A target board is a board on a server. When controlling a specific indicator device, the board connected to that indicator device is the target board. A target device is a device installed on the target board. When controlling a specific indicator device, the operating status of the target device is reflected by that indicator device. The type and number of target boards and target devices are not limited and are determined based on actual conditions. For example, in the example above, the target board is a fan board, the target device is a fan on the fan board, and the indicator device is an indicator light on the fan board.
[0043] Since the working state of the target device may change in practice, in order to enable the user to accurately understand the working state of the target device through the indicating device, the working state of the indicating device corresponding to the target device may also change as the working state of the target device changes. Therefore, in practice, the state of the indicating device corresponding to the target device may also change each time it is set. There is no limitation on the current state of the indicating device to be set, and it may be set according to user needs. However, in order for the indicating device to accurately reflect the working state of the device. In some embodiments, obtaining the current state of the indicating device corresponding to the target device to be set includes:
[0044] Get the in-place status of the target device;
[0045] In the case where it is detected that the target device is not in position, determining that the current secondary state to be set of the indicator device corresponding to the target device is the first state;
[0046] When the target device is detected to be in place, obtaining a property value of the target device; wherein the property of the target device is determined according to the type of the target device;
[0047] If it is detected that the attribute value is greater than or equal to the threshold, determining that the current state to be set of the indicator device corresponding to the target device is the second state;
[0048] If it is detected that the attribute value is less than the threshold, it is determined that the current secondary state to be set of the indicator device corresponding to the target device is the third state.
[0049] In order to obtain the in-place state and attribute value of the target device, an attribute table is established in an embodiment of the present application. The attribute table is a way of storing data and can be used for data interaction between different processes. Specifically, when obtaining the in-place state of the target device (that is, whether the device is inserted or not inserted into the board), the register for storing the in-place state data of the target device is read through the integrated circuit bus and address where the complex programmable logic device of the target board is located; the in-place state data of the target device read from the register for storing the in-place state data of the target device is stored in the attribute table; the in-place state of the target device is obtained from the attribute table.
[0050] When obtaining the attribute value of the target device, the register storing the attribute value of the target device is read through the integrated circuit bus and address of the complex programmable logic device of the target board; the attribute value of the target device read from the register storing the attribute value of the target device is stored in the attribute table; and the attribute value of the target device is obtained from the attribute table. After obtaining the attribute value, the attribute value is compared with a threshold value to determine the current state to be set for the indicator device. The threshold value is not limited and is determined based on actual conditions.
[0051] The following example illustrates the process of determining the current pending state of the fan light on the fan board. To facilitate user understanding, before explaining how to control the current pending state of the fan light on the fan board, some of the fan board's functions are explained. The fan's rotation and the status of the fan light are directly controlled by a complex programmable logic device (CPLD). CPLDs are digital integrated circuits typically used to implement various logic circuits, state machines, and timing control functions. The presence of the fan, the fan speed, and the illumination of the fan light are all directly controlled by the CPLD. The CPLD exposes a set of registers to other controllers, which can indirectly control the status of the fan and fan board by reading and writing to these registers. For example, the basic management controller can determine whether a fan is plugged in by reading specific CPLD registers and indirectly control the fan speed and the status of the fan light by writing to specific registers.
[0052] For some functions of the fan board, the complex programmable logic device and the baseboard management controller are often implemented in the following way: 1. Fan in-place status: controlled by the complex programmable logic device. The complex programmable logic device writes different values to specific registers when in place and when not in place. The baseboard management controller can read the value to determine whether the fan is in place; 2. Fan speed: indirectly controlled by the baseboard management controller by writing to the complex programmable logic device. There are many devices plugged into various boards of the server. There are temperature sensors on the devices. The baseboard management controller obtains the temperature of the device by reading the values of these temperature sensors, and then calculates the required pulse width modulation (Pulse Width Modulation) through a linear algorithm or a proportional-integral-derivative (PID) algorithm. Modulation (PWM) value, and then calculate the fan speed through the PWM value, and then write the speed into the specific register of the complex programmable logic device to control the fan speed; 3. Fan light: indirectly controlled by the baseboard management controller by writing to the complex programmable logic device. The baseboard management controller determines the fan's presence status by reading the complex programmable logic device. If it is not in place, the fan light is turned off by writing to the specific register of the complex programmable logic device. If it is in place, the fan speed is read. If the speed is higher than a certain speed, the fan light is turned green by writing to the specific register of the complex programmable logic device, indicating that the fan speed is normal. If it is lower than a certain speed, the fan light is turned orange by writing to the specific register of the complex programmable logic device, indicating that the fan speed is abnormal. The fan speed is determined by the temperature of each device on the server. The temperature of these devices may change continuously over time, so the baseboard management controller must write to the complex programmable logic device every second for the fan speed to ensure that the fan speed is real-time data.
[0053] Now that we've explained some of the fan board's functions, let's take the example of controlling the current pending state of the fan indicator on the fan board to explain how to determine the current pending state. This process consists of two parts: the first is obtaining the fan's status, and the second is determining the current pending state of the indicator based on the fan's status.
[0054] FIG2 is a flow chart of a method for obtaining fan status provided by an embodiment of the present application. As shown in FIG2 , the method includes:
[0055] S14: Read the fan status;
[0056] S15: Determine whether the fan is in place; if so, proceed to step S16; if not, proceed to step S17;
[0057] S16: Setting the fan speed value in the attribute table;
[0058] S17: Set the status of the fan in the attribute table to a scanning disabled state.
[0059] In implementation, in order to obtain the status of the fan, specifically, 1. the baseboard management controller reads the register related to the fan position through the integrated circuit bus and address where the complex programmable logic device of the fan board is located;
[0060] 2. Determine whether the fan is in place based on the value of the relevant register. If not, set the fan status in the attribute table to prohibit scanning;
[0061] 3. If the fan is in place, continue to read the fan speed related registers, obtain the fan speed, and store it in the attribute table.
[0062] After obtaining the fan status, the indicator light's current secondary state (LEDPattern) is determined based on the fan status. If the fan is not in place, the fan light's current secondary state is determined to be the first state, meaning the fan light is off (LEDPattern can be set to 0x00). If the fan is in place and the fan speed is greater than or equal to a threshold (for example, 500 rpm), indicating the fan is functioning normally, the fan light's current secondary state is determined to be the second state (normal state, LEDPattern can be set to 0x01, meaning green light). If the fan is in place and the fan speed is less than a threshold (for example, 500 rpm), indicating the fan is running too low, the fan light's current secondary state is determined to be the third state (abnormal state, LEDPattern can be set to 0x10, meaning orange light).
[0063] As business needs change, the functions of the complex programmable logic device may be added or changed. In this case, it is necessary to update the complex programmable logic device of the board so that the new complex programmable logic device image can take effect. However, after the complex programmable logic device is updated, the values in all register lists in the complex programmable logic device will become default values, and those functions that are indirectly controlled by writing to the complex programmable logic device through the baseboard management controller will be restored to the default state, such as the fan light will be restored to the default state - off. At this time, the user will misjudge or be unable to judge the working status of the device based on the status of the indicator device. Therefore, in the embodiment of the present application, after determining that the complex programmable logic device of the target board has been updated, the complex programmable logic device is rewritten so that the indicator device maintains its original state.
[0064] Updating a CPLD involves two steps: upgrading and refreshing. The first step involves the baseboard management controller (BMC) writing the CPLD upgrade file to the CPLD via the integrated circuit bus. However, the CPLD does not take effect immediately, requiring a second step, refreshing. Refreshing involves the BMC writing a command to the CPLD via the integrated circuit bus, which enables the new CPLD upgrade file to take effect. Because refreshing the CPLD to enable the new CPLD file while the server's operating system (OS) is running can affect the functionality of the Basic Input / Output System (BIOS) and the operating system, some data that requires the BIOS to obtain the CPLD and then pass it to the BMC cannot be passed to the BMC. Furthermore, after refreshing the CPLD, the values in all CPLD registers return to default values. The value of a particular register controls the motherboard's power-on state. If this default value causes the motherboard to lose power, shutting down the operating system. If the operating system is still running at this time, this can affect functionality. Therefore, refreshing the CPLD is done only after the server is shut down. In practice, the server may be in the power-on state or the power-off state. The following describes the method of updating the complex programmable logic device of the target board when the server is in the power-off state and the method of updating the complex programmable logic device of the target board when the server is in the power-on state. In some embodiments, updating the complex programmable logic device of the target board includes:
[0065] Obtain the image file of the complex programmable logic device of the upgraded target board;
[0066] Writing the upgraded image file of the complex programmable logic device of the target board into the complex programmable logic device of the target board;
[0067] Obtain the motherboard's complex programmable logic device to obtain the server's power on / off status;
[0068] When it is detected that the power-on / off state of the server is the power-off state, a refresh operation of the complex programmable logic device of the target board is executed.
[0069] In order to facilitate users to understand the update process of the complex programmable logic device, a refresh variable is set in the embodiment of the present application. Specifically, before updating the complex programmable logic device of the target board, it also includes:
[0070] Setting a refresh variable used to represent a refresh state to a first preset value and storing the value in the attribute table;
[0071] After detecting that the server is in the shutdown state, and before completing the refresh operation of the complex programmable logic device of the target board, the method further includes:
[0072] Setting the refresh variable to a second preset value and storing it in the attribute table;
[0073] After detecting that the refresh operation of the complex programmable logic device of the target board is completed, the method further includes:
[0074] The refresh variable is set to a third preset value and stored in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
[0075] When it is detected that the server is in the power-on state, at least the integrated circuit bus and address of the target board's complex programmable logic device and a flag indicating that the target board's complex programmable logic device has not been refreshed are stored in the motherboard's memory, and the target board's complex programmable logic device is refreshed after a power cycle (power off, wait a few seconds, then power on). Executing the target board's complex programmable logic device refresh operation after the power cycle includes:
[0076] After the power cycle, a fourth preset value is written into a memory for storing power-on and power-off states in the complex programmable logic device of the mainboard to control the server to shut down; the fourth preset value is not limited and is determined according to actual conditions;
[0077] Reading data in the memory of the mainboard, and determining whether the data in the memory of the mainboard contains a flag indicating that the complex programmable logic device of the target board has not been refreshed;
[0078] If so, a refresh operation of the complex programmable logic device of the target board is performed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the main board.
[0079] Similarly, in order to facilitate users to understand the update process of the complex programmable logic device, a refresh variable is set in the embodiment of the present application. Specifically, before updating the complex programmable logic device of the target board, it also includes:
[0080] Setting a refresh variable used to represent a refresh state to a first preset value and storing the value in the attribute table;
[0081] After detecting that the data in the memory of the mainboard includes a flag indicating that the complex programmable logic device of the target board has not been refreshed, and before completing the refresh operation of the complex programmable logic device of the target board according to the integrated circuit bus and address of the complex programmable logic device of the target board in the memory of the mainboard, the method further includes:
[0082] Setting the refresh variable to a second preset value and storing it in the attribute table;
[0083] In the case where a refresh operation of the complex programmable logic device of the target board is completed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the main board, the method further includes:
[0084] The refresh variable is set to a third preset value and stored in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
[0085] For the above-mentioned method of updating a complex programmable logic device when the server is in a shutdown state and the method of updating a complex programmable logic device when the server is in a powered-on state, when it is detected that the current refresh state and the previous refresh state meet preset requirements, determining that the complex programmable logic device of the target board has completed the update includes:
[0086] When it is detected that the refresh variable corresponding to the previous refresh state is the first preset value or the second preset value, and the refresh variable corresponding to the current refresh state is the third preset value, it is determined that the complex programmable logic device of the target board has completed updating.
[0087] There is no limit on the first preset value, the second preset value, and the third preset value of the refresh variable. For example, if the initial value is set to 0, it means that no refresh is being performed, 1 means that refresh is being performed, and 2 means that refresh is completed.
[0088] Since refreshing a complex programmable logic device (CPLD) requires shutting down the server, to ensure normal operation of the server after the refresh is complete, in practice, if it is detected that the data in the motherboard's memory does not contain a flag indicating that the complex programmable logic device of the target board has not been refreshed, or if a refresh operation of the complex programmable logic device of the target board is performed based on the integrated circuit bus and address of the target board's CPLD in the motherboard's memory, a fifth preset value is written to the memory used to store the power on / off status to control the server to start up. The fifth preset value is not limited and is determined based on actual conditions.
[0089] To help users further understand the update process of a complex programmable logic device, FIG3 is a flowchart of a method for updating a complex programmable logic device provided in an embodiment of the present application. As shown in FIG3 , the method includes:
[0090] S18: Set the refresh variable to 0 and set it in the attribute table;
[0091] S19: Upgrade the complex programmable logic device until the upgrade is completed;
[0092] S20: Read the power-on / off related attributes in the attribute table to determine whether the device is currently powered on; if not, proceed to step S21; if so, proceed to step S22;
[0093] S21: temporarily storing the unrefreshed flag bit and the bus address of the complex programmable logic device in the memory of the mainboard;
[0094] S22: Set the refresh variable to 1 and set it in the attribute table;
[0095] S23: executing a refresh operation of the complex programmable logic device;
[0096] S24: Set the refresh variable to 2 and set it in the attribute table.
[0097] In practice, updating a complex programmable logic device includes the following process:
[0098] 1. Before updating the complex programmable logic device, set the refresh variable to 0, indicating that it is not in the refresh phase, and set it in the attribute table;
[0099] 2. When upgrading the CPLD image file through scripts, web interfaces, or Redfish, the baseboard management controller will split the image file into fixed-size pieces and write them to the CPLD on the fan board through the integrated circuit bus. At this point, the new CPLD image is not yet effective and requires a second refresh operation to take effect.
[0100] 3. Read the power-on / off related properties in the property table to determine whether the device is currently powered on or off. If it is powered off, the complex programmable logic device refresh operation can be performed at this time, and step 4 can be executed. Otherwise, step 5 can be executed.
[0101] 4. If the system is shutting down, first set the refresh variable to 1 and then write it to the property table, indicating that the CPLD is being refreshed. Then the baseboard management controller refreshes the CPLD by writing preset values to specific registers of the CPLD. After the refresh, the new CPLD image takes effect. Then set the refresh variable to 2 and set it to the property table, indicating that the refresh is complete.
[0102] 5. If the computer is powered on, the complex programmable logic device refresh operation cannot be performed at this time. First, temporarily store relevant information such as the unrefreshed flag, the integrated circuit bus where the fan board is located, the address, and other related information in the mainboard's electrically erasable programmable read-only memory (EEPROM), and then perform the refresh operation when the power is cycled.
[0103] FIG4 is a flow chart of a method for performing a refresh of a complex programmable logic device during a power cycle according to an embodiment of the present application. As shown in FIG4 , the method includes:
[0104] S25: The user executes a power cycle instruction;
[0105] S26: Shut down the system by writing to a specific register of the motherboard's complex programmable logic device;
[0106] S27: After the shutdown is successful, read the data in the mainboard memory;
[0107] S28: Determine whether there is a power-on flag; if so, proceed to step S29; if not, proceed to step S32;
[0108] S29: Set the refresh variable to 1 and set it in the attribute table;
[0109] S30: executing a complex programmable logic device refresh operation;
[0110] S31: Set the refresh variable to 2 and set it in the attribute table;
[0111] S32: Start the system by writing to specific registers of the motherboard's complex programmable logic device.
[0112] In implementation, the method for performing a refresh of a complex programmable logic device during a power cycle specifically includes the following steps:
[0113] 1. When the user performs a power cycle through commands or the web interface, the baseboard management controller will first indirectly control the server shutdown by writing a specific value to a specific register in the motherboard complex programmable logic device;
[0114] 2. After the server is shut down, the CPLD refresh operation can be performed. First, the data in the mainboard's electrically erasable programmable read-only memory is read to determine whether there is an unrefreshed flag in the electrically erasable programmable read-only memory. If not, it indicates that the CPLD update operation was not performed when the server was turned on. In this case, the server can be turned on directly by writing to the specific register of the CPLD.
[0115] 3. If there is an unrefreshed flag, it means that the server update operation was performed while the server was turned on. Then read the integrated circuit bus, address and other information where the fan board is located from the mainboard's electrically erasable programmable read-only memory. First, set the refresh variable to 1 and set it in the attribute table. Then refresh the complex programmable logic device, then set the refresh variable to 2 and set it in the attribute table, and finally turn on the server.
[0116] In order to determine whether the complex programmable logic device of the target board has completed the update, in an embodiment of the present application, the current refresh state of the complex programmable logic device of the target board and the refresh state of the previous refresh state are obtained. When it is detected that the current refresh state and the previous refresh state meet the preset requirements, it is determined that the complex programmable logic device of the target board has completed the update. There is no limitation on the preset requirements, and the determination is based on the actual situation. As described above, if the refresh variable corresponding to the current refresh state is 2, and the refresh variable corresponding to the previous refresh state is 0 or 1, then it is determined that the complex programmable logic device of the target board has completed the update.
[0117] In implementation, after it is determined that the complex programmable logic device has completed updating, the complex programmable logic device may be written in the following manner.
[0118] Method 1: After updating the CPLD, restart the baseboard management controller. The baseboard management controller will rewrite the CPLD after restarting, and the indicator device will maintain its original status.
[0119] Method 2: Regardless of whether the complex programmable logic device is updated, the complex programmable logic device is written once every second. In this way, even after the complex programmable logic device is updated, the original state of the indicating device can be maintained.
[0120] However, in method one, the baseboard management controller needs to be restarted. If the baseboard management controller is processing other business operations, the function of the baseboard management controller will be affected. This method makes the complex programmable logic device and the baseboard management controller too tightly coupled, which does not conform to the principle of high cohesion and low coupling.
[0121] In method 2, since the complex programmable logic device is written once every second, the resources of the central processing unit and memory will be greatly wasted, resulting in high CPU occupancy and high memory usage. In addition, the baseboard management controller controls the status of the fan light by writing the complex programmable logic device through the integrated circuit bus. This is an operation of software controlling hardware. If the integrated circuit bus is hung, the process of the baseboard management controller writing the complex programmable logic device through the integrated circuit bus may take a long time to complete. If it is written once every second, it will take a long time to complete each time, which may affect other functions of the software system.
[0122] Therefore, in order to solve the problem of the impact on the baseboard management controller business caused by restarting the baseboard management controller after refreshing the complex programmable logic device, and to reduce the number of times the complex programmable logic device is written, thereby avoiding the waste of central processing unit resources and memory resources, in the embodiment of the present application, after determining that the complex programmable logic device has completed the update, when the baseboard management controller is working, the data corresponding to the current secondary state to be set is written into the complex programmable logic device of the target board, so that the state of the indicator device is controlled by the complex programmable logic device of the target board to be the current secondary state to be set.
[0123] In the method provided by the embodiment of the present application, first, after determining that the complex programmable logic device of the target board has completed the update, the baseboard management controller writes the data corresponding to the current state to be set into the complex programmable logic device of the target board, so that after the complex programmable logic device is updated, the indicator device can still maintain the state to be set before the complex programmable logic device is updated, rather than the default state, so that the indicator device can accurately reflect the working state of the device, and the user can accurately understand the working state of the device through the indicator device; secondly, since the baseboard management controller is working, the baseboard management controller writes the data corresponding to the current state to be set into the complex programmable logic device of the target board, compared with the method of restarting the baseboard management controller to write the complex programmable logic device, the method provided by the present application ensures that the baseboard management controller is up to date. and other services on the processing controller; thirdly, compared with the method of writing to the complex programmable logic device every second regardless of whether the complex programmable logic device is updated, the method provided in the present application only writes to the complex programmable logic device after determining that the complex programmable logic device has completed the update, thereby reducing the number of times the complex programmable logic device is written, avoiding the waste of central processing unit resources and memory resources, and also avoiding the possible impact on software performance caused by hardware failures such as integrated circuit bus lines, thereby improving the user experience when using the server; in addition, in the method, by detecting that the current refresh status and the previous refresh status meet the preset requirements, it is determined that the complex programmable logic device of the target board has completed the update, thereby achieving accurate judgment on the completion of the update of the complex programmable logic device, making the timing of writing the complex programmable logic device more accurate.
[0124] In practice, the working state of a device usually remains unchanged over a period of time. If the working state of the indicator device is updated by writing to the complex programmable logic device every second, it will lead to a waste of CPU resources and memory resources. Therefore, in order to reduce resource waste, in some embodiments, after writing the data corresponding to the current secondary state to be set to the complex programmable logic device of the target board, the method further includes: returning to the step of obtaining the current secondary state to be set of the indicator device corresponding to the target device to obtain a new current secondary state to be set;
[0125] Determine whether the current secondary waiting setting state is the same as the new current secondary waiting setting state;
[0126] If so, the data corresponding to the current state to be set in the complex programmable logic device of the target board is kept unchanged;
[0127] If not, the data corresponding to the new current secondary state to be set will be written into the complex programmable logic device of the target board so that the state of the indicator device can be updated from the current secondary state to be set to the new current secondary state to be set through the complex programmable logic device of the target board.
[0128] Here, we continue to use the fan light as an example to illustrate its current pending state. Relative to the new current secondary pending state (represented by LEDPattern), the previous current secondary pending state is the previously set state (represented by PreLEDPattern). If PreLEDPattern and LEDPattern are different, this indicates a change in the fan state, requiring the fan light's state to be updated. Specifically, data representing the new current secondary pending state is written to the target board's complex programmable logic device (CPLD), thereby controlling the target board's CPLD to update the indicator's state from the current secondary pending state to the new current secondary pending state.
[0129] In the method provided in this embodiment, the complex programmable logic device is written only when it is detected that the current state to be set is different from the new state to be set. Compared with the method of updating the working status of the indicating device by writing the complex programmable logic device every second, the method provided in this embodiment reduces the waste of resources.
[0130] There are multiple devices on the server, and the working status of the multiple devices may need to be displayed through the status of the corresponding indicator devices. In order to ensure that the working status of each device is reflected through the corresponding indicator device as much as possible, in some embodiments, before obtaining the current state to be set of the indicator device corresponding to the target device, the following is also included:
[0131] Acquire information of all target devices and store the information of the target devices in an attribute table; wherein the information of the target devices at least includes the quantity of all target devices and an identifier of each target device;
[0132] Obtaining the current secondary setting state of the indicator device corresponding to the target device includes:
[0133] The current secondary setting state of the indicator device corresponding to each target device is obtained from the attribute table respectively.
[0134] All devices are recorded in the attribute table, and the steps of the above-mentioned control method of the indicating device are executed for each device, so that after the complex programmable logic device is updated, the indicating device corresponding to each device can still correctly reflect the working status of the device, thereby improving the user experience when using the server.
[0135] In order to enable those skilled in the art to better understand the present application, the following uses the control process of a fan light as an example, and further describes the present application in detail in conjunction with the accompanying drawings and specific implementation methods. The specific lighting process is divided into the following modules: 1. Fan status acquisition module; 2. Complex programmable logic device update module; 3. Power cycle refresh module; 4. Lighting module. The control process of the fan status acquisition module (refer to FIG2 ), the control process of the complex programmable logic device update module (refer to FIG3 ), and the control process of the power cycle refresh module (refer to FIG4 ) have been described in detail above and will not be repeated here. Only the control process of the lighting module will be described.
[0136] FIG5 is a flow chart of a method for controlling a lighting module according to an embodiment of the present application. As shown in FIG5 , the method includes:
[0137] S33: Get the number of fans;
[0138] S34: traverse all fans;
[0139] S35: Obtain the fan value and status in the attribute table, and obtain the status and speed of each fan;
[0140] S36: Determine whether the fan status is scanning prohibited; if so, proceed to step S37; if not, proceed to step S38;
[0141] S37: Set the fan light's current state to 0x00;
[0142] S38: Determine whether the fan speed is less than a threshold; if so, proceed to step S39; if not, proceed to step S40;
[0143] S39: Set the fan light's current state to 0x10;
[0144] S40: Set the fan light's current state to 0x01;
[0145] S41: Determine whether the state set last time is different from the state that should be set currently or determine whether the variable refreshed last time is 0 or 1, and whether the variable refreshed currently is 2; if so, proceed to step S42;
[0146] S42: Write to the specific register of the complex programmable logic device to set the fan light on and off and color;
[0147] S43: Assign the value of the state that should be set currently to the state set last time, assign the value of the currently refreshed variable to the value of the last refreshed variable, and return to step S35.
[0148] It should be noted that, for step S41, if no, the value of the specific register of the complex programmable logic device remains unchanged.
[0149] In practice, the control method of the lighting module specifically includes the following process:
[0150] 1. Obtain the number of fans that should be on the current server by reading the attribute table, and then iterate over each fan and perform subsequent operations on each fan;
[0151] 2. Read the speed and status of each fan from the attribute table to determine whether the fan status is "disable scanning". If it is, it means that the fan is not currently plugged in. Then, set the fan light's current status LEDPattern to 0x00, which is off.
[0152] 3. If the fan status is not in the "Disable Scan" state, it indicates that the fan is plugged in. Continue to determine whether the fan speed is less than a certain threshold, such as 500 rpm. If it is, the fan speed is too low and a fault may have occurred. Set the fan light's current status LEDPattern to 0x10, which indicates an orange light.
[0153] 4. If the fan speed is not lower than the threshold, it indicates that it is normal. Set the fan light's current status LEDPattern to 0x01, which is a green light.
[0154] 5. Determine whether "PreLEDPattern (indicates the last fan light setting state, the default value is 0xff) and LEDPattern (indicates the current fan light setting state, 0x00 is off, 0x01 is green light, 0x10 is orange light, and 0xff is the default value when the baseboard management controller starts) are different" or "PreRefresh (indicates the last CPLD refresh state) is 0 or 1 and refresh (indicates the current CPLD refresh state) is 2." If the PreLEDPattern value is different from the LEDPattern value, it means that the fan state has changed and the fan light state needs to be updated. If PreRefresh is 0 or 1 and refresh is 2, it means that the CPLD has just been refreshed and the fan light has returned to the default state - off. The fan light state needs to be updated again.
[0155] 6. The baseboard management controller writes the value of LEDPattern to the specific register of the fan board complex programmable logic device, and the complex programmable logic device controls the on and off of the fan light;
[0156] 7. Finally, assign the value of LEDPattern to PreLEDPattern and the value of refresh to PreRefresh, and continue the next loop.
[0157] Furthermore, Figure 6 illustrates an architecture for maintaining fan light status after updating a fan board's complex programmable logic device (CPLD), as provided by an embodiment of the present application. As shown in Figure 6, the architecture includes fan board 1 and mainboard 2, which exchange data to maintain fan light status after updating the fan board's CPLD. The arrows in Figure 6 are based on the fan status acquisition module, CPLD update module, power cycle refresh module, and light-on module. Data flowing into these four modules represents a read, while data flowing out represents a write.
[0158] The method for maintaining the fan light status after updating the fan board complex programmable logic device through the above architecture specifically includes the following process:
[0159] 1. The fan status acquisition module reads the fan status from the fan board complex programmable logic device register list;
[0160] 2. The fan status acquisition module reads the fan speed from the fan board complex programmable logic device register list;
[0161] 3. The fan status acquisition module writes the fan status and speed to the baseboard management controller attribute table;
[0162] 4. The complex programmable logic device update module upgrades the complex programmable logic device image to the complex programmable logic device on the fan board;
[0163] 5. The complex programmable logic device update module writes the value of the refresh variable into the baseboard management controller attribute table;
[0164] 6. The baseboard management controller reads the motherboard complex programmable logic device to obtain the server's power on / off status and writes it into the baseboard management controller attribute table;
[0165] 7. The complex programmable logic device update module reads the attribute table to obtain the power on / off status;
[0166] 8. The complex programmable logic device update module writes the unrefreshed flag bit and bus address and other information into the mainboard EEPROM;
[0167] 9. The CPLD update module writes the fan board CPLD register to refresh the CPLD;
[0168] 10. The shutdown refresh module shuts down the server by writing to the motherboard complex programmable logic device register;
[0169] 11. The shutdown refresh module reads the motherboard memory (specifically, the electrically erasable programmable read-only memory) to obtain information such as the unrefreshed flag and the fan board bus address;
[0170] 12. The shutdown refresh module writes the value of the refresh variable into the baseboard management controller attribute table;
[0171] 13. The shutdown refresh module writes the fan board complex programmable logic device register to refresh the complex programmable logic device;
[0172] 14. The lighting module reads the baseboard management controller attribute table to obtain the number of fans;
[0173] 15. The lighting module reads the baseboard management controller attribute table to obtain the fan speed and status;
[0174] 16. The lighting module reads the baseboard management controller attribute table to obtain the refresh variable value;
[0175] 17. The lighting module writes the fan board complex programmable logic device register.
[0176] In the method provided in this embodiment, by determining whether the fan board's complex programmable logic device has been refreshed, if the refresh is complete, the complex programmable logic device is rewritten to re-light the light. This method solves the problem of the fan indicator light not lighting up after the complex programmable logic device is refreshed because the baseboard management controller cannot sense the change in fan status. This method does not require restarting the baseboard management controller after refreshing the complex programmable logic device, thus avoiding the impact on the baseboard management controller's business. This method only rewrites the register corresponding to the complex programmable logic device fan indicator light once the complex programmable logic device is refreshed, without having to rewrite it every second, thus avoiding the waste of CPU resources and memory resources, and also avoiding the possible impact on software performance caused by hardware failures such as integrated circuit bus lines. Moreover, this method is compatible with both shutting down the computer to perform a complex programmable logic device update and performing a complex programmable logic device update.
[0177] It should be noted that the method provided in this embodiment is aimed at the problem that the fan indicator light does not light up after refreshing the complex programmable logic device of the fan board, but it is not limited to this problem. For example, other boards such as hard disk backplanes, motherboards, input and output boards, etc., if they have indicator lights or are not indicator lights but have only a few states, and the status is updated by writing the complex programmable logic device through the baseboard management controller after the state changes, this solution is applicable to them.
[0178] In the above embodiments, the control method of the indicating device is described in detail. This application also provides corresponding embodiments of the control device and server of the indicating device. It should be noted that this application describes the embodiments of the device part from two perspectives: one is based on the functional module perspective, and the other is based on the hardware perspective.
[0179] FIG7 is a structural diagram of a control device of an indicator device provided in an embodiment of the present application. This embodiment is based on the perspective of functional modules and includes:
[0180] A first acquisition module 10 is used to acquire the current secondary setting state of the indicator device corresponding to the target device;
[0181] The second acquisition module 11 is used to obtain the current refresh status and the previous refresh status of the complex programmable logic device of the target board; wherein the refresh status includes the unrefreshed state, the refreshing state, and the refresh completed state; the target board is the board to which the indicating device is connected, and the target device is the device set on the target board;
[0182] The detection and determination module 12 is used to determine that the complex programmable logic device of the target board has completed the update when it is detected that the current refresh state and the previous refresh state meet the preset requirements;
[0183] The writing module 13 is used to write data corresponding to the current secondary state to be set into the complex programmable logic device of the target board when the baseboard management controller is working, so that the state of the indicator device is controlled by the complex programmable logic device of the target board to be the current secondary state to be set.
[0184] In some embodiments, the control device of the indicating device further comprises: a first judging module for judging whether the current secondary state to be set is the same as the new current secondary state to be set; if so, triggering the holding module; if not, triggering the first writing module;
[0185] A holding module is used to keep unchanged the data corresponding to the current state to be set in the complex programmable logic device of the target board;
[0186] The first writing module is used to write data corresponding to the new current secondary state to be set into the complex programmable logic device of the target board card, so that the state of the indicator device is updated from the current secondary state to be set to the new current secondary state to be set through the complex programmable logic device of the target board card.
[0187] The first acquisition module 10 specifically includes:
[0188] A third acquisition module is used to obtain the in-place status of the target device;
[0189] A first determining module is configured to determine that the current state of the indicator device to be set corresponding to the target device is a first state when it is detected that the target device is not in place;
[0190] a fourth acquisition module, configured to acquire a property value of the target device when the target device is detected to be in place; wherein the property of the target device is determined according to the type of the target device;
[0191] A second determining module is configured to determine that the current state to be set of the indicator device corresponding to the target device is a second state if it is detected that the attribute value is greater than or equal to the threshold;
[0192] The third determining module is configured to determine that the current secondary to-be-set state of the indicator device corresponding to the target device is a third state if it is detected that the attribute value is less than a threshold value.
[0193] In some embodiments, the third acquisition module specifically includes:
[0194] A first reading module is used to read a register for storing in-bit state data of a target device through an integrated circuit bus and an address where a complex programmable logic device of a target board is located;
[0195] A first storage module is configured to store the target device's in-position state data read from a register for storing the target device's in-position state data into an attribute table;
[0196] The fifth acquisition module is used to acquire the in-place status of the target device from the attribute table.
[0197] In some embodiments, the fourth acquisition module specifically includes:
[0198] A second reading module is used to read a register for storing a property value of a target device through an integrated circuit bus and an address where the complex programmable logic device of the target board is located;
[0199] A second storage module is used to store the attribute value of the target device read from the register used to store the attribute value of the target device into the attribute table;
[0200] The sixth acquisition module is used to acquire the attribute value of the target device from the attribute table.
[0201] In some embodiments, the control device of the indicating device includes an update module for updating the complex programmable logic device of the target board;
[0202] The update modules include:
[0203] A seventh acquisition module is used to obtain the image file of the complex programmable logic device of the upgraded target board;
[0204] A second writing module is used to write the image file of the upgraded complex programmable logic device of the target board into the complex programmable logic device of the target board;
[0205] An eighth acquisition module, configured to acquire the power on / off status of the server from the complex programmable logic device of the mainboard;
[0206] The first refresh module is used to execute a refresh operation of the complex programmable logic device of the target board when detecting that the power on / off state of the server is the power off state.
[0207] In some embodiments, the control device of the indicating device further includes:
[0208] The second refresh module is used to store at least the integrated circuit bus and address of the complex programmable logic device of the target board and the flag bit indicating that the complex programmable logic device of the target board has not been refreshed in the memory of the mainboard when it is detected that the power-on / off state of the server is the power-on state, and perform the refresh operation of the complex programmable logic device of the target board after the power cycle.
[0209] In some embodiments, the control device of the indicating device further comprises:
[0210] A third storage module is used to set the refresh variable used to represent the refresh state to a first preset value and store it in the attribute table;
[0211] a fourth storage module, configured to set the refresh variable to a second preset value and store the value in the attribute table;
[0212] The fifth storage module is used to set the refresh variable to a third preset value and store it in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
[0213] In some embodiments, the second refresh module specifically includes:
[0214] A third writing module is used to write a fourth preset value into a memory for storing power on / off status in the complex programmable logic device of the mainboard to control the server to shut down after a power cycle;
[0215] The second judgment module is used to read the data in the memory of the mainboard and judge whether the data in the memory of the mainboard contains a flag indicating that the complex programmable logic device of the target board has not been refreshed; if so, trigger the third refresh module;
[0216] The third refresh module is used to perform a refresh operation on the complex programmable logic device of the target board according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the mainboard.
[0217] In some embodiments, the control device of the indicating device further comprises:
[0218] a sixth storage module, configured to set a refresh variable used to characterize a refresh state to a first preset value and store the value in an attribute table;
[0219] a seventh storage module, configured to set the refresh variable to a second preset value and store the value in the attribute table;
[0220] The eighth storage module is used to set the refresh variable to a third preset value and store it in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
[0221] In some embodiments, the control device of the indicating device further comprises:
[0222] The fourth writing module is used to control the server power-on by writing a fifth preset value to the memory for storing the power-on and power-off status when it is detected that the data in the memory of the mainboard does not contain a flag bit indicating that the complex programmable logic device of the target board has not been refreshed, or when the refresh operation of the complex programmable logic device of the target board is performed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the mainboard.
[0223] The detection and determination module 12 is specifically used to determine that the complex programmable logic device of the target board has completed the update when it is detected that the refresh variable corresponding to the previous refresh state is the first preset value or the second preset value, and the refresh variable corresponding to the current refresh state is the third preset value.
[0224] In some embodiments, the control device of the indicating device further comprises:
[0225] An acquisition and storage module, configured to acquire information of all target devices and store the information of the target devices in an attribute table; wherein the information of the target devices at least includes the number of all target devices and an identification of each target device;
[0226] The first acquisition module 10 is specifically configured to respectively acquire the current secondary to-be-set status of the indicator device corresponding to each target device from the attribute table.
[0227] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0228] FIG8 is a structural diagram of a server provided in another embodiment of the present application. This embodiment is based on the hardware perspective. As shown in FIG8 , the server includes:
[0229] Memory 20, for storing computer-readable instructions;
[0230] The processor 21 is configured to implement the steps of the control method of the indicating device mentioned in the above embodiment when executing computer-readable instructions.
[0231] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU, which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0232] The memory 20 may include one or more non-volatile computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer-readable instructions 201, wherein, after the computer-readable instructions are loaded and executed by the processor 21, the relevant steps of the control method of the indicating device disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the data involved in the control method of the indicating device mentioned above.
[0233] In some embodiments, the server may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0234] Those skilled in the art will appreciate that the structure shown in FIG8 does not limit the server and may include more or fewer components than shown in the figure.
[0235] The server provided in an embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: a control method of an indicating device, with the same effect as above.
[0236] Finally, the present application also provides an embodiment corresponding to a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps described in the above method embodiment.
[0237] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in one or more embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as 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.
[0238] The non-volatile computer-readable storage medium provided in this application includes the control method of the above-mentioned indicating device, and the effect is the same as above.
[0239] The above is a detailed introduction to the control method, device, server and medium of an indicating device provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of this application.
[0240] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A method for controlling an indicating device, characterized in that: Baseboard management controller for motherboards, including: Obtain the current secondary setting state of the indicator device corresponding to the target device; Obtaining the current refresh status and the previous refresh status of the complex programmable logic device of the target board; wherein the refresh status includes a non-refreshed state, a refreshing state, and a refresh completed state; the target board is the board to which the indicating device is connected, and the target device is the device provided on the target board; When it is detected that the current refresh state and the previous refresh state meet the preset requirements, determining that the complex programmable logic device of the target board has completed the update; and When the baseboard management controller is working, the data corresponding to the current secondary state to be set is written into the complex programmable logic device of the target board, so that the state of the indicator device is controlled by the complex programmable logic device of the target board to be the current secondary state to be set.
2. The control method of the indicating device according to claim 1, characterized in that: After writing the data corresponding to the current state to be set into the complex programmable logic device of the target board, the method further includes: Return to the step of obtaining the current secondary state to be set of the indicator device corresponding to the target device to obtain a new current secondary state to be set; Determine whether the current secondary waiting setting state is the same as the new current secondary waiting setting state; and In response to the current secondary state to be set being the same as the new current secondary state to be set, the data corresponding to the current secondary state to be set in the complex programmable logic device of the target board is kept unchanged.
3. The control method of the indicating device according to claim 2, characterized in that: The method further comprises: In response to the current secondary state to be set being different from the new current secondary state to be set, data corresponding to the new current secondary state to be set is written into the complex programmable logic device of the target board so that the state of the indicator device is updated from the current secondary state to be set to the new current secondary state to be set through the complex programmable logic device of the target board.
4. The control method of the indicator device according to claim 3, characterized in that: Obtaining a current secondary setting state of an indicator device corresponding to the target device includes: Acquiring the in-place status of the target device; In the case where it is detected that the target device is not in position, determining that the current secondary state to be set of the indicator device corresponding to the target device is a first state; When the target device is detected to be in place, obtaining a property value of the target device; wherein the property of the target device is determined according to the type of the target device; and In response to detecting that the attribute value is greater than or equal to a threshold, determining that the current secondary to-be-set state of the indicator device corresponding to the target device is a second state.
5. The control method of the indicating device according to claim 4, characterized in that: The method further comprises: In response to detecting that the attribute value is less than the threshold, it is determined that the current secondary to-be-set state of the indicator device corresponding to the target device is a third state.
6. The control method of the indicating device according to claim 4, characterized in that: Obtaining the in-place status of the target device includes: Reading a register for storing in-position state data of the target device through an integrated circuit bus and an address where the complex programmable logic device of the target board is located; storing the in-position state data of the target device read from the register for storing the in-position state data of the target device into an attribute table; and The in-place status of the target device is obtained from the attribute table.
7. The control method of the indicating device according to claim 6, characterized in that: Obtaining the attribute value of the target device includes: Reading a register for storing a property value of the target device through an integrated circuit bus and an address where the complex programmable logic device of the target board is located; storing the attribute value of the target device read from the register for storing the attribute value of the target device in the attribute table; and Acquire the attribute value of the target device from the attribute table.
8. The control method of the indicating device according to claim 7, characterized in that: Updating the complex programmable logic device of the target board, including: Obtaining an upgraded image file of the complex programmable logic device of the target board; Writing the upgraded image file of the complex programmable logic device of the target board into the complex programmable logic device of the target board; Obtain the motherboard's complex programmable logic device to obtain the server's power on / off status; and When it is detected that the power-on / off state of the server is the power-off state, a refresh operation of the complex programmable logic device of the target board is executed.
9. The control method of the indicating device according to claim 8, characterized in that: Also includes: The image file of the complex programmable logic device of the target board is upgraded through a script, a web interface or a redfish method.
10. The control method of the indicating device according to claim 9, characterized in that: The step of writing the upgraded image file of the complex programmable logic device of the target board into the complex programmable logic device of the target board comprises: The baseboard management controller divides the upgraded image file of the complex programmable logic device of the target board into pieces of fixed size and writes the pieces into the complex programmable logic device of the target board through an integrated circuit bus channel.
11. The control method of the indicating device according to claim 8, characterized in that: Also includes: When it is detected that the server's power-on / off state is the power-on state, at least the integrated circuit bus and address where the complex programmable logic device of the target board is located and the flag bit indicating that the complex programmable logic device of the target board has not been refreshed are stored in the memory of the mainboard, and the refresh operation of the complex programmable logic device of the target board is executed after the power cycle.
12. The control method of the indicating device according to claim 8, characterized in that: Before updating the complex programmable logic device of the target board, the method further includes: The refresh variable used to represent the refresh state is set to a first preset value and stored in the attribute table; after detecting that the power-on / off state of the server is the shutdown state, before completing the refresh operation of the complex programmable logic device of the target board, the method further includes: Setting the refresh variable to a second preset value and storing the value in the attribute table; and After detecting that the refresh operation of the complex programmable logic device of the target board is completed, it also includes: setting the refresh variable to a third preset value and storing it in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
13. The control method of the indicating device according to claim 11, characterized in that: Performing a refresh operation of the complex programmable logic device of the target board after a power cycle includes: After a power cycle, writing a fourth preset value into a memory for storing power-on and power-off states in a complex programmable logic device of the mainboard to control the server to shut down; Reading data in the memory of the mainboard, and determining whether the data in the memory of the mainboard contains a flag indicating that the complex programmable logic device of the target board has not been refreshed; and In response to the data in the mainboard's memory containing a flag indicating that the complex programmable logic device of the target board has not been refreshed, a refresh operation of the complex programmable logic device of the target board is performed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the mainboard's memory.
14. The control method of the indicator device according to claim 13, characterized in that: Before updating the complex programmable logic device of the target board, the method further includes: Setting a refresh variable used to characterize a refresh state to a first preset value and storing the value in the attribute table; After detecting that the data in the memory of the mainboard includes a flag indicating that the complex programmable logic device of the target board has not been refreshed, and before completing the refresh operation of the complex programmable logic device of the target board according to the integrated circuit bus and address of the complex programmable logic device of the target board in the memory of the mainboard, the method further includes: Setting the refresh variable to a second preset value and storing the value in the attribute table; In the case where the refresh operation of the complex programmable logic device of the target board is completed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the main board, the method further includes: and The refresh variable is set to a third preset value and stored in the attribute table; wherein the first preset value, the second preset value, and the third preset value are not equal.
15. The control method of the indicator device according to claim 13, characterized in that: Also includes: When it is detected that the data in the memory of the mainboard does not contain a flag indicating that the complex programmable logic device of the target board has not been refreshed, or when the refresh operation of the complex programmable logic device of the target board is performed according to the integrated circuit bus and address where the complex programmable logic device of the target board is located in the memory of the mainboard, the server is controlled to be powered on by writing a fifth preset value to the memory used to store the power on and power off status.
16. The control method of the indicator device according to claim 12 or 14, characterized in that: When it is detected that the current refresh state and the previous refresh state meet the preset requirements, determining that the complex programmable logic device of the target board has completed the update includes: When it is detected that the refresh variable corresponding to the previous refresh state is the first preset value or the second preset value, and the refresh variable corresponding to the current refresh state is the third preset value, it is determined that the complex programmable logic device of the target board has completed the update.
17. The control method of the indicator device according to claim 13, characterized in that: Before obtaining the current state of the indicator device corresponding to the target device to be set, the method further includes: Acquire information of all the target devices and store the information of the target devices in the attribute table; wherein the information of the target devices at least includes the number of all the target devices and the identification of each of the target devices; and Acquiring the current secondary setting state of the indicator device corresponding to the target device includes: The current secondary setting status of the indicator device corresponding to each target device is respectively obtained from the attribute table.
18. A control device for an indicating device, characterized in that: A baseboard management controller applied to a mainboard, the device comprising: A first acquisition module is used to acquire a current secondary setting state of an indicator device corresponding to a target device; A second acquisition module is configured to acquire the current refresh status and the previous refresh status of the complex programmable logic device of the target board; wherein the refresh status includes a non-refreshed state, a refreshing state, and a refresh completed state; the target board is the board to which the indicating device is connected, and the target device is the device provided on the target board; a detection and determination module, configured to determine that the complex programmable logic device of the target board has completed updating when detecting that the current refresh state and the previous refresh state meet preset requirements; and The writing module is used to write data corresponding to the current state to be set into the complex programmable logic device of the target board when the baseboard management controller is working, so that the state of the indicator device is controlled by the complex programmable logic device of the target board to be the current state to be set.
19. A server, characterized in that: include: a memory for storing computer-readable instructions; as well as A processor, configured to implement the steps of the method for controlling an indicating device according to any one of claims 1 to 17 when executing the computer-readable instructions.
20. A non-volatile computer-readable storage medium, characterized in that The non-volatile computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for controlling the indicating device according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Hard disk state detection method and system, complex programmable logic device and server
CN115016996A
Data loss prevention method and device, computer equipment and storage medium
CN115033502A
Server starting fault detection system, method and device and medium
CN116107819A
Mirror image updating method and device and medium
CN116578309A
Server exception monitoring method and device, equipment and storage medium
CN116846790A
Cited By
Fan management and control method and device in BMC starting process, equipment and medium
CN121478358A