A fault reporting method, electronic device, medium and computer program product
By writing fault diagnosis information into shared memory and stopping SMI, the problem of limited IPMI fault diagnosis information transmission was solved, achieving efficient and reliable fault information transmission and ensuring stable system operation.
Patent Information
- Application Number
- CN202411523541.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2044-10-29
AI Technical Summary
In existing technologies, the transmission of fault diagnosis information by IPMI is limited by the number of bytes, which leads to excessive time spent calling SMI multiple times, affecting business continuity.
The fault diagnosis information is written to a designated area of shared memory via the BIOS, and SMI is stopped after the writing is completed. The information is then read from the shared memory using the BMC, avoiding multiple IPMI calls.
It shortened the SMI time, improved data transmission efficiency and reliability, reduced business fluctuations, and ensured the continuous availability and stability of the system.
Smart Images

Figure CN119046050B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a fault reporting method, electronic device, medium, and computer program product. Background Technology
[0002] Currently, there is a continuous need for optimization and updates to fault diagnosis and reporting in various server application scenarios. Related technologies use IPMI (Intelligent Platform Management Interface) to send fault diagnosis information from registers to the BMC. However, IPMI has a byte limit; if the fault diagnosis information exceeds the maximum number of bytes IPMI can send in a single call, multiple IPMI calls are required. However, IPMI calls are performed in the SMI (System Management Interrupt) state, and multiple IPMI calls lead to excessively long SMI times, impacting customer business continuity. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a fault reporting method, electronic device, medium, and computer program product. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, a fault reporting method is provided, comprising:
[0005] In the event of a device malfunction within the system, a system management interruption is triggered.
[0006] Fault diagnosis information is obtained from the registers corresponding to the device through the basic input / output system;
[0007] The fault diagnosis information is written into a designated area of shared memory through the basic input / output system.
[0008] After the fault diagnosis information is written to the designated area of the shared memory, the system management interrupt is stopped;
[0009] The control board management controller reads the fault diagnosis information from a designated area of the shared memory.
[0010] Optionally, it also includes:
[0011] After the system is powered on, the shared memory is allocated using the baseboard management controller;
[0012] The shared memory is mapped to the memory of the basic input / output system; the basic input / output system and the baseboard management controller can access the shared memory;
[0013] A portion of the shared memory is defined as a designated region of the shared memory.
[0014] Optionally, the designated area of the shared memory is a circular cache, which includes read pointers and write pointers; the step of writing the fault diagnosis information into the designated area of the shared memory through the basic input / output system includes:
[0015] Determine the size of the fault diagnosis information;
[0016] Determine the write pointer offset; the write pointer offset is used to indicate the position of the write pointer in the circular cache, and to indicate the writable position of the circular cache;
[0017] The write length of the circular cache tail is determined by the write pointer offset; the circular cache tail represents the very end of the circular cache.
[0018] Based on the size of the fault diagnosis information and the writable length, it is determined whether the cache tail is exceeded after all the fault diagnosis information is written to the circular cache starting from the write pointer offset.
[0019] By determining whether the cache tail has been exceeded, the write strategy corresponding to the determination result is determined;
[0020] The fault diagnosis information is written to the circular cache using the aforementioned writing strategy.
[0021] Optionally, by determining whether the cache tail has been exceeded, a write strategy corresponding to the determination result is determined, including:
[0022] Without exceeding the end of the cache, the write operation on the fault diagnosis information is started directly from the position corresponding to the write pointer;
[0023] After completing the fault diagnosis information, update the write pointer offset;
[0024] If the cache tail is exceeded, the first fault diagnosis information and the second fault diagnosis information corresponding to the fault diagnosis information are determined by the writable length; the length corresponding to the first fault diagnosis information is the same as the writable length.
[0025] The first fault diagnosis information is written to the circular cache starting from the write pointer offset;
[0026] After the first fault diagnosis information is written into the circular cache, the second fault diagnosis information is written into the circular cache starting from the cache head; the cache head of the circular cache indicates the start of the circular cache;
[0027] After writing the second fault diagnosis information into the circular cache, the write pointer offset is updated.
[0028] Optionally, it also includes:
[0029] The baseboard management controller is controlled to monitor, in a polling manner, whether there is any unread fault diagnosis information in a designated area of the shared memory;
[0030] The control board management controller reads fault diagnosis information from a designated area of the shared memory, including:
[0031] If unread fault diagnosis information is detected in a designated area of the shared memory, the baseboard management controller is controlled to read the fault diagnosis information from the designated area of the shared memory.
[0032] Optionally, the designated area of the shared memory is a circular cache, which includes read pointers and write pointers; controlling the baseboard management controller to monitor, in a polling manner, whether there is any unread fault diagnosis information in the designated area of the shared memory, includes:
[0033] At preset time intervals, the baseboard management controller monitors the write pointer offset and read pointer offset corresponding to the circular cache;
[0034] If the write pointer offset and the read pointer offset are not located at the same position in the circular cache, it is determined that there is unread fault diagnosis information in a specified area of the shared memory.
[0035] Optionally, the designated area of the shared memory is a circular cache, which includes read pointers and write pointers; the step of controlling the baseboard management controller to read the fault diagnosis information from the designated area of the shared memory when unread fault diagnosis information is detected in the designated area of the shared memory includes:
[0036] Calculate the readable length between the read pointer offset and the write pointer offset;
[0037] The baseboard management controller is controlled to perform a read operation on the fault diagnosis information starting from the read pointer offset, and the fault diagnosis information is obtained.
[0038] After the fault diagnosis information is read, the read pointer offset is updated based on the write pointer offset; the updated read pointer offset is located at the same position as the write pointer offset in the circular cache.
[0039] Optionally, before writing the fault diagnosis information into a designated area of shared memory via the basic input / output system, the following steps are included:
[0040] Calculate the cyclic redundancy check value corresponding to the fault diagnosis information; the cyclic redundancy check value is used to verify data security.
[0041] The cyclic redundancy check value is added to the end of the data packet corresponding to the fault diagnosis information to obtain the fault diagnosis information with the cyclic redundancy check value added.
[0042] The step of writing the fault diagnosis information into a designated area of shared memory through the basic input / output system includes:
[0043] The fault diagnosis information with added cyclic redundancy check value is written into a designated area of the shared memory through the basic input / output system.
[0044] Optionally, after the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, it further includes:
[0045] Calculate the target cyclic redundancy check value corresponding to the read fault diagnosis information;
[0046] Determine whether the target cyclic redundancy check value is consistent with the cyclic redundancy check value;
[0047] In the event of inconsistency, it is determined that the fault diagnosis information contains data errors, and an alarm log corresponding to the data errors is generated;
[0048] Under consistent conditions, the fault diagnosis information is parsed to obtain the parsing result of the fault diagnosis information.
[0049] Optionally, obtaining fault diagnosis information from the register corresponding to the device via the basic input / output system includes:
[0050] Determine the fault data in the register corresponding to the device;
[0051] Determine the error types included in the fault data;
[0052] Each of the aforementioned error types is identified as a corresponding data segment; the data segment includes the error field, sub-error field, stage, mode, and sequence number corresponding to the error type;
[0053] By arranging the various data segments sequentially, a total data segment is obtained;
[0054] The fault diagnosis information is obtained through the total data segment.
[0055] Optionally, after the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, it further includes:
[0056] Determine the total data segment corresponding to the fault diagnosis information;
[0057] Determine the target data segment from the total data segment;
[0058] The target data segment is parsed to obtain the parsing result of the target data segment;
[0059] After the target data segment is parsed, the starting offset of the next data segment to be parsed in the total data segment is determined according to the size of the target data segment.
[0060] Based on the starting offset, determine the next data segment to be parsed;
[0061] The next data segment to be parsed is then parsed.
[0062] Optionally, after obtaining the parsing result of the fault diagnosis information, or after generating the alarm log corresponding to the data error, the method further includes:
[0063] The baseboard management controller reports the parsing results or the alarm log to the terminal.
[0064] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements the steps of the fault reporting method as described in the first aspect.
[0065] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the fault reporting method as described in the first aspect.
[0066] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the fault reporting method described in the first aspect.
[0067] This disclosure uses the BIOS to write fault diagnosis information to shared memory. Once the information writing is complete, SMI is stopped, thus shortening the SMI time. By using shared memory to transmit fault diagnosis information during system runtime, the need to call IPMI to send fault diagnosis information is avoided, improving data transmission efficiency and reliability. Shortening the SMI time reduces service fluctuations, increases overall system uptime, and provides a stable and secure operating environment for business-sensitive customers. Attached Figure Description
[0068] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 This is a schematic diagram illustrating the steps of a fault reporting method according to an embodiment of this disclosure;
[0070] Figure 2 This is a flowchart illustrating a fault diagnosis information processing method on the board management controller side, as shown in an embodiment of this disclosure.
[0071] Figure 3 This is a flowchart illustrating a fault diagnosis information processing procedure for a basic input / output system according to an embodiment of this disclosure;
[0072] Figure 4 This is a schematic diagram illustrating an architecture according to an embodiment of this disclosure;
[0073] Figure 5 This is a schematic diagram of an electronic device shown in an embodiment of this disclosure. Detailed Implementation
[0074] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0075] The terms "first," "second," etc., used in this disclosure and in the claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this disclosure can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0076] In related technologies, to improve the accuracy of fault diagnosis and resolution, registers are typically added, such as the IERR (Internal Error) register and the PCIe error status register. Adding registers increases the amount of fault diagnosis information. However, IPMI has a byte limit, sending a maximum of 255 bytes at a time. Sending more than 255 bytes requires multiple calls. Therefore, with the increase in registers, sending fault diagnosis information via IPMI leads to excessively long SMI execution times. Furthermore, the time spent sending fault diagnosis information via IPMI varies, causing business instability.
[0077] Therefore, using IPMI to send fault diagnosis information will affect business continuity, work efficiency and real-time performance, especially for scenarios that require 24-hour uninterrupted operation.
[0078] To address the aforementioned technical issues, this disclosure proposes a fault reporting method that avoids excessively long SMI processing times.
[0079] Figure 1 This is a schematic diagram illustrating the steps of a fault reporting method according to an embodiment of this disclosure. Figure 1 As shown, the fault reporting method may specifically include the following steps:
[0080] Step S11: In the event of a device failure within the system, trigger a system management interrupt.
[0081] When a device malfunction is detected, such as a hardware failure, overheating, or connectivity problem, SMI is immediately triggered. This ensures that the system can take swift action after a fault is detected, reducing the potential impact of the fault on system operation.
[0082] Step S12: Obtain fault diagnosis information from the register corresponding to the device through the basic input / output system.
[0083] When an SMI is triggered, the CPU suspends its current task and executes the SMI handler in the BIOS (Baseboard Manager Controller). The BIOS can access the registers corresponding to the faulty device through specific instructions or interfaces. These registers contain detailed fault information, such as error codes and fault types; this information constitutes the fault diagnosis information for that device. The BIOS reads and collects this fault diagnosis information from these registers.
[0084] By obtaining fault diagnosis information from the corresponding registers of the device through the BIOS, the accuracy of the information and the reliability of the source are ensured.
[0085] Step S13: Write the fault diagnosis information into a designated area of shared memory through the basic input / output system.
[0086] The BIOS writes the fault diagnosis information collected from the registers to a designated area of shared memory. This shared memory is pre-allocated and directly accessible to the BIOS. The designated area of shared memory refers to a specific portion of the shared memory. When writing fault diagnosis information to this designated area, the BIOS must ensure data integrity and consistency to prevent data loss or corruption.
[0087] Step S14: After the fault diagnosis information is written to the designated area of the shared memory, stop the system management interrupt.
[0088] After the BIOS successfully and completely writes the fault diagnosis information to the designated area of shared memory, it can send a signal to the CPU to indicate that the SMI process is complete. Upon receiving the signal, the CPU resumes normal system operation.
[0089] Step S15: The control board management controller reads the fault diagnosis information from a designated area of the shared memory.
[0090] The Baseboard Manager Controller (BMC) can also directly access a designated area of shared memory and retrieve diagnostic information from it. After the BIOS writes diagnostic information to the designated area of shared memory, the BMC reads this information from there. There is no need to call IPMI to send diagnostic information.
[0091] By utilizing the high-speed access characteristics of shared memory in the embodiments of this disclosure, fault diagnosis information is written to a designated area of shared memory, which helps reduce information reporting latency and improve the overall system response speed. After the fault diagnosis information is successfully written to shared memory, SMI is stopped, avoiding unnecessary system overhead and ensuring that the system can maintain normal operating efficiency while handling faults. Controlling the BMC to read fault diagnosis information from the designated area of shared memory can avoid calling PIMI, effectively improving the overall system uptime. Controlling the BMC to read fault diagnosis information from the designated area of shared memory enables remote monitoring and management of faults, improving the maintainability and reliability of the system.
[0092] To ensure data integrity and security, the acquired fault diagnosis information needs to be verified. This can be done by comparing the original checksum carried by the fault diagnosis information with the recalculated checksum to determine whether the fault diagnosis information meets the requirements for integrity and security.
[0093] The following is a method for carrying the original checksum in fault diagnosis information.
[0094] In one optional embodiment, before writing the fault diagnosis information into a designated area of shared memory via the basic input / output system, the method includes: calculating a cyclic redundancy check (CRC) value corresponding to the fault diagnosis information; the CRC value is used to verify data security; adding the CRC value to the end of the data packet corresponding to the fault diagnosis information to obtain fault diagnosis information with the CRC value added; the step of writing the fault diagnosis information into the designated area of shared memory via the basic input / output system includes: writing the fault diagnosis information with the CRC value added into the designated area of shared memory via the basic input / output system.
[0095] This disclosure uses CRC (Cyclic Redundancy Check) to determine the check value of fault diagnosis information.
[0096] After the BIOS obtains the fault diagnosis information but before it writes it to a designated area of shared memory, it calculates the corresponding Cyclic Redundancy Check (CRC) value and appends it to the end of the data packet containing the fault diagnosis information. This ensures the fault diagnosis information carries the CRC value for verification. When a device needs to use or receives this fault diagnosis information, it can use the CRC value carried in the fault diagnosis information to verify the integrity of the CRC checksum.
[0097] The BIOS writes the fault diagnosis information, after adding the cyclic redundancy check value, to a designated area of shared memory.
[0098] By employing embodiments of this disclosure, cyclic redundancy check (CRC) values can effectively detect errors that may occur during data transmission or storage. By adding CRC values and performing verification at the receiving end, data errors can be detected and corrected promptly, significantly reducing the data error rate. Adding CRC values can also prevent malicious data tampering to some extent. Through CRC values, the system can tolerate a certain degree of error, thereby enhancing the system's fault tolerance.
[0099] The following is a method for verifying the integrity of fault diagnosis information using cyclic redundancy check values.
[0100] In one optional embodiment, after the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, the method further includes: calculating the target cyclic redundancy check value corresponding to the read fault diagnosis information; determining whether the target cyclic redundancy check value is consistent with the cyclic redundancy check value; if they are inconsistent, determining that the fault diagnosis information has a data error and generating an alarm log corresponding to the data error; if they are consistent, parsing the fault diagnosis information to obtain the parsing result of the fault diagnosis information.
[0101] After the BMC reads the fault diagnosis information from a specified area of shared memory, it needs to verify the integrity of the fault diagnosis information.
[0102] The target cyclic redundancy check (CRBC) value corresponding to the acquired fault diagnosis information is calculated. The CRBC value carried by the fault diagnosis information is then determined. The completeness of the fault diagnosis information is determined by comparing the target CRBC value with the CRBC value to determine if they are consistent. The target CRBC value and the CRBC value are obtained using the same calculation strategy, meaning that when the same data is calculated multiple times, the results are consistent.
[0103] If the target cyclic redundancy check value matches the cyclic redundancy check value, it means that the fault diagnosis information has not been tampered with and there is no data error. The fault diagnosis information can be used in subsequent business operations, such as parsing the fault diagnosis information to determine the information corresponding to the faulty device.
[0104] If the target cyclic redundancy check value is inconsistent with the cyclic redundancy check value, it indicates that the integrity test of the fault diagnosis information has failed. The fault diagnosis information may be missing or tampered with, resulting in data errors. Therefore, the fault diagnosis information cannot be used normally. A corresponding alarm log can be generated based on the data errors. The alarm log is used to indicate that there is a problem with the data and it needs to be handled.
[0105] By employing embodiments of this disclosure, the system calculates the target cyclic redundancy check (CRUD) value of the read fault diagnosis information and compares it with the actual CRUD value. This ensures data integrity and enables timely detection and reporting of data errors. If a discrepancy is found between the target CRUD values, the system can immediately determine that the fault diagnosis information contains a data error and generate a corresponding alarm log. This helps maintenance personnel quickly locate the problem and take necessary corrective measures. When the CRUD values are consistent, using the fault diagnosis information for subsequent business processing ensures business continuity.
[0106] In one optional embodiment, after the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, the method further includes: determining the total data segment corresponding to the fault diagnosis information; determining a target data segment from the total data segment; parsing the target data segment to obtain a parsing result for the target data segment; after the target data segment is parsed, determining the starting offset of the next data segment to be parsed in the total data segment based on the size of the target data segment; determining the next data segment to be parsed based on the starting offset; and parsing the next data segment to be parsed.
[0107] In this disclosure, in order to report equipment failures, after obtaining the fault diagnosis information, it is necessary to parse the fault diagnosis information to determine the cause of each faulty device, so as to facilitate user handling.
[0108] Each time an SMI is triggered, one or more devices may malfunction, or a single device may experience multiple types of malfunctions. Therefore, each fault diagnosis message read by the BMC can include one or more data segments, each representing an error type. These data segments together form a single data segment.
[0109] The BMC (Browser Controlled Messaging) process parses each data segment sequentially, ensuring that all data is processed correctly. Specifically, it can parse from the first data segment corresponding to the total data segment to the last data segment.
[0110] The target data segment can be identified by the first byte information at the corresponding position in the target data segment, such as byte 6 of the target data segment. This can be used to determine the total number of data segments and the segment number of the target data segment.
[0111] By obtaining the total number of data segments included in the total data segment and the position of the current target data segment within the total data segment, it is possible to effectively ensure that all data segments are received and processed. When data segments are lost or erroneous, corresponding alarm logs can be generated based on the information of the current segment and the total data segment, helping maintenance personnel to quickly locate and resolve problems. Furthermore, knowing the position of the current target data segment within the total data segment helps the BMC process data in the correct order.
[0112] After parsing the target data segment, the parsing result of the target data segment can be obtained, which can represent the error information corresponding to an error type.
[0113] After parsing the target data segment, if there are still unparsed data segments in the total data segment, continue parsing the unparsed data segments.
[0114] The starting offset of the next adjacent data segment can be determined by the second byte of information at the corresponding position in the target data segment, such as byte 7 of the target data segment. The starting offset of the next data segment to be parsed can be determined by the size of the target data segment. By calculating the starting offset of the next segment, BMC can quickly locate the next data segment, reducing search time and thus improving processing efficiency.
[0115] After parsing the target data segment, the next data segment to be parsed is located by the starting offset of the next data segment to be parsed, and then the data segment is parsed to obtain the corresponding parsing result.
[0116] The parsing process proceeds sequentially through all data segments within the total data segment. Once all data segments are parsed, the fault diagnosis information is considered parsed successfully. The process can then proceed to parse the next unparsed fault diagnosis information.
[0117] The embodiments of this disclosure ensure that the BMC can accurately identify and locate the total data segment containing complete fault diagnosis information. By parsing the target data segment, the BMC can extract specific fault diagnosis information, improving the efficiency of subsequent diagnosis, repair, and recording. After parsing one data segment, the BMC needs to be able to accurately find the starting position of the next data segment and ensure that the BMC can process all data in the total data segment sequentially and without omission. Completing the processing sequentially ensures that all data segments are processed, avoiding omissions or duplicate processing of any data segment, thereby guaranteeing the integrity and accuracy of the data.
[0118] In order to achieve parsing of fault diagnosis information according to data segments, the fault diagnosis information needs to be collected in accordance with the specified rule format when the BIOS collects the fault diagnosis information, and the fault diagnosis information also needs to be written in the specified rule format when writing to the specified area of shared memory. This way, when the BMC obtains and parses the fault diagnosis information, the fault diagnosis information used also conforms to the specified rule format.
[0119] In one optional embodiment, obtaining fault diagnosis information from the register corresponding to the device via the basic input / output system includes: determining fault data in the register corresponding to the device; determining the error types included in the fault data; identifying each error type as a corresponding data segment; the data segment includes an error field, a sub-error field, a stage, a mode, and a sequence number corresponding to the error type; obtaining a total data segment by arranging each of the data segments sequentially; and obtaining the fault diagnosis information through the total data segment.
[0120] According to the specified rule format, the fault information is obtained from the register corresponding to the faulty device. For example, for a fault type, it is necessary to obtain the fault information including the error field, sub-error field, stage, mode, sequence number, etc., and determine the fault information corresponding to the fault type as a data segment.
[0121] In cases where the triggered SMI corresponds to multiple fault types, each fault type is identified as a corresponding data segment in the same manner. These data segments are then combined to form a single overall data segment, which consists of the data segments corresponding to each fault type. The data segments within the overall data segment can be arranged sequentially.
[0122] It is also possible to determine the overall information corresponding to a total data segment, such as the data packet length and command word, and add the overall information to the header of the data packet corresponding to the total data segment.
[0123] Fault diagnosis information is written to a designated area of shared memory in the form of data segments.
[0124] In the embodiments of this disclosure, this step encapsulates each error type into an independent data segment. This structured data representation facilitates subsequent data parsing and processing. Arranging the various data segments into a single overall data segment in a specific order ensures that all fault data is completely and systematically included, enabling the BIOS to comprehensively understand the device's fault status during subsequent processing.
[0125] The data processed by the BMC needs to be transmitted to the terminal so that the administrator can understand the system's operating status in a timely manner and take quick measures based on this information transmitted by the BMC when the equipment malfunctions.
[0126] In one optional embodiment, after obtaining the parsing result of the fault diagnosis information, or after generating the alarm log corresponding to the data error, the method further includes: reporting the parsing result or the alarm log to the terminal through the baseboard management controller.
[0127] After detecting data errors in the fault diagnosis information through cyclic redundancy check (CRUD) values, or after parsing the fault diagnosis information to obtain the parsing results, the BMC will transmit the alarm log corresponding to the data error, or the parsing results, to the terminal. Specifically, during the parsing of the fault diagnosis information, each data segment included in the fault diagnosis information is parsed sequentially. After parsing each data segment and obtaining the corresponding parsing result, the parsing result for each data segment is reported to the interrupt. The parsing of the fault diagnosis information is completed after all data segments included in the fault diagnosis information have been parsed.
[0128] By employing embodiments of this disclosure, sending processing information to the terminal via the BMC allows maintenance personnel to promptly understand the system's operational status. Sending fault information to the terminal aids in data logging, and analysis of historical fault data can identify system weaknesses. Sending fault information to the terminal increases the transparency of system operation, enabling relevant personnel to clearly understand the system's operational status and fault information.
[0129] The specified region of shared memory is determined by following these steps.
[0130] In one optional embodiment, the method further includes: after the system is powered on, allocating the shared memory using the baseboard management controller; mapping the shared memory to the basic input / output system memory; enabling the basic input / output system and the baseboard management controller to access the shared memory; and defining a portion of the shared memory as a designated area of the shared memory.
[0131] System power-on refers to the process of connecting a power source to a computer or other electronic device, thereby enabling it to start operating and initialize. After the system is powered on and completes the initial self-test process, it enters the initialization phase. The BMC then begins running its firmware code to perform system management and monitoring tasks.
[0132] The BMC can inspect the system's physical memory resources, including memory regions available for sharing. Following a pre-defined allocation strategy, the BMC can allocate a memory region of a certain size as shared memory. The size of the shared memory can be determined based on system requirements and the expected data volume.
[0133] After allocation, the BMC maps the shared memory into the BIOS's memory space. This mapping ensures that the BIOS can access the shared memory, specifically through a range of memory addresses.
[0134] Shared memory can be accessed by the BIOS and BMC. The BIOS and BMC access shared memory through their respective memory access mechanisms to perform write or read operations on the shared memory.
[0135] A portion of the shared memory is then designated as a specific area of the shared memory to ensure that the use of other areas of the shared memory is not affected.
[0136] The embodiments of this disclosure utilize shared memory to store data, allowing the BIOS and BMC to directly access the shared data area without the need for other intermediate media, thereby reducing communication latency. Shared memory enables the BIOS and BMC to exchange data at near-memory access speeds, improving data transfer rates. By rationally partitioning the shared memory area, optimized utilization of system resources can be achieved, avoiding resource waste.
[0137] In one optional embodiment, the method further includes: controlling the baseboard management controller to monitor, in a polling manner, whether there is any unread fault diagnosis information in a designated area of the shared memory; controlling the baseboard management controller to read the fault diagnosis information from the designated area of the shared memory includes: when it is detected that there is unread fault diagnosis information in the designated area of the shared memory, controlling the baseboard management controller to read the fault diagnosis information from the designated area of the shared memory.
[0138] The BMC accesses a designated area of shared memory in a polling manner to query whether fault diagnosis information exists in the designated area of shared memory. The polling method means that the same operation is performed at preset time intervals. In this disclosure, by using the polling method, the BMC accesses the designated area of shared memory at preset time intervals to monitor whether there is any unread fault diagnosis information in the designated area of shared memory.
[0139] Because each time the BMC reads fault diagnosis information from a designated area of shared memory, it reads all fault diagnosis information in that area. Therefore, when the BMC accesses fault diagnosis information in a designated area of shared memory, it indicates that there is unread fault diagnosis information in that area.
[0140] When the BMC detects that there is unread fault diagnosis information in a specified area of shared memory, it controls the BMC to read the fault diagnosis information from the specified area of shared memory, so that the BMC can obtain the fault diagnosis information.
[0141] By employing the embodiments of this disclosure, the BMC can periodically and rapidly check designated areas in shared memory through a polling mechanism. This ensures that any fault diagnosis information written to the system can be detected and processed promptly, enabling rapid response and repair of system faults. Using a polling approach to detect fault diagnosis information simplifies the system architecture, reduces implementation costs, and effectively utilizes system resources. By continuously monitoring shared memory, the BMC ensures that all generated fault diagnosis information is read in a timely manner, avoiding difficulties in troubleshooting due to information omissions.
[0142] A designated area of shared memory can be set as a circular cache. When the write pointer reaches the end of the array, it wraps back to the beginning of the array, forming a loop. The circular cache includes two pointers: a write pointer and a read pointer. These two pointers can move independently, allowing parallel reads and writes within the cache. Specifically, moving the write pointer temporarily stores data in the circular cache, waiting to be read; moving the read pointer reads the data out of the circular cache and releases the cache space. The write pointer offset indicates the position of the write pointer in the circular cache, and the read pointer offset indicates the position of the read pointer. By comparing the write and read pointer offsets, it is determined whether there is data to read or space to write in the circular cache. Circular caches can further save shared memory, as the memory corresponding to the circular cache can be reused, and it effectively avoids affecting the use of other areas within the circular cache.
[0143] When allocating a designated area from shared memory and setting it as a circular cache, it is necessary to ensure that the data in the circular cache is not overwritten by newly written data before it is read. For example, in this disclosure, the size of the circular cache can be set to 32KB. The specific setup steps can be as follows: First, determine the maximum time interval between each read operation, the frequency of SMIs triggered by device failures, and the maximum number of bytes that the fault diagnosis information corresponding to the SMIs can reach. Based on this information, determine a suitable size for the circular cache to avoid data overwriting due to untimely reads.
[0144] In one optional embodiment, the designated area of the shared memory is a circular cache, which includes a read pointer and a write pointer. The baseboard management controller is controlled to monitor, in a polling manner, whether there is any unread fault diagnosis information in the designated area of the shared memory, including: at preset time intervals, controlling the baseboard management controller to monitor the write pointer offset and the read pointer offset corresponding to the circular cache; if the write pointer offset and the read pointer offset are not located at the same position in the circular cache, determining that there is unread fault diagnosis information in the designated area of the shared memory.
[0145] When a designated area of shared memory is a circular cache, the circular cache manages two pointers: a read pointer and a write pointer. The read pointer offset indicates a readable location within the circular cache, while the write pointer offset indicates a writable location within the circular cache.
[0146] Since the BMC reads all the fault diagnosis information from the ring cache each time it does so, the read pointer offset and write pointer offset should point to the same value in the ring cache when there is no unread fault diagnosis information in the ring cache.
[0147] BMC can query the position of the read pointer offset and write pointer offset in the circular cache at preset intervals.
[0148] If the write pointer offset and the read pointer offset are not located at the same position in the circular cache, it indicates that the current write pointer offset has moved relative to the read pointer offset. This means that new data was written to the circular cache between the current and previous monitoring periods, causing the write pointer to move and updating the write pointer offset. The BMC only reads the fault diagnosis information in the circular cache each time monitoring occurs and detects unread fault diagnosis information. Therefore, during the current and previous monitoring periods, the fault diagnosis information in the circular cache will not be read by the BMC. Consequently, from the BMC's perspective, the fault diagnosis information detected in the circular cache this time is unread fault diagnosis information.
[0149] In the embodiments of this disclosure, the BMC periodically monitors the offsets of the write and read pointers via polling, enabling rapid determination of new fault diagnosis information and thus achieving real-time monitoring of the system status. Continuous monitoring of the write and read pointer offsets ensures that all generated fault diagnosis information is read promptly, avoiding difficulties in troubleshooting due to information omissions. By monitoring pointer offsets, the BMC determines whether unread fault diagnosis information exists, allowing for rational allocation of system resources and ensuring priority processing of critical tasks. The circular cache and the BMC's polling mechanism can be easily integrated into existing systems.
[0150] When unread fault diagnosis information is detected in a specified area of shared memory, the fault diagnosis information in the specified area of shared memory is read.
[0151] In one optional embodiment, the designated area of the shared memory is a circular cache, which includes a read pointer and a write pointer. When unread fault diagnosis information is detected in the designated area of the shared memory, controlling the baseboard management controller to read the fault diagnosis information from the designated area of the shared memory includes: calculating the readable length between the read pointer offset and the write pointer offset; controlling the baseboard management controller to perform a read operation on the fault diagnosis information starting from the read pointer offset to obtain the fault diagnosis information; after reading the fault diagnosis information, updating the read pointer offset based on the write pointer offset; the updated read pointer offset and the write pointer offset are located at the same position in the circular cache.
[0152] When a designated area of shared memory is a circular cache, data in the circular cache can be read through the read pointer and write pointer managed by the circular cache.
[0153] First, calculate the length between the write pointer offset and the read pointer offset. This length represents the readable length in the current circular cache. The readable length represents the size of the data that can be read.
[0154] After determining the readable length, the BMC is controlled to start reading data from the read pointer offset until all the data corresponding to the readable length has been read, so as to obtain all the unread fault diagnosis information in the current circular buffer.
[0155] After the BMC finishes reading the fault diagnosis information, update the read pointer offset.
[0156] Since the BMC reads all the unread fault diagnosis information in the circular cache, there is currently no unread fault diagnosis information in the circular cache. Therefore, after the reading is completed, the updated read pointer offset should be located at the same position in the circular cache as the write pointer offset. The write pointer offset is also used as the basis for adjusting the read pointer offset.
[0157] By employing embodiments of this disclosure, the BMC can quickly locate the fault diagnosis information to be read by calculating the readable length between the read pointer offset and the write pointer offset, thereby reducing data reading latency. Starting the read operation from the read pointer offset ensures the sequential nature of data reading and avoids processing errors caused by out-of-order data. After reading is complete, the read pointer offset is updated based on the write pointer offset, ensuring data integrity and preventing data loss due to pointer misalignment.
[0158] In one optional embodiment, the designated area of the shared memory is a circular cache, which includes a read pointer and a write pointer. Writing the fault diagnosis information into the designated area of the shared memory via the basic input / output system includes: determining the size of the fault diagnosis information; determining a write pointer offset; the write pointer offset indicating the position of the write pointer within the circular cache and indicating a writable position in the circular cache; determining the writable length from the write pointer offset to the end of the circular cache; the end of the circular cache representing the very end of the circular cache; determining whether, starting from the write pointer offset, writing all the fault diagnosis information into the circular cache exceeds the end of the cache based on the size of the fault diagnosis information and the writable length; determining a write strategy corresponding to the determination result based on whether the end of the cache is exceeded; and writing the fault diagnosis information into the circular cache using the write strategy.
[0159] After designating a specified area of shared memory as a circular cache, data in the circular cache is read or written using the read and write pointers. The write pointer offset indicates the position of the write pointer within the circular cache, indicating the writable location within the circular cache.
[0160] When writing data to the circular cache, if the data has reached the end of the circular cache, the corresponding exception handling function will be used to roll back to the beginning of the circular cache.
[0161] Therefore, before the BIOS writes the fault diagnosis information to the shared memory, it first determines the size of the fault diagnosis information to be written, specifically by determining the data length of the fault diagnosis information. Then, it determines the writable length that the current write pointer is directed to the end of the circular cache. The end of the circular cache represents the very end of the circular cache. When data exceeds the end of the cache, an exception handling function is triggered, rolling back to the beginning of the circular cache, which is the start of the circular cache, and data writing continues from the beginning of the circular cache.
[0162] Comparing the size of the fault diagnosis information with the writable length of the circular cache determines whether a write operation will trigger a data rollback in the circular cache. If the size of the fault diagnosis information does not exceed the writable length of the circular cache, the written information will not exceed the cache tail, and a rollback will not be triggered. If the size of the fault diagnosis information exceeds the writable length of the circular cache, the written information will exceed the cache tail, triggering a rollback, and data will continue to be written from the beginning of the circular cache. If unread data exists at the beginning of the circular cache, the newly written data will overwrite the unread data, resulting in data loss.
[0163] Therefore, different writing strategies will be used to write the fault diagnosis information in two scenarios: when the size of the fault diagnosis information does not exceed the writable length of the ring cache, and when the size of the fault diagnosis information exceeds the writable length of the ring cache.
[0164] After obtaining the results of determining the size of the fault diagnosis information and the writable length of the ring cache, different write strategies are executed to write the fault diagnosis information.
[0165] By employing embodiments of this disclosure and utilizing a circular cache, the system can efficiently manage the storage of fault diagnosis information without frequent memory allocation and deallocation, reducing memory fragmentation and management overhead. The use of write and read pointers ensures ordered storage and retrieval of data, preventing data corruption and loss. The system can dynamically adjust the write strategy based on the size of the fault diagnosis information and the writable length of the circular cache, ensuring that new fault diagnosis information is correctly stored. By determining whether the fault diagnosis information exceeds the cache tail after being written, it can be ensured that data is not accidentally overwritten.
[0166] In one optional embodiment, determining the write strategy corresponding to the determination result by judging whether the cache tail is exceeded includes: if the cache tail is not exceeded, directly starting the write operation on the fault diagnosis information from the position corresponding to the write pointer; after completing the write operation on the fault diagnosis information, updating the write pointer offset; if the cache tail is exceeded, determining the first fault diagnosis information and the second fault diagnosis information corresponding to the fault diagnosis information based on the writable length; the length corresponding to the first fault diagnosis information is the same as the writable length; writing the first fault diagnosis information into the circular cache starting from the write pointer offset; after writing the first fault diagnosis information into the circular cache, writing the second fault diagnosis information into the circular cache starting from the cache head of the circular cache; the cache head of the circular cache represents the start of the circular cache; after writing the second fault diagnosis information into the circular cache, updating the write pointer offset.
[0167] If the write operation does not exceed the end of the cache (i.e., when the fault diagnosis information to be written is written from the write pointer offset, and a rollback of the circular cache is not triggered), the write operation is performed directly, writing the fault diagnosis information from the write pointer offset into the circular cache. After the fault diagnosis information is completely written into the circular cache, the write pointer offset is updated.
[0168] If the write operation exceeds the end of the buffer, the fault diagnosis information to be written is divided into two parts according to the writable length of the circular buffer: a first fault diagnosis information and a second fault diagnosis information. The first fault diagnosis information has the same writable length as the circular buffer. After the first fault diagnosis information is completely written, the end of the circular buffer is reached, triggering a rollback of the circular buffer. Subsequent data to be written will start from the beginning of the circular buffer.
[0169] In this disclosure, the size of the circular cache is set to be large enough to ensure that unread data is not overwritten by newly written data, thus guaranteeing that the written data will not completely occupy the space of the circular cache during the time interval between two read operations.
[0170] Therefore, for the second fault diagnosis information, after the ring cache is rolled back, the second fault diagnosis information is directly written from the cache head of the ring cache, which is also the start of the ring cache.
[0171] If the cache tail is exceeded, the write pointer offset needs to be updated after the second fault diagnosis information has been completely written to the circular cache.
[0172] Updating the write pointer offset is to update the position of the write pointer in the circular cache, indicating the new writable position in the circular cache. When writing fault diagnosis information next time, the writing will start from the updated write pointer offset.
[0173] By employing embodiments of this disclosure, the write strategy can be dynamically adjusted by determining whether the fault diagnosis information exceeds the cache tail, ensuring maximum utilization of the cache space. When the information does not exceed the cache tail, it is written directly; when it does, the information is segmented and written separately, avoiding write failures or data loss due to insufficient space. Intelligent management of the write pointer offset ensures the persistent preservation of important information when cache space is tight by segmenting data and rationally arranging the write position.
[0174] In one optional embodiment, asset information can be rapidly transmitted to the baseboard management controller via a ring buffer during startup to reduce startup time. Asset information refers to various data and information related to a system or device, which can be used to describe, manage, and monitor the status and performance of the system or device. Asset information is stored in corresponding registers.
[0175] Figure 2 This is a flowchart illustrating a fault diagnosis information processing procedure at the baseboard management controller (BMC) according to an embodiment of this disclosure. When the BMC detects unread fault diagnosis information (i.e., when the read and write pointer offsets of the shared memory are not at the same location in the shared memory), it triggers a read operation on the circular cache. It obtains the shared memory write and read pointer offsets, reads data starting from the read pointer offset, with a size equal to the readable data in the circular cache, obtains the fault diagnosis information, and updates the read pointer offset. It reads the cyclic redundancy check (CRUD) value carried by the fault diagnosis information and performs CRUD checks to determine if the check passes. If the check fails, it exits the parsing of the fault diagnosis information and generates an alarm log. If the check passes, it identifies the data segments corresponding to the fault diagnosis information, obtaining the overall information of the data packet corresponding to the fault diagnosis information, each data segment, and the CRUD value carried by the fault diagnosis information. The overall information includes the command word and the data packet length. The BMC processes the fault diagnosis information according to data segments, sequentially completing the parsing of each data segment included in the fault diagnosis information.
[0176] Figure 3 This is a flowchart illustrating a fault diagnosis information processing procedure for a basic input / output system (PIS) according to an embodiment of this disclosure. When a system error occurs and triggers a system management interrupt, the PIS collects write data according to a specified rule format and calculates the cyclic redundancy check (CRC) value of the write data. Before writing the write data to shared memory, it is determined whether writing from the current write pointer offset in shared memory will exceed the cache tail. If it does not exceed the cache tail, the write data is directly written to shared memory, and the write pointer offset is updated. If it exceeds the cache tail, the write data is segmented according to the writable length corresponding to the write pointer offset to the cache tail. The portion of the write data corresponding to the writable length is written to shared memory from the write pointer offset, and then the other portion of the write data is written to shared memory from the cache head. After the write data is completely written to shared memory, the write pointer offset is updated. After updating the write pointer offset, the writing of the write data is completed.
[0177] Figure 4 This is a schematic diagram illustrating an architecture according to an embodiment of this disclosure. It includes a processor, shared memory, a basic input / output system, a baseboard management controller, and a terminal. A portion of the shared memory is configured as a circular cache for storing fault information. When a system management interrupt is triggered, fault diagnosis information is collected through the basic input / output system and added to the circular cache in the shared memory. The baseboard management controller can directly read the fault diagnosis information from the circular cache in the shared memory, parse the fault diagnosis information, and then notify the terminal of the parsing result via an alarm.
[0178] This disclosure also provides an electronic device, with reference to... Figure 5 , Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this disclosure. For example... Figure 5 As shown, the electronic device 500 includes a memory 510 and a processor 520. The memory 510 and the processor 520 are connected via a bus for communication. The memory 510 stores a computer program that can run on the processor 520 to implement the steps in the fault reporting method disclosed in this embodiment.
[0179] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the fault reporting method disclosed in this disclosure.
[0180] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the fault reporting method described in the first aspect.
[0181] 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.
[0182] Those skilled in the art will understand that the embodiments disclosed herein can be provided as methods, apparatus, or computer program products. Therefore, the embodiments disclosed herein can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments disclosed herein can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0183] This disclosure describes embodiments of methods, apparatus, electronic devices, and computer program products according to embodiments of this disclosure with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0184] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0186] Although some embodiments of the present disclosure have been described, those skilled in the art, upon learning the basic inventive concept, can make further changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present disclosure.
[0187] The above provides a detailed description of the fault reporting method, electronic device, medium, and computer program product provided by this disclosure. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this disclosure. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this disclosure. Therefore, the content of this specification should not be construed as a limitation of this disclosure.
Claims
1. A fault reporting method, characterized in that, include: In the event of a device malfunction within the system, a system management interruption is triggered. Fault diagnosis information is obtained from the registers corresponding to the device through the basic input / output system; The fault diagnosis information is written to a designated area of shared memory through the basic input / output system; the shared memory is used to transfer the fault diagnosis information between the basic input / output system and the control board management controller during system operation; wherein, the designated area of the shared memory is a circular buffer, and the circular buffer has a write pointer and a read pointer, which are used by the board management controller to read the information in a polling manner after the system management interrupt has stopped; After the fault diagnosis information is written to the designated area of the shared memory, the system management interrupt is stopped; The control board management controller reads the fault diagnosis information from a designated area of the shared memory. The control board management controller is used to monitor whether there is any unread fault diagnosis information in the designated area of the shared memory in a polling manner, so as to read the fault diagnosis information from the designated area of the shared memory when unread fault diagnosis information is detected in the designated area of the shared memory. The write strategy is determined according to the size of the fault diagnosis information, the writable length of the circular cache and the write pointer offset, and the read pointer offset is updated after the fault diagnosis information is read.
2. The method according to claim 1, characterized in that, Also includes: After the system is powered on, the shared memory is allocated using the baseboard management controller; The shared memory is mapped to the memory of the basic input / output system; The basic input / output system and the baseboard management controller can access the shared memory; A portion of the shared memory is defined as a designated region of the shared memory.
3. The method according to claim 1, characterized in that, The designated area of the shared memory is a circular cache, which includes read pointers and write pointers; the step of writing the fault diagnosis information into the designated area of the shared memory through the basic input / output system includes: Determine the size of the fault diagnosis information; Determine the write pointer offset; the write pointer offset is used to indicate the position of the write pointer in the circular cache, and to indicate the writable position of the circular cache; The write length of the circular cache tail is determined by the write pointer offset; the circular cache tail represents the very end of the circular cache. Based on the size of the fault diagnosis information and the writable length, it is determined whether the cache tail is exceeded after all the fault diagnosis information is written to the circular cache starting from the write pointer offset. By determining whether the cache tail has been exceeded, the write strategy corresponding to the determination result is determined; The fault diagnosis information is written to the circular cache using the aforementioned writing strategy.
4. The method according to claim 3, characterized in that, By determining whether the cache tail has been exceeded, a write strategy corresponding to the determination result is determined, including: Without exceeding the end of the cache, the write operation on the fault diagnosis information is started directly from the position corresponding to the write pointer; After completing the fault diagnosis information, update the write pointer offset; If the cache tail is exceeded, the first fault diagnosis information and the second fault diagnosis information corresponding to the fault diagnosis information are determined by the writable length; the length corresponding to the first fault diagnosis information is the same as the writable length. The first fault diagnosis information is written to the circular cache starting from the write pointer offset; After the first fault diagnosis information is written into the circular cache, the second fault diagnosis information is written into the circular cache starting from the cache head; the cache head of the circular cache indicates the start of the circular cache; After writing the second fault diagnosis information into the circular cache, the write pointer offset is updated.
5. The method according to claim 1, characterized in that, Also includes: The baseboard management controller is controlled to monitor, in a polling manner, whether there is any unread fault diagnosis information in a designated area of the shared memory; The control board management controller reads fault diagnosis information from a designated area of the shared memory, including: If unread fault diagnosis information is detected in a designated area of the shared memory, the baseboard management controller is controlled to read the fault diagnosis information from the designated area of the shared memory.
6. The method according to claim 5, characterized in that, The designated area of the shared memory is a circular cache, which includes read pointers and write pointers; the baseboard management controller is controlled to monitor, in a polling manner, whether there is any unread fault diagnosis information in the designated area of the shared memory, including: At preset time intervals, the baseboard management controller monitors the write pointer offset and read pointer offset corresponding to the circular cache; If the write pointer offset and the read pointer offset are not located at the same position in the circular cache, it is determined that there is unread fault diagnosis information in a specified area of the shared memory.
7. The method according to claim 5, characterized in that, The designated area of the shared memory is a circular cache, which includes read pointers and write pointers; when unread fault diagnosis information is detected in the designated area of the shared memory, controlling the baseboard management controller to read the fault diagnosis information from the designated area of the shared memory includes: Calculate the readable length between the read pointer offset and the write pointer offset; The baseboard management controller is controlled to perform a read operation on the fault diagnosis information starting from the read pointer offset, and the fault diagnosis information is obtained. After the fault diagnosis information is read, the read pointer offset is updated based on the write pointer offset; the updated read pointer offset is located at the same position as the write pointer offset in the circular cache.
8. The method according to claim 1, characterized in that, Before writing the fault diagnosis information into a designated area of shared memory via the basic input / output system, the process includes: Calculate the cyclic redundancy check value corresponding to the fault diagnosis information; the cyclic redundancy check value is used to verify data security. The cyclic redundancy check value is added to the end of the data packet corresponding to the fault diagnosis information to obtain the fault diagnosis information with the cyclic redundancy check value added. The step of writing the fault diagnosis information into a designated area of shared memory through the basic input / output system includes: The fault diagnosis information with added cyclic redundancy check value is written into a designated area of the shared memory through the basic input / output system.
9. The method according to claim 8, characterized in that, After the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, the following is also included: Calculate the target cyclic redundancy check value corresponding to the read fault diagnosis information; Determine whether the target cyclic redundancy check value is consistent with the cyclic redundancy check value; In the event of inconsistency, it is determined that the fault diagnosis information contains data errors, and an alarm log corresponding to the data errors is generated; Under consistent conditions, the fault diagnosis information is parsed to obtain the parsing result of the fault diagnosis information.
10. The method according to claim 1, characterized in that, The step of obtaining fault diagnosis information from the corresponding register of the device through the basic input / output system includes: Determine the fault data in the register corresponding to the device; Determine the error types included in the fault data; Each of the aforementioned error types is identified as a corresponding data segment; the data segment includes the error field, sub-error field, stage, mode, and sequence number corresponding to the error type; By arranging the various data segments sequentially, a total data segment is obtained; The fault diagnosis information is obtained through the total data segment.
11. The method according to claim 10, characterized in that, After the baseboard management controller reads the fault diagnosis information from a designated area of the shared memory, the following is also included: Determine the total data segment corresponding to the fault diagnosis information; Determine the target data segment from the total data segment; The target data segment is parsed to obtain the parsing result of the target data segment; After the target data segment is parsed, the starting offset of the next data segment to be parsed in the total data segment is determined according to the size of the target data segment. Based on the starting offset, determine the next data segment to be parsed; The next data segment to be parsed is then parsed.
12. The method according to claim 9, characterized in that, After obtaining the parsing results of the fault diagnosis information, or after generating the alarm log corresponding to the data error, the method further includes: The baseboard management controller reports the parsing results or the alarm log to the terminal.
13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the fault reporting method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the fault reporting method as described in any one of claims 1-12.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the fault reporting method as described in any one of claims 1-12.
Citation Information
Patent Citations
Server and method for data exchange between BMC and BIOS
CN111190749A
Fault-recoverable firmware detection system and method, storage medium and server
CN117389790A
Fault diagnosis drive loading method and device, electronic equipment and storage medium
CN117806721A