Anomaly reporting method and electronic device

By generating device health status information through the firmware of external devices, the problem of insufficient abnormal information of external devices is solved, enabling the host to accurately handle abnormalities and predict risks.

WO2026066002A1PCT designated stage Publication Date: 2026-04-02HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In the existing technology, the abnormal information reported by the external device to the host is relatively coarse, which makes it impossible for the host to obtain detailed abnormal information and make accurate processing.

Method used

The device health status information, including anomaly type, level, location, address, and number of occurrences, is generated by the firmware of the external device and reported to the host in detail.

Benefits of technology

The host can obtain more detailed anomaly information, make more accurate decisions, prevent anomalies from accumulating and worsening, and improve system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025086403_02042026_PF_FP_ABST
    Figure CN2025086403_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications. Provided are an anomaly reporting method and an electronic device. The method is applied to external devices, and each external device is connected to a host by means of a bus. The method comprises: in the event of an anomaly, firmware of each external device generating device health status information, and reporting the device health status information to a host. The device health status information is used for indicating anomaly information of each external device. The technical solution provided in the present application can improve the level of detail of the anomaly information of each external device acquired by the host, thereby enabling the host to perform more accurate processing on the basis of the anomaly information.
Need to check novelty before this filing date? Find Prior Art

Description

Abnormality reporting method and electronic device

[0001] The present application claims priority from the Chinese patent application No. 202411378322.X filed on September 29, 2024, and entitled "Abnormality reporting method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of communication technology, in particular to an abnormality reporting method and an electronic device. BACKGROUND

[0003] When a host accesses an external device, the host usually uses the resources of the external device. Abnormalities of the external device may affect the host, and therefore the external device needs to report abnormality information to the host so that the host can process according to the abnormality information reported by the external device. For example, a peripheral component interconnect express (PCIE) device is mounted on a host through a PCIE bus, and the PCIE device and the host implement abnormality reporting through an advanced error reporting (AER) mechanism defined by PCIE.

[0004] However, the abnormality information reported by the external device is usually rough, for example, the PCIE device can only report error types specified by PCIE AER to the host, resulting in insufficient abnormality information obtained by the host and inaccurate processing by the host. SUMMARY

[0005] The present application provides an abnormality reporting method and an electronic device, which are used to improve the detail of abnormality information obtained by the host from the external device, so that the host can make more accurate processing according to the abnormality information.

[0006] In a first aspect, an abnormality reporting method is provided by embodiments of the present application, which is applied to an external device, and the external device is connected to a host through a bus. The external device refers to a device connected to the host, including input devices, output devices, and external memories, etc., and the bus refers to a group of common signal lines connecting the host and various external devices. The method comprises:

[0007] In the case of an abnormality, the firmware of the external device generates device health status information, and the device health status information is used to indicate abnormality information;

[0008] The firmware reports the device health status information to the host.

[0009] The abnormality reporting method provided by the embodiments of the present application can report abnormality information of an external device to a host through firmware of the external device when the external device has an abnormality. Compared with the current way of reporting abnormality information to the host through hardware, the present application reports abnormality information through firmware, so that the reported abnormality information is no longer limited to error types defined by a bus, thereby making the reported abnormality information more detailed, and the host can obtain more detailed abnormality information of the external device, and then can make more accurate processing according to the abnormality information.

[0010] In a possible implementation of the first aspect, in the case of an abnormality, the firmware of the external device generates device health status information, including:

[0011] The hardware of the external device reports abnormality information to the firmware when detecting an abnormality;

[0012] The firmware generates device health status information based on the abnormality information.

[0013] Through the above implementation, the firmware can generate device health status information with more detailed content based on the abnormality information reported by the hardware that has an abnormality, and report the device health status information to the host, so that the host can make more accurate processing according to the device health status information.

[0014] In a possible implementation of the first aspect, the device health status information includes at least one of the following:

[0015] An abnormality type (such as correctable, uncorrectable, recoverable, etc.), an abnormality level (such as a module level, a system level, etc.), an abnormality position (i.e., a specific module of the external device that has an abnormality), an abnormality address (such as an address corresponding to a memory abnormality), and an abnormality occurrence number (such as a number of occurrences of a correctable or recoverable abnormality).

