Hardware fault processing method and device, electronic equipment and storage medium

By responding to the hardware fault signal in the BIOS, loading the target processing firmware, and reporting the hardware fault information, it avoids the triggering of system management interrupts, solves the problem of the CPU stopping working during hardware fault processing, and achieves stable business services.

CN118860701APending Publication Date: 2024-10-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310487260.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In an

Method used

By responding to the system control interrupt triggered by the hardware fault signal in the BIOS, the target processing firmware is obtained, and the firmware is loaded during the BIOS startup process, and the hardware fault information is reported to avoid triggering the system management interrupt. Non-ASL code target processing firmware is used to assist in processing. Hardware failure.

Benefits of technology

It effectively avoids CPU operation suspension, ensures the normal operation of business, provides stable business services, and reduces the impact of hardware fault handling on system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860701A_ABST
    Figure CN118860701A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a hardware fault processing method and device, electronic equipment and a storage medium, and the method comprises the steps: responding to system control interruption triggered by a hardware fault signal, and processing firmware according to a predefined corresponding relation between the hardware fault signal and the processing firmware; target processing firmware corresponding to the system control interrupt is obtained, and the code language of the target processing firmware is different from the code language for inherent processing of the system control interrupt; and adopting the target processing firmware to report hardware fault information associated with the system control interruption. In this way, normal operation of services can be greatly guaranteed, system performance jitter caused by the fact that other cores of a CPU stop working due to system management interruption is avoided, the target processing firmware achieved through the non-ASL code is obtained, processing of system control interruption is assisted, and therefore the system control interruption can be processed in a firmware priority processing mode, and the system performance jitter can be avoided. And a complex processing function is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In related technologies, in X86 server systems, a firmware-first hardware fault handling mode is usually adopted. When the Central Processing Unit (CPU) senses an interruption caused by a hardware fault, it calls the associated firmware to report the hardware fault to the Operating System (OS) and the Base-Board Management Controller (BMC).

[0003] Currently, when the number of correctable hardware errors reaches a set threshold, a hardware fault is triggered, generating a System Management Interrupt (SMI). Furthermore, after the CPU senses the SMI, it calls the associated processing firmware to report the hardware fault to the OS and BMC respectively.

[0004] However, since system management interruptions will cause other CPU cores to stop working, this will cause system performance jitter during the hardware fault processing process, greatly affecting the execution of normal business and making it impossible to provide stable business services. Summary of the Invention

[0005] The embodiments of the present application provide a method, device, electronic device, and storage medium for handling hardware failures, so as to avoid stopping the operation of other CPU cores during hardware failure handling, thereby reducing the impact of hardware failure handling on normal business.

[0006] First, a method for handling hardware failures is proposed, which is applied to BIOS and includes:

[0007] In response to a system control interrupt triggered by a hardware fault signal, obtaining target processing firmware corresponding to the system control interrupt according to a predefined correspondence between the hardware fault signal and the processing firmware, wherein the target processing firmware is written in a code language different from a code language inherently used to process the system control interrupt, and the target firmware is loaded during the BIOS startup process;

[0008] The target processing firmware is used to report hardware fault information associated with the system control interrupt.

[0009] In a second aspect, a device for handling hardware failure is provided, comprising:

[0010] a response unit, configured to, in response to a system control interrupt triggered by a hardware fault signal, obtain target processing firmware corresponding to the system control interrupt according to a predefined correspondence between the hardware fault signal and the processing firmware, wherein a code language of the target processing firmware is different from a code language inherently used to process the system control interrupt, and the target firmware is loaded during the BIOS startup process;

[0011] A reporting unit is used to report hardware fault information associated with the system control interrupt using the target processing firmware.

[0012] Optionally, when acquiring the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware, the acquiring unit is configured to:

[0013] Determining a GUID of a target processing firmware according to a predefined correspondence between a hardware fault signal and a processing firmware, wherein the target processing firmware corresponds to the system control interrupt;

[0014] The positioning pointer and parameter pointer associated with the target processing firmware are determined based on the GUID, and the target processing firmware corresponding to the system control interrupt is obtained based on the positioning pointer and parameter pointer.

[0015] Optionally, the determining of the location pointer and parameter pointer associated with the target processing firmware based on the GUID, the acquiring unit is configured to:

[0016] Writing the GUID into a preset interaction area between the bridge driver and the operating system so that the bridge driver in the operating system determines, based on the GUID, a location pointer and a parameter pointer associated with the target processing firmware in a maintained firmware code table;

[0017] Obtain the positioning pointer and parameter pointer of the bridge drive feedback.

[0018] Optionally, when reporting the hardware fault information associated with the system control interrupt, the reporting unit is configured to:

[0019] Determining abnormal hardware information that triggers the system control interrupt using the target processing firmware;

[0020] Collecting abnormality location information associated with the abnormal hardware information, and generating hardware fault information corresponding to the system control interrupt based on the abnormal hardware information and the abnormality location information;

[0021] The hardware fault information is sent to the BMC via a preset transmission bus and transmission interface, and after the error information table is filled based on the hardware fault information, an interrupt signal is sent to the operating system OS.

[0022] Optionally, the hardware fault signal is generated by any of the following hardware faults:

[0023] When the number of correctable errors CE in the memory exceeds a first set value, a memory exception is generated;

[0024] When the number of correctable errors CE in the PCIE exceeds a second set value, a bus abnormality is generated.

[0025] Optionally, before determining the system control interrupt triggered by the hardware fault signal, the startup process further includes a startup unit, which is configured to perform the following operations:

[0026] Configure the system to not trigger a system management interrupt when hardware fault signals are detected in the memory correctable error and PCIE correctable error reporting mechanisms, and configure the MCA reporting mechanism to only send a CMCI interrupt to the operating system.

[0027] Loading various processing firmware in the form of drivers developed for various types of hardware fault signals, and after determining that the driver loading is complete, generating a firmware code table searchable by the operating system based on the ownership information, location pointer, and parameter pointer of each processing firmware obtained by parsing;

[0028] A conversion relationship between the physical address and the virtual address associated with each target processing firmware is established.

[0029] Optionally, when loading target processing firmware in the form of drivers developed for various types of hardware fault signals, the startup unit is configured to:

[0030] Determining a correspondence between predefined types of hardware fault signals and processing firmware, wherein each processing firmware is configured as a runtime type driver;

[0031] In the driver execution environment, the corresponding processing firmware is loaded.

[0032] Optionally, when generating a firmware code table searchable by an operating system based on the ownership information, location pointer, and parameter pointer of each target processing firmware obtained through parsing, the startup unit is configured to:

[0033] Writing the attribute information, location pointer, and parameter pointer corresponding to each target processing firmware determined by parsing into a preset memory space according to a predefined format to generate a firmware code table;

[0034] Determine the physical address of the firmware code table in the memory space, write the physical address into the ACPI structure, into the entry information associated with the extended system description table, and update the statistical results in the extended system description table.

