Extended device detection systems, methods, computer devices, and storage media

By collecting and comparing extended device configuration space values ​​during BIOS and OS boot processes, the problem of inconsistent configuration information between BIOS and OS is solved, achieving the technical effect of quickly locating configuration differences.

CN119621621BActive Publication Date: 2025-12-12INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411683404.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-12-12
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

In existing technologies, when the configuration information of extended devices is inconsistent when viewed in the BIOS and OS, it is impossible to quickly and accurately locate the source of the problem.

Method used

By collecting extended device configuration space values ​​before and after the BIOS system boots, and comparing the differences with the baseboard management controller, the source of the configuration difference is determined.

Benefits of technology

Quickly locate configuration differences in extended devices and accurately determine configuration inconsistencies caused by the BIOS or OS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621621B_ABST
    Figure CN119621621B_ABST
Patent Text Reader

Abstract

The application relates to the computer field and discloses an expansion device detection method and system, a computer device and a storage medium. The method is applied to a computer device, the computer device comprises a processor and a baseboard management controller, the processor runs a basic input / output system and an operating system, and the method comprises the following steps: when the basic input / output system is started and the operating system is not started, collecting a first expansion device configuration space value through the basic input / output system and sending the first expansion device configuration space value to the baseboard management controller; when the basic input / output system is started and the operating system is started, collecting a second expansion device configuration space value through the basic input / output system and sending the second expansion device configuration space value to the baseboard management controller; and comparing the first expansion device configuration space value and the second expansion device configuration space value through the baseboard management controller to obtain expansion device configuration difference information. The method can quickly locate the problem source through the expansion device configuration difference information.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an expansion device detection system and method, computer device and storage medium. BACKGROUND

[0002] Expansion devices are widely used on computer devices, almost all types of computing devices will use expansion devices; different customers have different business scenarios, and the configurations of expansion devices are also different; the configuration information of the expansion device is mainly recorded in the configuration space corresponding to the expansion device. There are many options related to expansion devices in the setting page of BIOS (Basic Input Output System). By modifying these BIOS options, the configuration information of the expansion device can be modified. However, users usually use related commands under OS (Operating System) to view the configuration information of the expansion device. However, in actual use, there may be a situation that the configuration information of the expansion device set in the BIOS is inconsistent with that viewed in the OS. At present, it is not possible to quickly and accurately locate the source of the problem. SUMMARY

[0003] Therefore, it is necessary to provide an expansion device detection system and method, computer device and storage medium to obtain configuration difference information corresponding to the expansion device, and quickly locate the source of the problem through the device configuration difference information.

[0004] An expansion device detection system, the system comprising a processor and a baseboard management controller, the processor running a basic input output system and an operating system, comprising:

[0005] The basic input output system is configured to collect first expansion device configuration space values when the basic input output system is started and the operating system is not started, and send the first expansion device configuration space values to the baseboard management controller;

[0006] The basic input output system is configured to collect second expansion device configuration space values when the basic input output system is started and the operating system is not started, and send the second expansion device configuration space values to the baseboard management controller;

[0007] The baseboard management controller is configured to compare the first expansion device configuration space values and the second expansion device configuration space values to obtain expansion device configuration difference information.

[0008] In one embodiment, the processor and the baseboard management controller are connected through a general input output interface, wherein:

[0009] The basic input output system is configured to configure one end of the general input output interface connected with the processor as an interrupt mode;

[0010] a baseboard management controller configured to configure the other end of the general purpose input / output interface as an output mode;

[0011] a basic input / output system configured to register a general purpose input / output interface interrupt function;

[0012] a general purpose input / output interface interrupt function configured to collect second expansion device configuration space values;

[0013] a baseboard management controller configured to pull up or pull down a level of the general purpose input / output interface to trigger the general purpose input / output interface interrupt when the basic input / output system is started and the operating system is started.

[0014] An expansion device detection method, the method is applied to a computer device, the computer device includes a processor and a baseboard management controller, the processor runs a basic input / output system and an operating system, and the method includes:

[0015] collecting, by the basic input / output system, first expansion device configuration space values when the basic input / output system is started and the operating system is not started, and sending the first expansion device configuration space values to the baseboard management controller;

[0016] collecting, by the basic input / output system, second expansion device configuration space values when the basic input / output system is started and the operating system is started, and sending the second expansion device configuration space values to the baseboard management controller;

[0017] comparing, by the baseboard management controller, the first expansion device configuration space values and the second expansion device configuration space values to obtain expansion device configuration difference information.

[0018] In one of the embodiments, the processor is connected to one end of a general purpose input / output interface, and the other end of the general purpose input / output interface is connected to the baseboard management controller, and the method further includes:

[0019] configuring, by the basic input / output system, the one end of the general purpose input / output interface connected to the processor as an interrupt mode;

[0020] configuring, by the baseboard management controller, the other end of the general purpose input / output interface connected to the baseboard management controller as an output mode;

[0021] registering, by the basic input / output system, a general purpose input / output interface interrupt function;

[0022] Before the collecting, by the basic input / output system, of the second expansion device configuration space values, the method further includes:

[0023] changing, by the baseboard management controller, a level corresponding to the general purpose input / output interface to trigger the general purpose input / output interface interrupt;

[0024] The method comprises the following steps:

[0025] The method comprises the following steps:

[0026] The method comprises the following steps:

[0027] In one embodiment, the second expansion device configuration space value is collected by the basic input / output system, and the method comprises the following steps:

[0028] The basic input / output system calls the general input / output interface interrupt function.

[0029] The second expansion device configuration space value is collected by the general input / output interface interrupt function.

[0030] In one embodiment, the second expansion device configuration space value is sent to the baseboard management controller, and the method comprises the following steps:

[0031] The intelligent platform management interface command is sent to the baseboard management controller.

[0032] In one embodiment, the first expansion device configuration space value and the second expansion device configuration space value are compared by the baseboard management controller to obtain expansion device configuration difference information, and the method comprises the following steps:

[0033] The first expansion device configuration space value and the second expansion device configuration space value are compared by the baseboard management controller to determine whether they are the same.

[0034] When the first expansion device configuration space value and the second expansion device configuration space value are different, the baseboard management controller generates expansion device configuration difference information.

[0035] In one embodiment, the method further comprises the following steps:

[0036] The expansion device configuration difference information is written into the system event log by the baseboard management controller.

[0037] In one embodiment, the method further comprises the following steps:

[0038] A log viewing instruction is received, and the system event log is called according to the log viewing instruction.

[0039] The expansion device configuration difference information recorded in the system event log is analyzed to determine an abnormal system.

[0040] Expansion device configuration space value Expansion device configuration space value Expansion device configuration space value Expansion device configuration space value

[0041] A computer device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:

[0042] When the basic input / output system is started and the operating system is not started, the basic input / output system collects first extended device configuration space values and sends them to the baseboard management controller;

[0043] When the basic input / output system is started and the operating system is not started, the basic input / output system collects first extended device configuration space values and sends them to the baseboard management controller;

[0044] The baseboard management controller compares the first extended device configuration space values and the second extended device configuration space values to obtain extended device configuration difference information.

[0045] A computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:

[0046] When the basic input / output system is started and the operating system is not started, the basic input / output system collects first extended device configuration space values and sends them to the baseboard management controller;

[0047] When the basic input / output system is started and the operating system is not started, the basic input / output system collects first extended device configuration space values and sends them to the baseboard management controller;

[0048] The baseboard management controller compares the first extended device configuration space values and the second extended device configuration space values to obtain extended device configuration difference information.

[0049] The above-mentioned extended device detection system, method, computer device and storage medium collect first extended device configuration space values through the basic input / output system when the basic input / output system is started and the operating system is not started, and send them to the baseboard management controller; collect second extended device configuration space values through the basic input / output system when the basic input / output system is started and the operating system is not started, and send them to the baseboard management controller; and the baseboard management controller compares the first extended device configuration space values and the second extended device configuration space values to obtain extended device configuration difference information.