[0016] Through the above implementation, the device health status information is more detailed, so that the host can make more accurate processing according to the device health status information.

[0017] In a possible implementation of the first aspect, the device health status information is also used to indicate an abnormality processing result.

[0018] Through the above implementation, the device health status information can not only indicate abnormality information, but also indicate an abnormality processing result, so that the device health status information is more detailed, and the host can make more accurate processing according to the device health status information.

[0019] In a possible implementation of the first aspect, in the case of an abnormality, the firmware of the external device generates device health status information, including:

[0020] The hardware of the external device reports the exception information to the firmware when detecting an exception;

[0021] The firmware processes the exception based on the exception information;

[0022] The firmware generates device health status information based on the exception information and the exception processing result.

[0023] Through the above implementation, the device health status information can not only indicate the exception information, but also indicate the exception processing result, so that the device health status information is more detailed, and the host can make more accurate processing according to the device health status information.

[0024] In a possible implementation of the first aspect, the device health status information further includes device status, wherein the device status can be the health status of the external device generated by the firmware according to the exception processing result. The device status includes multiple of the following:

[0025] Normal, degraded, risk, and unavailable.

[0026] Through the above implementation, the device health status information is more detailed, and the host can make more accurate processing according to the device health status information.

[0027] In a possible implementation of the first aspect, when the host is in a cluster, the method further includes:

[0028] The firmware reports the device health status information to a management center of the cluster (i.e., a manager of the cluster).

[0029] Through the above implementation, the manager of the cluster can timely perceive the exception information of the device externally connected to each host in the cluster.

[0030] In a possible implementation of the first aspect, the firmware reports the device health status information to the host through a message reporting manner specified by the bus.

[0031] Since the message reporting manner specified by the bus is applicable to both the host and the external device connected by the bus, through the above implementation, it can be avoided to re-negotiate the message transmission manner between the external device and the host.

[0032] In a possible implementation of the first aspect, the firmware reports the device health status information to the host, including:

[0033] The firmware reports the device health status information to an operating system (OS) of the host.

[0034] Through the above implementation, the host can directly process according to the device health status information reported by the firmware of the external device.

[0035] In a possible implementation of the first aspect, the firmware is a basic input output system (BIOS) of the peripheral device or firmware embedded in abnormal hardware.

[0036] In a second aspect, an embodiment of the present application provides an exception reporting apparatus, applied to a peripheral device, the peripheral device being connected to a host through a bus, the apparatus comprising a generating module and a reporting module.

[0037] The generating module is configured to generate, in a case where an exception occurs, device health status information through firmware of the peripheral device, the device health status information being used for indicating exception information.

[0038] The reporting module is configured to report, through the firmware, the device health status information to the host.

[0039] In a possible implementation of the second aspect, in the case where the exception occurs, the generating module is specifically configured to report, to the firmware, exception information in a case where hardware of the peripheral device detects the exception.

[0040] The firmware generates the device health status information based on the exception information.

[0041] In a possible implementation of the second aspect, the device health status information comprises at least one of the following:

[0042] an exception type, an exception level, an exception location, an exception address, and an exception occurrence frequency.

[0043] In a possible implementation of the second aspect, the device health status information is further used for indicating an exception processing result.

[0044] In a possible implementation of the second aspect, the generating module is specifically configured to:

[0045] the hardware of the peripheral device reports, to the firmware, exception information in a case where the hardware detects the exception;

[0046] the firmware processes the exception based on the exception information;

[0047] the firmware generates the device health status information based on the exception information and the exception processing result.

[0048] In a possible implementation of the second aspect, the device health status information further comprises a device state, the device state comprising a plurality of the following:

[0049] normal, degraded, risky, and unavailable.

[0050] In a possible implementation of the second aspect, when the host is in a cluster, the reporting module is further configured to:

[0051] report the device health status information to a management center of the cluster.

[0052] In a possible implementation of the second aspect, the firmware reports the device health status information to the host in a manner specified by a message of a bus.

