A disk detection method and electronic device
Patent Information
- Application Number
- CN202610756856.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-18
AI Technical Summary
[0002]电子设备工作时,需要频繁读写磁盘,如果磁盘安装的位置不正确,可能导致电子设备的部分程序无法正常工作
Smart Images

Figure CN122594082A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of disk testing technology, and in particular to a disk testing method and electronic device. Background Technology
[0002] Electronic devices frequently read and write to disks during operation. If the disk is installed in an incorrect location, some programs on the electronic device may malfunction. Therefore, a method to check whether the disk is installed correctly is urgently needed. Summary of the Invention
[0003] Therefore, this application discloses the following technical solution:
[0004] The first aspect of this application provides a disk detection method applied to a baseboard management controller, the method comprising:
[0005] Send a first control signal to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to the target state via the Unified Extensible Firmware Interface;
[0006] Detect the status register that is in the target state, and record the slot number of the slot corresponding to the status register that is in the target state as the slot number of the target slot;
[0007] By comparing the current slot number of the disk in the in-situ state with the slot number of the target slot, a detection result of the disk is obtained. The current slot number is the slot number of the slot where the disk is currently installed, and the detection result indicates whether the disk is installed in the target slot.
[0008] Optionally, setting the status register of the slot to which the target processor is connected to to the target state via the unified extensible firmware interface includes:
[0009] The indicator light status register of the slot to which the target processor is connected is set to a blinking state via the unified extensible firmware interface, thereby controlling the blinking of the indicator light of the slot to which the target processor is connected.
[0010] Optionally, sending the first control signal to the unified extensible firmware interface includes:
[0011] When a direct network connection is established for the first time after the baseboard management controller is reset, a first control signal is sent to the unified scalable firmware interface.
[0012] Alternatively, in response to receiving user operation instructions, a first control signal is sent to the Unified Extensible Firmware Interface.
[0013] Optional, also includes:
[0014] After obtaining the slot number of the target slot, a second control signal is sent to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to a non-target state via the Unified Extensible Firmware Interface.
[0015] Optionally, the comparison of the current slot number corresponding to the disk in the in-situ state and the slot number of the target slot includes:
[0016] When the target conditions are met, compare the current slot number of the disk in the in-situ state with the slot number of the target slot.
[0017] The conditions for meeting the target include determining that the disk controller running the target processor is in an enabled state, and that the baseboard management controller cannot communicate with the disk controller.
[0018] Optionally, when the target condition is met, comparing the current slot number corresponding to the disk in the in-situ state with the slot number of the target slot includes:
[0019] When the target conditions are met, a detection prompt message is output, which is used to prompt the user to trigger the detection.
[0020] In response to receiving a user-triggered detection operation command, the current slot number of the disk in the in-place state is compared with the slot number of the target slot.
[0021] Optionally, the comparison of the current slot number corresponding to the disk in the in-situ state and the slot number of the target slot includes:
[0022] Identify the target disk that is in place and belongs to the target disk type;
[0023] Obtain the current slot number of the target disk;
[0024] Compare the current slot number of the target disk with the slot number of the target slot.
[0025] Optional, also includes:
[0026] If the detection result indicates that the disk is not installed in the target slot, the slot number of the target slot is output.
[0027] Optional, also includes:
[0028] If the detection result indicates that the disk is not installed in the target slot, the indicator light corresponding to the target slot is controlled to flash via the unified extensible firmware interface.
[0029] A second aspect of this application provides an electronic device, including a baseboard management controller, a unified scalable firmware interface, and a target processor;
[0030] The substrate management controller is used for:
[0031] Send a first control signal to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to the target state via the Unified Extensible Firmware Interface;
[0032] Detect the status register that is in the target state, and record the slot number of the slot corresponding to the status register that is in the target state as the slot number of the target slot;
[0033] By comparing the current slot number of the disk in the in-situ state with the slot number of the target slot, a detection result of the disk is obtained. The current slot number is the slot number of the slot where the disk is currently installed, and the detection result indicates whether the disk is installed in the target slot. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0035] Figure 1 This is a flowchart of a disk detection method provided in an embodiment of this application;
[0036] Figure 2 This is a schematic diagram illustrating the connection relationship between BMC and UEFI provided in an embodiment of this application;
[0037] Figure 3 This is a flowchart of a method for comparing slot numbers provided in an embodiment of this application;
[0038] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0040] This application provides a disk detection method applied to a baseboard management controller. Please refer to [link to relevant documentation]. Figure 1 The method may include the following steps.
[0041] S101, send a first control signal to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to the target state via the Unified Extensible Firmware Interface.
[0042] S102, detect the status register in the target state, and record the slot number of the slot corresponding to the status register in the target state as the slot number of the target slot.
[0043] S103. Compare the current slot number of the disk in the in-situ state with the slot number of the target slot to obtain the disk detection result. The current slot number is the slot number of the slot where the disk is currently installed. The detection result indicates whether the disk is installed in the target slot.
[0044] The detection method of this embodiment can be applied to any server device, and the execution subject of the method can be the baseboard management controller (BMC) of the server device. The server device may have a Virtual RAID on CPU (VROC) module, where RAID stands for Redundant Array of Independent Disks. VROC is a software program that relies on the hardware controller integrated within the central processing unit (CPU) to run. VROC can use the hardware controller to manage the solid-state drives (SSDs) installed on the server device, such as Non-Volatile Memory Host Controller Interface Specification (NVMe) solid-state drives (i.e., NVMe SSDs).
[0045] The disks compared in step S103 may include all disks installed on the server device that are in place, or may only include disks that are in place and belong to a specific type, such as only NVMe SSD disks that are in place.
[0046] In server devices, some functions and modules require the disk to be correctly installed to function properly. If the disk is not installed in the correct location, these functions and modules may malfunction. For example, the out-of-band (OOB) management function of the VROC module requires that the managed disk (such as the NVMe SSD mentioned above) be connected to the main processor (i.e., CPU0) of the server device. If this condition is not met, the out-of-band (OOB) management function of the VROC module cannot be used properly.
[0047] In related technologies, when an error occurs due to an incorrect disk installation location, the error message provided by the server device is rather vague, such as "disk configuration error". Based on this error message, it is difficult for users to determine whether the disk is not installed correctly or whether there is a problem with the disk-related software configuration. Therefore, the server device has the problem of poor maintenance convenience.
[0048] The beneficial effects of this embodiment are as follows:
[0049] By detecting the status register of the slot, the slot number of the target processor's slot can be determined in advance. When detection is needed (e.g., when a related function error is found), the slot number of the current slot of the disk can be compared with the slot number of the target slot. This provides a detection result as to whether the disk is correctly installed, i.e., whether it is installed in the target slot. This allows users to easily determine whether the disk is correctly installed when the server device reports an error, thereby improving the ease of maintenance of the server device.
[0050] The Unified Extensible Firmware Interface (UEFI) is a type of firmware used in server devices to perform functions such as booting the operating system, hardware initialization, and self-testing during server device startup. The connection relationships between the BMC, UEFI, and processor in a server device can be found in [reference needed]. Figure 2 .
[0051] The first control signal is sent from the BMC to the UEFI, which can trigger the UEFI to perform subsequent operations to set the target state. The UEFI may have a diagnostic mode for diagnosing certain functions and modules. The UEFI is configured to perform the operation to set the target state in S101 when entering the corresponding diagnostic mode. Given the aforementioned diagnostic mode, the first control signal can be a signal that triggers the UEFI to enter the diagnostic mode. The UEFI responds to the first control signal and enters the diagnostic mode, where it performs the operation to set the target state according to its configuration.
[0052] As an example, UEFI has a VROC diagnostic mode for diagnosing VROC. The BMC sends a first control signal to UEFI to notify UEFI to enter VROC diagnostic mode. UEFI responds to the first control signal and enters VROC diagnostic mode. In this mode, UEFI sets the status register of the slot to which the target processor is connected to to the target status.
[0053] The target state can be specified by the first control signal or pre-configured in the UEFI's diagnostic mode. The target state can be any of the various states that the status register has. For example, if the status register has state 1 or state 2, the first control signal can specify state 1 as the target state, and then the UEFI will set the status register to state 1. Or, for example, if the status register is an indicator light status register that controls the on / off state of an indicator light, it can have a flashing state, a constantly lit state, and an off state, and the first control signal can specify the flashing state as the target state.
[0054] The target processor is one of several processors in a server device. The target processor can be specified by a first control signal or pre-configured in UEFI diagnostic mode. Which processor is chosen as the target processor depends on the requirements of the function and module being tested (or diagnosed).
[0055] Taking VROC diagnostic mode as an example, if the managed NVMe SSD is not connected to CPU0, VROC will report an error. Therefore, in VROC diagnostic mode, the target processor can be CPU0.
[0056] UEFI can set the status register of the slot to which the target processor is connected in several ways. Optionally, UEFI can send a sideband signal to the status register of the slot to which the target processor is connected via a PCIe cable that uses the PCIe protocol. This sideband signal sets the status register to the target state. The sideband signal can be sent based on some common protocols, such as the Serial Universal Input / Output (SGPIO) protocol and / or the Universal Backplane Management (UBM) protocol.
[0057] In server equipment, the BMC cannot directly detect which specific slot each processor is installed in. For example, it cannot directly identify whether CPU0 is installed in slots 0-3 (bay) or 4-7. However, each slot has its own status register, and the BMC can detect the status of these status registers. Therefore, in S102, after completing the aforementioned settings, the BMC can detect which status registers are in the target state. This allows it to confirm that the slot corresponding to the status register in the target state is the target slot, and its slot number can be recorded as the slot number of the target slot.
[0058] Considering that setting the status register in UEFI may take some time, the BMC can delay the execution of S102 for a certain period of time after sending the first control signal, such as executing S102 1 second after sending the first control signal.
[0059] As an example, CPU0 is installed in slots 0-3 and 4-7. In S101, UEFI sets the status registers of both slots 0-3 and 4-7 to the target state. The BMC detects that the status registers of both slots 0-3 and 4-7 are in the target state, thus confirming that CPU0 is installed in slots 0-3 and 4-7. The target slot numbers are recorded as 0-3 and 4-7. The target slot refers to the slot where the target processor is connected; for example, in the above example, the target slots include slots 0-3 and 4-7.
[0060] The BMC can detect the status registers of each slot through the Inter-Integrated Circuit (I2C) bus and / or the System Management Bus (SMBus).
[0061] In S103, the BMC can read the server device's backplane registers, determine which disks are currently in use based on the information in the backplane registers, and obtain the current slot number of these disks. A disk being in use means that the disk is installed on the backplane and is functioning correctly, and the server device's processor can read and write to it. The current slot number refers to the slot number of the slot where the disk is currently installed. For example, if a disk is installed in slots 0-3, then the current slot number of that disk is 0-3.
[0062] If the current slot number of a disk X does not match the slot number of the target slot after comparison in S103, the detection result of disk X not being installed in the target slot can be obtained; if the current slot number of a disk X matches the slot number of the target slot, the detection result of disk X being installed in the target slot can be obtained.
[0063] Optionally, after executing S101 and S102, the BMC can execute step S103 once or multiple times as needed, without repeating S101 and S102. That is, after executing S101 and S102 at least once, if it is necessary to check whether the disk is correctly installed, the BMC can directly obtain the current slot number, compare the current slot number with the slot number of the target slot recorded between them, and obtain the detection result, without having to redetermine the slot number of the target slot in the manner of S101 and S102 every time a detection is performed.
[0064] Optionally, the status register of the slot to which the target processor is connected can be set to the target state via a unified extensible firmware interface, including:
[0065] By setting the indicator light status register of the slot to which the target processor is connected to to a blinking state through a unified extensible firmware interface, the blinking of the indicator light on the slot to which the target processor is connected can be controlled.
[0066] Based on the above settings, the BMC can detect which indicator light status registers are flashing and record the slot number corresponding to the flashing register as the slot number of the target slot.
[0067] The indicator light can be a light-emitting diode (LED). The indicator light status register is connected to the indicator light and is used to control the status of the indicator light. When the indicator light status register is in the flashing state, the connected indicator light will flash.
[0068] A slot can have multiple status registers. In this embodiment, the UEFI can set one or more specific status registers for each slot by specifying them with the first control signal or by pre-configuring them in diagnostic mode. For example, a slot can have orange and green indicator lights, corresponding to orange indicator light status registers and green indicator light status registers. The UEFI can set the orange indicator light status register of the slot to which the target processor is connected to to a flashing state, causing the orange indicator lights of these slots to flash.
[0069] For example, CPU0 is installed in slots 0-3 and 4-7. The BMC sends the first control signal to the UEFI, and the UEFI sets the status registers of the orange indicator lights in slots 0-3 and 4-7 to the flashing state, so that the orange indicator lights in slots 0-3 and 4-7 flash.
[0070] The advantage of setting the slot's indicator status register to a blinking state is that:
[0071] During the process of BMC determining the slot number of the target slot, the above settings allow relevant personnel to intuitively identify the target slot to which the target processor belongs by observing whether the indicator lights of each slot are flashing, without the need for BMC to specifically output or access BMC to read the slot number of the target slot, further improving the convenience of the method in this embodiment.
[0072] Optionally, the BMC may send the first control signal to the UEFI at various detection times. For example, the timing of the BMC sending the first control signal to the Unified Extensible Firmware Interface may include at least one of the following:
[0073] When a direct network connection is established for the first time after the baseboard management controller is reset, a first control signal is sent to the unified scalable firmware interface.
[0074] Alternatively, in response to receiving user operation instructions, a first control signal is sent to the Unified Extensible Firmware Interface.
[0075] Direct network connection refers to the network connection between the BMC and external electronic devices (such as terminal devices used by administrators) through its dedicated network port. Resetting the board management controller means that the board management controller has been restored to factory settings.
[0076] The purpose of sending the first control signal at this time is that after the baseboard management controller is reset, the slot number of the target slot that it previously determined and recorded may also be reset to the initial value configured in the production stage. The initial value may not match the actual target slot of the server device. For example, the initial value is 0-2, but the actual target slot is slot 4-5. Therefore, the first control signal can be sent once when the direct network connection is established for the first time after the reset in order to obtain the accurate slot number of the target slot.
[0077] The BMC can communicate with electronic devices via out-of-band communication. Users can operate electronic devices that are connected to the BMC. In response to user operations, the electronic devices send user operation commands to the BMC that trigger a first control signal. The BMC then responds to these user operation commands by sending a first control signal to the UEFI.
[0078] Based on this opportunity, the first control signal is sent, enabling the BMC to detect the slot number of the target slot according to the user's needs, so as to obtain the correct slot number of the target slot in a timely manner after the user manually changes the target slot for installing the target processor.
[0079] In some optional embodiments, the BMC may also send a first control signal in response to the operation instructions of the production personnel during the factory production stage of the server equipment to obtain the slot number of the initial target slot; or it may automatically send a first control signal once each time it starts up.
[0080] Optionally, the method in this embodiment may further include:
[0081] After obtaining the slot number of the target slot, a second control signal is sent to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to a non-target state via the Unified Extensible Firmware Interface.
[0082] Setting the status register to a non-target state can include restoring the status register to its state before the target state was set.
[0083] As an example, in response to the first control signal, the UEFI configures the orange indicator status register of the target slot from its original off state to a flashing state (i.e., set it to the target state). Upon receiving the second control signal, the UEFI restores the orange indicator status register of the target slot from the flashing state to the off state (i.e., sets it to the non-target state). The method for setting it to the non-target state is the same as the method for setting it to the target state described above.
[0084] When the UEFI has a diagnostic mode, the second control signal can be a signal used to trigger the UEFI to exit the corresponding diagnostic mode. For example, the first control signal is used to notify the UEFI to enter the VROC diagnostic mode, and the second control signal is used to notify the UEFI to end the VROC diagnostic mode.
[0085] The advantage of sending a second control signal is that if the status register remains in the target state, it may generate additional power consumption. For example, if the indicator status register remains in a flashing state, the corresponding indicator will continue to flash, generating additional power consumption. Sending a second control signal to restore it to a non-target state helps save power consumption of the server equipment.
[0086] Optionally, compare the current slot number of the disk in the in-place state with the slot number of the target slot, including:
[0087] When the target conditions are met, compare the current slot number of the disk in the in-place state with the slot number of the target slot.
[0088] Meeting the target conditions includes ensuring that the disk controller running the target processor is enabled and that the baseboard management controller cannot communicate with the disk controller.
[0089] The disk controller is equivalent to the VROC module in the aforementioned embodiment. Each time the server device's operating system starts (equivalent to the server device booting up), the server device's BMC can detect whether the disk controller is in an enabled state and attempt to communicate with the disk controller. The communication method can be out-of-band (OOB) communication, thereby confirming whether the target conditions are met.
[0090] If the BMC cannot communicate with the disk controller, it means that the disk controller is currently in a state of not being able to operate normally (i.e., the disk controller is reporting an error). If the disk controller is enabled at this time, it means that the disk controller has been correctly installed and is running in the target processor, thus ruling out the possibility that the error is caused by a fault in the disk controller's own program.
[0091] If the above target conditions are confirmed to be met, the BMC will perform the operation of comparing slot numbers in step S103 and output the corresponding detection results.
[0092] The advantage of comparing slot numbers when the target conditions are met is that:
[0093] By setting target conditions, and after confirming that the disk controller is reporting an error and ruling out some possible causes, the slot number can be compared. This helps users quickly determine the cause of the disk controller error. At the same time, by confirming that the disk controller is in an enabled state, the possibility of disk controller software malfunctions can be ruled out. This avoids comparing slot numbers when the error is caused by a software malfunction, thereby reducing unnecessary testing, saving power consumption, and improving testing efficiency.
[0094] The above comparison of slot numbers when the target conditions are met is only one possible example. In some embodiments, the BMC may trigger the comparison of slot numbers based on other patterns. For example, a comparison may be performed periodically at regular intervals; a comparison may be performed in response to the detection of a change in the slot where the disk is located; or a comparison may be performed every time the operating system starts.
[0095] Optionally, when the target conditions are met, the current slot number corresponding to the disk in the in-situ state is compared with the slot number of the target slot, including:
[0096] When the target conditions are met, a detection prompt message is output, which is used to prompt the user to trigger the detection.
[0097] In response to a user-triggered detection command, the current slot number of the disk in the in-situ state is compared with the slot number of the target slot.
[0098] In this embodiment, if the target conditions are confirmed to be met, the BMC may temporarily refrain from comparison and instead output a detection prompt message. The content of the detection prompt message is not limited. As an example, the detection prompt message may be "The disk may not be installed correctly. Should we perform VROC diagnostic detection?"
[0099] When outputting detection prompts, the system can also output options to start or refuse detection. The system receives corresponding operation instructions based on the user's selection of different options. For example, if the user selects "refuse detection," the current slot number is not obtained and no comparison is performed. If the user selects "start detection," the system confirms the user's operation instruction to trigger detection, and the slot number is compared as described above. The detection prompts can be sent by the BMC to the connected electronic device and displayed on the device's screen.
[0100] The advantage of outputting detection prompts using the above method is that, in some scenarios, users do not need to perform disk checks. By outputting detection prompts and comparing them only when an operation command is received, the usage needs of users in different scenarios can be met.
[0101] Optional, see Figure 3 The method for comparing the current slot number of the disk in the in-situ state with the slot number of the target slot may include the following steps.
[0102] S301, Identify the target disk that is in place and belongs to the target disk type.
[0103] S302, obtain the current slot number of the target disk.
[0104] S303 compares the current slot number of the target disk with the slot number of the target slot.
[0105] The disk type can be determined by the BMC based on the information recorded in the backplane registers. The target disk type in S301 refers to the disk type managed by the aforementioned disk controller. Taking VROC as an example, VROC is mainly used to manage NVMe SSDs of server devices. If an NVMe SSD is not installed in the target slot, it will cause a VROC error, while whether other types of disks are installed in the target slot will not have an impact.
[0106] Therefore, the target disk type can include NVMe SSDs. BMC can first filter out NVMe SSDs from all disks in the server device as target disks, and then compare the current slot number of each target disk with the slot number of the target slot. If the current slot number of the target disk and the slot number of the target slot are the same, the detection result is that the target disks are installed in the target slots. If the current slot number of the target disk and the slot number of the target slot are different, the detection result is that the target disks are not installed in the target slots.
[0107] The advantage of filtering target disks by disk type is that:
[0108] The installation location of some types of disks is irrelevant to the error reports of server devices. By filtering target disks, only those target disks that may cause errors due to incorrect installation locations can be detected, while disks whose installation locations are irrelevant to the errors are not detected, thereby improving the detection efficiency of the method in this embodiment.
[0109] Optionally, the method in this embodiment may further include:
[0110] If the detection result indicates that the disk is not installed in the target slot, output the slot number of the target slot.
[0111] BMC can display the slot number of the target slot through a communication-connected electronic device, or output the slot number of the target slot by playing voice.
[0112] Optional, also includes:
[0113] If the test results indicate that the disk is not installed in the target slot, the indicator light corresponding to the target slot can be controlled to flash via the unified extensible firmware interface.
[0114] One method to control the indicator light to blink is to send a command to the UEFI to configure the indicator light status register. This command triggers the UEFI to set the indicator light status register corresponding to the target slot to a blinking state, thereby controlling the indicator light corresponding to the target slot to blink.
[0115] By controlling the flashing of the indicator light corresponding to the target slot, users can intuitively confirm which slot the disk should be correctly installed in by observing the indicator light, further improving the ease of maintenance of server equipment.
[0116] Optionally, the BMC can also control the indicator light of the slot where the target disk is currently located using the method described above, so that users can quickly find and remove the target disk.
[0117] To distinguish between the current slot of the target disk and the correct target slot, you can control the indicator lights of the two slots to be different colors, or control the indicator lights of the two slots to light up in different ways.
[0118] For example, if the target disk is currently installed in slots 12-15 and the target slot is slots 0-3, you can control the red indicator light in slots 12-15 to flash and the green indicator light in slots 0-3 to flash; or you can control the red indicator light in slots 12-15 to flash and the red indicator light in slots 0-3 to remain constantly lit.
[0119] This application also provides an electronic device; please refer to [link to relevant documentation]. Figure 4 It includes a baseboard management controller 401, a unified scalable firmware interface 402, and a target processor 403;
[0120] The baseboard management controller 401 is used for:
[0121] Send a first control signal to the Unified Extensible Firmware Interface 402 to set the status register of the slot to which the target processor 403 is connected to the target state via the Unified Extensible Firmware Interface 402.
[0122] Detect the status register that is in the target state, and record the slot number of the slot corresponding to the status register that is in the target state as the slot number of the target slot;
[0123] The disk detection result is obtained by comparing the current slot number of the disk in the in-situ state with the slot number of the target slot. The current slot number is the slot number of the slot where the disk is currently installed, and the detection result indicates whether the disk is installed in the target slot.
[0124] The working principle of the electronic device in this embodiment can be found in the relevant steps of the disk detection method in the foregoing embodiment, and will not be repeated here.
[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0126] The above systems or apparatuses are described by dividing them into various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware. In this document, relational terms such as first, second, third, and fourth are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0127] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A disk detection method, applied to a baseboard management controller, the method comprising: Send a first control signal to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to the target state via the Unified Extensible Firmware Interface; Detect the status register that is in the target state, and record the slot number of the slot corresponding to the status register that is in the target state as the slot number of the target slot; By comparing the current slot number of the disk in the in-situ state with the slot number of the target slot, a detection result of the disk is obtained. The current slot number is the slot number of the slot where the disk is currently installed, and the detection result indicates whether the disk is installed in the target slot.
2. The method according to claim 1, wherein setting the status register of the slot to which the target processor is connected to the unified extensible firmware interface to the target status includes: The indicator light status register of the slot to which the target processor is connected is set to a blinking state via the unified extensible firmware interface, thereby controlling the blinking of the indicator light of the slot to which the target processor is connected.
3. The method according to claim 1, wherein sending the first control signal to the Unified Extensible Firmware Interface comprises: When a direct network connection is established for the first time after the baseboard management controller is reset, a first control signal is sent to the unified scalable firmware interface. Alternatively, in response to receiving user operation instructions, a first control signal is sent to the Unified Extensible Firmware Interface.
4. The method according to claim 1, further comprising: After obtaining the slot number of the target slot, a second control signal is sent to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to a non-target state via the Unified Extensible Firmware Interface.
5. The method according to claim 1, wherein comparing the current slot number corresponding to the disk in the in-situ state with the slot number of the target slot includes: When the target conditions are met, compare the current slot number of the disk in the in-place state with the slot number of the target slot; The conditions for meeting the target include determining that the disk controller running the target processor is in an enabled state, and that the baseboard management controller cannot communicate with the disk controller.
6. The method according to claim 5, wherein when the target condition is met, comparing the current slot number corresponding to the disk in the in-situ state with the slot number of the target slot includes: When the target conditions are met, a detection prompt message is output, which is used to prompt the user to trigger the detection. In response to receiving a user-triggered detection operation command, the current slot number corresponding to the disk in the in-place state is compared with the slot number of the target slot.
7. The method according to claim 1, wherein comparing the current slot number corresponding to the disk in the in-situ state with the slot number of the target slot includes: Identify the target disk that is in place and belongs to the target disk type; Obtain the current slot number of the target disk; Compare the current slot number of the target disk with the slot number of the target slot.
8. The method according to claim 1, further comprising: If the detection result indicates that the disk is not installed in the target slot, the slot number of the target slot is output.
9. The method according to claim 1, further comprising: If the detection result indicates that the disk is not installed in the target slot, the indicator light corresponding to the target slot is controlled to flash via the unified extensible firmware interface.
10. An electronic device, comprising a baseboard management controller, a unified scalable firmware interface, and a target processor; The substrate management controller is used for: Send a first control signal to the Unified Extensible Firmware Interface to set the status register of the slot to which the target processor is connected to to the target state via the Unified Extensible Firmware Interface; Detect the status register that is in the target state, and record the slot number of the slot corresponding to the status register that is in the target state as the slot number of the target slot; By comparing the current slot number of the disk in the in-situ state with the slot number of the target slot, a detection result of the disk is obtained. The current slot number is the slot number of the slot where the disk is currently installed, and the detection result indicates whether the disk is installed in the target slot.