[0035] In a third aspect, an electronic device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.

[0036] In a fourth aspect, a computer-readable storage medium is proposed, on which a computer program is stored, and the computer program implements the above method when executed by a processor.

[0037] In a fifth aspect, a computer program product is proposed, comprising a computer program, which implements the above method when executed by a processor.

[0038] The beneficial effects of this application are as follows:

[0039] In the embodiments of the present application, a method, apparatus, electronic device, and storage medium for handling hardware faults are proposed. By configuring different reporting mechanisms to detect various types of hardware fault signals, a system management interrupt is not triggered. This prevents a system management interrupt from occurring when a hardware fault occurs, thereby preventing the CPU from pausing. This significantly ensures the normal operation of services and avoids system performance fluctuations caused by CPU downtime. This ensures that stable service is provided during the hardware fault handling process proposed in the present application, ensuring a better user experience.

[0040] Moreover, considering that the inherent code for processing system management interrupts is ASL code, and the scope of use of ASL code is limited and cannot implement complex processing functions, the BIOS assists in the processing of system management interrupts by obtaining target processing firmware implemented using non-ASL code. This enables the BIOS to implement complex processing functions in accordance with pre-written processing strategies in a firmware-priority processing mode with the help of target processing firmware implemented in other code languages, and effectively handle hardware failures. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a schematic diagram of the process of troubleshooting under the prior art in an embodiment of the present application;

[0042] Figure 2A This is a hardware-level connection diagram in an embodiment of the present application;

[0043] Figure 2B This is another hardware-level connection diagram in an embodiment of the present application;

[0044] Figure 3A Schematic diagram of the processing operations performed during the BIOS startup process in an embodiment of the present application;

[0045] Figure 3B A schematic diagram of the process of configuring the firmware code table in an embodiment of the present application;

[0046] Figure 4A Schematic diagram of the process of handling hardware failure in an embodiment of the present application;

[0047] Figure 4B A schematic diagram of a process for instructing a bridge driver to search for target processing firmware in an embodiment of the present application;

[0048] Figure 5A This is a schematic diagram of the content that needs to be filled in the embodiment of this application;

[0049] Figure 5B This is a schematic diagram of the fault information printed by the operating system in an embodiment of the present application;

[0050] Figure 6 This is a schematic diagram of the logical structure of a device for processing hardware failures in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application;

[0052] Figure 8 This is a schematic diagram of the structure of a computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0053] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.

[0054] The terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein.

[0055] The following explains some of the terms used in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0056] CPU (Central Processing Unit): refers to the central processing unit.

[0057] Correctable Error (CE): Also known as a correctable error, it refers to an error that can be corrected by specific technologies such as software or hardware. In the embodiment of the present application, it specifically refers to a correctable error in the memory or a correctable error in the PCIE bus.

[0058] BIOS (Basic Input / Output System): refers to the basic input / output system.

[0059] System Management Interrupt (SMI): To make it easier for software and hardware designers to design interrupt routines that meet their needs, many CPUs provide SMIs. When used, the CPU enters System Management Mode (SMM). Before entering SMM, the CPU stores register values ​​in SMRAM and then jumps to the SMI ENTRY POINT for execution. After processing, the CPU uses the RSM instruction to jump back to the original location and resume execution, restoring the CPU register values.

[0060] ERR#0: also known as ERR0, or ERR0-PIN, refers to the output pin corresponding to a fault error processing signal in the CPU.

[0061] GPIO (General Purpose Input / Output): refers to the general input and output interface on the PCH chip.

[0062] PCH (Platform Controller Hub): refers to the south bridge chip on the X86 device.

[0063] ASL (ACPI Source language): is an expression used to describe hardware information and related hardware operations for OS use.

[0064] SCI (System Control Interrupt): System control interrupt.

[0065] BMC (Base-Board Management Controller): Baseboard management controller.

[0066] OS (operating system): operating system.

[0067] MCA (Machine Check Architecture): Also known as the MCA mechanism, this is a hardware error detection architecture. It performs self-checks on server hardware and issues interrupts or exceptions when hardware errors are detected. It can detect hardware errors such as system bus errors, Error Correcting Code (ECC) memory errors, and parity errors.

[0068] Baseboard Management Controller (BMC): A dedicated controller used to implement detection and management on devices. BMC is an independent system that does not rely on other hardware on the system, nor does it rely on systems such as BIOS and OS. However, BMC can interact with BIOS and OS. BMC supports the IPMI specification.

[0069] IPMI (Intelligent Platform Management Interface): Intelligent Platform Management Interface.

[0070] Keyboard Controller Style (KCS): As a standard interface for communication between BMC and BIOS, the KCS interface is currently usually mounted on the (Low Pin Count, LPC) bus.

[0071] System Event Log (SEL): This is a type of data that is widely present in various server systems. It contains various event logs generated by the baseboard management controller, heat exchanger, etc. By analyzing the SEL information, warnings or potential major problems can be discovered.

[0072] PCIE (Peripheral Component Interconnect Express): refers to a high-speed serial computer expansion bus.

[0073] OEM (Original Equipment Manufacture): refers to the original equipment manufacturer.

[0074] ACPI (Advanced Configuration and Power Interface): stands for Advanced Configuration and Power Management Interface. It provides operating system applications with the ability to manage all power management interfaces. It is an industry standard that includes both software and hardware protocol specifications.

[0075] APEI (ACPI Platform Error Interface): is the ACPI platform error interface used to pass error information to the OS. It should be understood that APEI is an interface defined by ACPI and contains four ACPI tables.

[0076] HEST (Hardware Error Source Table): A table in the APEI structure, also known as an APCI table, defines many error sources and error types. The purpose of defining these hardware error sources is to standardize the implementation of the software and hardware error interface.

[0077] CMCI (Corrected Machine Check Interrupt): Corrected machine check type interrupt.

[0078] Physical address (PA): refers to the address loaded into the memory address register, the real address of the memory unit. With the help of the physical address, the data bus can access the memory address of a specific storage unit in the main memory.

[0079] CPER (Common Platform Error Record): Common Platform Error Record.

[0080] RCT (Runtime Code Table): Runtime code table, or runtime code set.

[0081] DXE (Driver Execution Environment): Driver execution environment.

[0082] The following is a brief introduction to the design concept of the embodiment of this application:

[0083] In related technologies, in an x86 server system, after a hardware failure is determined to have occurred, it is necessary to report it to the BMC to generate an SEL. Afterwards, subsequent operation and maintenance personnel can update the faulty hardware part according to the SEL to restore normal business processing.

[0084] Currently, the firmware-first hardware fault handling mode is usually adopted, which triggers a system management interrupt after a fault occurs; the BIOS collects fault information and reports it to the BMC through the IPMI, and then reports it to the operating system through the APEI table.

