Data processing method and system and electronic equipment
By employing a collaborative processing mechanism between the system firmware and the operating system, system management interrupts that can correct errors are prohibited, and error information is obtained by querying registers using the platform runtime mechanism, thus resolving the livelock problem caused by system management interrupt storms and improving system performance and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
In a livelock state caused by a system management interruption storm, users are unable to perform any operations, which severely impacts system performance.
The system firmware disables the system management interrupts corresponding to the first type of correctable errors and sends instructions to the operating system. The platform runtime mechanism handler queries the registers to obtain the error information and writes it into the general hardware error source table. The operating system then performs error correction actions based on this information.
It effectively avoids SMI storms, reduces the frequency of SMI interrupts, improves system performance and stability, and ensures normal interrupt response capabilities.
Smart Images

Figure CN121880069A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, system and electronic device. Background Technology
[0002] Currently, once a system management interruption storm occurs, the operating system will be in a livelock state, in which users cannot perform any operations. Summary of the Invention
[0003] In view of the above problems, this application provides a data processing method, system, and electronic device, the specific solutions of which are as follows:
[0004] The first aspect of this application provides a data processing method, including:
[0005] If the system firmware determines that a system management interruption storm caused by a first type of correctable error has occurred, the system firmware disables the system management interruption corresponding to the first type of correctable error and sends a first instruction to the operating system;
[0006] If the operating system receives the first instruction, it calls the first platform runtime mechanism handler, which queries the register to obtain the error information of the first type of correctable error and writes the error information into the general hardware error source table.
[0007] The operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error.
[0008] In one possible implementation, the first platform runtime mechanism handler obtains the error information of the first type of correctable error by querying a register, and writes the error information into a general hardware error source table, including:
[0009] When the query timing is reached, the first platform runtime mechanism handler queries the register corresponding to the first type of correctable error to obtain the error information of the first type of correctable error, including the occurrence time.
[0010] The first platform runtime mechanism handler determines the frequency of occurrence of the first type of correctable error based on the error information of the first type of correctable error;
[0011] If the occurrence frequency is greater than the first threshold, the first platform runtime mechanism handler will write the error information into the general hardware error source table corresponding to the first type of correctable error.
[0012] In one possible implementation, after the first platform runtime mechanism handler writes the error information into the general hardware error source table, it further includes:
[0013] The first platform runtime mechanism handler issues a second instruction by triggering a system control interrupt to notify the operating system to perform error correction.
[0014] In one possible implementation, the operating system queries the general hardware error source table and, based on the error information of the first type of correctable error, performs error correction actions, including:
[0015] If the operating system receives the second instruction, it queries the general hardware error source table, obtains the error information, and then performs a first type of error correction action based on the error information. The first type of error correction action is used to correct the first type of correctable error.
[0016] In one possible implementation, the data processing method also includes:
[0017] If the occurrence frequency is less than the second threshold, the first platform runtime mechanism handler triggers an interrupt, enabling the system management interrupt corresponding to the first type of correctable error;
[0018] Exit the runtime mechanism handler of the first platform.
[0019] In one possible implementation, the data processing method also includes:
[0020] If the occurrence frequency is not greater than the first threshold and not less than the second threshold, the first platform runtime mechanism handler is executed to obtain the error information of the first type of correctable error by querying the register, and the error information is written into the general hardware error source table.
[0021] In one possible implementation, if the system firmware determines that a system management interrupt storm caused by a Type I correctable error has occurred, it disables the system management interrupt corresponding to the Type I correctable error and sends a first instruction to the operating system, including:
[0022] The system firmware monitors whether a system management interruption storm caused by a Type I correctable error has occurred.
[0023] If so, after the system firmware disables the system management interrupt corresponding to the first type of correctable error, it triggers a system control interrupt to send a first instruction to the operating system, so that the operating system can query the error information of the first type of correctable error obtained by calling the first platform runtime mechanism handler and perform error correction.
[0024] In one possible implementation, the data processing method also includes:
[0025] The system firmware initializes the runtime mechanism processing program of the first platform during the power-on self-test phase.
[0026] A second aspect of this application provides a data processing apparatus, including system firmware and an operating system;
[0027] The system firmware is used to monitor whether a system management interruption storm caused by a first type of correctable error occurs; if so, the system firmware disables the system management interrupt corresponding to the first type of correctable error and then triggers a system control interrupt to send a first instruction to the operating system.
[0028] The operating system is configured to, upon receiving the first instruction, invoke the first platform runtime mechanism handler, query the general hardware error source table, and perform error correction actions based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.
[0029] A third aspect of this application provides an electronic device, comprising: a memory, at least one processor, and a first computer program and a second computer program stored in the memory;
[0030] The processor executes the first computer program to achieve:
[0031] Monitor whether a system management interruption storm caused by a Type I correctable error has occurred; if so, disable the system management interruption corresponding to the Type I correctable error and send the first instruction.
[0032] The processor executes the second computer program to achieve:
[0033] If the first instruction is received, the first platform runtime mechanism handler is invoked to query the general hardware error source table, and an error correction action is performed based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.
[0034] By employing the above technical solutions, the data processing method, system, and electronic device provided in this application embodiment, if the system firmware determines that a system management interrupt storm caused by a first type of correctable error has occurred, disables the system management interrupt corresponding to the first type of correctable error and sends a first instruction to the operating system. If the operating system receives the first instruction, it calls a first platform runtime mechanism handler, which queries the register to obtain the error information of the first type of correctable error and writes the error information into a general hardware error source table. The operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error. Attached Figure Description
[0035] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0036] Figure 1 A flowchart illustrating a data processing method provided in this application;
[0037] Figure 2 A flowchart illustrating yet another data processing method provided in this application;
[0038] Figure 3 A flowchart illustrating yet another data processing method provided in this application;
[0039] Figure 4 A flowchart illustrating yet another data processing method provided in this application;
[0040] Figure 5 A schematic diagram of the structure of a data processing system provided in this application;
[0041] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0042] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0043] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0044] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar elements and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing elements with the same properties in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0045] In existing technologies, under System Management Interrupt (SMI) mode, when a correctable error occurs, the system immediately enters the corresponding SMI (System Management Interrupt) to perform error correction. Frequent occurrences of correctable errors lead to continuous and high-speed triggering of SMI interrupts, causing the system to repeatedly enter the SMI interrupt handler, resulting in an SMI storm. This leads to a livelock state, preventing users from performing any operations and severely impacting system performance. To address this, this application provides a data processing method aimed at improving system performance.
[0046] Reference Figure 1 , Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, a data processing method may include steps 101 to 103, which are described in detail below.
[0047] Step 101: If the system firmware determines that a system management interrupt storm caused by a Type I correctable error has occurred, the system firmware disables the system management interrupt corresponding to the Type I correctable error and sends a first instruction to the operating system.
[0048] In this embodiment, the first type of correctable error can be one of the correctable errors generated by hardware such as memory and PCIe. For example, the first type of correctable error is an ECC memory error or a PCIe correctable error.
[0049] In this embodiment, the system firmware UEFI is a unified extensible firmware interface, the first firmware environment to run when the computer starts up. It is responsible for initializing the hardware, starting the operating system, and providing runtime services. Specifically, when the UEFI detects that the frequency of SMI interrupts triggered by Type I correctable errors reaches the storm threshold, it determines that a system management interrupt storm caused by Type I correctable errors has occurred. Furthermore, the UEFI disables the SMI interrupt signal corresponding to the Type I correctable error in the SMI interrupt handling function, thereby preventing Type I correctable errors from triggering SMI interrupts.
[0050] For example, when UEFI detects a system management interrupt storm caused by an ECC memory error, it can prevent the system from entering an SMI interrupt due to an ECC memory error by configuring relevant register bits. At this time, the SMI interrupt mode corresponding to the ECC memory error is disabled, and no SMI interrupt will be triggered after an ECC memory error occurs.
[0051] In this embodiment, after the system firmware prohibits the system management interrupt corresponding to the first type of correctable error, it sends a first instruction to the operating system to notify the operating system to call the first platform runtime mechanism handler.
[0052] Step 102: If the operating system receives the first instruction, it calls the first platform runtime mechanism handler, which queries the register to obtain the error information of the first type of correctable error and writes the error information into the general hardware error source table.
[0053] In this embodiment, the platform runtime mechanism handler is a firmware code module that is pre-initialized in UEFI but executed in a runtime environment with lower operating system privileges, i.e., a PRM Handler. Specifically, the first platform runtime mechanism handler, i.e., the first PRM handler, is registered by UEFI during the self-test phase, has the permission to access hardware registers, but runs in the management context of the operating system.
[0054] In this embodiment, since the operating system cannot directly access the hardware error register, the operating system calls the first PRM handler. The PRM handler, as a trusted firmware code module, performs the following operations:
[0055] First, the register is queried, and the register query yields the error information for the first type of correctable error.
[0056] The registers are used to record error information for various correctable errors. For example, the registers include the MCA (Machine Check Architecture) register and the RREL (Retry Read Error Log) register. The error information includes detailed location, type and frequency information.
[0057] Then, the error information is written to the general hardware error source table, also known as the WHEA GHES table.
[0058] The WHEA GHES table is located in system memory accessible to the operating system.
[0059] Step 103: The operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error.
[0060] In this embodiment, after the operating system obtains the error information of the first type of correctable error by querying the hardware error source table, it executes the error correction action corresponding to the first type of correctable error. For example, for ECC memory errors, the corresponding memory page is marked as offline to avoid further use.
[0061] As can be seen from the above technical solutions, the data processing method provided in this application, when detecting an SMI storm caused by a first type of correctable error, the UEFI immediately prohibits the first type of correctable error from triggering an SMI interrupt, thereby avoiding an SMI storm. Furthermore, the operating system calls the first PRM handler to query the register and write the error information into the WHEAGHES table accessible to the operating system. Since the error information has been securely written into the WHEAGHES table by the first PRM handler, the operating system performs error correction based on the error information in the WHEAGHES table, and can complete the error correction without entering the SMI interrupt, thereby reducing the SMI interrupt frequency and improving system performance.
[0062] Based on the above embodiments, see Figure 2 , Figure 2 This application provides yet another data processing method. Figure 2 This illustrates the specific implementation process of disabling the system management interrupt corresponding to the Type I correctable error and sending the first instruction to the operating system if the system firmware determines that a system management interrupt storm caused by a Type I correctable error has occurred. Figure 2 As shown in the figure, the data processing method provided in this application embodiment may include steps 201 to 202, which are described in detail below.
[0063] Step 201: Monitor the system firmware to see if a system management interruption storm caused by a Type I correctable error has occurred.
[0064] In this embodiment, the UEFI continuously monitors the frequency of system management interrupts triggered by the first type of correctable error during runtime. It should be noted that the UEFI can simultaneously monitor the frequency of SMI interrupts triggered by various types of correctable errors during runtime. For example, it can monitor the frequency of system management interrupts (SMI) triggered by memory ECC errors and the frequency of system management interrupts (SMI) triggered by PCIe errors.
[0065] Specifically, UEFI distinguishes between SMI interrupts triggered by various correctable errors by reading relevant hardware registers, and maintains an error counter and time window for each type of correctable error within the SMI handler. For any type of correctable error, when the number of SMI interrupts triggered within a unit of time exceeds a preset threshold, it is determined that an SMI storm is caused by that type of correctable error.
[0066] Step 202: If yes, after the system firmware disables the system management interrupt corresponding to the first type of correctable error, it sends the first instruction to the operating system by triggering the system control interrupt, so as to notify the operating system to query the error information of the first type of correctable error obtained by calling the first platform runtime mechanism handler and perform error correction.
[0067] In this embodiment, after determining that a Type I correctable error has caused a system management interruption storm, the UEFI prohibits the system management interrupt corresponding to the Type I correctable error. That is, by blocking the SMI interrupt trigger signal related to the Type I correctable error, the system temporarily exits the SMI interrupt mode of the Type I correctable error, and no SMI interrupt will be triggered when a Type I correctable error occurs.
[0068] In this embodiment, the UEFI sends a first instruction to the operating system by triggering a System Control Interrupt (SCI). Specifically, the UEFI generates a first SCI signal by configuring the System Control Interrupt Trigger Register, and sends it to the operating system as a first instruction. This first SCI signal may carry a predefined first event identifier, allowing the operating system to recognize the first event identifier through the ACPI event handling mechanism, thereby identifying the first instruction.
[0069] As can be seen from the above technical solutions, the data processing method provided in this application monitors whether a system management interrupt storm caused by a first type of correctable error occurs through system firmware. After the system firmware disables the system management interrupt corresponding to the first type of correctable error, it sends a first instruction to the operating system by triggering a system control interrupt. This achieves proactive identification of the system management interrupt storm and shielding of the SMI interrupt trigger signal that causes the system management interrupt storm, thereby avoiding the system performance degradation caused by the system management interrupt storm and maintaining normal interrupt response capability. Furthermore, the error correction authority is transferred to the operating system through the SCI mechanism, thereby entering the PRM processing environment scheduled by the operating system.
[0070] It should be noted that during the power-on self-test phase, the system firmware UEFI pre-initializes one or more platform runtime mechanism handlers, including the first platform runtime mechanism handler, namely the first PRM Handler. The first PRM Handler is registered by UEFI and configured to obtain error information of the first type of correctable error by querying registers in a low-privilege environment when the operating system is running, and write the error information into the general hardware error source table.
[0071] Further, see Figure 3 , Figure 3 This application provides yet another data processing method. Figure 3 This illustrates the specific implementation process of the first platform runtime mechanism handler, which obtains error information of the first type of correctable error by querying registers and writes the error information into the general hardware error source table. Figure 3 As shown in the embodiment of this application, a data processing method may include steps 301 to 305, which are described in detail below.
[0072] Step 301: After the query timing is reached, the first platform runtime mechanism handler queries the register corresponding to the first type of correctable error to obtain the error information of the first type of correctable error.
[0073] In this embodiment, the query timing can be configured according to system performance requirements. Optionally, the query timing includes when it is first called, when the periodic timed trigger time is reached, when the error frequency is determined to be at the first threshold and the second threshold, after the sleep wait is completed, and after the second instruction is sent.
[0074] In this embodiment, error information for different types of correctable errors can be recorded by different registers. Depending on the error type, the error information includes at least the time of occurrence, and may also include key information such as physical address, device identifier, and error type code.
[0075] Step 302: The first platform runtime mechanism handler determines the frequency of occurrence of the first type of correctable error based on the error information of the first type of correctable error.
[0076] In this embodiment, the occurrence frequency of the first type of correctable error refers to the number of times the first type of correctable error occurs per unit time, which can be obtained by statistically analyzing the occurrence time of the first type of correctable error.
[0077] Specifically, the first PRM processing program can use a sliding time window algorithm to analyze the time distribution and frequency of occurrence of the first type of correctable errors based on the error information of the first type of correctable errors.
[0078] Step 303: If the frequency of occurrence is greater than the first threshold, the first platform runtime mechanism handler will write the error information into the general hardware error source table corresponding to the first type of correctable error.
[0079] In this embodiment, the first threshold is a pre-set high-frequency threshold. When the occurrence frequency of the first type of correctable error exceeds the first threshold, it is determined that the first type of correctable error is in a frequent state and error correction processing is required. Therefore, the error information is written into the WHEA GHES table corresponding to the first type of correctable error. For example, the first PRM processing program formats the error information of the currently queried first type of correctable error and writes it into the corresponding entry of the WHEA GHES table. The writing process includes operations such as error information encoding, timestamp synchronization, and table entry index update to ensure that the operating system can correctly read the complete error information.
[0080] Step 304: If the frequency of occurrence is less than the second threshold, the first platform runtime mechanism handler triggers an interrupt, enables the system management interrupt corresponding to the first type of correctable error, and then exits the first platform runtime mechanism handler.
[0081] In this embodiment, the second threshold is a pre-set low-frequency threshold. When the error occurrence frequency is lower than the second threshold, the error is determined to be in a stable state. At this time, an interrupt is triggered to enable the system management interrupt corresponding to the first type of correctable error, that is, to reset the relevant hardware registers and allow the first type of correctable error to trigger the SMI interrupt. Furthermore, the first PRM handler safely exits the PRM execution environment and returns control to the operating system.
[0082] Step 305: If the frequency of occurrence is not greater than the first threshold and not less than the second threshold, return to step 301.
[0083] In this embodiment, when the occurrence frequency is not greater than the first threshold and not less than the second threshold, that is, between the first threshold and the second threshold, the current processing mode is not changed, and the first PRM processing program can wait for the next query opportunity to execute step 301.
[0084] As can be seen from the above technical solutions, the data processing method provided in this application embodiment allows the first platform runtime mechanism processing program to actively query the register according to various query timings, thereby realizing real-time on-demand collection of error information. This ensures the timeliness of error information collection while avoiding performance overhead caused by continuous queries. For example, it ensures intensive information collection during error-prone phases and reduces the query frequency during error-low-frequency phases, achieving a balance between performance and real-time monitoring.
[0085] Furthermore, the first platform runtime mechanism handler compares the frequency of occurrence of the first type of correctable error with the first threshold and the second threshold to determine the current error state (stable state, frequent state, persistent state) and executes corresponding operations, thereby realizing the automatic switching of the system management interrupt prohibition mode, system management interrupt mode and error correction execution corresponding to the first type of correctable error.
[0086] It should be noted that, in one optional embodiment, after the first platform runtime mechanism handler writes the error information into the general hardware error source table, it issues a second instruction by triggering a system control interrupt to notify the operating system to perform error correction. Specifically, after the first PRM Handler writes the error information into the WHEA GHES table, it triggers a system control interrupt. For example, by configuring the system control interrupt trigger register, a second SCI signal is generated and sent to the operating system as a second instruction. This second SCI signal may carry a predefined second event identifier, allowing the operating system to identify the second event identifier through the ACPI event handling mechanism, thereby identifying the second instruction used to request error correction processing. This ensures that the operating system can respond to error processing requests in a timely manner, improving the timeliness of error correction.
[0087] Based on this, the operating system queries the general hardware error source table. Based on the error information of the first type of correctable error, the specific method for executing the error correction action includes: if the operating system receives the second instruction, it queries the general hardware error source table, obtains the error information, and then executes the first type of error correction action based on the error information. The first type of error correction action is used to correct the first type of correctable error. Specifically, after recognizing the second instruction, the operating system accesses the WHEA GHES table, obtains the error information of the first type of correctable error recorded therein (such as error type, physical address, and device identifier), and executes the corresponding first type of error correction action according to the mapping relationship between error type and error correction action. For example, for ECC memory errors, the operating system can mark the physical memory page where the error occurred as offline; for PCIe correctable errors, it can perform recovery operations such as device reset or link retraining.
[0088] It should be noted that the operating system can also query the general hardware error source table through polling. Specifically, the operating system actively queries the general hardware error source table periodically to detect whether any new error records have been generated. This polling mechanism enhances adaptability and robustness under different system configurations.
[0089] Based on the above embodiments, the data processing method provided in this application establishes a collaborative processing mechanism between the system firmware UEFI, the operating system OS, and the first PRM Handler. This achieves a smooth transition from a high-privilege, high-overhead SMI interrupt handling mode to a low-privilege, schedulable runtime processing mode, mitigating the system performance degradation caused by frequent SMI interrupts triggered by correctable errors. Further, see... Figure 4 , Figure 4 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Figure 4 This application illustrates a specific implementation flow of a data processing method provided in an embodiment, specifically showing the collaborative execution flow between the system firmware, operating system, and first PRM Handler, such as... Figure 4 As shown in the embodiment of this application, a data processing method may include steps 401 to 411, which are described in detail below.
[0090] Step 401: After the device is powered on, the system firmware initializes multiple platform runtime mechanism PRM processing programs, software SMI processing programs, and RAS SMI processing programs during the power-on self-test process.
[0091] Among them, the PRM handlers of the multiple platform runtime mechanisms include the first PRM handler.
[0092] Step 402: After the operating system starts, the system firmware monitors in real time whether an SMI storm triggered by a Type I correctable error has occurred. If an SMI storm is detected, proceed to step 403; otherwise, continue monitoring.
[0093] Step 403: The system firmware disables the SMI interrupt corresponding to the first type of correctable error in the SMI handler.
[0094] Step 404: The system firmware sends the first instruction to the operating system by triggering the System Control Interrupt (SCI).
[0095] Step 405: After receiving the first instruction, the operating system calls the first PRM processing program.
[0096] Step 406: The first PRM process queries the register for error information of the first type of correctable error to determine whether the first type of correctable error exists.
[0097] Specifically, the first PRM handler accesses the register corresponding to the first type of correctable error to determine whether there is error information for the first type of correctable error.
[0098] Step 407: If a Type I correctable error exists, the first PRM process records the error information to the cache space and determines the target condition that the frequency of occurrence of Type I correctable errors meets.
[0099] The target condition is one of the following: the frequency of occurrence is not higher than the first threshold and not lower than the second threshold; the frequency of occurrence is higher than the first threshold; and the frequency of occurrence is lower than the second threshold.
[0100] Step 408: If the frequency of occurrence exceeds the first threshold, the first PRM processing program executes: fills the error information into the corresponding WHEA GHES table, and sends a second instruction to the operating system by triggering the SCI terminal, and then returns to execute step 406.
[0101] Step 409: If the frequency of occurrence is lower than the second threshold, the first PRM processing program executes: triggers the SMI terminal, enables the SMI interrupt corresponding to the first type of correctable error, and exits the first PRM processing program.
[0102] Step 410: If the frequency of occurrence is not higher than the first threshold and not lower than the second threshold, then after a short sleep, return to step 406.
[0103] Step 411: After receiving the second instruction, the operating system queries the WHEA GHES table and performs the corresponding error correction action based on the error information of the first type of correctable error recorded in the WHEA GHES table.
[0104] As can be seen from the above technical solutions, the data processing method provided in this application realizes a complete closed-loop processing flow from SMI storm detection, SMI interruption suppression, error information collection and recording, and operating system autonomous error correction. Under the premise of ensuring that error handling capabilities are not lost, it reduces the impact of SMI interruption on system performance and improves the stability of the system and user experience under high-load error environment.
[0105] The above describes a data processing method provided by an embodiment of this application. The following describes a data processing system that performs the above data processing method.
[0106] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. Figure 5 As shown, the data processing system 500 includes system firmware 501 and operating system 502.
[0107] The system firmware is used to disable the system management interrupt corresponding to the first type of correctable error and send a first instruction to the operating system if it is determined that a system management interrupt storm caused by a first type of correctable error has occurred.
[0108] The operating system is configured to, upon receiving the first instruction, invoke the first platform runtime mechanism handler, query the general hardware error source table, and perform error correction actions based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.
[0109] In one possible implementation, the first platform runtime mechanism handler, when obtaining error information of the first type of correctable error by querying a register and writing the error information into a general hardware error source table, specifically performs the following:
[0110] After the query timing is reached, the register corresponding to the first type of correctable error is queried to obtain the error information of the first type of correctable error, including the occurrence time;
[0111] Based on the error information of the first type of correctable error, determine the frequency of occurrence of the first type of correctable error;
[0112] If the occurrence frequency is greater than the first threshold, the error information is written into the general hardware error source table corresponding to the first type of correctable error.
[0113] In one possible implementation, the first platform runtime mechanism handler is further configured to: after writing the error information into the general hardware error source table, issue a second instruction by triggering a system control interrupt to notify the operating system to perform error correction.
[0114] In one possible implementation, when the operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error, it specifically performs the following:
[0115] If the second instruction is received, the general hardware error source table is queried, the error information is obtained, and a first type of error correction action is performed based on the error information. The first type of error correction action is used to correct the first type of correctable error.
[0116] In one possible implementation, the first platform runtime mechanism handler is also used for:
[0117] If the occurrence frequency is less than the second threshold, trigger an interrupt to enable the system management interrupt corresponding to the first type of correctable error; exit the first platform runtime mechanism handler.
[0118] In one possible implementation, the first platform runtime mechanism handler is also used for:
[0119] If the occurrence frequency is not greater than the first threshold and not less than the second threshold, return to execute the error information of the first type of correctable error obtained by querying the register, and write the error information into the general hardware error source table.
[0120] In one possible implementation, the system firmware is used to disable the system management interrupt corresponding to the first type of correctable error and send a first instruction to the operating system if the system firmware determines that a system management interrupt storm caused by a first type of correctable error has occurred. Specifically, this is used to:
[0121] The system firmware monitors whether a system management interruption storm caused by a Type I correctable error has occurred.
[0122] If so, after the system firmware disables the system management interrupt corresponding to the first type of correctable error, it triggers a system control interrupt to send the first instruction to the operating system, so as to notify the operating system to query the error information of the first type of correctable error obtained by calling the first platform runtime mechanism handler and perform error correction.
[0123] In one possible implementation, the system firmware is also used for:
[0124] The system firmware initializes the runtime mechanism processing program of the first platform during the power-on self-test phase.
[0125] This application also provides an electronic device, which includes: a memory, at least one processor, and a first computer program and a second computer program stored in the memory;
[0126] The processor executes the first computer program to achieve:
[0127] Monitor whether a system management interruption storm caused by a Type I correctable error has occurred; if so, disable the system management interruption corresponding to the Type I correctable error and send the first instruction.
[0128] The processor executes the second computer program to achieve:
[0129] If the first instruction is received, the first platform runtime mechanism handler is invoked. The first platform runtime mechanism handler queries the register to obtain the error information of the first type of correctable error, and writes the error information into the general hardware error source table.
[0130] Query the general hardware error source table and perform error correction actions based on the error information of the first type of correctable error.
[0131] refer to Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as laptops, tablets, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0132] like Figure 6 As shown, the electronic device may include a processing unit (including at least one processor, such as a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0133] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0134] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can perform the following data processing method:
[0135] If the system firmware determines that a system management interrupt storm caused by a Type I correctable error has occurred, it disables the system management interrupt corresponding to the Type I correctable error and sends a first instruction to the operating system.
[0136] If the operating system receives the first instruction, it calls the first platform runtime mechanism handler to query the general hardware error source table, and performs error correction based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.
[0137] This application also provides a computer program product, including a first computer-readable instruction and a second computer program.
[0138] When the first computer-readable instruction is executed on the electronic device, the electronic device causes the electronic device to: if it is determined that a system management interrupt storm caused by a first type of correctable error has occurred, disable the system management interrupt corresponding to the first type of correctable error, and send the first instruction to the operating system.
[0139] When the second computer-readable instruction is executed on the electronic device, it causes the electronic device to perform:
[0140] If the first instruction is received, the first platform runtime mechanism handler is invoked to query the general hardware error source table, and an error correction action is performed based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.
[0141] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0144] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A data processing method, the data processing method comprising: If the system firmware determines that a system management interrupt storm caused by a Type I correctable error has occurred, it disables the system management interrupt corresponding to the Type I correctable error and sends a first instruction to the operating system. If the operating system receives the first instruction, it calls the first platform runtime mechanism handler, which queries the register to obtain the error information of the first type of correctable error and writes the error information into the general hardware error source table. The operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error.
2. The data processing method according to claim 1, wherein the first platform runtime mechanism processing program obtains the error information of the first type of correctable error by querying the register, and writes the error information into the general hardware error source table, including: When the query timing is reached, the first platform runtime mechanism handler queries the register corresponding to the first type of correctable error to obtain the error information of the first type of correctable error, including the occurrence time. The first platform runtime mechanism handler determines the frequency of occurrence of the first type of correctable error based on the error information of the first type of correctable error; If the occurrence frequency is greater than the first threshold, the first platform runtime mechanism handler will write the error information into the general hardware error source table corresponding to the first type of correctable error.
3. The data processing method according to claim 1, after the first platform runtime mechanism handler writes the error information into the general hardware error source table, further includes: The first platform runtime mechanism handler issues a second instruction by triggering a system control interrupt to notify the operating system to perform error correction.
4. The data processing method according to claim 3, wherein the operating system queries the general hardware error source table and performs error correction actions based on the error information of the first type of correctable error, including: If the operating system receives the second instruction, it queries the general hardware error source table, obtains the error information, and then performs a first type of error correction action based on the error information. The first type of error correction action is used to correct the first type of correctable error.
5. The data processing method according to claim 2, further comprising: If the occurrence frequency is less than the second threshold, the first platform runtime mechanism handler triggers an interrupt, enabling the system management interrupt corresponding to the first type of correctable error; Exit the runtime mechanism handler of the first platform.
6. The data processing method according to claim 2, further comprising: If the occurrence frequency is not greater than the first threshold and not less than the second threshold, the first platform runtime mechanism handler is executed to obtain the error information of the first type of correctable error by querying the register, and the error information is written into the general hardware error source table.
7. The data processing method according to claim 1, wherein if the system firmware determines that a system management interruption storm caused by a first type of correctable error has occurred, the system management interruption corresponding to the first type of correctable error is prohibited, and a first instruction is sent to the operating system, comprising: The system firmware monitors whether a system management interruption storm caused by a Type I correctable error has occurred. If so, after the system firmware disables the system management interrupt corresponding to the first type of correctable error, it triggers a system control interrupt to send the first instruction to the operating system, so as to notify the operating system to query the error information of the first type of correctable error obtained by calling the first platform runtime mechanism handler and perform error correction.
8. The data processing method according to claim 1, further comprising: The system firmware initializes the runtime mechanism processing program of the first platform during the power-on self-test phase.
9. A data processing system, comprising system firmware and an operating system; The system firmware is used to disable the system management interrupt corresponding to the first type of correctable error and send a first instruction to the operating system if it is determined that a system management interrupt storm caused by a first type of correctable error has occurred. The operating system, upon receiving the first instruction, invokes a first platform runtime mechanism handler to query a general hardware error source table, and performs error correction actions based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism processing program, and the error information is written into the general hardware error source table.
10. An electronic device, comprising: A memory, at least one processor, and a first computer program and a second computer program stored in the memory; The processor executes the first computer program to achieve: If a system management interruption storm caused by a Type I correctable error is determined to occur, the system management interrupt corresponding to the Type I correctable error is disabled, and a first instruction is sent to the operating system; The processor executes the second computer program to achieve: If the first instruction is received, the first platform runtime mechanism handler is invoked to query the general hardware error source table, and an error correction action is performed based on the error information of the first type of correctable error. The error information of the first type of correctable error is obtained by querying the register by the first platform runtime mechanism handler, and the error information is written into the general hardware error source table.