An AER function configuration method, device, equipment and medium

CN116302145BActive Publication Date: 2026-10-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211034555.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2026-10-09
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

现有技术存有不足之处:在初始化过程中没有事先检查系统硬件(RC)是否支持AER特性,就进行服务的初始化,导致系统起来后虽然系统中存在AER驱动程序,但是因为没有绑定虚拟设备(虚拟设备是root port虚拟出来的一个设备,AER驱动就绑定到这个设备上),从而不能通过AER服务来报告错误信息,这样不仅增加了系统启动时间,还容易扰乱开发人员视线,让开发人员以为只要PCIe设备支持AER特性,并且系统也进行了相应的正确配置,就认为整个系统支持AER特性,给开发人员分析问题造成了额外的负担

Benefits of technology

[0034]As can be seen, this application provides an AER function configuration method, including determining whether the local system configuration information supports AER; if the system configuration information supports AER, obtaining the AER driver and registering the AER driver locally to obtain an AER driver program; determining all device information in the local device list, performing AER feature detection on the device information to obtain a detection result; if the detection result indicates support, determining device feature information, obtaining AER resources based on the device feature information, and configuring the AER function according to the AER driver program and the AER resources. This application implements a scheme to pre-check whether the system supports AER features based on the characteristics of AER drivers. Even when the RC does not support AER features, the root cause of errors can still be located through the AER log module, thus facilitating developers in troubleshooting whether the system supports AER features. This application checks whether the RC supports AER features because, due to the characteristics of AER drivers (bound to the RC), if the RC does not support AER features, there is no need for the entire system to continue traversing subsequent devices of the RC, thereby reducing system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it is known that the system supports AER functionality, thereby improving server boot speed and flexibility, increasing the accuracy of AER function configuration, and improving the efficiency of AER function configuration. This application's AER log detection program can be flexibly configured and debugged according to needs, providing convenience for developers. The AER detection program can pre-filter out RCs that do not support AER features and the traversal process of all bridge devices connected to the RC, saving initialization time. It also effectively ensures that if the system has an AER driver, then the system will definitely support AER reporting functionality, further facilitating developers in troubleshooting whether the system supports AER features. This application implements a scheme to check in advance whether the system supports AER features based on the characteristics of AER driver, and the root cause of the error can still be located through the AER log detection program even when RC does not support AER features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302145B_ABST
    Figure CN116302145B_ABST
Patent Text Reader

Abstract

The application discloses an AER function configuration method and device, equipment and medium, and relates to the technical field of computers, which comprises the following steps: judging whether the local system configuration information supports AER, if the system configuration information supports AER, obtaining an AER driver, and registering the AER driver to the local to obtain an AER driver program; determining all device information in the local device list, performing AER characteristic detection on the device information to obtain a detection result; if the detection result is support, determining device characteristic information, obtaining AER resources based on the device characteristic information, and performing AER function configuration according to the AER driver program and the AER resources. Through the above technical scheme of the application, the server boot speed and flexibility can be effectively improved, the accuracy of AER function configuration is increased, and the efficiency of AER function configuration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an AER function configuration method, apparatus, device, and medium. Background Technology

[0002] With the development of the times and the advancement of technology, the demand for high-speed transmission of I / O (Input / Output) devices is increasing. The performance of the traditional PCI (Peripheral Component Interconnect) bus standard is being challenged, and it is increasingly unable to meet the needs of peripherals. To address this challenge and adapt to the needs of new application development, the PCI Express (PCIe) standard, the successor to the PCI bus, was born. The PCIe bus has many advantages over the PCI bus, the most important of which is that it can greatly improve the data transmission rate. In addition, it also has strong anti-interference capabilities, long transmission distance, and low power consumption. However, as the amount of data transmitted increases, the probability of data transmission errors also increases significantly. In order to better locate the root cause of the problem, PCIe provides two error reporting mechanisms: the first is the basic (Baseline Capability), which is a function that all PCIe devices must support; the second is optional, called Advanced Error Reporting Capability (AER), which provides more detailed error information to help developers locate the root cause of the error. Currently, to better support AER (Automatic Error Response) features, the Linux kernel registers AER as a PCIe port service during system startup. However, this existing technology has shortcomings: it doesn't pre-check whether the system hardware (RC) supports AER before initializing the service. This means that although the AER driver exists in the system after startup, it cannot report error messages through the AER service because it's not bound to a virtual device (a device created by the root port, to which the AER driver is bound). This not only increases system startup time but also easily misleads developers, leading them to believe that as long as the PCIe device supports AER and the system is correctly configured, the entire system supports AER, creating an additional burden for developers analyzing problems.