[0085] For example, see Figure 1 As shown, it is a schematic diagram of the process of fault handling under the prior art in the embodiment of the present application. Figure 1As can be seen from the illustrated content, under different fault reporting mechanisms, when it is determined that the number of memory correctable errors or PCIE correctable errors exceeds the corresponding set number threshold, a hardware fault is determined to have occurred, and a system management interrupt is triggered; then the corresponding processing firmware (SMI Error Handler) 102 configured in the BIOS organizes the abnormal information into information that complies with the IPMI protocol, and reports it to the BMC103 via the LPC bus and KCS interface. At the same time, the APEI table is configured based on the cause of the hardware fault, and an interrupt signal is triggered to be sent to the OS101, so that the OS101 determines the cause of the hardware fault through the configured ACPI table.

[0086] However, memory correctable errors and PCIE correctable errors are very common errors. Even though the corresponding number thresholds are set, hardware failures still occur frequently. Moreover, due to the inherent defects of system management interrupts, other CPU cores will stop working, resulting in system performance jitter. This makes it impossible to carry out services such as high-performance gateways, games, and Redis. This greatly affects the execution of normal business, makes it impossible to provide stable business services, and reduces the user experience.

[0087] In view of this, in an embodiment of the present application, a method, device, electronic device and storage medium for processing hardware faults are proposed to determine a system control interrupt triggered by a hardware fault signal, wherein the system management interrupt is pre-configured not to be triggered based on the hardware fault signal; then, according to the predefined correspondence between the hardware fault signal and the processing firmware, the target processing firmware corresponding to the system control interrupt is obtained, wherein the code language corresponding to the target processing firmware is different from the code language for the preset processing system control interrupt, and the target processing firmware is loaded during the BIOS startup process; thereafter, the target processing firmware is used to report the hardware fault information associated with the system control interrupt.

[0088] In this way, by configuring different reporting mechanisms to detect various types of hardware fault signals, without triggering a system management interrupt, no system management interrupt will be generated when a hardware fault occurs, thus not causing the CPU to stop running. This can greatly ensure the normal operation of the business and avoid system performance jitter caused by CPU stopping working. In this way, during the hardware fault handling process proposed in this application, stable business services can be provided, ensuring the user experience.

[0089] Moreover, considering that the inherent code for processing system control interrupts is ASL code, and the scope of use of ASL code is limited and it cannot implement complex processing functions, the BIOS assists in processing system control interrupts by obtaining target processing firmware implemented using non-ASL code, so that in the firmware-priority processing mode, with the help of target processing firmware implemented by other code languages, complex processing functions can be implemented according to pre-written processing strategies, and hardware failures can be effectively handled.

[0090] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0091] See Figure 2A FIG2 is a schematic diagram showing a hardware-level connection in an embodiment of the present application, including a CPU 201 , a PCH 201 , and a BMC 203 .

[0092] exist Figure 2A In the connection diagram shown, PCH201 triggers a system control interrupt based on a hardware fault signal.

[0093] See Figure 2B FIG. 2 is another schematic diagram of a hardware connection in an embodiment of the present application, including a CPU 201 and a BMC 203 .

[0094] exist Figure 2B In the connection diagram shown, the CPU 201 triggers a system control interrupt based on a hardware fault signal.

[0095] It should be noted that Figure 2A and Figure 2B The hardware-level connection diagram shown may specifically be a partial hardware connection structure in an X86 architecture server, or a partial hardware structure in an X86 architecture terminal, and this application does not make any specific limitations on this.

[0096] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.

[0097] The terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch or other device that supports X86 architecture.

[0098] exist Figure 2A In the diagram, the ERR0 pin (or ERR0-PIN) of CPU201 is connected to the input pin (GPI) of the GPIO pin on PCH202, so that PCH202 can sense the level change of the ERR0 pin on CPU201 with the help of the GPI connected to CPU201, and has the ability to trigger a system control interrupt; and then, when an abnormality occurs, it can trigger a system control interrupt.

[0099] exist Figure 2B In the diagram, the ERR0 pin (or ERR0-PIN) of CPU201 is connected to the input pin (GPI) of the GPIO pin on CPU201, so that the GPI on CPU201 can sense the level change of the ERR0 pin on CPU201 and has the ability to trigger a system control interrupt; thus, when an abnormality occurs, it can trigger a system control interrupt.

[0100] After the target processing firmware in the BIOS completes processing of the hardware fault, it sends IPMI information to BMC203 to inform BMC203 of the hardware fault information. At the same time, based on the hardware fault information, after completing the filling of the APEI table, it sends an interrupt signal to the OS to enable the OS to perceive the cause of the hardware fault. Among them, the BIOS runs on CPU201.

[0101] The following first describes the process of handling hardware failures in the embodiment of the present application from the perspective of BIOS with reference to the accompanying drawings:

[0102] See Figure 3A As shown in FIG, it is a schematic diagram of the processing operation performed during the BIOS startup process in the embodiment of the present application. Figure 3A From the perspective of BIOS, we first explain the configuration and installation contents during the BIOS startup process:

[0103] Step 301: The BIOS is configured not to trigger a system management interrupt when a hardware fault signal is detected under the memory correctable error and PCI correctable error reporting mechanisms, and is configured to send only a CMCI interrupt to the operating system under the MCA reporting mechanism.

[0104] In an embodiment of the present application, during the startup process, the BIOS implements startup processing according to a preset configuration method, and is configured not to trigger a system management interrupt when the memory correctable error and PCIE correctable error reporting mechanisms detect hardware fault signals, so that the CPU does not need to process the system management interrupt, and is configured to only send a CMCI interrupt to the operating system under the MCA reporting mechanism.

[0105] It should be noted that the hardware fault reporting mechanism involved in the embodiments of the present application includes the MCA reporting mechanism corresponding to the MCA domain, the memory correctable error reporting mechanism (or the reporting mechanism corresponding to the memory CE domain, or the memory CE reporting mechanism), and the PCIE correctable error reporting mechanism (or the reporting mechanism corresponding to the PCIE AER domain, or the PCIE AER reporting mechanism). Different reporting mechanisms have corresponding fault detection methods, and the relevant fault detection methods can be configured according to actual processing needs. This application does not provide specific explanations on this.

[0106] In addition, the hardware fault signal considered in this application can be generated by any one or combination of the following hardware faults: a memory fault generated when the number of correctable errors (CE) in the memory exceeds a first set value; a bus fault generated when the number of CEs in the PCIE exceeds a second set value.

[0107] In the embodiment of the present application, the cause of memory CE may be: an error caused by cosmic rays, or an error caused by a medium problem of the memory stick, etc.; the cause of PCIE CE may be: a verification error caused by incorrect content transmitted on the PCIE bus, or an error caused by a problem with the PCIE bus module itself, etc. This application does not impose any specific restrictions on this.

[0108] In this way, by configuring the triggered interrupt type, it is possible to effectively perceive hardware failures caused by the number of recorded correctable memory errors exceeding the first set value and the number of recorded correctable errors in the PCIE bus exceeding the second set value, thereby providing a basis for effective processing of memory anomalies and PCIE anomalies without stopping the CPU.