[0053] In a possible implementation of the second aspect, the reporting module is specifically configured to:

[0054] report the device health status information to an operating system of the host through the firmware.

[0055] In a possible implementation of the second aspect, the firmware is BIOS or firmware embedded in abnormal hardware.

[0056] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory is configured to store a computer program, and the processor is configured to execute the method in the first aspect or any implementation of the first aspect when the computer program is invoked.

[0057] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in the first aspect or any implementation of the first aspect.

[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on an electronic device, causes the electronic device to execute the method in the first aspect or any implementation of the first aspect.

[0059] In a sixth aspect, an embodiment of the present application provides a chip system, including a processor, the processor is coupled with a memory, and the processor executes a computer program stored in the memory to implement the method in the first aspect or any implementation of the first aspect. The chip system can be a single chip or a chip module composed of multiple chips.

[0060] It can be understood that the beneficial effects of the second aspect to the sixth aspect can be referred to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0061] FIG. 1 is an exception reporting architecture provided by an embodiment of the present application;

[0062] FIG. 2 is a PCIE exception processing flow provided by an embodiment of the present application;

[0063] FIG. 3 is a schematic diagram of an external device according to an embodiment of the present application;

[0064] FIG. 4 is another abnormality reporting architecture according to an embodiment of the present application;

[0065] FIG. 5 is a flowchart of an abnormality reporting method according to an embodiment of the present application;

[0066] FIG. 6 is a device health status information diagram according to an embodiment of the present application;

[0067] FIG. 7 is a schematic diagram of an abnormality reporting apparatus according to an embodiment of the present application;

[0068] FIG. 8 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0069] The embodiments of the present application will be described below in conjunction with the accompanying drawings. The terms used in the implementation manner part of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0070] Due to resource limitations in the host, some devices are usually externally connected to expand functions. The external device can be mounted on the host through a bus (a common communication trunk for transmitting information between various functional components of the computer). Abnormalities of the external device may have an impact on the host, for example, the external device runs incorrectly, the external device has a reliability risk, and for example, the host accesses an abnormal area of the external device, causing the host to be abnormal. Therefore, the external device usually needs to report abnormality information to the host, so that the host can perform corresponding processing measures according to the abnormality information reported by the external device.

[0071] As shown in FIG. 1, when the external device reports an abnormality, first, the hardware of the external device that has an abnormality sends a message to the corresponding hardware of the host (the hardware is connected to the hardware of the external device that has an abnormality through a bus) to notify the host that the hardware has an abnormality (step ①); then the hardware of the host generates an interrupt after receiving the message sent by the external device, and notifies the firmware of the host (step ②); next, the firmware of the host receives the interrupt, obtains the address of the external device that has an abnormality, and collects abnormality information from the hardware of the external device that has an abnormality (step ③); finally, the firmware of the host reports the collected abnormality information to the OS of the host, and the OS processes according to the abnormality information (step ④).

[0072] The hardware refers to various physical devices composed of electronic, mechanical and optoelectronic elements and the like in a computer system. The firmware refers to a program written in an erasable read-only memory (EROM) or an electrically erasable programmable read only memory (EEPROM), and is a software that undertakes the most basic and lowest level work of a system. The interrupt refers to a program that is automatically stopped by a host when an unexpected situation occurs during the running of a computer, and the host automatically stops the running program and enters the program for processing the new situation, and returns to the paused program for continuing the running after the processing is completed.

[0073] However, this reporting of the exception usually needs to follow the error reporting mechanism defined by the bus, which results in insufficient exception information obtained by the host and inability to make accurate processing.

[0074] For example, the PCIE AER defines a standard error type according to the characteristics of the PCIE bus, and reports all device exceptions as PCIE protocol errors, that is, the device connected through the PCIE bus can only report the error type specified by the PCIE AER to the host, which will cause the following two problems:

[0075] (1) The host cannot perceive part of the exceptions of the external device