[0003] As can be seen from the above, improving server boot speed and flexibility, increasing the accuracy of AER configuration, and improving the efficiency of AER configuration are problems that need to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide an AER function configuration method, apparatus, device, and medium, which can effectively improve server boot speed and flexibility, increase the accuracy of AER function configuration, and improve the efficiency of AER function configuration. The specific solution is as follows:

[0005] Firstly, this application discloses an AER function configuration method, including:

[0006] Determine whether the local system configuration information supports AER. If the system configuration information supports AER, obtain the AER driver and register the AER driver locally to obtain the AER driver program.

[0007] All device information in the local device list is identified, and AER feature detection is performed on the device information to obtain the detection results;

[0008] If the detection result is positive, the device characteristic information is determined, AER resources are obtained based on the device characteristic information, and AER functions are configured according to the AER driver and the AER resources.

[0009] Optionally, performing AER feature detection on the device information includes:

[0010] The device type in the device list is determined using a locally preset AER detection program; the device type includes RC devices and bridge devices.

[0011] If the device information type is RC device, then AER characteristic detection is performed on the device information.

[0012] Optionally, performing AER feature detection on the device information includes:

[0013] Determine whether the device information has been detected;

[0014] If the device information has not been tested, then the functional information in the device information is obtained, and the device information is subjected to AER characteristic testing based on the functional information.

[0015] Optionally, the AER function configuration method further includes:

[0016] If the device information type is a bridge device, then obtain the parent device information of the device information and determine the device type of the parent device information;

[0017] If the information type of the parent device information is RC device, then it is determined whether the parent device information has been detected. If the parent device information has not been detected, then the functional information in the parent device information is obtained, and AER characteristic detection is performed on the parent device information based on the functional information in the parent device information.

[0018] Optionally, configuring the AER function based on the AER driver and the AER resources includes:

[0019] A virtual device is created based on the AER resource, and the virtual device is registered to a local preset device driver model through a preset device driver model interface;

[0020] The AER driver is bound to the registered device driver model to obtain the bound device driver model.

[0021] Optionally, after obtaining the bound device driver model, the process further includes:

[0022] Once the registered device driver model detects that the AER driver has been successfully bound, it obtains the initialization function in the AER driver.

[0023] Execute the initialization function to obtain the configured device driver model.

[0024] Optionally, after obtaining the detection results, the method further includes:

[0025] If the detection result is not supported, the device information is sent to the local preset AER log program so that the AER log program can determine the device error information after obtaining the device information and report and print the device information and the device error information.

[0026] Secondly, this application discloses an AER function configuration device, comprising:

[0027] The judgment module is used to determine whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and registered locally to obtain the AER driver program.

[0028] The detection module is used to determine all device information in the local device list, perform AER feature detection on the device information, and obtain the detection results.

[0029] The AER function configuration module is used to determine device characteristic information if the detection result is supported, obtain AER resources based on the device characteristic information, and configure the AER function according to the AER driver and the AER resources.

[0030] Thirdly, this application discloses an electronic device, comprising:

[0031] Memory, used to store computer programs;

[0032] A processor is used to execute the computer program to implement the aforementioned AER function configuration method.

[0033] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed AER function configuration method.