[0109] During the specific configuration process, when the BIOS is configured under the memory CE reporting mechanism and the system management interrupt is no longer triggered, the value corresponding to the startup pin signal INTRPT_SEL_PIN is set to 1. At the same time, the value of INTRPT_SET_SMI is set to 0. By setting the value of INTRPT_SEL_PIN to 1, when the interrupt is triggered, a signal is sent through the err[0] pin to inform the BMC; by setting the value of INTRPT_SET_SMI to 0, the system management interrupt can be disabled, the system management interrupt signal is avoided from being triggered, and the generation of the system management interrupt signal is cleared to disable it.

[0110] Correspondingly, with the help of the above-mentioned configuration of the memory correctable error reporting mechanism and the PCIE correctable error reporting mechanism, in the subsequent fault handling process, when a hardware fault is detected under the two reporting mechanisms, the system management interrupt is no longer triggered. Instead, the Error pin0 is pulled low to trigger the system control interrupt; then, the UEFI runtime code is called to report the CE to the BMC and the operating system.

[0111] In addition, when a hardware fault signal is detected under the MCA reporting mechanism configured by the BIOS and a system management interrupt is not generated, the CMCI_CTL value can be configured to be 0 in the Machine Check CTL2 Register under IA32_MC2_CTL2, so that a CMCI interrupt is triggered instead of a CSMI interrupt. Based on this, the relevant memory bank can be configured to close to generate a CSMI interrupt. Under this reporting mechanism, a CMCI interrupt can be directly generated to the operating system without sending information to the BMC.

[0112] Optionally, for the configuration of the MCA reporting mechanism, the above processing method can be configured according to actual processing needs, that is, the memory-related bank is configured to close the CSMI interrupt and directly generate a CMCI to the operating system; or, a larger threshold can be set for CE, so that after determining that the number of CE occurrences exceeds the set larger threshold, the CSMI interrupt is re-enabled.

[0113] It should be noted that the hardware fault handling method proposed in this application is mainly aimed at hardware faults under the memory correctable error reporting mechanism and the PCIE correctable error reporting mechanism; and for the reporting method under the MCA reporting mechanism, the above settings are made to avoid triggering system management interrupts.

[0114] In addition, based on the configuration of this application, when processing hardware faults detected by the memory correctable error reporting mechanism, or when processing hardware faults detected by the PCIE correctable error reporting mechanism, the operating system can ultimately perceive the occurrence of the hardware fault and the BMC can obtain hardware fault information of the hardware fault. The configuration of the MCA reporting mechanism enables only an interrupt signal to be sent directly to the OS, without sending hardware fault information to the BMC. Based on this, the configuration of the MCA mechanism can, on the one hand, prevent it from triggering a system management interrupt when a hardware fault is detected, and on the other hand, it can provide additional reporting functions for memory faults or PCIE faults on the basis of the memory CE reporting mechanism and the PCIE AER reporting mechanism.

[0115] In this way, during the startup process, the BIOS performs a series of configurations so that different reporting mechanisms will not trigger system management interrupts, avoiding subsequent CPU shutdown caused by the cumulative number of correctable errors exceeding the set threshold.

[0116] Step 302: The BIOS loads various processing firmware in the form of drivers developed for various types of hardware fault signals, and after determining that the driver loading is completed, generates a firmware code table that can be searched by the operating system based on the ownership information, location pointer, and parameter pointer of each processing firmware obtained by parsing.

[0117] In the case where corresponding processing firmware is developed in advance for each type of hardware fault signal, during the startup process, the BIOS determines the correspondence between the predefined types of hardware fault signals and the processing firmware, wherein each processing firmware is configured as a runtime type driver; in the driver execution environment, the corresponding processing firmware is loaded.

[0118] Taking the loading of a single processing firmware as an example, the BIOS will implement the processing firmware (or processing function, denoted as CEHandler) of CE processing as a DXE_RUNTIME_DRIVER type driver for the bridge driver of the operating system in the runtime stage to call; moreover, this type of processing firmware will be loaded (loaded) into the runtime memory address space in the DXE stage, where the type driver identified by runtime refers to the firmware that is loaded into the runtime memory address space when the BIOS is started and can be called and executed during the fault handling process in the operating system stage.

[0119] In this way, when each target processing firmware is configured as a runtime type driver, each driver can be effectively loaded during the BIOS startup process, providing a processing basis for subsequently calling the specified target processing firmware to perform fault processing.

[0120] Furthermore, after the BIOS determines that the driver loading is completed, it generates a firmware code table that can be searched by the operating system based on the ownership information, location pointer, and parameter pointer of each target processing firmware obtained through analysis.

[0121] Specifically, when the BIOS generates a firmware code table that can be searched by the operating system, it will parse and determine the ownership information, location pointer, and parameter pointer corresponding to each target processing firmware, and write them into the preset memory space in a predefined format to generate a firmware code table; then it will determine the physical address of the firmware code table in the memory space, and write the physical address into the ACPI structure, the entry information associated with the extended system description table (denoted as XSDT), and the statistical results in the system description table (denoted as checksum) will be updated.

[0122] In an embodiment of the present application, the code for implementing the generation of the firmware code table is configured as a DXE_DRIVER type driver, that is, it is only executed during the startup process; furthermore, by registering the callback function RcLoaderEndOfDxeNotification of the EndofDXE event, after determining that the loading of each processing firmware is completed, the image content compiled by the BIOS is parsed according to the preset parsing protocol (loadimageprotocol), and the runtime code unit (denoted as RC module) to which each processing firmware (CEHandler) belongs is determined, as well as the runtime code processing component (RCHandler) corresponding to each processing firmware in the RCmodule, so that the ownership information, location pointer, and parameter pointer corresponding to each processing firmware can be determined, wherein the RCHandler that can handle a specified type of hardware fault is the CEHandler corresponding to the type of hardware fault; the location pointer of the CEHandler refers to the physical address where the CEHandler is stored, and the parameter pointer of the CEHandler refers to the storage address of the parameters related to the CEHandler; the ownership information of the target processing firmware may include the corresponding RC module and the corresponding related context information.

[0123] Afterwards, the BIOS determines the format for writing the ownership information, location pointer, parameter pointer and other contents related to each processing firmware according to the predefined format; and then generates the firmware code table in the preset memory space according to the format.

[0124] It should be noted that for RCHandler, the function structure corresponding to RCHandler is as follows:

[0125]

[0126]

[0127] At the same time, in order to ensure that the generated firmware code table can be found by the OS, settings are made at the ACPI structure level. The physical address of the generated firmware code table in the memory space is written into the ACPI structure, the entry information associated with XSDT, and the checksum value associated with XSDT is updated. Among them, XSDT is an ACPI table.

[0128] For example, see Figure 3B As shown, it is a schematic diagram of the process of configuring the firmware code table in the embodiment of the present application. Figure 3BIn the content shown, there are three configuration stages S1-S3 when configuring the firmware code table. Figure 3B The three configuration stages are described below:

[0129] S1: RC Module is found.

[0130] In the first stage of implementing the firmware code table configuration, the BIOS discovers the RC Module to which each processing firmware belongs.

[0131] S2: Fill in the RCT.

[0132] In the second stage of configuration, the BIOS writes the contents of the firmware code table into a preset memory space according to the information associated with each processing firmware, thereby obtaining a firmware code table (denoted as RCT).

[0133] S3: Install RCT.

[0134] In the third stage of configuration, the BIOS implements the installation of the RCT and configures the RCT as an APCI table that the operating system can access.

[0135] In this way, by adding the physical address of the firmware code table to the ACPI structure, the firmware code table can be configured as an ACPI table, so that the operating system can search the firmware code table, so that in the subsequent exception handling process, the BIOS can use the bridge driver in the operating system to effectively search for the target processing firmware.

[0136] After that, you need to initialize the CEHandler parameters.

[0137] Specifically, to ensure that the bridge driver (referred to as "Bridge Driver") in the operating system correctly calls the RCHandler function that performs CE processing, the BIOS must initialize the function's input parameters during the boot phase. The BIOS implements a DXE_RUNTIME_DRIVER driver to initialize the Static Data Buffer and RuntimeMMIO of the CE processing function RCHandler. This initialization includes allocating runtime memory address space and determining data content.

[0138] It should be noted that StaticDataBuffer stores many address pointers of services used by RCHandler, and runtimeMmioRanges stores PCIE MMCFG, IMC MMIO and DMI RCRB, etc. These addresses are physical addresses during initialization and need to be converted to virtual addresses in order to be called in the operating system stage.

[0139] Taking StaticDataBuffer as an example, to convert physical addresses to virtual addresses, a callback function for the virtualaddresschange event is registered. When entering the operating system, the callback function converts the physical address in the StaticDataBuffer to a virtual address. A similar operation is performed for Runtime MMIO, which will not be described in detail here.

[0140] In addition, in order to ensure that the bridge driver in the operating system can perceive the BIOS's call needs in the subsequent hardware fault processing process and realize the interaction between the BIOS and the operating system bridge driver, the BIOS can declare the RCT Device in the Scope(\_SB) in the ASL code; then configure it in the SCI Handler corresponding to the GPIO, and call the implementation code that writes the CEHandler's GUID into the interaction area, where the GUID written in the interaction area can be perceived by the Bridge Driver.

[0141] In this way, the configuration of the hardware fault handling method proposed in this application can be completed at the BIOS level, providing a guarantee for the handling process when a hardware fault occurs.

[0142] See Figure 4A FIG. 1 is a schematic diagram of a process for handling hardware failures in an embodiment of the present application. Figure 4A , describes the BIOS process when a hardware failure is determined after the boot is complete:

[0143] Step 401: In response to a system control interrupt triggered by a hardware fault signal, the BIOS obtains target processing firmware corresponding to the system control interrupt according to a predefined correspondence between the hardware fault signal and the processing firmware.

[0144] Specifically, a connection is pre-established between the general input pin (i.e., GPI) of the PCH and the abnormal output pin (i.e., ERR0-PIN) of the CPU, and when various types of hardware fault signals are detected under different reporting mechanisms, without triggering the system management interrupt, the BIOS can determine that a hardware fault has occurred after determining that the PCH triggers a system control interrupt based on the hardware fault signal.

[0145] In addition, when a connection is pre-established between the CPU's GPI and the CPU's ERR0-PIN, and various types of hardware fault signals are detected under different reporting mechanisms, without triggering a system management interrupt, the BIOS can determine that a hardware fault has occurred after determining that the CPU has triggered a system control interrupt based on the hardware fault signal.

[0146] It should be noted that, during the startup configuration process of the BIOS, a system management interrupt is generated when the number of CE occurrences in the closed memory exceeds a first set value, and a system management interrupt is generated when the number of CE occurrences in the closed PCIE exceeds a second set value. When it is determined that the number of memory CE occurrences exceeds the first set value, or the number of CE occurrences in the PCIE exceeds the second set value, the triggering process of the system control interrupt is: when the hardware CE is configured to reach the set value, the ERR0 pin on the CPU is pulled low, and the ERR0 pin is hardware-connected to the PCH GPI or the CPU GPI, thereby generating a system control interrupt.

[0147] In this way, the BIOS is configured during the startup process so that in the event of a hardware failure, the system management interrupt is not triggered based on the hardware failure signal, but the system control interrupt is triggered instead, thereby avoiding the CPU stopping due to the hardware failure. While effectively handling the hardware failure, it can ensure the normal operation of other services.

[0148] Furthermore, in response to the system control interrupt, the BIOS obtains the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware.

[0149] In an embodiment of the present application, when the correspondence between various types of hardware fault signals and processing firmware is predefined, when the BIOS obtains the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware, the BIOS determines the globally unique identifier (GUID) of the target processing firmware according to the predefined correspondence between the hardware fault signal and the processing firmware, wherein the target processing firmware corresponds to the triggered system control interrupt; then, based on the GUID, the positioning pointer and parameter pointer associated with the target processing firmware are determined, and based on the positioning pointer and parameter pointer, the target processing firmware corresponding to the system control interrupt is obtained.

[0150] Specifically, the BIOS first determines the type of hardware fault signal targeted by the system control interrupt, and then determines the target processing firmware corresponding to the current system control interrupt based on the pre-defined correspondence between various types of hardware fault signals and processing firmware, and obtains the GUID of the target processing firmware. When determining the type of hardware fault signal that causes the system management interrupt, the BIOS can use a related interrupt acquisition program to determine the type of hardware fault that causes the system management interrupt; it can be understood that one hardware fault type corresponds to one hardware fault signal type; the hardware fault type may include a memory fault or a PCIE fault, and correspondingly, the hardware fault signal type may include a signal for indicating the presence of a memory fault, or a signal for indicating the presence of a PCIE fault.

[0151] It should be noted that in the embodiment of the present application, the code language corresponding to the target processing firmware is different from the code language for inherently processing the system control interrupt, and the target processing firmware is loaded during the BIOS startup process; in addition, the SCI processing firmware for inherently processing the system control interrupt and the target processing firmware corresponding to the determined system control interrupt are two different concepts. The SCI processing firmware for inherently processing the system control interrupt in the BIOS is written in ASL language, which is a very primitive interpretation code with a limited scope of use and very slow speed. Usually, complex functions cannot be implemented using ASL code. Therefore, in order to ensure the processing effect of hardware failures, it is necessary to use the target processing firmware written in other languages ​​for processing. In the embodiment of the present application, according to actual processing needs, the processing firmware can be developed using UEFI code, or the processing firmware can be an OS driver, wherein UEFI code refers to code that complies with the UEFI specification, such as code written in C language; the code for writing the OS driver can be C language code, or C++ code, etc., and this application does not make specific restrictions on this; based on this, it is necessary to call the determined target processing firmware in the SCI processing firmware. In other words, it is necessary to implement the ASL code to call firmware written in other languages.