[0076] When the host does not access the exception resource of the external device, the host cannot perceive the exception of the external device even if the exception occurs in the external device, thereby causing a potential risk. For example, the fifth case shown in FIG. 2, for the uncorrectable exception, the exception can be accumulated, and the host cannot perceive the exception, which can cause greater impact when the host accesses. For example, the sixth case shown in FIG. 2, for the correctable exception, if the external device corrects the exception, although the exception does not cause the exception to worsen, since the host cannot perceive the exception, the host cannot know in advance that the external device has a risk and make processing in advance. For example, multiple correctable exceptions occur in the local memory of the external device, the local memory of the external device is corrected, but multiple exceptions occur, which indicates that the external device itself has a risk, but when the host does not access the memory, the memory where the exception occurs does not actively report the exception, so that the host cannot perceive the exception.

[0077] For example, the fourth case shown in FIG. 2, when the host accesses the exception resource of the external device, for the correctable exception, if the exception of the external device has been corrected, the host cannot perceive that the exception has occurred in the external device, and cannot make processing in advance.

[0078] (2) The host cannot accurately handle the abnormality of the external device after sensing the abnormality

[0079] In the first and second cases shown in FIG. 2, when the host accesses an abnormal resource of the external device, for an uncorrectable abnormality, although the host can sense the abnormality of the external device, the host can only obtain the error type specified by PCIE AER due to the unresponsive access, resulting in insufficient abnormality information obtained by the host and the host being unable to accurately handle the abnormality. At this time, if the host does not enable DPC (downstream port containment, a mechanism for handling abnormal conditions in a PCIE link), the host can handle the abnormality by triggering a panic mechanism (a serious error handling mechanism). If the host enables DPC, the host can remove the driver of the external device to isolate the external device, and both of these handling methods can cause over-handling of the host.

[0080] For example, an abnormality occurs in a part of the memory particles of the external device, causing the host to hang up, and the host cannot obtain specific abnormality information of the external device and can only determine that the external device cannot be accessed according to the received access timeout information, and then remove the entire external device, resulting in over-handling.

[0081] As shown in the third case in FIG. 2, only when the host accesses an abnormal resource of the external device and the abnormality is a correctable abnormality, the access can return the corresponding abnormality analysis, and the host can more accurately handle the abnormality.

[0082] Therefore, the present application provides an abnormality reporting method, as shown in FIG. 3, when an abnormality occurs in the hardware of the external device, the hardware reports the abnormality to the firmware of the external device (step ①), and the firmware of the external device actively reports the abnormality information of the external device to the host (step ②), so that the host can sense the abnormality of the external device without accessing the abnormal resource of the external device, thereby helping the host to identify the risk of the external device in advance, preventing abnormality accumulation and deterioration, and causing more serious impact. In addition, compared with the current method of reporting abnormality information to the host through hardware, the present application reports abnormality information through the firmware of the external device, so that the reported abnormality information is no longer limited to the error type defined by the bus, so that the reported abnormality information is more detailed, and the host can obtain more detailed abnormality information of the external device, and then can handle the abnormality more accurately.

[0083] The abnormality reporting method provided by the present application can be applied to an external device connected to a host through a bus. The external device can include an input device, an output device, an external storage device, etc.

[0084] The input device can include a keyboard, a mouse, a microphone, a digital camera, a digital video camera, a scanner, a wireless laser pointer, and the like. The output device can include a display, a printer, a sound device, and the like. The external storage device can include a U disk, a mobile hard disk, and the like.

[0085] In some embodiments, the external device can also include a graphics card, a memory card, a network card, a solid state disk, and the like, as shown in FIG. 4.

[0086] The bus can include a PCIE bus, a unified bus (UB), an industry standard architecture (ISA) bus, a universal serial bus (USB), an inter-integrated circuit (I2C), a serial advanced technology attachment (SATA), and the like. In this embodiment of the application, the PCIE bus is taken as an example for illustrative description.

[0087] FIG. 5 is a flowchart of an abnormality reporting method provided by the embodiment of the application. As shown in FIG. 5, the abnormality reporting method provided by the embodiment can include the following steps:

[0088] S110, the hardware of the external device reports abnormality information to the firmware of the external device in the case of detecting an abnormality.