[0034] As can be seen, this application provides an AER function configuration method, including determining whether the local system configuration information supports AER; if the system configuration information supports AER, obtaining the AER driver and registering the AER driver locally to obtain an AER driver program; determining all device information in the local device list, performing AER feature detection on the device information to obtain a detection result; if the detection result indicates support, determining device feature information, obtaining AER resources based on the device feature information, and configuring the AER function according to the AER driver program and the AER resources. This application implements a scheme to pre-check whether the system supports AER features based on the characteristics of AER drivers. Even when the RC does not support AER features, the root cause of errors can still be located through the AER log module, thus facilitating developers in troubleshooting whether the system supports AER features. This application checks whether the RC supports AER features because, due to the characteristics of AER drivers (bound to the RC), if the RC does not support AER features, there is no need for the entire system to continue traversing subsequent devices of the RC, thereby reducing system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it is known that the system supports AER functionality, thereby improving server boot speed and flexibility, increasing the accuracy of AER function configuration, and improving the efficiency of AER function configuration. This application's AER log detection program can be flexibly configured and debugged according to needs, providing convenience for developers. The AER detection program can pre-filter out RCs that do not support AER features and the traversal process of all bridge devices connected to the RC, saving initialization time. It also effectively ensures that if the system has an AER driver, then the system will definitely support AER reporting functionality, further facilitating developers in troubleshooting whether the system supports AER features. This application implements a scheme to check in advance whether the system supports AER features based on the characteristics of AER driver, and the root cause of the error can still be located through the AER log detection program even when RC does not support AER features. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0036] Figure 1 This is a flowchart of an AER function configuration method disclosed in this application;

[0037] Figure 2This is a flowchart of an AER function configuration method disclosed in this application;

[0038] Figure 3 This is a flowchart illustrating a specific AER function configuration method disclosed in this application;

[0039] Figure 4 This is a flowchart illustrating a specific AER function configuration method disclosed in this application;

[0040] Figure 5 This is a schematic diagram of the structure of an AER function configuration device disclosed in this application;

[0041] Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] With the development of the times and the advancement of technology, the demand for high-speed transmission of I / O (Input / Output) devices is increasing. The performance of the traditional PCI (Peripheral Component Interconnect) bus standard is being challenged, and it is increasingly unable to meet the needs of peripherals. To address this challenge and adapt to the needs of new application development, the PCI Express (PCIe) standard, the successor to the PCI bus, was born. The PCIe bus has many advantages over the PCI bus, the most important of which is that it can greatly improve the data transmission rate. In addition, it also has strong anti-interference capabilities, long transmission distance, and low power consumption. However, as the amount of data transmitted increases, the probability of data transmission errors also increases significantly. In order to better locate the root cause of the problem, PCIe provides two error reporting mechanisms: the first is the basic (Baseline Capability), which is a function that all PCIe devices must support; the second is optional, called Advanced Error Reporting Capability (AER), which provides more detailed error information to help developers locate the root cause of the error. Currently, to better support AER (Automatic Error Detection) features, the Linux kernel registers AER as a PCIe port service during system startup. However, this existing technology has shortcomings: it doesn't pre-check whether the system hardware (RC) supports AER before initializing the service. This means that although the AER driver exists after system startup, it cannot report error information through the AER service because it's not bound to a virtual device (a device created by the root port, to which the AER driver is bound). This not only increases system startup time but also easily misleads developers, leading them to believe that as long as the PCIe device supports AER and the system is correctly configured, the entire system supports AER, adding an extra burden to problem analysis. Therefore, improving server boot speed and flexibility, increasing the accuracy of AER configuration, and improving the efficiency of AER configuration are problems that need to be solved in this field.This application utilizes an AER log detection program that allows for flexible configuration and debugging as needed, providing convenience for developers. The AER detection program can preemptively filter out RCs that do not support AER features, as well as the traversal process of all bridge devices connected to the RC, saving initialization time. Furthermore, it effectively ensures that if an AER driver is present in the system, the system will support AER reporting functionality, making it easier for developers to troubleshoot whether the system supports AER features. This application implements a preemptive check scheme for system AER feature support based on the characteristics of the AER driver, and even when the RC does not support AER features, the AER log detection program can still pinpoint the root cause of errors.

[0044] See Figure 1 As shown, this embodiment of the invention discloses an AER function configuration method, which may specifically include:

[0045] Step S11: Determine whether the local system configuration information supports AER. If the system configuration information supports AER, obtain the AER driver and register the AER driver locally to obtain the AER driver program.

[0046] Step S12: Determine all device information in the local device list, and perform AER feature detection on the device information to obtain the detection results.

[0047] In this embodiment, after determining all device information in the local device list, the device type of the device information in the device list is determined using a locally preset AER detection program. The device type includes RC devices and bridge devices. If the device information type is an RC device, AER characteristic detection is performed on the device information, and finally the detection result is obtained.