[0152] When the BIOS determines the positioning pointer and parameter pointer associated with the target processing firmware based on the GUID, the BIOS writes the GUID into the preset interaction area between the BIOS and the bridge driver, so that the bridge driver in the operating system determines the positioning pointer and parameter pointer associated with the target processing firmware based on the GUID in the firmware code table maintained by the BIOS; and then obtains the positioning pointer and parameter pointer fed back by the bridge driver.

[0153] Specifically, after the BIOS implements the interaction with the bridge driver, it can use the bridge driver to find the driver location (i.e., the location of the target processing firmware) based on the GUID, so that it can determine the function pointer that needs to be called, facilitating the subsequent call of the corresponding target processing firmware. During the specific interaction process, the BIOS uses the internal SCI processing firmware to fill in the GUID of the target processing firmware in the preset interaction area (denoted as OpRegion) between the BIOS and the bridge driver; then, when the bridge driver senses the GUID to be called, it searches for and determines the target processing firmware based on the information stored in the runtime code table (RCT) maintained by the BIOS, and then calls the corresponding target processing firmware after converting the physical address of the target processing firmware into a virtual address.

[0154] It should be noted that when the target processing firmware is written by UEFI code, although the target processing firmware is UEFI code, it is relatively independent. The services that the function depends on rely on the input parameters to provide pointers. However, since the parameter pointers corresponding to the input parameters correspond to physical addresses, the code execution phase of the target processing firmware is the runtime phase, and the BIOS needs to convert the physical address into a virtual address when entering the operating system.

[0155] See Figure 4B As shown, it is a schematic diagram of the process of instructing the bridge driver to search for the target processing firmware in the embodiment of the present application. Figure 4B As shown in the diagram, the SCI processing firmware in the BIOS writes the GUID of the target processing firmware into the preset interaction area, namely OpRegion. Then, after the bridge driver in the operating system senses the GUID of the target processing firmware, it searches the RCT table maintained by the BIOS to determine the location pointer (*RCHandler), parameter pointer (*ContextBuffer), and reserved parameter pointer (*ParamBuffer) associated with the target processing firmware.

[0156] Continue to combine Figure 4B ,according to Figure 4B As shown in the RCT structure, Figure 4B The pointer in circle 1 is the function pointer to be called, that is, the positioning pointer of the target processing firmware; the parts indicated by circle 2 (*DataBuffe) and circle 3 (*Runtime MMIORanges) are important components of the input parameters. The location indicated by *ContextBuffer stores the contents indicated by circles 2 and 3. Moreover, the area pointed to by the address pointers indicated by circles 2 and 3 is where the service pointer is placed. It is a physical address. The code execution stage is the runtime stage, so it needs to be converted into a virtual address by the BIOS when entering the operating system.

[0157] In this way, the BIOS can use the bridge driver in the operating system to search for target processing firmware written in different code languages, so that the target processing firmware written in non-ASL language can be called to implement hardware fault processing.

[0158] Based on the location pointer and parameter pointer associated with the target processing firmware, the BIOS can determine the storage location of the target processing firmware and the storage location of parameters related to the target processing firmware, thereby enabling acquisition of the target processing firmware.

[0159] In this way, according to the predefined correspondence between the hardware fault signal and the processing firmware, the GUID used to search for the target processing firmware can be determined, so that the target processing firmware can be effectively searched and located subsequently.

[0160] Step 402: The BIOS uses the target processing firmware to report hardware fault information associated with the system control interrupt.

[0161] When executing step 402, the BIOS uses the target processing firmware to collect hardware fault information that generates the system control interrupt, sends the hardware fault information to the BMC, and fills the APEI table based on the hardware fault information, and then sends an interrupt signal to the operating system.

[0162] Specifically, the BIOS uses target processing firmware to determine the abnormal hardware information that triggers the system control interrupt; then collects the abnormal location information associated with the abnormal hardware information, and generates hardware fault information corresponding to the system control interrupt based on the abnormal hardware information and the abnormal location information; then, the hardware fault information is sent to the BMC through the preset transmission bus and transmission interface, and after filling the error information table based on the hardware fault information, an interrupt signal is sent to the operating system OS.

[0163] It should be noted that the collected information associated with the hardware fault type that triggers the system control interrupt includes: abnormal hardware information and abnormal location information, wherein the abnormal hardware information is used to indicate the hardware where the abnormality (or fault) occurs, and the abnormal location information is used to indicate the location of the abnormality in the hardware.

[0164] For example, assuming that SCI is triggered because the CE in memory X1 exceeds the threshold, the corresponding abnormal hardware information is memory X1, and the corresponding abnormal location information includes: related information of the faulty memory X1 obtained by reading the retry_rd_err_log series registers, such as node, channel, DIMM, rank, sub rank, bank, device, row, column, address, error type, etc.

[0165] In the implementation of this application, the functions implemented by the target processing firmware include fault information collection and clearing, and reporting IPMI messages (or IPMI commands) to the BMC through the KCS channel. In addition, reporting to the operating system through the APEI interface.

[0166] It should be noted that the physical communication bus between the CPU and BMC is the LPC bus (BUS). The BIOS runs on the CPU and can use the IPMI protocol to send messages to the BMC through the KCS interface and map them to the corresponding IO port (IOport).

[0167] For example, the BIOS code sends IPMI commands by interacting with IO Ports 0xCA2 and 0xCA3. The standard data format and data content of the IPMI commands are shown in Tables 1 and 2 below.

[0168] Table 1: Schematic diagram of the standard data format of IMPI commands

[0169] Byte 1 Byte 2 Byte 3:N NetFn / LUN CMD Data

[0170] Among them, byte 1 is the network function code (NetFn) and the sub-address number (LUN) under the same physical address; byte 2 is the command (command, CMD); bytes 3 to N correspond to the transmitted data, where the data length varies depending on the command.

[0171] For another example, suppose the add SEL command is sent to report memory fault information to the BMC, the NetFn / LUN is 0x28, the CMD is 0x44, and the Data filling format can be as shown in Table 2:

[0172] Table 2: Schematic diagram of the filling format of data in IMPI

[0173]

[0174] Among them, the time when the exception occurred can be determined based on the TimeStamp; the location of the faulty module or component can be determined based on the SensorNumber. Taking the faulty memory as an example, the location of the faulty memory can be determined; the error type can be determined based on OEMEvData1. Since the definitions corresponding to different bytes in the IMPI data are common definitions in this field, they will not be explained in detail here.

[0175] In addition, when the BIOS uses the target processing firmware to process so that the operating system can perceive the occurrence of hardware abnormalities, the BIOS fills the hardware fault information in the ACPI Table HEST established at startup. Among them, the GHES structure exists in the Error Source Structure in HEST, which is used to specifically report memory CE and PCIE CE.