[0089] Different external devices usually have different hardware. For example, a printer can include a print head, an ink cartridge, a toner cartridge, a paper tray, and the like. A display can include a display panel, a controller, an image processing chip, a heat sink, and the like. The hardware abnormalities of the corresponding external devices are usually different. For example, the hardware abnormalities of the printer can include print head abnormalities, ink cartridge abnormalities, toner cartridge abnormalities, paper tray abnormalities, and the like. The hardware abnormalities of the display can include display panel abnormalities, controller abnormalities, image processing chip abnormalities, heat sink abnormalities, and the like.

[0090] Specifically, in the case that the hardware in which the abnormality occurs does not embed firmware, the hardware can report abnormality information to other firmware (such as the firmware in BIOS, UB, and the like). In the case that the hardware in which the abnormality occurs embeds firmware, the hardware can report abnormality information to the firmware embedded therein, or can report abnormality information to other firmware.

[0091] S120, the firmware of the external device receives the abnormality information reported by the hardware, and processes the abnormality based on the abnormality information.

[0092] The firmware of the external device can directly process the abnormality based on the abnormality information reported by the hardware.

[0093] Specifically, the external device can reserve an exception table in the memory, in which the numbers of various exceptions and corresponding processing manners (such as recovery backup, restart, etc.) can be recorded. The external device can query the corresponding processing manner in the exception table according to the exception information reported by the hardware, and process the exception.

[0094] In some embodiments, the firmware of the external device can also report exception information to the OS of the external device, and the OS of the external device processes the exception according to the exception information. After processing the exception, the OS of the external device can issue an exception processing result to the firmware of the external device. The exception processing result can include recovery, non-recovery, etc.

[0095] S130, the firmware of the external device generates device health status information based on the exception information and the exception processing result.

[0096] The device health status information can be used to indicate the exception information and the exception processing result of the external device. For example, as shown in FIG. 6, the device health status information can include exception type, exception level, exception location, exception address, exception occurrence frequency, and device status, etc. The firmware of each external device can abstract the exception information of the external device into a standard information format (i.e., device health status information), so as to shield the hardware differences of each external device, and enable the host to manage the health of all external devices in a unified standard.

[0097] The exception type can include correctable, non-correctable, recoverable, etc. The exception level can include module level, system level, etc. The exception location can be a specific module or hardware of the external device where the exception occurs. The exception address can be an error address corresponding to the memory exception. The exception occurrence frequency can be the number of times of correctable exceptions or recoverable exceptions, etc. The device status can be generated by the firmware of the external device based on the exception processing result.

[0098] Specifically, the device status can include normal, degraded, risky, and unavailable, etc. For example, if the external device has a light fault and has been recovered, the device status can be normal. If the external device has a fault and has been recovered, but the backup data used to recover the exception is consumed, the device status can be degraded. If the external device has a correctable error and the number of times is large, the device status can be risky. If the external device has a major fault and cannot be recovered (such as bus hang, etc.), the device status can be unavailable.

[0099] In some embodiments, the firmware of the external device can further generate the device health status information based on the exception information directly after receiving the exception information, so as to improve the efficiency of generating the device health status information. Correspondingly, the device health status information can include the exception type, the exception level, the exception location, the exception address, the exception occurrence frequency, etc.

[0100] In S140, the firmware of the external device reports the device health status information to the host.

[0101] The firmware of the external device can report the device health status information to the firmware of the host, and then the firmware of the host reports the device health status information to the OS of the host, so that the host can perform corresponding processing measures according to the device health status information.

[0102] In some embodiments, the firmware of the external device can also report the device health status information to the OS of the host directly, so that the host can perform corresponding processing measures according to the device health status information reported by the firmware of the external device.

[0103] The firmware of the external device can report the device health status information to the host through a message reporting manner agreed in advance with the host. Since the message reporting manner defined by the bus can be applied to the external device and the host connected by the bus, in some embodiments, the firmware of the external device can also report the device health status information to the host through the message reporting manner defined by the bus, so as to avoid re-agreement of the message reporting manner between the external device and the host.