[0050] Therefore, the BIOS system (Basic Input Output System) sends the extended configuration value to the BMC when the BIOS system is started and before the OS system (Operating System) is started; the OS system sends the extended configuration space information to the BMC after the OS system is started, and the BMC compares the difference between the extended configuration space before the OS system is started and the extended configuration space after the OS system is started to obtain the extended device configuration difference information, and quickly locates whether the extended device configuration difference is caused by the OS system or the BIOS system. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 A flowchart of an embodiment of the extended device detection method;

[0052] Figure 2 A flowchart of an embodiment of the extended device detection method;

[0053] Figure 3 A flowchart of an embodiment of the second extended device configuration space value collection step;

[0054] Figure 4 A flowchart of an embodiment of the extended device configuration space value comparison step;

[0055] Figure 5 An internal structure diagram of a computer device in an embodiment;

[0056] Figure 6 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the present application clearer, further detailed description of the present application will be given below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0058] In one embodiment, an extended device detection system is provided, the system comprising a processor and a baseboard management controller, the processor running a basic input output system and an operating system, comprising:

[0059] The basic input output system is configured to collect first extended device configuration space values when the basic input output system is started and the operating system is not started, and send the first extended device configuration space values to the baseboard management controller;

[0060] The basic input output system is configured to collect second extended device configuration space values when the basic input output system is started and the operating system is started, and send the second extended device configuration space values to the baseboard management controller;

[0061] A substrate management controller is configured to compare a first extended device configuration space value and a second extended device configuration space value to obtain extended device configuration difference information.

[0062] The computer device includes a central processing unit (CPU) and a baseboard management controller (BMC), and the CPU runs a basic input / output system (BIOS) and an operating system (OS) in sequence.

[0063] The BIOS is a set of programs fixed to a ROM chip on a motherboard of the computer, and stores programs for basic input / output of the computer, a self-checking program after startup, and a system self-starting program.

[0064] The OS is an inbuilt program for cooperating various hardware of the computer to interact with a user.

[0065] Specifically, when the BIOS system is started and the OS system is not started, the BIOS system is configured to collect a first extended device configuration space value and send the first extended device configuration space value to the BMC.

[0066] Further, after the BMC collects the first extended device configuration space value and the second extended device configuration space value, the BMC compares the first extended device configuration space value and the second extended device configuration space value to obtain extended device configuration difference information.

[0067] In one embodiment, the processor is connected to the BMC through a general input / output interface, and the general input / output interface includes one end connected to the processor and the other end connected to the BMC.

[0068] The BIOS is configured to configure the one end of the general input / output interface connected to the processor as an interrupt mode.

[0069] The BMC is configured to configure the other end of the general input / output interface connected to the BMC as an output mode.

[0070] The BIOS is configured to register a general input / output interface interrupt function.

[0071] The general input / output interface interrupt function is configured to collect a second extended device configuration space value.

[0072] The substrate management controller is configured to pull up or pull down a level of the general input / output interface to trigger a general input / output interface interrupt when a basic input / output system is started and an operating system is started.

[0073] The one end of the general input / output interface GPIO is connected to the processor, and the other end is connected to the substrate management controller. Specifically, the BIOS sets the one end of the GPIO connected to the processor to an interrupt mode, the BMC sets the one end of the GPIO connected to the processor to an output mode, and the BIOS registers a general input / output interface interrupt function. The function of the general input / output interface interrupt function is to collect extended device configuration space values and send the extended device configuration space values to the BMC.

[0074] The level corresponding to the general input / output interface is changed by the substrate management controller to trigger a general input / output interface interrupt. Specifically, the two ends of the GPIO are directly connected to the CPU and the BMC, respectively. The BIOS configures the CPU end to an interrupt mode, and the BMC configures the GPIO to an output mode. When the CPU detects a change in the level of the GPIO, an interrupt is triggered, and a general input / output interrupt function is called. The general input / output interrupt function is called after the OS system is started. The change in the level includes pulling up or pulling down the level. In one embodiment, as shown in Figure 1 A device configuration difference acquisition method is provided. The method is applied to a computer device including a processor and a substrate management controller. The processor runs a basic input / output system and an operating system. The method includes:

[0075] In step 102, when the basic input / output system is started and the operating system is not started, the basic input / output system collects first extended device configuration space values and sends them to the substrate management controller.

[0076] The computer device includes a processor CPU and a substrate management controller BMC. The processor CPU runs a basic input / output system BIOS and an operating system OS. The basic input / output system BIOS and the operating system OS are started in sequence. The processor CPU is the operation and control core of the computer system and is the final execution unit for information processing and program running.

[0077] The basic input / output system BIOS is a set of programs fixed to a ROM chip on the motherboard of a computer. It stores the most important basic input / output programs, self-checking programs after startup, and system self-starting programs. It can read and write specific information set by the system from the CMOS. Its main function is to provide the most basic and direct hardware settings and control for the computer.

[0078] The operating system OS is an inbuilt program for coordinating various hardware of the computer to interact with the user. It can be seen that the basic input output system BIOS and the operating system OS are started in sequence, and generally, after the computer device is started, the BIOS system is started first, and then the OS system is started.

[0079] Specifically, after the computer device is started, it is detected that the BIOS system is started and the OS system is not started, and the BIOS system collects a first extended device configuration space value. The extended device configuration space value is used to record the configuration information of the PCIE device, and reflects the state of the PCIE device.

[0080] The extended device can be a PCIE device. The PCIE device is a device using the PCIE standard, such as a storage controller, a network adapter, an extended IO card, etc. The PCIE (peripheral component interconnect express) is a high-speed serial point-to-point double-channel high-bandwidth transmission. The connected devices are allocated exclusive channel bandwidth and do not share bus bandwidth. It mainly supports active power management, error reporting, end-to-end reliable transmission, hot plug, and quality of service (QOS) functions.

[0081] As other embodiments of the present application, the extended devices meeting other bus protocols can also achieve the purpose of the present application, and belong to the protection scope of the present application.

[0082] Step 104, when the basic input output system is started and the operating system is started, the second extended device configuration space value is collected through the basic input output system and sent to the baseboard management controller.

[0083] Specifically, when the BIOS system is started and the OS system is started, the BIOS system collects the second extended device configuration space value. At this time, the second extended device configuration space value is the extended device configuration space after the OS system is started, and the first extended device configuration space value is the extended device configuration space before the OS system is started.

[0084] Step 106, the first extended device configuration space value and the second extended device configuration space value are compared through the baseboard management controller to obtain the extended device configuration difference information.

[0085] Specifically, after obtaining the extended device configuration space values before and after the OS system starts, the extended device configuration space values before and after the OS system starts are compared to determine whether the extended device configuration space has changed and whether it is as expected, and extended device configuration difference information is obtained. For example, taking a BIOS option A as an example, assuming that the BIOS option A has two selectable values value0 and value1, and the default value of the option A is value0; after the BIOS setting modifies the option value to value1, after entering the OS, the corresponding configuration space value expected to be seen under the OS using a related command should be value1, but the actual value seen is still value0, which is not as expected.

[0086] In the above device configuration difference acquisition method, when the basic input output system starts and the operating system does not start, the basic input output system collects a first extended device configuration space value and sends it to the baseboard management controller; when the basic input output system starts and the operating system starts, the basic input output system collects a second extended device configuration space value and sends it to the baseboard management controller; the baseboard management controller compares the first extended device configuration space value and the second extended device configuration space value to obtain the extended device configuration difference information. Therefore, when the BIOS system (basic input output system) starts and before the OS system (operating system) starts, the BIOS system sends the PCIE configuration value to the BMC; after the OS system starts, the extended device configuration space information is sent to the BMC, and the BMC compares the extended device configuration space difference before and after the OS system starts to obtain the extended device configuration difference information, and quickly locates whether the extended device configuration difference is caused by the OS system or the BIOS system.

[0087] In one embodiment, the processor is connected to one end of the general input output interface, and the other end of the general input output interface is connected to the baseboard management controller, as shown in Figure 2 The above method further includes:

[0088] Step 202, configuring the one end of the general input output interface connected to the processor to an interrupt mode by the basic input output system.

[0089] Step 204, configuring the other end of the general input output interface connected to the baseboard management controller to an output mode by the baseboard management controller.

[0090] Step 206, registering the general input output interface interrupt function by the basic input output system.

[0091] One end of the general input and output interface GPIO is connected with the processor, and the other end is connected with the baseboard management controller. Specifically, the BIOS sets the end of the GPIO connected with the processor as an interrupt mode, the BMC sets the end of the GPIO connected with the processor as an output mode, and then registers the general input and output interface interrupt function through the BIOS. The general input and output interface interrupt function is used to collect the extended device configuration space value and send the extended device configuration space value to the BMC.

[0092] In one embodiment, the general input and output interface interrupt function is implemented by firmware in the basic input and output system. Firmware is a program written into an EPROM (erasable programmable read-only memory) or an EEPROM (electrically erasable programmable read-only memory). Firmware refers to a device "driver" stored in a device. Through the firmware, the operating system can implement the running action of a specific machine according to the standard device driver.

[0093] In one embodiment, before collecting the second extended device configuration space value through the basic input and output system, the method further includes:

[0094] The level corresponding to the general input and output interface is changed through the baseboard management controller to trigger the general input and output interface interrupt. Specifically, the two ends of the GPIO are directly connected with the CPU and the BMC respectively, the BIOS configures the CPU end as an interrupt mode, and the BMC configures the GPIO as an output mode. When the CPU detects a change in the level of the GPIO, an interrupt is triggered, and then the general input and output interrupt function is called. However, the general input and output interrupt function is called only after the OS system is started.

[0095] In one embodiment, changing the level corresponding to the general input and output interface through the baseboard management controller includes: pulling up the level of the general input and output interface through the baseboard management controller; or pulling down the level of the general input and output interface through the baseboard management controller.

[0096] Specifically, the BMC pulls up or pulls down the level of the GPIO interface to trigger the GPIO interrupt. Further, the CPU starts to call the general input and output interrupt function, and collects the second extended device configuration space value after the OS system is started through the general input and output interrupt function.

[0097] In one embodiment, as shown in Figure 3 collecting the second extended device configuration space value through the basic input and output system includes:

[0098] In step 302, the general input and output interface interrupt function is called through the basic input and output system.

[0099] Step 304, collecting the second expansion device configuration space value through the general input-output interface interrupt function.

[0100] Specifically, the BMC pulls up or pulls down the level of the GPIO interface, triggers the GPIO interrupt, and the CPU runs the BIOS to call the registered general input-output interface interrupt function to collect the second expansion device configuration space value through the general input-output interface interrupt function. The general input-output interrupt function is called after the OS system is started, and the general input-output interrupt function is not called before the OS system is started.

[0101] In one embodiment, the sending to the baseboard management controller includes: sending to the baseboard management controller through an intelligent platform management interface command.

[0102] The intelligent platform management interface command is an IPMI (Intelligent Platform Management Interface) command.

[0103] In one embodiment, as shown in Figure 4 The first expansion device configuration space value and the second expansion device configuration space value are compared through the baseboard management controller to obtain the expansion device configuration difference information, which includes:

[0104] Step 402, comparing the first expansion device configuration space value and the second expansion device configuration space value through the baseboard management controller.

[0105] Step 404, when the first expansion device configuration space value and the second expansion device configuration space value are different, generating the expansion device configuration difference information through the baseboard management controller.

[0106] The first expansion device configuration space value and the second expansion device configuration space value are compared through the baseboard management controller to obtain the expansion device configuration difference information, which specifically can be that the BMC compares whether the expansion device configuration space values before and after the OS system is started are the same to generate the expansion device configuration difference information. Specifically, after receiving the two expansion device configuration space values, the BMC compares whether the first expansion device configuration space value and the second expansion device configuration space value are the same. If they are the same, it means that the expansion device configuration space value is as expected. After the related configuration of the expansion device is modified through the BIOS system related setting interface, the configuration space value is checked under the OS system and is as expected. Conversely, if they are not the same, it means that the expansion device configuration space value is not as expected, and the expansion device configuration difference information is generated.