[0176] Then, after confirming the level by level, refer to Figure 5A As shown, it is a schematic diagram of the content that needs to be filled in the embodiment of this application. Based on the hardware fault information that generates the hardware fault, Figure 5AFill in the selected content in the box to obtain the filled memory information; then, the BIOS triggers an interrupt signal to the operating system, so that after receiving the interrupt signal, the operating system can parse the relevant information of the APEI table and print the fault information in dmesg. The interrupt signal can be a system control interrupt or an NMI interrupt.

[0177] In this way, the BIOS uses target processing firmware to report hardware fault information. While sending hardware fault information that generates a system management interrupt to the BMC, the BMC can determine the existence of the hardware fault. At the same time, it can configure the APEI table and send an interrupt to the operating system so that the operating system can perceive the occurrence of the hardware fault.

[0178] It should be noted that from the BMC level, when the BMC receives an IPMI command, it will generate a SEL to report the specific fault location and error type, so that subsequent operation and maintenance personnel can replace or repair the faulty hardware based on the content recorded in the SEL to restore normal business.

[0179] For example, the SEL format generated by the BMC is as follows: 04 / 15 / 2021; 19:06:25; Memory DIMM000; Correctable ECC logging limit reached; Assert, which identifies the time, location, type, and reporting status of the hardware fault.

[0180] From the operating system perspective, after receiving an interrupt signal, the operating system can parse the APEI table related information and print the fault information in dmesg.

[0181] For example, see Figure 5B As shown, it is a schematic diagram of the fault information printed by the operating system in the embodiment of the present application. Figure 5B As shown in the figure, when the operating system senses a hardware failure, it can print out detailed information about the hardware failure by parsing the filled APEI table.

[0182] In this way, with the help of the technical solution proposed in this application, there will be no system management interruption when handling hardware failures, and thus the CPU operation will not be suspended. Moreover, in the hardware fault handling process proposed in this application, stable business services can be provided to ensure the user experience; and on the premise of meeting operation and maintenance needs, the problem of business performance jitter caused by hardware correctable errors can be fundamentally solved.

[0183] Based on the same inventive concept, see Figure 6As shown, it is a schematic diagram of the logical structure of the hardware fault processing device in the embodiment of the present application. The hardware fault processing device 600 includes a response unit 601 and a reporting unit 602, wherein:

[0184] a response unit 601 configured to respond to a system control interrupt triggered by a hardware fault signal and, based on a predefined correspondence between the hardware fault signal and the processing firmware, obtain a target processing firmware corresponding to the system control interrupt, wherein the target processing firmware is written in a different code language than the inherent code language for processing the system control interrupt, and the target firmware is loaded during the BIOS startup process;

[0185] The reporting unit 602 is configured to report hardware fault information associated with the system control interrupt using the target processing firmware.

[0186] Optionally, when acquiring the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware, the response unit 601 is configured to:

[0187] Determining a GUID of a target processing firmware according to a predefined correspondence between the hardware fault signal and the processing firmware, wherein the target processing firmware corresponds to the system control interrupt;

[0188] The positioning pointer and parameter pointer associated with the target processing firmware are determined based on the GUID, and the target processing firmware corresponding to the system control interrupt is obtained based on the positioning pointer and the parameter pointer.

[0189] Optionally, based on the GUID, the location pointer and parameter pointer associated with the target processing firmware are determined, and the response unit 601 is configured to:

[0190] Writing the GUID into a preset interaction area with the bridge driver, so that the bridge driver in the operating system determines the location pointer and parameter pointer associated with the target processing firmware in the maintained firmware code table based on the GUID;

[0191] Get the positioning pointer and parameter pointer of the bridge driver feedback.

[0192] Optionally, when reporting hardware fault information associated with the system control interrupt, the reporting unit 602 is configured to:

[0193] Using target processing firmware, determine the abnormal hardware information that triggers the system control interrupt;

[0194] Collecting abnormality location information associated with abnormal hardware information, and generating hardware fault information corresponding to the system control interrupt based on the abnormal hardware information and the abnormality location information;

[0195] The hardware fault information is sent to the BMC through a preset transmission bus and transmission interface, and after the error information table is filled based on the hardware fault information, an interrupt signal is sent to the operating system OS.

[0196] Optionally, the hardware fault signal is generated by any of the following hardware faults:

[0197] When the number of correctable errors CE in the memory exceeds a first set value, a memory exception is generated;

[0198] When the number of correctable errors CE in the PCIE exceeds a second set value, a bus abnormality is generated.

[0199] Optionally, before determining the system control interrupt triggered by the hardware fault signal, the startup process further includes a startup unit 603, which is configured to perform the following operations:

[0200] Configure the system to not trigger a system management interrupt when hardware fault signals are detected in the memory correctable error and PCIE correctable error reporting mechanisms, and configure the MCA reporting mechanism to only send a CMCI interrupt to the operating system.

[0201] Loading each processing firmware in the form of a driver developed for each type of hardware fault signal, and after confirming that the driver loading is completed, generating a firmware code table that can be searched by the operating system based on the ownership information, location pointer, and parameter pointer of each processing firmware obtained by parsing;

[0202] Establish a conversion relationship between the physical address and virtual address associated with each target processing firmware.

[0203] Optionally, when loading target processing firmware in the form of drivers developed for various types of hardware fault signals, the starting unit 603 is used to:

[0204] Determining a correspondence between predefined types of hardware fault signals and processing firmware, wherein each processing firmware is configured as a runtime type driver;

[0205] In the driver execution environment, the corresponding processing firmware is loaded.

[0206] Optionally, when generating a firmware code table searchable by the operating system based on the ownership information, location pointer, and parameter pointer of each target processing firmware obtained through parsing, the starting unit 603 is configured to:

[0207] Write the corresponding attribution information, location pointer, and parameter pointer of each target processing firmware determined by the analysis into a preset memory space according to a predefined format to generate a firmware code table;

[0208] Determine the physical address of the firmware code table in the memory space, write the physical address into the ACPI structure, the entry information associated with the extended system description table, and update the statistical results in the extended system description table.

[0209] After introducing the method and apparatus for handling hardware failure according to an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application is introduced next.

[0210] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0211] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application, Figure 7 , which is a schematic diagram of a hardware structure of an electronic device to which an embodiment of the present application is applied, wherein the electronic device 700 may include at least a processor 701 and a memory 702. The memory 702 stores program code, which, when executed by the processor 701, causes the processor 701 to perform any of the steps for handling a hardware failure described above.

[0212] In some possible implementations, the computing device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of handling hardware failures according to various exemplary embodiments of the present application described above in this specification. For example, the processor may execute the following steps: Figure 3A 、 Figure 4A Follow the steps shown in .

[0213] Refer to the following Figure 8 800 according to this embodiment of the present application. Figure 8 As shown, computing device 800 is implemented as a general-purpose computing device. Components of computing device 800 may include, but are not limited to, at least one processing unit 801, at least one storage unit 802, and a bus 803 connecting various system components (including storage unit 802 and processing unit 801).