[0104] For example, the type of the bus connecting the external device and the host is PCIE, and the firmware of the external device can report the device health status information to the host based on the VDM (vendor defined message) message defined by PCIE.

[0105] In some embodiments, when the host is in a cluster (that is, a group of computer systems that work together as a whole to provide a set of network resources to users. Each individual computer system is a node of the cluster), the firmware of the external device can also report the device health status information to the management center (that is, the manager) of the cluster where the host is located, so that the manager of the cluster can timely perceive the exception information of the device externally connected to each host in the cluster.

[0106] In some embodiments, when the external device is in a cluster, the firmware of the external device can also report the device health status information only to the manager of the cluster where the external device is located. After receiving the device health status information reported by the external device, the manager can send the device health status information to the user of the external device (that is, the host corresponding to the external device), or directly process (such as device replacement, etc.) according to the device health status information. In some embodiments, the firmware of the external device can further generate the device health status information based on the exception information directly after receiving the exception information, so as to improve the efficiency of generating the device health status information. Correspondingly, the device health status information can include the exception type, the exception level, the exception location, the exception address, the exception occurrence frequency, etc.

[0100] In S140, the firmware of the external device reports the device health status information to the host.

[0101] The firmware of the external device can report the device health status information to the firmware of the host, and then the firmware of the host reports the device health status information to the OS of the host, so that the host can perform corresponding processing measures according to the device health status information.

[0102] In some embodiments, the firmware of the external device can also report the device health status information to the OS of the host directly, so that the host can perform corresponding processing measures according to the device health status information reported by the firmware of the external device.

[0103] The firmware of the external device can report the device health status information to the host through a message reporting manner agreed in advance with the host. Since the message reporting manner defined by the bus can be applied to the external device and the host connected by the bus, in some embodiments, the firmware of the external device can also report the device health status information to the host through the message reporting manner defined by the bus, so as to avoid re-agreement of the message reporting manner between the external device and the host.

[0104] For example, the type of the bus connecting the external device and the host is PCIE, and the firmware of the external device can report the device health status information to the host based on the VDM (vendor defined message) message defined by PCIE.

[0105] In some embodiments, when the host is in a cluster (that is, a group of computer systems that work together as a whole to provide a set of network resources to users. Each individual computer system is a node of the cluster), the firmware of the external device can also report the device health status information to the management center (that is, the manager) of the cluster where the host is located, so that the manager of the cluster can timely perceive the exception information of the device externally connected to each host in the cluster.

[0106] In some embodiments, when the external device is in a cluster, the firmware of the external device can also report the device health status information only to the manager of the cluster where the external device is located. After receiving the device health status information reported by the external device, the manager can send the device health status information to the user of the external device (that is, the host corresponding to the external device), or directly process (such as device replacement, etc.) according to the device health status information.

[0107] In some embodiments, the external device can also be a device under management of the data center. In the case of an abnormality of a device not in use under management of the data center, the device can report the abnormality to the data center; in the case of an abnormality of a device in use under management of the data center, the device can report device health status information of the device to the data center, and can also report the device health status information of the device to a host using the device.

[0108] S150, the host receives the device health status information reported by the firmware of the external device, and processes according to the device health status information.

[0109] After receiving the device health status information reported by the firmware of the external device, the host can perform reset, removal, replacement, or continued use, etc. on the external device according to the device health status information.

[0110] The abnormality reporting method provided by the embodiments of the present application can report abnormality information of an external device to a host through firmware of the external device when the external device has an abnormality, so that the host can perceive the abnormality of the external device without accessing abnormal resources of the external device, thereby helping the host to identify risks of the external device in advance, preventing abnormality accumulation and deterioration, and causing more serious impact. In addition, compared with the current way of reporting abnormality information to the host through hardware, the present application reports abnormality information through firmware of the external device, so that the reported abnormality information is no longer limited to error types defined by a bus, thereby making the reported abnormality information more detailed, and the host can obtain more detailed abnormality information of the external device, and then make more accurate processing according to the abnormality information.