[0048] Furthermore, if the device information type is a bridge device, then the parent device information of the device information is obtained, and the device type of the parent device information is determined; if the information type of the parent device information is an RC device, then it is determined whether the parent device information has been detected; if the parent device information has not been detected, then the functional information in the parent device information is obtained, and AER characteristic detection is performed on the parent device information based on the functional information in the parent device information.

[0049] In this embodiment, it is determined whether the device information has been detected. If the device information has not been detected, the functional information in the device information is obtained, and the device information is subjected to AER characteristic detection based on the functional information.

[0050] Step S13: If the detection result is supportive, determine the device characteristic information, obtain AER resources based on the device characteristic information, and configure the AER function according to the AER driver and the AER resources.

[0051] In this embodiment, the system first determines whether the local system configuration information supports AER. If the system configuration information supports AER, AER service registration is performed. The registration process is divided into two parts. The first part is the flowchart on the left of the figure, which obtains the AER driver and registers it locally to obtain the AER driver program. At this time, no device is bound. The second part involves traversing all bridge devices in the device list of the system and determining whether the device supports AER function through the AER detection program. If it supports AER, AER-related resources are requested and the corresponding virtual device is created. Then, the virtual device is registered to the system through the device driver model interface. Finally, the AER driver program is bound, and the AER driver program completes the service initialization.

[0052] In this embodiment, it is determined whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and registered locally to obtain the AER driver program. All device information in the local device list is determined, and AER feature detection is performed on the device information to obtain the detection result. If the detection result indicates support, the device feature information is determined, AER resources are obtained based on the device feature information, and the AER function is configured according to the AER driver program and the AER resources. This application implements a scheme to pre-check whether the system supports AER features based on the characteristics of AER drivers. Even when the RC does not support AER features, the root cause of errors can still be located through the AER log module, thus facilitating developers in troubleshooting whether the system supports AER features. This application checks whether the RC supports AER features because, due to the characteristics of AER drivers (bound to the RC), if the RC does not support AER features, there is no need for the entire system to continue traversing subsequent devices of the RC, thereby reducing system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it is known that the system supports AER functionality, thereby improving server boot speed and flexibility, increasing the accuracy of AER function configuration, and improving the efficiency of AER function configuration. This application's AER log detection program can be flexibly configured and debugged according to needs, providing convenience for developers. The AER detection program can pre-filter out RCs that do not support AER features and the traversal process of all bridge devices connected to the RC, saving initialization time. It also effectively ensures that if the system has an AER driver, then the system will definitely support AER reporting functionality, further facilitating developers in troubleshooting whether the system supports AER features. This application implements a scheme to check in advance whether the system supports AER features based on the characteristics of AER driver, and the root cause of the error can still be located through the AER log detection program even when RC does not support AER features.

[0053] See Figure 2 As shown, this embodiment of the invention discloses an AER function configuration method, which may specifically include:

[0054] Step S21: Determine whether the local system configuration information supports AER. If the system configuration information supports AER, obtain the AER driver and register the AER driver locally to obtain the AER driver program.

[0055] Step S22: Determine all device information in the local device list, and perform AER feature detection on the device information to obtain the detection results.

[0056] In this embodiment, after obtaining the detection result, the method further includes: if the detection result is not supported, the device information is sent to a locally preset AER log program, so that after the AER log program obtains the device information, it can determine the device error information and report and print the device information and the device error information.

[0057] Step S23: If the detection result is supportive, determine the device characteristic information, obtain AER resources based on the device characteristic information, create a virtual device based on the AER resources, register the virtual device to the local preset device driver model through the preset device driver model interface, and then bind the AER driver to the registered device driver model to obtain the bound device driver model.

[0058] Step S24: When the registered device driver model detects that the AER driver has been successfully bound, the initialization function in the AER driver is obtained and executed to obtain the configured device driver model.