[0107] In one embodiment, the above method further includes: writing the expansion device configuration difference information into the system event log through the baseboard management controller.

[0108] In one embodiment, the method further comprises: receiving a log viewing instruction, calling the system event log according to the log viewing instruction, and determining the abnormal system through the extended device configuration difference information recorded in the system event log.

[0109] Specifically, after the BMC compares the two extended device configuration space values and generates the extended device configuration difference information, the BMC triggers the recording of a system event log and records the extended device configuration difference information in the system event log.

[0110] Therefore, if the user finds that the extended device configuration space value does not meet the expectation under the OS system, the user can directly check the system event log. Specifically, a log viewing instruction is received, which can be triggered by the user or generated by the user performing relevant operations. Further, the system event log is called according to the log viewing instruction, and the abnormal system is determined through the extended device configuration difference information recorded in the system event log. The abnormal system is the BIOS system or the OS system that has a problem. In this way, it can be analyzed whether the extended device configuration space value not meeting the expectation is caused by the BIOS system or the OS system.

[0111] In one embodiment, the extended device detection method is described in detail by the following specific steps:

[0112] S1, the GPIO is directly connected to the CPU and the BMC on both sides, the BIOS configures the CPU end as an interrupt mode, the BMC configures the GPIO as an output mode, the BIOS registers a GPIO interrupt processing function, denoted as function A, the function A is implemented by the BIOS, and the function A is used to collect the PCIE configuration space value and send the PCIE configuration space value to the BMC through an IPMI command; when the CPU detects a change in the GPIO level, an interrupt is triggered, and then the interrupt processing function A is called; the function A is called after the OS is started;

[0113] S2, the BIOS continues to execute until the BIOS is about to be executed, and the BIOS collects the PCIE configuration space value before the OS is started, and sends the PCIE configuration space value to the BMC through an IPMI command, which is the first PCIE configuration space value received by the BMC, corresponding to the PCIE state configured by the BIOS before the OS is started;

[0114] S3, the BIOS exits, and the OS starts and completes;

[0115] S4, the BMC changes the GPIO state, i.e. pulls up or pulls down the GPIO level, triggers the GPIO interrupt, the CPU of the computer device starts to call the function A, the function A collects the value of the PCIE configuration space, and sends the PCIE configuration space value to the BMC through the IPMI command; here is the second PCIE configuration space value collected by the BMC, which corresponds to the PCIE state after the OS is started;

[0116] S5, the BMC compares the two PCIE space values, if there is a difference, the BMC triggers a SEL log to be recorded, and records the difference value to the SEL;

[0117] S6, when the user finds that the PCIE configuration value under the OS does not meet the expectation, directly checks the SEL log, and combines the expected value, to immediately analyze whether the PCIE configuration space value not meeting the expectation is caused by the BIOS or the OS.

[0118] It should be understood that although each step in the above flowchart is displayed in sequence according to the indication of the arrow, these steps are not necessarily executed in sequence according to the indication of the arrow. Unless explicitly stated in this article, the execution of these steps does not have strict sequence restrictions, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowchart can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.

[0119] In an embodiment, a computer device, which can be a server, has an internal structure diagram as shown in Figure 5 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is used to store extended device configuration difference information. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an extended device detection method.

[0120] In an embodiment, a computer device, which can be a terminal, has an internal structure diagram as shown in Figure 6The computer device shown in the figure includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an expansion device detection method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0121] Those skilled in the art can understand that, Figure 5 or Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0122] In one embodiment, a computer device is provided, including a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:

[0123] When the basic input / output system is started and the operating system is not started, the basic input / output system collects a first expansion device configuration space value and sends it to the baseboard management controller;

[0124] When the basic input / output system is started and the operating system is not started, the basic input / output system collects a first expansion device configuration space value and sends it to the baseboard management controller;