[0111] Those skilled in the art can understand that the above embodiments are exemplary and are not intended to limit the present application. In possible cases, the execution order of one or more steps in the above steps can be adjusted, and selective combination can be performed to obtain one or more other embodiments, for example, in some embodiments, step S120 can not be performed, in some embodiments, step S150 can not be performed, and in some embodiments, steps S120 and S150 can not be performed. Those skilled in the art can selectively combine any of the above steps as needed, and any solution that does not deviate from the spirit of the present application falls within the protection scope of the present application.

[0112] Based on the same concept, as an implementation of the above method, the embodiments of the present application provide an abnormality reporting device. The device embodiments correspond to the above method embodiments, and for the convenience of reading, the device embodiments will not be described one by one. However, it should be clear that the device in the present embodiment can correspondingly implement all the contents in the above method embodiments.

[0113] FIG. 7 is a structural schematic diagram of an exception reporting apparatus provided by an embodiment of the present application. As shown in FIG. 7, the apparatus provided by the embodiment can include a generating module 210 and a reporting module 220.

[0114] The generating module 210 is configured to generate, by firmware of an external device, device health status information in a case where an exception occurs, the device health status information being used for indicating exception information.

[0115] The reporting module 220 is configured to report, by the firmware, the device health status information to a host.

[0116] As an optional implementation, in the case where the exception occurs, the generating module 210 is specifically configured to report, by hardware of the external device, the exception information to the firmware in a case where the hardware detects the exception.

[0117] The firmware generates the device health status information based on the exception information.

[0118] As an optional implementation, the device health status information includes at least one of the following:

[0119] an exception type, an exception level, an exception position, an exception address, and an exception occurrence frequency.

[0120] As an optional implementation, the device health status information is further used for indicating an exception processing result.

[0121] As an optional implementation, the generating module 210 is specifically configured to:

[0122] the hardware of the external device reports the exception information to the firmware in a case where the hardware detects the exception;

[0123] the firmware processes the exception based on the exception information;

[0124] the firmware generates the device health status information based on the exception information and the exception processing result.

[0125] As an optional implementation, the device health status information further includes a device state, and the device state includes multiple ones of the following:

[0126] normal, degraded, risky, and unavailable.

[0127] As an optional implementation, in a case where the host is in a cluster, the reporting module 220 is further configured to:

[0128] report the device health status information to a management center of the cluster.

[0129] As an optional implementation, the firmware reports the device health status information to the host by using a message reporting manner specified by a bus.

[0130] As an optional implementation, the reporting module 220 is specifically configured to:

[0131] reporting the device health status information to an operating system of the host through the firmware.

[0132] As an optional implementation, the firmware is BIOS or firmware embedded in abnormal hardware.

[0133] The apparatus provided in the embodiment can execute the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0135] Based on the same concept, the embodiment of the present application also provides an electronic device. FIG. 8 is a structural schematic diagram of an electronic device provided by the embodiment of the present application. As shown in FIG. 8, the electronic device provided by the embodiment of the present application can include a memory 310 and a processor 320. The memory 310 is configured to store a computer program. The processor 320 is configured to implement the method described in the foregoing method embodiments when the computer program is called.

[0136] The electronic device provided in the embodiment can execute the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here.

[0137] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method described in the foregoing method embodiments.

[0138] The embodiment of the present application also provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the method described in the foregoing method embodiments.

[0139] The embodiment of the present application further provides a chip system, comprising a processor coupled with a memory, and the processor executes a computer program stored in the memory to implement the method described in the above method embodiment. The chip system can be a single chip or a chip module composed of multiple chips.

[0140] In the above embodiments, all or part of the method can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the method can be implemented in the form of a computer program product. The computer program product comprises 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 the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted by the computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk or magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)) and the like.

[0141] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be implemented by a computer program to instruct the relevant hardware to complete, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The storage medium mentioned above can include ROM or random storage memory RAM, magnetic disk or optical disk and various program code storage media.

[0142] The naming or numbering of the steps in the present application does not mean that the steps in the method process must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0143] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0144] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0145] It should be understood that in the description of this application and the appended claims, the terms "comprising," "including," "having," and any variations thereof are intended to cover a non-exclusive inclusion and mean "including but not limited to," unless otherwise specifically emphasized. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0146] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is used to describe the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural.