[0059] In this embodiment, the specific process is as follows: Figure 3 As shown, the first step is to determine whether the local system configuration information supports AER (i.e., Figure 3If the system configuration information supports AER (CONFIG_PCIE PORTBUS), then AER service registration (i.e., registering the bus pci_express) is performed. The registration process is divided into two parts. The first part is the flowchart on the left of the figure, which obtains the AER driver and registers it locally to obtain the AER driver program. At this time, no device is bound. The second part is to traverse all bridge devices in the device list of the system and use the AER detection program to determine whether the device supports the AER function. If it supports it, it requests AER-related resources and creates the corresponding virtual device. Then, it registers the virtual device to the system through the device driver model interface and finally binds the AER driver program. The AER driver program completes the service initialization. If it does not support it, the AER log control program is used. The specific steps are: the device information is sent to the local preset AER log program so that after the AER log program obtains the device information, it determines the device error information and reports and prints the device information and the device error information. This application utilizes an AER log detection program that allows for flexible configuration and debugging as needed, providing convenience for developers. The AER detection program can preemptively filter out RCs that do not support AER features, as well as the traversal process of all bridge devices connected to the RC, saving initialization time. Furthermore, it effectively ensures that if an AER driver is present in the system, the system will support AER reporting functionality, making it easier for developers to troubleshoot whether the system supports AER features. This application implements a preemptive check scheme for system AER feature support based on the characteristics of the AER driver, and even when the RC does not support AER features, the AER log detection program can still pinpoint the root cause of errors.

[0060] In this embodiment, the main function of the AER detection program is to check whether the RC supports AER features. Because of the nature of the AER driver (bound to the RC), if the RC does not support AER features, the entire system does not need to continue traversing subsequent devices, thus reducing system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it is known that the system supports AER functionality. The main function of the AER log detection program is to check the device's AER status register. If an error is detected, it prints the relevant register information. This module does not depend on whether the system supports AER reporting; as long as the device supports AER, error information can be located through this module. Furthermore, by adding a log control switch, it can be flexibly configured according to actual needs.

[0061] In this embodiment, the specific steps of the AER log detection program are as follows: Figure 4As shown, this application adds a log control switch (aer_log_ctrl=0 indicates the log module is off, aer_log_ctrl=1 indicates the log module is on). This allows us to easily turn the AER log module on and off, enabling flexible debugging. Moreover, it does not depend on the RC AER function. In other words, if our system does not support the AER reporting function, but the PCIe device supports the AER feature, we can still obtain detailed error information through the AER-related registers, making it easier to find the problem. First, iterate through all device information in the device list, read the functional information of the devices, and determine the device type of the device information in the device list. The device type includes RC devices and bridge devices. If the device information type is RC device, perform AER feature detection on the device information. If the device information type is bridge device, obtain the parent device information of the device information and determine the device type of the parent device information. If the information type of the parent device information is RC device, determine whether the parent device information has been detected. If the parent device information has not been detected, obtain the functional information in the parent device information and perform AER feature detection on the parent device information based on the functional information in the parent device information. Then, determine whether the device information has been... If the device information has not been checked (i.e., whether aer_check equals 1), then the functional information in the device information is obtained, and it is determined whether AER is supported. If it is supported (i.e., aer_cap = 1), then the device status register is read. According to the status register, we can see whether any errors have occurred. If an error occurs, the status register information and all error-related register information are printed. If the device does not support the AER feature (i.e., aer_cap = 0), then the current traversal is skipped, and the next device is traversed. If the device information has been checked (i.e., aer_cap = 1 at the rightmost end of the diagram), then the device status register is read again. According to the status register, we can see whether any errors have occurred.

[0062] This application utilizes an AER log detection program that allows for flexible configuration and debugging as needed, providing convenience for developers. The AER detection program can preemptively filter out RCs that do not support AER features, as well as the traversal process of all bridge devices connected to the RC, saving initialization time. Furthermore, it effectively ensures that if an AER driver is present in the system, the system will support AER reporting functionality, making it easier for developers to troubleshoot whether the system supports AER features. This application implements a preemptive check scheme for system AER feature support based on the characteristics of the AER driver, and even when the RC does not support AER features, the AER log detection program can still pinpoint the root cause of errors.

[0063] In this embodiment, it is determined whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and registered locally to obtain the AER driver program. All device information in the local device list is determined, and AER feature detection is performed on the device information to obtain the detection result. If the detection result indicates support, the device feature information is determined, AER resources are obtained based on the device feature information, and the AER function is configured according to the AER driver program and the AER resources. This application implements a scheme to pre-check whether the system supports AER features based on the characteristics of AER drivers. Even when the RC does not support AER features, the root cause of errors can still be located through the AER log module, thus facilitating developers in troubleshooting whether the system supports AER features. This application checks whether the RC supports AER features because, due to the characteristics of AER drivers (bound to the RC), if the RC does not support AER features, there is no need for the entire system to continue traversing subsequent devices of the RC, thereby reducing system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it is known that the system supports AER functionality, thereby improving server boot speed and flexibility, increasing the accuracy of AER function configuration, and improving the efficiency of AER function configuration. This application's AER log detection program can be flexibly configured and debugged according to needs, providing convenience for developers. The AER detection program can pre-filter out RCs that do not support AER features and the traversal process of all bridge devices connected to the RC, saving initialization time. It also effectively ensures that if the system has an AER driver, then the system will definitely support AER reporting functionality, further facilitating developers in troubleshooting whether the system supports AER features. This application implements a scheme to check in advance whether the system supports AER features based on the characteristics of AER driver, and the root cause of the error can still be located through the AER log detection program even when RC does not support AER features.

[0064] See Figure 5 As shown, this embodiment of the invention discloses an AER function configuration device, which may specifically include:

[0065] The judgment module 11 is used to determine whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and the AER driver is registered locally to obtain the AER driver program.

[0066] The detection module 12 is used to determine all device information in the local device list, perform AER feature detection on the device information, and obtain the detection result.

[0067] AER function configuration module 13 is used to determine device characteristic information if the detection result is supported, obtain AER resources based on the device characteristic information, and configure AER function according to the AER driver and the AER resources.

[0068] In some specific embodiments, the detection module 12 may specifically include:

[0069] The device type determination module is used to determine the device type of the device information in the device list using a locally preset AER detection program; the device types include RC devices and bridge devices;

[0070] The detection module is used to perform AER characteristic detection on the device information if the device information type is RC device.

[0071] In some specific embodiments, the detection module 12 may specifically include:

[0072] The detection and judgment module is used to determine whether the device information has been detected.

[0073] The function information acquisition module is used to acquire the function information in the device information if the device information has not been detected, and to perform AER characteristic detection on the device information based on the function information.

[0074] In some specific embodiments, the detection module 12 may specifically include:

[0075] The parent device type determination module is used to obtain the parent device information of the device information and determine the device type of the parent device information if the device information type is a bridge device.

[0076] The parent device detection module is used to determine whether the parent device information has been detected if the information type of the parent device information is RC device, and if the parent device information has not been detected, to obtain the functional information in the parent device information and to perform AER characteristic detection on the parent device information based on the functional information in the parent device information.

[0077] In some specific embodiments, the AER function configuration module 13 may specifically include:

[0078] The registration module is used to create virtual devices based on the AER resources and register the virtual devices to a local preset device driver model through a preset device driver model interface.

[0079] The model binding module is used to bind the AER driver to the registered device driver model to obtain the bound device driver model.

[0080] In some specific embodiments, the AER function configuration module 13 may specifically include:

[0081] The initialization function acquisition module is used to acquire the initialization function in the AER driver after the registered device driver model detects that the AER driver has been successfully bound.

[0082] The function execution module is used to execute the initialization function to obtain the configured device driver model.

[0083] In some specific embodiments, the AER function configuration module 13 may specifically include:

[0084] The device error information determination module is used to send the device information to a locally preset AER log program if the detection result is not supported, so that the AER log program can determine the device error information after obtaining the device information and report and print the device information and the device error information.

[0085] In this embodiment, it is determined whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and registered locally to obtain the AER driver program. All device information in the local device list is determined, and AER feature detection is performed on the device information to obtain the detection result. If the detection result indicates support, the device feature information is determined, AER resources are obtained based on the device feature information, and the AER function is configured according to the AER driver program and the AER resources. This application implements a scheme to check whether the system supports AER features in advance based on the characteristics of AER drivers. Even when the RC does not support AER features, the root cause of the error can still be located through the AER log module, thus making it easier for developers to troubleshoot whether the system supports AER features. This application checks whether the RC supports AER features. Because of the characteristics of AER drivers (bound to RC), if the RC does not support AER features, then the entire system does not need to continue to traverse the subsequent devices of the RC, thereby reducing the system initialization time. It also ensures that as long as the corresponding virtual device or AER driver exists in the system, it can be known that the system supports AER function, thereby improving the server boot speed and flexibility, increasing the accuracy of AER function configuration, and improving the efficiency of AER function configuration.

[0086] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the AER function configuration method performed by the electronic device as disclosed in any of the foregoing embodiments.

[0087] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0088] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0089] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform operations and processing on the data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the AER function configuration method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the AER function configuration device from external devices, as well as data collected by its own input / output interface 25.