[0125] The baseboard management controller compares the first expansion device configuration space value and the second expansion device configuration space value to obtain expansion device configuration difference information.

[0126] In one embodiment, the processor is connected to one end of a general input / output interface, and the other end of the general input / output interface is connected to the baseboard management controller, and the processor further implements the following steps when executing the computer program:

[0127] The basic input / output system configures one end of the general input / output interface connected to the processor as an interrupt mode;

[0128] configuring another end connected with the general input / output interface as an output mode through the baseboard management controller;

[0129] registering a general input / output interface interrupt function through the basic input / output system.

[0130] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0131] changing a level corresponding to the general input / output interface through the baseboard management controller to trigger an interrupt of the general input / output interface;

[0132] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0133] pulling up the level of the general input / output interface through the baseboard management controller; or

[0134] pulling down the level of the general input / output interface through the baseboard management controller.

[0135] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0136] calling the general input / output interface interrupt function through the basic input / output system;

[0137] collecting a second extended device configuration space value through the general input / output interface interrupt function.

[0138] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0139] sending a command to the baseboard management controller through the intelligent platform management interface.

[0140] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0141] comparing, through the baseboard management controller, whether the first extended device configuration space value and the second extended device configuration space value are the same;

[0142] when not the same, generating, through the baseboard management controller, extended device configuration difference information.

[0143] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0144] writing, through the baseboard management controller, the extended device configuration difference information into a system event log.

[0145] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0146] receiving a log viewing instruction and calling the system event log according to the log viewing instruction.

[0147] An abnormal system is determined through analysis of extended device configuration difference information recorded by a system event log.

[0148] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0149] When the basic input output system is started and the operating system is not started, the first extended device configuration space value is collected by the basic input output system and sent to the baseboard management controller;

[0150] When the basic input output system is started and the operating system is not started, the first extended device configuration space value is collected by the basic input output system and sent to the baseboard management controller;

[0151] The first extended device configuration space value and the second extended device configuration space value are compared by the baseboard management controller to obtain the extended device configuration difference information.

[0152] In one embodiment, the processor is connected to one end of the general input output interface, and the other end of the general input output interface is connected to the baseboard management controller, and the processor further implements the following steps when executing the computer program:

[0153] The one end of the general input output interface connected to the processor is configured as an interrupt mode by the basic input output system;

[0154] The other end of the general input output interface connected to the baseboard management controller is configured as an output mode by the baseboard management controller;

[0155] The general input output interface interrupt function is registered by the basic input output system.

[0156] In one embodiment, the processor further implements the following steps when executing the computer program:

[0157] The level corresponding to the general input output interface is changed by the baseboard management controller to trigger the general input output interface interrupt;

[0158] In one embodiment, the processor further implements the following steps when executing the computer program:

[0159] The level of the general input output interface is pulled high by the baseboard management controller; or

[0160] The level of the general input output interface is pulled low by the baseboard management controller.

[0161] In one embodiment, the processor further implements the following steps when executing the computer program:

[0162] collecting a second extended device configuration space value via a generic input / output interface interrupt function;

[0163] collecting a second extended device configuration space value via a generic input / output interface interrupt function.

[0164] In one embodiment, the processor executing the computer program further implements the following steps:

[0165] sending a command to the baseboard management controller via an intelligent platform management interface.

[0166] In one embodiment, the processor executing the computer program further implements the following steps:

[0167] comparing, via the baseboard management controller, whether the first extended device configuration space value and the second extended device configuration space value are identical;

[0168] generating, via the baseboard management controller, an extended device configuration difference information when not identical.

[0169] In one embodiment, the processor executing the computer program further implements the following steps:

[0170] writing, via the baseboard management controller, the extended device configuration difference information into a system event log.

[0171] In one embodiment, the processor executing the computer program further implements the following steps:

[0172] receiving a log viewing instruction, and calling the system event log according to the log viewing instruction;

[0173] analyzing and determining an abnormal system via the extended device configuration difference information recorded by the system event log.