[0147] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0148] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0149] In addition, in the description of the present application and the appended claims, the terms "first", "second", and the like are used merely to distinguish similar objects from each other, and do not necessarily indicate a particular order or sequence, nor do they necessarily indicate relative importance of, or a preference for, the identified technical features. It is understood that such terms are used in appropriate situations to refer to different instances of similar objects, and that the embodiments described herein are capable of implementation in other than the order or sequence described herein; features identified with "first", "second", etc. can be included in either the same or different embodiments, explicitly or implicitly.

[0150] In the embodiments of the present application, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration, at 5 2 least. Any implementation described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other implementations. The

[0151] In the present application, the expressions "one embodiment" or "some embodiments" etc. mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, appearances of the phrases "in one embodiment" or "in some embodiments" etc. in various places in the present specification are not necessarily all referring to the same embodiment, but can refer to one or more but not all embodiments, unless otherwise indicated. 5

[0152] Finally, it should be noted that the above-described embodiments are merely intended for describing and illustrating, not limiting, the technical solutions of the present application; even though the present application has been described in detail with reference to the above-described embodiments, those of ordinary skill in the art should understand that they can still make modifications to the technical solutions recorded in the above-described embodiments, or make equivalent replacements to some or all of the technical features; and such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An abnormality reporting method characterized by comprising: The application is applied to an external device connected with a host through a bus, and the method comprises the following steps: In the case of an exception, the firmware of the external device generates device health status information, and the device health status information is used to indicate exception information; The firmware reports the device health status information to the host.

2. The method of claim 1, wherein, The firmware generates the device health status information in the case of an exception, and the firmware comprises the following steps: The hardware of the external device reports exception information to the firmware in the case of detecting an exception; The firmware generates device health status information based on the exception information.

3. The method according to claim 1 or 2, characterized in that, The device health status information comprises at least one of the following: Exception type, exception level, exception location, exception address, and exception occurrence frequency.

4. The method according to any one of claims 1 to 3, characterized in that, The device health status information is also used to indicate exception processing results.

5. The method of claim 4, wherein, The firmware generates the device health status information in the case of an exception, and the firmware comprises the following steps: The hardware of the external device reports exception information to the firmware in the case of detecting an exception; The firmware processes the exception based on the exception information; The firmware generates device health status information based on the exception information and exception processing results.

6. The method according to claim 4 or 5, characterized in that, The device health status information further comprises device status, and the device status comprises multiple types of the following: Normal, degraded, risky, and unavailable.

7. The method according to any one of claims 1 to 6, characterized in that, In the case that the host is in a cluster, the method further comprises the following steps: The firmware reports the device health status information to a management center of the cluster.

8. The method according to any one of claims 1 to 7, characterized in that, The firmware reports the device health status information to the host through a message reporting mode specified by the bus.

9. The method according to any one of claims 1 to 8, characterized in that, The firmware reports the device health status information to the host, and the firmware comprises the following steps: The firmware reports the device health status information to an operating system of the host.

10. The method according to any one of claims 1 to 9, characterized in that, The firmware is BIOS or firmware embedded in hardware in which an exception occurs.

11. An electronic device, comprising: The application comprises the following steps: A memory is used to store a computer program, and a processor is used to execute the method according to any one of claims 1-10 when the computer program is called.

12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the method according to any one of claims 1-10.

13. A computer program product, characterised in that, When the computer program product runs on an electronic device, the electronic device executes the method according to any one of claims 1-10.

14. A chip system, characterized by The chip system comprises a processor coupled with a memory, and the processor executes a computer program stored in the memory to realize the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Processing method and device based on external equipment in server

    CN115794690A

  • Fault-recoverable firmware detection system and method, storage medium and server

    CN117389790A

  • Solid state disk error reporting method, device and equipment and storage medium

    CN118152174A

  • Hard disk management method, computer equipment and storage medium

    CN118642660A

  • Method and system for positioning failure unit during staring data processing system

    CN1303046A