[0090] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0091] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the AER function configuration method steps disclosed in any of the foregoing embodiments.

[0092] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0093] The above provides a detailed description of an AER function configuration method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for configuring AER functionality, characterized in that, include: Determine whether the local system configuration information supports AER. If the system configuration information supports AER, obtain the AER driver and register the AER driver locally to obtain the AER driver program. All device information in the local device list is identified, and AER feature detection is performed on the device information to obtain the detection results; If the detection result is positive, the device characteristic information is determined, AER resources are obtained based on the device characteristic information, and AER functions are configured according to the AER driver and the AER resources. Configuring AER functionality based on the AER driver and the AER resources includes: creating a virtual device based on the AER resources and registering the virtual device to a local preset device driver model through a preset device driver model interface; binding the AER driver to the registered device driver model to obtain the bound device driver model. After obtaining the bound device driver model, the process also includes: when the registered device driver model detects that the AER driver has been successfully bound, obtaining the initialization function in the AER driver; executing the initialization function to obtain the configured device driver model; After obtaining the test results, the process also includes: if the test results are not supported, the device information is sent to a locally preset AER log program, so that the AER log program can determine the device error information after obtaining the device information, and report and print the device information and device error information; the AER log program includes a log control switch, and the AER log program can be configured and debugged as needed.