[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0175] The technical features of the above embodiments can be combined in any way. To make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present disclosure.

[0176] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.

Claims

1. An extended device detection method, applied to a computer device, the computer device comprising a processor and a baseboard management controller, the processor running a basic input output system and an operating system, comprising: collecting, by the basic input output system, first extended device configuration space values when the basic input output system is started and the operating system is not started, and sending the first extended device configuration space values to the baseboard management controller; collecting, by the basic input output system, second extended device configuration space values when the basic input output system is ended and the operating system is started, and sending the second extended device configuration space values to the baseboard management controller; comparing, by the baseboard management controller, the first extended device configuration space values and the second extended device configuration space values to obtain extended device configuration difference information, and locating a device configuration difference position through the extended device configuration difference information; the processor being connected to one end of a general input output interface, and the other end of the general input output interface being connected to the baseboard management controller, the method further comprising: configuring, by the basic input output system, the one end of the general input output interface connected to the processor as an interrupt mode; configuring, by the baseboard management controller, the other end of the general input output interface connected to the baseboard management controller as an output mode; registering, by the basic input output system, a general input output interface interrupt function, wherein the general input output interface interrupt function is used to collect extended device configuration space values and send the extended device configuration space values to the baseboard management controller; wherein, before the collecting, by the basic input output system, of the second extended device configuration space values, further comprising: changing, by the baseboard management controller, a level corresponding to the general input output interface to trigger the general input output interface interrupt; wherein, the changing, by the baseboard management controller, of the level corresponding to the general input output interface comprises: pulling up the level of the general input output interface by the baseboard management controller; or pulling down the level of the general input output interface by the baseboard management controller. the collecting, by the basic input output system, of the second extended device configuration space values comprises: calling, by the basic input output system, the general input output interface interrupt function; collecting, by the general input output interface interrupt function, the second extended device configuration space values. the sending to the baseboard management controller comprises: sending to the baseboard management controller through an intelligent platform management interface command. the comparing, by the baseboard management controller, of the first extended device configuration space values and the second extended device configuration space values to obtain the extended device configuration difference information comprises: comparing, by the baseboard management controller, whether the first extended device configuration space values and the second extended device configuration space values are the same; when not the same, generating, by the baseboard management controller, the extended device configuration difference information. the method further comprising: writing, by the baseboard management controller, the extended device configuration difference information into a system event log. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 2. The method of claim 1, wherein, ​ ​ ​ 3. The method of claim 1, wherein, ​ ​ 4. The method of claim 1, wherein, ​ ​ ​ 5. The method of claim 1, wherein, ​ ​ The method further comprises: receiving a log viewing instruction, and calling the system event log according to the log viewing instruction; An abnormal system is determined through the extended device configuration difference information recorded by the system event log.

6. An extended device detection system for implementing the extended device detection method of any one of claims 1-5, the system comprising a processor and a baseboard management controller, the processor running a basic input / output system and an operating system, comprising: The basic input / output system is configured to collect first extended device configuration space values and send them to the baseboard management controller when the basic input / output system is started and the operating system is not started; and the basic input / output system is configured to collect second extended device configuration space values and send them to the baseboard management controller when the basic input / output system is started and the operating system is started. The baseboard management controller is configured to compare the first extended device configuration space values and the second extended device configuration space values to obtain extended device configuration difference information.

7. The system of claim 6, wherein, The processor and the baseboard management controller are connected through a general input / output interface, wherein: The basic input / output system is configured to configure one end of the general input / output interface connected to the processor as an interrupt mode; The baseboard management controller is configured to configure the other end of the general input / output interface connected to the processor as an output mode; The basic input / output system is configured to register a general input / output interface interrupt function; The general input / output interface interrupt function is configured to collect second extended device configuration space values; The baseboard management controller is configured to pull up or pull down the level of the general input / output interface to trigger the general input / output interface interrupt when the basic input / output system is started and the operating system is started.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1-5.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Detection system and method of PCIE edevices

    CN110377469A

  • Data exception processing method and device, equipment and storage medium

    CN117312034A