[0214] Bus 803 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a processor or local bus using any of a variety of bus architectures.

[0215] The storage unit 802 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 8021 and / or a cache memory 8022 , and may further include a read-only memory (ROM) 8023 .

[0216] The storage unit 802 may also include a program / utility 8025 having a set (at least one) of program modules 8024, such program modules 8024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0217] The computing device 800 can also communicate with one or more external devices 804 (e.g., a keyboard, pointing device, etc.), one or more devices that enable objects to interact with the computing device 800, and / or any device that enables the computing device 800 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 805. Furthermore, the computing device 800 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 806. As shown, the network adapter 806 communicates with other modules of the computing device 800 via a bus 803. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with the computing device 800, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0218] Based on the same inventive concept as the above-mentioned method embodiment, various aspects of the processing of hardware failures provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method for processing hardware failures according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device can execute the following steps: Figure 3A 、 Figure 4A Follow the steps shown in .

[0219] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0220] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0221] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for handling hardware failure, characterized in that: Applied to BIOS, including: In response to a system control interrupt triggered by a hardware fault signal, according to a predefined correspondence between the hardware fault signal and the processing firmware, a target processing firmware corresponding to the system control interrupt is obtained, wherein a code language of the target processing firmware is different from a code language of an inherent processing of the system control interrupt, and the target firmware is loaded during the BIOS startup process; The target processing firmware is used to report hardware fault information associated with the system control interrupt.

2. The method according to claim 1, characterized in that The step of obtaining the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware includes: Determine the GUID of the target processing firmware according to the predefined correspondence between the hardware fault signal and the processing firmware, wherein the target processing firmware corresponds to the system control interrupt; The location pointer and parameter pointer associated with the target processing firmware are determined based on the GUID, and the target processing firmware corresponding to the system control interrupt is obtained based on the location pointer and parameter pointer.

3. The method according to claim 2, characterized in that The determining, based on the GUID, a location pointer and a parameter pointer associated with the target processing firmware comprises: Writing the GUID into a preset interaction area with the bridge driver, so that the bridge driver in the operating system determines the location pointer and parameter pointer associated with the target processing firmware in the firmware code table maintained by the BIOS based on the GUID; The positioning pointer and parameter pointer of the bridge drive feedback are obtained.

4. The method according to claim 1, characterized in that The reporting of the hardware fault information associated with the system control interruption includes: Using the target processing firmware, determining abnormal hardware information that triggers the system control interrupt; Collecting abnormality location information associated with the abnormal hardware information, and generating hardware fault information corresponding to the system control interrupt based on the abnormal hardware information and the abnormality location information; The hardware fault information is sent to the BMC via a preset transmission bus and transmission interface, and after the error information table is filled based on the hardware fault information, an interrupt signal is sent to the operating system OS.

5. The method according to claim 1, characterized in that The hardware fault signal is generated by any of the following hardware faults: When the number of correctable errors CE in the memory exceeds a first set value, a memory exception is generated; When the number of correctable errors CE in the PCIE exceeds a second set value, a bus abnormality is generated.

6. The method according to any one of claims 1 to 5, characterized in that: Before determining the system control interrupt triggered by the hardware fault signal, during the startup process of the BIOS, the following operations are performed: When hardware fault signals are detected under the memory correctable error and PCIE correctable error reporting mechanisms, the system management interrupt is not triggered, and only the CMCI interrupt is sent to the operating system under the MCA reporting mechanism; Loading various processing firmware in the form of drivers developed for various types of hardware fault signals, and after determining that the driver loading is completed, generating a firmware code table that can be searched by the operating system based on the ownership information, positioning pointer, and parameter pointer of the various processing firmware obtained by parsing; A conversion relationship between the physical address and the virtual address associated with each target processing firmware is established.

7. The method according to claim 6, characterized in that The loading of each target processing firmware in the form of a driver developed for each type of hardware fault signal includes: Determine a correspondence between predefined types of hardware fault signals and processing firmware, wherein each processing firmware is configured as a runtime type driver; In the driver execution environment, the corresponding processing firmware is loaded.

8. The method according to claim 6, characterized in that The generating of a firmware code table searchable by the operating system based on the ownership information, positioning pointer, and parameter pointer of each target processing firmware obtained by parsing includes: Writing the corresponding attribution information, positioning pointer, and parameter pointer of each target processing firmware determined by the analysis into a preset memory space according to a predefined format to generate a firmware code table; Determine the physical address of the firmware code table in the memory space, write the physical address into the ACPI structure, the entry information associated with the extended system description table, and update the statistical results in the extended system description table.

9. A device for processing hardware failure, characterized in that: include: a response unit, in response to a system control interrupt triggered by a hardware fault signal, acquiring a target processing firmware corresponding to the system control interrupt according to a predefined correspondence between the hardware fault signal and the processing firmware, wherein a code language of the target processing firmware is different from a code language of an inherent processing of the system control interrupt, and the target firmware is loaded during the BIOS startup process; A reporting unit is used to report hardware fault information associated with the system control interrupt using the target processing firmware.

10. The device according to claim 9, characterized in that When acquiring the target processing firmware corresponding to the system control interrupt according to the predefined correspondence between the hardware fault signal and the processing firmware, the response unit is used to: Determine the GUID of the target processing firmware according to the predefined correspondence between the hardware fault signal and the processing firmware, wherein the target processing firmware corresponds to the system control interrupt; The location pointer and parameter pointer associated with the target processing firmware are determined based on the GUID, and the target processing firmware corresponding to the system control interrupt is obtained based on the location pointer and parameter pointer.

11. The device according to claim 9 or 10, characterized in that Before determining the system control interruption triggered by the hardware fault signal, the startup process also includes a startup unit, which is used to perform the following operations: When hardware fault signals are detected under the memory correctable error and PCIE correctable error reporting mechanisms, the system management interrupt is not triggered, and only the CMCI interrupt is sent to the operating system under the MCA reporting mechanism; Loading various processing firmware in the form of drivers developed for various types of hardware fault signals, and after determining that the driver loading is completed, generating a firmware code table that can be searched by the operating system based on the ownership information, positioning pointer, and parameter pointer of the various processing firmware obtained by parsing; A conversion relationship between the physical address and the virtual address associated with each target processing firmware is established.

12. The device according to claim 11, characterized in that When generating a firmware code table searchable by the operating system based on the ownership information, location pointer, and parameter pointer of each target processing firmware obtained by parsing, the startup unit is used to: Writing the corresponding attribution information, positioning pointer, and parameter pointer of each target processing firmware determined by the analysis into a preset memory space according to a predefined format to generate a firmware code table; Determine the physical address of the firmware code table in the memory space, write the physical address into the ACPI structure, the entry information associated with the extended system description table, and update the statistical results in the extended system description table.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to claims 1 to 8 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of items 1-8 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Hardware interrupt control method and electronic equipment

    CN120892237A