2. The AER function configuration method according to claim 1, characterized in that, The step of performing AER characteristic detection on the device information includes: The device type in the device list is determined using a locally preset AER detection program; the device type includes RC devices and bridge devices. If the device information type is RC device, then AER characteristic detection is performed on the device information.

3. The AER function configuration method according to claim 2, characterized in that, The step of performing AER characteristic detection on the device information includes: Determine whether the device information has been detected; If the device information has not been tested, then the functional information in the device information is obtained, and the device information is subjected to AER characteristic testing based on the functional information.

4. The AER function configuration method according to claim 2, characterized in that, Also includes: If the device information type is a bridge device, then obtain the parent device information of the device information and determine the device type of the parent device information; If the information type of the parent device information is RC device, then it is determined whether the parent device information has been detected. If the parent device information has not been detected, then the functional information in the parent device information is obtained, and AER characteristic detection is performed on the parent device information based on the functional information in the parent device information.

5. An AER function configuration device, characterized in that, include: The judgment module is used to determine whether the local system configuration information supports AER. If the system configuration information supports AER, the AER driver is obtained and registered locally to obtain the AER driver program. The detection module is used to determine all device information in the local device list, perform AER feature detection on the device information, and obtain the detection results. The AER function configuration module is used to determine device characteristic information if the detection result is supported, obtain AER resources based on the device characteristic information, and configure the AER function according to the AER driver and the AER resources. Configuring AER functionality based on the AER driver and the AER resources includes: creating a virtual device based on the AER resources and registering the virtual device to a local preset device driver model through a preset device driver model interface; binding the AER driver to the registered device driver model to obtain the bound device driver model. After obtaining the bound device driver model, the process also includes: when the registered device driver model detects that the AER driver has been successfully bound, obtaining the initialization function in the AER driver; executing the initialization function to obtain the configured device driver model; After obtaining the test results, the process also includes: if the test results are not supported, the device information is sent to a locally preset AER log program, so that the AER log program can determine the device error information after obtaining the device information, and report and print the device information and device error information; the AER log program includes a log control switch, and the AER log program can be configured and debugged as needed.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the AER function configuration method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the AER function configuration method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • AER function management method and device, server and storage medium

    CN114201360A

  • PCIe NETWORK SYSTEM WITH FAIL-OVER CAPABILITY AND OPERATION METHOD THEREOF

    US20170147456A1