Device detection method, electronic device, readable storage medium and program product
By using the device detection method in the server system, using the substrate management controller to obtain optimized connection topology information and adjust the enumeration order, the problem of PCIe equipment being too long is solved, and the enumeration order is matched with the chassis silk screen and high-speed signal integrity.
Patent Information
- Application Number
- CN202411722044.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In server system design, the routing topology design of PCIe devices needs to consider the CPU enumeration order and the design routing order of PCIe adapter equipment, resulting in the traces of PCIe connections being too long in some cases, affecting the integrity of high-speed signals and increase product costs.
Through a device detection method, the board management controller is used to obtain the configuration connection information and actual connection information of the optimized connection topology, and the chassis silkscreen information is obtained in the case of matching, and the default enumeration order is adjusted to obtain the effective enumeration order. Ensure that the device enumeration inspection is consistent with the chassis screen printing.
It is realized that the routing topology is optimized while ensuring that the enumeration sequence is consistent with the chassis screen printing, thereby avoiding the problem of PCIe routing too long, reducing product costs, and improving the integrity of high-speed signals.
Smart Images

Figure CN119226064B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a device detection method, an electronic device, a readable storage medium, and a program product. Background Art
[0002] In server system design, PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard) devices are widely used. As the speed of PCIe devices is getting higher and higher, such as PCIe5.0, which requires a speed of 32Gb / s, the routing topology of PCIe devices is also crucial. That is, the routing loss and anti-interference between the HOST (host) processor and the DEVICE PCIe device (DEVICE) are the focus of attention at all stages of the design, and will also have a great impact on the overall system architecture design and product cost.
[0003] At present, the system topology design of high-speed PCIe devices in servers needs to consider the enumeration order of the CPU itself and the design and routing order of the PCIe adapter device. For example, after the design of the 4-slot NVMe (Non-Volatile Memory express, flash storage protocol) backplane is completed, there is only one fixed slot connection order, either from left to right or from right to left, so that the chassis silk screen design can be displayed as a unified and standardized NVMe hard disk order. Therefore, the connection from the CPU to the motherboard connected to the backplane through the cable also needs to be designed in a certain order so that the PCIe device enumeration order of the CPU itself matches the backplane design order. Then the display order of the device under the system is consistent with the chassis design silk screen.
[0004] However, due to the position of the backplane, the position of the high-speed PCIe connector is affected by multiple factors when designing the motherboard, and the connection is limited by the enumeration order. In some cases, some PCIe connections will be routed very far, thus affecting the integrity of the high-speed signal. In order to meet the high-speed signal integrity, the PCB (Printed Circuit Board) material is increased or a retimer card is added to enhance the signal, which will greatly increase the cost of the product.
[0005] In summary, how to effectively solve the problem of too long PCIe lines is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0006] The purpose of this application is to provide a device detection method, an electronic device, a readable storage medium and a program product, which optimize the routing topology while ensuring that the enumeration order is consistent with the chassis silk screen, thereby avoiding the occurrence of PCIe routing being too long.
[0007] In order to solve the above technical problems, this application provides the following technical solutions:
[0008] A device detection method, applied to a basic input and output system, comprising:
[0009] In the absence of a valid enumeration order, obtaining configuration connection information and actual connection information corresponding to the optimized connection topology; wherein the actual connection information is obtained by scanning slot devices using a baseboard management controller;
[0010] When the configured connection information matches the actual connection information, using the baseboard management controller to obtain chassis silk screen information;
[0011] The default enumeration order is adjusted according to the slot order in the chassis silk-screen information to obtain a valid enumeration order;
[0012] Use the valid enumeration sequence to enumerate and detect the access devices.
[0013] Preferably, the default enumeration order is adjusted with reference to the slot order in the chassis silk-screen information to obtain a valid enumeration order, including:
[0014] On the basis of the default enumeration order, the order is adjusted with reference to the slot order in the chassis silk-screen information to obtain a target enumeration order that is consistent with the slot order;
[0015] Writing the target enumeration sequence into a memory, and locking the target enumeration sequence as a valid enumeration sequence;
[0016] Restart the local device to make the effective enumeration order take effect.
[0017] Preferably, locking the target enumeration order to a valid enumeration order includes:
[0018] Locking the status bit of the memory to read-only;
[0019] The information valid flag of the memory is set to true.
[0020] Preferably, when the configured connection information does not match the actual connection information, the method further includes:
[0021] Output connection error prompt;
[0022] The access devices are enumerated and detected using the default enumeration order.
[0023] Preferably, when the configured connection information does not match the actual connection information, the method further includes:
[0024] After reconnecting according to the process file corresponding to the optimized connection topology, obtain the actual connection information;
[0025] Determine whether the configured connection information matches the newly acquired actual connection information;
[0026] If yes, get the chassis silkscreen information;
[0027] The default enumeration order is adjusted according to the slot order in the chassis silk-screen information to obtain a valid enumeration order;
[0028] Use the valid enumeration sequence to enumerate and detect the access devices.
[0029] Preferably, obtaining the configuration connection information and actual connection information corresponding to the optimized connection topology includes:
[0030] Reading the enumeration sequence from a memory storing the enumeration sequence;
[0031] If the enumeration sequence is not read, or when the information validity flag is false, it is determined that the valid enumeration sequence does not exist, and the configured connection information and the actual connection information are obtained.
[0032] Preferably, obtaining the configuration connection information corresponding to the optimized connection topology includes:
[0033] Get the configuration binary file corresponding to the optimized connection topology;
[0034] Read the configuration connection information from the configuration binary file;
[0035] The process of generating the configuration binary file includes:
[0036] During the system selection process of the production system, obtain the configuration information and connection information of the components corresponding to the optimized connection topology;
[0037] The configuration information and connection information are converted into a configuration binary file.
[0038] Preferably, obtaining actual connection information corresponding to the optimized connection topology includes:
[0039] Get the actual binary file corresponding to the optimized wiring topology;
[0040] Read the actual connection information from the actual binary file;
[0041] The actual binary file generation process includes:
[0042] The baseboard management controller is used to scan the slots to obtain board device information, slot information, and port information connected to the slots;
[0043] The board device information, slot information and port information connected to the slot are converted into actual binary files.
[0044] Preferably, using the baseboard management controller to obtain chassis silk screen information includes:
[0045] The baseboard management controller is used to scan the slots to obtain board device information, slot information, and port information connected to the slots;
[0046] Determine the physical silk screen of the slot and the slot sequence by using the board device information, slot information and the port information connected to the slot;
[0047] The slot physical silk screen and the slot sequence are determined as the chassis silk screen information.
[0048] Preferably, determining whether the configured connection information matches the actual connection information includes:
[0049] Determine whether the configuration connection information is consistent with the actual connection information;
[0050] If yes, determining that the configured connection information matches the actual connection information;
[0051] If not, it is determined that the configured connection information does not match the actual connection information.
[0052] Preferably, enumerating and detecting access devices using a valid enumeration sequence includes:
[0053] Detect access devices one by one in the valid enumeration order;
[0054] The detection results are output on the display interface.
[0055] Preferably, it also includes:
[0056] Get the new configuration connection information corresponding to the new optimized connection topology;
[0057] Acquire new actual connection information after assembling the cables according to the process file corresponding to the new optimized connection topology;
[0058] Determining whether the newly configured connection information matches the new actual connection information;
[0059] If yes, adjust the default enumeration order with reference to the slot order in the chassis silk-screen information to obtain a new valid enumeration order;
[0060] Use the new effective enumeration order to enumerate and detect the access devices.
[0061] An electronic device, comprising:
[0062] Memory for storing computer programs;
[0063] A processor is used to implement the steps of the above-mentioned device detection method when executing the computer program.
[0064] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned device detection method are implemented.
[0065] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned device detection method.
[0066] The method provided by the embodiment of the present application includes: a basic input and output system obtains configuration connection information and actual connection information corresponding to an optimized connection topology; wherein the actual connection information is obtained by scanning slot devices using a baseboard management controller; when the configuration connection information and the actual connection information match, the baseboard management controller is used to obtain chassis silk screen information; the default enumeration order is adjusted with reference to the slot order in the chassis silk screen information to obtain a valid enumeration order; and access devices are enumerated and detected using the valid enumeration order.
[0067] In the present application, the basic input and output system can obtain the configuration connection information and actual connection information corresponding to the optimized connection topology; wherein, the actual connection information is obtained by scanning the slot devices using the baseboard management controller. By comparing the two, when it is clear that the configuration connection information and the actual connection information match, it indicates that the current actual connection is consistent with the configuration, that is, the actual connection at this time is the optimized connection topology, that is, there is no long-distance routing in the actual connection at this time. In this case, the chassis silk screen information can be obtained through the baseboard management controller, and then the default enumeration order can be adjusted with reference to the slot order therein to obtain a valid enumeration order. When enumerating devices, the valid enumeration order can be used to enumerate and detect the access devices.
[0068] The technical effect of the present application is as follows: Due to the optimized wiring topology, there is no long-distance routing. By adjusting the default enumeration order based on the slot order in the chassis silk-screen information, the confusion of the enumeration order caused by the optimized topology can be avoided. When performing device enumeration detection, the device enumeration that conforms to the slot order can be achieved. In other words, the present application can optimize the routing topology while ensuring that the enumeration order is consistent with the chassis silk-screen, thereby avoiding the occurrence of PCIe routing that is too long.
[0069] Correspondingly, the embodiments of the present application also provide a device detection apparatus, a device, a readable storage medium and a computer program product corresponding to the above-mentioned device detection method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0071] Figure 1 This is a flow chart of an implementation method of a device detection method in an embodiment of the present application;
[0072] Figure 2 This is a specific implementation flow chart of a device detection method in an embodiment of the present application;
[0073] Figure 3 This is a functional schematic diagram of a system menu module in an embodiment of the present application;
[0074] Figure 4 This is a schematic diagram of enumeration order storage in an embodiment of the present application;
[0075] Figure 5 This is a schematic diagram of executing an enumeration sequence method in an embodiment of the present application;
[0076] Figure 6 This is a schematic diagram of an enumeration order and optimal connection topology in an embodiment of the present application;
[0077] Figure 7 This is a schematic diagram of the structure of a device detection device in an embodiment of the present application;
[0078] Figure 8 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0079] Fig. 9 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0081] Please refer to Figure 1 , Figure 1 This is a flow chart of a device detection method in an embodiment of the present application. The method can be applied to a basic input and output system in a server. The method includes the following steps:
[0082] S101. In the absence of a valid enumeration order, obtain configuration connection information and actual connection information corresponding to the optimized connection topology.
[0083] The actual connection information is obtained by scanning the slot devices using the baseboard management controller.
[0084] After the BIOS (Basic Input-Output System) in the server is powered on, it can be determined whether there is a valid enumeration sequence. If it is determined that there is no valid enumeration sequence, the configuration connection information and actual connection information corresponding to the optimized connection topology can be obtained.
[0085] The enumeration sequence may be stored in a memory, and whether the enumeration sequence stored in the memory is valid may be marked by information such as a valid identifier.
[0086] In a specific implementation of the present application, obtaining the configuration connection information and the actual connection information corresponding to the optimized connection topology includes:
[0087] Reading the enumeration sequence from a memory storing the enumeration sequence;
[0088] If the enumeration sequence is not read, or when the information validity flag is false, it is determined that the valid enumeration sequence does not exist, and the configuration connection information and the actual connection information are obtained.
[0089] That is, determine whether there is a valid enumeration order, including:
[0090] Step 1: Read the enumeration sequence from the memory storing the enumeration sequence;
[0091] Step 2: If the enumeration sequence is read, then the information valid flag of the memory is read, and when the information valid flag is true, it is determined that there is a valid enumeration sequence;
[0092] Step 3: If the enumeration sequence is not read, or if the information validity flag is false, it is determined that a valid enumeration sequence does not exist.
[0093] That is, the enumeration order can be read from the memory storing the enumeration order. After the enumeration order is read, the information valid flag in the memory can be read, so as to determine whether the read enumeration order is valid based on the information valid flag. Specifically, when the information valid flag is true, the read enumeration order is a valid enumeration order, and when the information valid flag is false, the read enumeration order is not a valid enumeration order. In addition, if the enumeration order is not read from the memory, it also indicates that the valid enumeration order does not exist.
[0094] In this embodiment, the configuration connection information and the actual connection information can be obtained in real time or by reading a pre-acquired and stored file. The configuration connection information can be obtained based on a configuration file or configuration information, and the actual connection information can be determined by device detection or obtained through external input.
[0095] In a specific implementation of the present application, obtaining configuration connection information corresponding to the optimized connection topology includes:
[0096] Get the configuration binary file corresponding to the optimized connection topology;
[0097] Read configuration connection information from the configuration binary file;
[0098] The process of generating the configuration binary file includes:
[0099] During the system selection process of the production system, obtain the configuration information and connection information of the components corresponding to the optimized connection topology;
[0100] Convert configuration information and connection information into a configuration binary file.
[0101] For ease of description, the above steps are combined for explanation below.
[0102] In this embodiment, accurate configuration connection information can be quickly acquired with the help of the production system. Specifically, the configuration binary file can be output based on the system menu module.
[0103] Among them, the system menu module can support front-end personnel to output BOM (bill of materials) after configuration selection according to customer needs, which is used for order preparation and production. The design input of this menu module is a limited relationship sorted out by system engineers and BOM engineers according to the configuration requirements of the project. The overall logic is that after selecting a PCIe device, the relevant components and the corresponding structural parts, boards, cables, etc. that support the installation of the components will be associated. Therefore, when sorting out this logical relationship, the location of component installation, board installation, and cable installation location information have been clarified.
[0104] In actual applications, the menu module can be redesigned to have an installation information conversion module built into it, which is used to output the configuration, installation and connection information of each component and board into a binary file A (configuration binary file) with all installation information features. In this way, when the system is selected, in addition to outputting a BOM according to the original design, a binary file A including all installation and connection information features is also output.
[0105] When obtaining the configuration connection information, the binary file A can be directly obtained and read to obtain the configuration connection information.
[0106] In a specific implementation of the present application, obtaining actual connection information corresponding to the optimized connection topology includes:
[0107] Get the actual binary file corresponding to the optimized wiring topology;
[0108] Read the actual connection information from the actual binary file;
[0109] The actual binary file generation process includes:
[0110] Use the baseboard management controller to scan the slots to obtain board device information, slot information, and port information connected to the slots;
[0111] Convert the board device information, slot information and the port information connected to the slot into actual binary files.
[0112] For ease of description, the above steps are combined for explanation below.
[0113] The current actual connection information can be scanned according to the BMC management module. Specifically, the physical silkscreen of the slots of each PCIe device under the current server configuration can be determined according to the I2C (Inter-Integrated Circuit, serial communication bus protocol) scanning sequence of the PCIe slot device designed and planned by the server system, the BMC sequentially scans the device status of each slot, and the slot device ID (identity, identification number) information. For example, if the I2C of the front window backplane BP0 is defined, and a 4x3.5anybay (hard disk backplane) backplane is scanned, it means that the front window is allocated with 4 slots that can support NVMe U.2, and the physical slot silkscreen is 0, 1, 2, 3, and the order is the order supported by the backplane, such as from left to right (from the front window). Similarly, for the I2C defined as riser0 in the rear window A area, a 3x16 riser is scanned, that is, there are 3 slots in the rear window A area that can support PCIe, and the physical slots are printed as PCIe0, PCIe1, and PCIe2, in the order of the silk screen support of the rear window chassis from bottom to top (from the rear window). Similarly, the remaining PCIe slot devices such as E3.S / E1.S backplane, OCP (Open Compute Project, interface conversion) adapter board, M.2 riser (an adapter card used to connect M.2 interface devices to the motherboard or other interfaces), M.2 (an interface specification for internal expansion of the computer) backplane, etc. At the same time, the PCIe port information of the CPU connected to each PCIe device slot is scanned through the currently designed PCIe location (location on the motherboard) solution. That is, the current actual board device, slot, and PCIe port information connected to the slot are completed, that is, the currently configured installation connection information. In the BMC, the installation connection information actually scanned by the BMC management module can be converted into a binary file B (actual binary file) through a built-in installation information conversion module (the same as the built-in installation information conversion module in the system generation module).
[0114] When it is necessary to obtain the actual connection information, the binary file B can be directly obtained and the actual connection information can be read therefrom.
[0115] S102: When the configured connection information matches the actual connection information, the chassis silk screen information is obtained by using the baseboard management controller.
[0116] It should be noted that the configured connection information and the actual connection information need to correspond to the optimized connection topology. In other words, the configured connection information needs to correspond to the optimized connection topology, and the actual connection information also needs to correspond to the optimized connection topology. Specifically, the configuration of overly long connections should be avoided in the connection configuration information, and there should be no long-distance wiring in the actual connection.
[0117] Therefore, in this embodiment, the configuration connection information and the actual connection information need to be checked for matching, and when the two are clearly matched, the chassis silk screen information is obtained using the BMC. The matching of the configuration connection information and the actual connection information indicates that the actual connection corresponds to the configuration connection, and the actual connection is also optimized topology, and there is no long distance connection.
[0118] When determining whether the configured connection information matches the actual connection information, attention may be paid to comparing whether both ends of each connection in the configured and actual connections are the same, thereby determining whether the two match.
[0119] In a specific implementation of the present application, determining whether the configured connection information matches the actual connection information includes:
[0120] Determine whether the configuration connection information is consistent with the actual connection information;
[0121] If so, determining that the configured connection information matches the actual connection information;
[0122] If not, it is determined that the configured connection information does not match the actual connection information.
[0123] Specifically, to determine whether the content of information from two different sources is consistent, you can pay attention to whether each connection is consistent, or you can arrange the information in a fixed order to calculate the hash value of the two information and determine whether they are consistent based on the hash value, or you can directly subtract or divide the information and determine whether they are consistent based on the calculation result. When the two are consistent, it means that the two match, otherwise, it means that the two do not match.
[0124] In a specific implementation of the present application, obtaining chassis silk screen information includes:
[0125] Use the baseboard management controller to scan the slots to obtain board device information, slot information, and port information connected to the slots;
[0126] Use the board device information, slot information, and the port information connected to the slot to determine the slot physical silk screen and slot sequence;
[0127] The physical silk screen of the slot and the slot sequence are determined as the chassis silk screen information.
[0128] For ease of description, the above steps are combined for explanation below.
[0129] The chassis silk screen information can be obtained with the help of BMC. Specifically, according to the I2C scanning sequence of the PCIe slot devices designed and planned by the server system, the BMC sequentially scans the status of the devices in each slot and the slot device ID information to determine the physical silk screen of the slots of each PCIe device under the current server configuration. For example, the I2C of the front window backplane BP0 is defined, and a 4x3.5 anybay backplane is scanned, that is, the front window is allocated with 4 slots that support NVMe U.2, and the physical slots are silk-screened as 0, 1, 2, 3, and the order is the order supported by the backplane from left to right (viewed from the front window); the I2C of riser0 defined as the rear window area A is scanned with a 3x16 riser, that is, the rear window area A is allocated with 3 slots that support PCIe, and the physical slots are silk-screened as PCIe0, PCIe1, PCIe2, and the order is the order supported by the rear window chassis silk-screen from bottom to top (viewed from the rear window); and so on, the remaining PCIe slot devices such as E3.S / E1.S backplane, OCP adapter board, M.2 riser, M.2 backplane, etc.
[0130] S103. Adjust the default enumeration order with reference to the slot order in the chassis silk-screen information to obtain a valid enumeration order.
[0131] Since the connections in the embodiments of the present application correspond to the optimized topology, the actual connections between devices may not be completely consistent with the default enumeration order. Therefore, if the devices are still enumerated according to the default enumeration order, the enumeration order and the chassis silk screen, as well as the enumeration display, will be confused. Therefore, in this embodiment, the default enumeration order is adjusted with reference to the slot order in the chassis silk screen information to obtain an effective enumeration order. In other words, in this embodiment, the default enumeration order needs to be adjusted to be consistent with the slot order, or in other words, the effective enumeration order is consistent with the slot order.
[0132] In a specific implementation of the present application, the default enumeration order is adjusted with reference to the slot order in the chassis silk-screen information to obtain a valid enumeration order, including:
[0133] Based on the default enumeration order, the order is adjusted according to the slot order in the chassis silk-screen information to obtain a target enumeration order that is consistent with the slot order;
[0134] Write the target enumeration sequence into the memory, and lock the target enumeration sequence as a valid enumeration sequence;
[0135] Restart the local device for the effective enumeration order to take effect.
[0136] For ease of description, the above steps are combined for explanation below.
[0137] When the enumeration order is adjusted, the default enumeration order is used as the basis, and the order is adjusted with reference to the slot order, so as to obtain a target enumeration order that is consistent with the slot order. Then, the target enumeration order is written into the memory, and the target enumeration order is locked as the effective enumeration order. In order to make the target enumeration order effective, the local device will be restarted.
[0138] Among them, the lock target enumeration order is a valid enumeration order, including:
[0139] Lock the memory status bits as read-only;
[0140] Set the memory information valid flag to true.
[0141] After the memory status bit is adjusted to read-only, the target enumeration sequence stored in the memory can only be read, and the target enumeration sequence cannot be changed when the status bit remains in the read-only state. Setting the memory information valid flag bit to true can be used to determine whether there is a valid enumeration sequence.
[0142] S104: Enumerate and detect access devices using a valid enumeration sequence.
[0143] The effective enumeration sequence corresponds to the actual connection after the topology is optimized and also matches the slot sequence. Therefore, by using the effective enumeration sequence to enumerate and detect the access device, it can be ensured that the enumeration result matches the chassis silk screen and the enumeration information display is standardized.
[0144] Among them, access devices include GPU (Graphics Processing Unit), network card, NVMe hard disk, PCIe memory card, etc.
[0145] In a specific implementation of the present application, enumeration detection is performed on access devices using a valid enumeration sequence, including:
[0146] Detect access devices one by one in the valid enumeration order;
[0147] The detection results are output on the display interface.
[0148] That is, when enumerating, the access devices can be detected one by one based on the effective enumeration order, and the detection results can be output in the real interface.
[0149] The method provided by the embodiment of the present application includes:
[0150] The basic input and output system obtains the configuration connection information and actual connection information corresponding to the optimized connection topology; wherein the actual connection information is obtained by scanning the slot devices using the baseboard management controller; when the configuration connection information and the actual connection information match, the chassis silk screen information is obtained using the baseboard management controller; the default enumeration order is adjusted with reference to the slot order in the chassis silk screen information to obtain the effective enumeration order; and the access device is enumerated and detected using the effective enumeration order.
[0151] In the present application, the basic input and output system can obtain the configuration connection information and actual connection information corresponding to the optimized connection topology; wherein, the actual connection information is obtained by scanning the slot devices using the baseboard management controller. By comparing the two, when it is clear that the configuration connection information and the actual connection information match, it indicates that the current actual connection is consistent with the configuration, that is, the actual connection at this time is the optimized connection topology, that is, there is no long-distance routing in the actual connection at this time. In this case, the chassis silk screen information can be obtained through the baseboard management controller, and then the default enumeration order can be adjusted with reference to the slot order therein to obtain a valid enumeration order. When enumerating devices, the valid enumeration order can be used to enumerate and detect the access devices.
[0152] The technical effect of the present application is as follows: Due to the optimized wiring topology, there is no long-distance routing. By adjusting the default enumeration order based on the slot order in the chassis silk-screen information, the confusion of the enumeration order caused by the optimized topology can be avoided. When performing device enumeration detection, the device enumeration that conforms to the slot order can be achieved. In other words, the present application can optimize the routing topology while ensuring that the enumeration order is consistent with the chassis silk-screen, thereby avoiding the occurrence of PCIe routing that is too long.
[0153] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.
[0154] In a specific implementation manner of the present application, when the configured connection information and the actual connection information do not match, the method further includes:
[0155] Step 1: Output connection error prompt;
[0156] Step 2: Use the default enumeration order to enumerate and detect the access devices.
[0157] For ease of description, the above steps are combined for explanation below.
[0158] When it is found that the configuration connection information does not match the actual connection information, it means that there is an error in the configuration connection or the actual connection. At this time, a connection error prompt may appear so that the administrator can readjust the connection. At this time, when enumerating devices, the default enumeration order can be used directly to enumerate and detect the access devices.
[0159] In a specific implementation manner of the present application, when the configured connection information and the actual connection information do not match, the method further includes:
[0160] Step 1: After reconnecting according to the process file corresponding to the optimized connection topology, obtain the actual connection information;
[0161] Step 2: Determine whether the configured connection information matches the newly acquired actual connection information;
[0162] Step 3. If yes, obtain the chassis silk screen information;
[0163] Step 4: Adjust the default enumeration order according to the slot order in the chassis silk-screen information to obtain a valid enumeration order;
[0164] Step 5: Use the valid enumeration sequence to enumerate and detect the access devices.
[0165] For ease of description, the above steps are combined for explanation below.
[0166] When it is found that the configured connection information does not match the actual connection information, you can reconnect. Specifically, you can optimize the process file corresponding to the connection topology to reconnect. Then, obtain the actual connection information again. The method of obtaining the actual connection information is the same as the method of obtaining the actual connection information for the first time, and will not be repeated here.
[0167] Then, determine whether the configured connection information matches the newly acquired actual connection information. If they match, the chassis silk screen information can be obtained, and the default enumeration order can be adjusted based on the slot order to obtain a valid enumeration order, and then the access device is enumerated and detected based on the valid enumeration order.
[0168] If they do not match, you can go back and rewire them. In this way, you can redetermine the effective enumeration order again after discovering the wiring error.
[0169] In a specific implementation of the present application, it also includes:
[0170] Get the new configuration connection information corresponding to the new optimized connection topology;
[0171] Obtain new actual connection information after assembling cables according to the process file corresponding to the new optimized connection topology;
[0172] Determine whether the new configuration connection information matches the new actual connection information;
[0173] If yes, adjust the default enumeration order according to the slot order in the chassis silkscreen information to obtain a new valid enumeration order;
[0174] Use the new effective enumeration order to enumerate and detect the access devices.
[0175] For ease of description, the above steps are combined for explanation below.
[0176] When configuration modification is required, the authorized operation and maintenance personnel or the authorized personnel will unlock and clear the valid identification bit of the information in the enumeration order to re-adapt and adjust the configuration information. The adjustment process is the same as the adaptive adjustment process during the production of the new configuration. That is, the new configuration connection information corresponding to the new optimized connection topology will be obtained first. Then, after organizing the cables based on the process files, the new actual connection information is obtained. When the new configuration connection information and the new actual connection information match, the default enumeration order is adjusted to obtain a new effective enumeration order. Finally, the access devices are enumerated and detected according to the new effective enumeration order. For how to determine whether the information matches, how to adjust the order, and how to perform enumeration and other same or similar operations, please refer to the description of the above embodiment, which will not be repeated here.
[0177] In a specific implementation of the present application, it also includes:
[0178] Use BMC to read the valid enumeration order in storage;
[0179] The effective enumeration order is displayed in the visual interface.
[0180] The valid enumeration sequence exists in the form of a binary file. That is, the BMC reads the valid enumeration sequence information locked in the memory and then displays it on the web interface for reference or knowledge by operation and maintenance or debug personnel.
[0181] To facilitate those skilled in the art to better understand and implement the device detection method provided in the embodiment of the present application, the device detection method is described in detail below with reference to a specific application scenario as an example.
[0182] The system topology design of the server's high-speed PCIe devices needs to consider the enumeration order of the CPU itself and the design and routing order of the PCIe adapter device. For example, after the 4-slot NVMe backplane is designed, there is only one fixed slot connection order, either from left to right or from right to left, so that the chassis silk screen design can be displayed as a unified and standardized NVMe hard disk order. Therefore, the connection from the CPU to the motherboard connected to the backplane through the cable needs to be designed in a certain order so that the CPU's own PCIe device enumeration order matches the backplane design order. Then the display order of the device under the system is consistent with the chassis design silk screen.
[0183] However, due to the position of the backplane, the position of the high-speed PCIe connector during motherboard design is affected by multiple factors, and the connection is limited by the enumeration order. In some cases, the wiring will be very long, affecting the integrity of the high-speed signal. In order to meet the high-speed signal integrity, the PCB board material is increased or a retimer card is added for signal enhancement, which greatly increases the cost of the product. For example, in some cases, to ensure the normal connection order, the NVMe3-4 and NVMe9-10 cables need to be pulled from one side of the motherboard to the other side in front.
[0184] It should be noted that the reason why it cannot be exchanged with other cables is that the NVMe order of the backplane is fixed due to the backplane and chassis design. In order to ensure signal quality, the high-speed connector of the motherboard needs to be kept close to the CPU and cannot be adjusted over a large range.
[0185] To solve this problem, there are several solutions:
[0186] Solution 1: Ignore the inconsistency of the enumeration order, and only ensure consistency with the external silk screen under the BMC display through firmware design, without considering the default enumeration order under the BIOS and the system. That is, give priority to ensuring the optimization of cable connection, and the firmware tries to perform silk screen consistency conversion and design. For example, when configuring the front window NVMe, give priority to ensuring the optimal topology of cable connection (that is, do not go around far, but connect nearby). This method can only be applied to some customers who have no order requirements under the system or BIOS, and there is still a certain problem of inconsistent order for operation and maintenance.
[0187] Solution 2: Under a specific product, according to the current motherboard design and the distribution of PCIe devices on the front and back windows, a fixed BIOS order is adjusted to adapt to the current configuration, which can ensure that the PCIe device enumeration order matches the optimal routing topology of the current configuration. Adjust the BIOS enumeration order to adapt to the currently connected NVMe hard disk order and solve the hard disk disorder problem caused by routing optimization.
[0188] However, this method can generally only be used for specific product configurations and cannot meet the universal requirements of multiple different types of products on different platforms. In order to achieve cost optimization, design reuse and module reuse between different products and different platforms must be considered.
[0189] Similarly, similar problems exist in other PCIe devices, such as network cards and GPU cards in the rear PCIe slots.
[0190] In addition, there is actually a problem of inconsistent order and chaotic display between different PCIe devices. For example, there is a network controller device sandwiched between three memory controllers.
[0191] Solution 4: Set the priority of the PCIe port provided by the server according to the default priority identifier and store the set default priority identifier in the identifier register; change the default priority identifier corresponding to the PCIe device connected to the PCIe port through the peripheral board card in the identifier register to the first priority identifier; the interconnection device includes a priority setting module, which is used to change the first priority identifier corresponding to the PCIe device connected to the PCIe port through the peripheral board card in the identifier register to the dynamic priority identifier. Through this interconnection device, the priority of the PCIe device that has been set with a priority identifier on the peripheral board card can be changed again.
[0192] The priorities of PCIe device boards are enumerated, and multiple PCIe ports and multiple PCIe devices may be connected to one PCIe device board (for example, 12 NVMe hard disk backplanes on the front window have 6 X8 PCIe port connections). This method cannot distinguish the connection relationship between the hard disks and cables on this backplane, and then adjust the corresponding priorities. The devices on this device board can only be sorted by default as one priority, which cannot solve the problem of long and difficult wiring of multiple PCIe devices of the same type on one priority board.
[0193] In addition, this solution aims to solve the problem that PCIe devices need to be given priority and cables are difficult to adjust. In general scenarios where no priority is given, it is impossible to solve the problem of keeping the enumeration order of the same PCIe devices consistent with the chassis silk screen.
[0194] Therefore, the above-mentioned methods for detecting the PCIe device enumeration order of the server have the following defects:
[0195] 1. The routing is guaranteed to be smooth, but the enumeration order cannot be guaranteed to match the silk screen, or it can be guaranteed to match the silk screen, but the routing is difficult to route around.
[0196] 2. It cannot solve the problem that different enumeration orders need to be automatically set to match the silk screen according to routing optimization under the same device.
[0197] 3. The order of different PCIe devices is mixed and chaotic.
[0198] 4. There are problems such as inconsistent enumeration order on different platforms, non-shared cables and non-reusable designs.
[0199] In order to address the deficiencies of these solutions, the present application provides an enumeration detection method for adaptive PCIe device connection sequence. First, the system menu module is designed to generate configuration connection information, and the current actual connection information is scanned by the BMC management module. When the BMC module scan information is compared with the configuration connection information generated by the menu module, the BIOS automatically adjusts the enumeration order to match the chassis silk screen, and refreshes the enumeration order memory and locks it.
[0200] When the configuration needs to be changed, you only need to modify the configuration according to the new configuration requirements and re-select the menu to generate the connection information of the new configuration, and then perform the same operation after importing.
[0201] Through this application, the shortcomings of the existing enumeration detection method can be compensated, and the server system design can be implemented without considering the influence of the PCIe device enumeration order. The system topology design can be performed according to the optimal routing. It can also meet the actual production process. The PCIe enumeration order must be consistent with the chassis silk screen, and at the same time meet the unified display requirements of different platforms.
[0202] Please refer to Figure 2 , a binary file A with configuration connection information can be generated through the system menu module, and the BMC obtains the actual connection information and generates a binary file B with the actual connection information.
[0203] When the BIOS is powered on for the first time, the information of the enumeration order loaded and stored is empty or the valid mark of the enumeration order in the memory is not set, and the installation connection information B transmitted by the BMC is compared with the information A generated by the system menu. After the judgment is consistent, the BIOS enumeration order adjustment is automatically performed.
[0204] The specific method of adjustment is to adjust the PCIe port enumeration order according to the order of the slots according to the order of the current slots and the corresponding PCIe port information on the slots. After the adjustment, the BIOS performs a corresponding restart operation to make the modified enumeration order effective, and writes the adjusted enumeration information into the memory for storage, sets the enumeration order valid flag bit and locks it.
[0205] When the power is turned on again, the BIOS directly loads the enumeration sequence and starts the computer normally after judging that the enumeration sequence is valid based on the memory. When configuration modification is required, authorized maintenance personnel or authorized personnel are required to unlock and clear the enumeration sequence flag to re-adapt and adjust the configuration information. The adjustment method is the adaptive adjustment method for new configuration production.
[0206] Among them, by redesigning the menu module, such as Figure 3 As shown, an installation connection information conversion module can be built into the menu module to output the configuration installation and connection information of each component and board into a binary file with all installation connection information features. When the system is selected, in addition to outputting a BOM according to the original design, a binary file A including all installation connection information features is also output.
[0207] The baseboard management controller (BMC) is a core system management module with programmable firmware that can implement various health status management functions such as server system power management, voltage management, and temperature management. In this application, the BMC management module is used to read the information of each PCIe slot device (backplane, riser, etc.) and to realize the correspondence between each PCIe port information and slot in combination with the PCIe location solution. At the same time, the installation information is converted into a binary file B by installing the connection information conversion module.
[0208] The motherboard is designed for the storage module circuit of BIOS enumeration sequence storage, supports S5 power supply, that is, AC power supply is powered on, supports BIOS and BMC to read together, and can be locked as read-only by writing the status bit. The design of the relevant circuit topology is shown as follows Figure 4 .
[0209] Please refer to Figure 5 , a computer system with a central processing unit as the core, designed to support multiple PCIe ports, which are connected to PCIe slot devices (backplane, riser, etc.) through cables to expand the PCIe slot interface of the entire machine. In this application, the processor system not only expands the external PCIe standard slot interface of the entire machine, but also reads the enumeration information of the storage module through I2C during the power-on process by the BIOS firmware (running on the motherboard) and performs storage information valid identification position and clearing and status locking processing. At the same time, when the installation connection information generated by the menu system and the installation connection information scanned by the BMC are compared, the BIOS automatically adjusts the BIOS enumeration order according to the chassis silk screen consistency requirements, and writes the storage module enumeration information at the same time.
[0210] For example, a 2U dual-socket server with 12 NVMe drives on the front panel (3 4x3.5 anybay backplanes), the slot silkscreen order and the optimal connection order are as follows: Figure 6 , built-in DC-SCM template (BMC management module).
[0211] Step 1: The system menu module generates the installation connection information binary file A (the specific information included corresponds to Table 1):
[0212] Table 1, Table 1 is the I2C planning table for the front and rear window PCI slot devices
[0213]
[0214] The process of generating Table 1 is as follows: 12 NVMe hard disks are input into the front-end menu, a 12-disk chassis is used, and three 4x3.5NVMe backplanes are installed.
[0215] The menu system is transformed according to the constraints:
[0216] 1. When 12 NVMes use three 4x3.5NVMe backplanes, six high-speed MCIO (Micro Connector Input / Output, miniaturized input / output interface) cables are required, each with an X8 bandwidth supporting two NVMe hard drives.
[0217] 2. According to the constraint hard disk installation rules, three identical NVMe backplanes are installed in sequence at the BP0 / BP1 / BP2 positions on the front window.
[0218] 3. Design the routing topology according to the constraint system, and bring out the following Figure 6 The 6 connecting lines are accompanied by wiring relationship information, that is, which port on the mainboard a certain line goes to which port on the backplane at which position.
[0219] 4. The installation connection information as shown in Table 1 is converted into a binary file through the information conversion module and passed to the production system together with the generated BOM list.
[0220] Step 2: BMC scans the devices under each I2C and finds the corresponding backplane BOARDID (backplane identification) under the I2C channel in the above table. Then, based on the ID, it is confirmed that the backplane specification is 4x3.5anybay. Therefore, the physical silkscreen information of the device slot is initially identified as shown in Table 2:
[0221] Table 2, Table 2 is the front window PCI slot device scan physical slot screen print table
[0222]
[0223] At the same time, through the PCIe location solution (such as through the I2C signal in the high-speed connector, BMC writes port information to the EEPROM (Electrically Erasable Programmable read only memory) of each device, and then uses another way to scan the EEPROM result to determine the PCIe port location of the cable connection), complete the port information scan of each slot and correspond. The scan results are the same as Table 1. BMC generates the installation connection information binary file B through the information conversion module.
[0224] Step 3: After the machine is assembled, the BIOS is powered on and reads the storage module enumeration information. It is found to be empty, the enumeration information valid flag is not set, and the lock state is not locked. The binary file A delivered by the production system and the binary file B delivered by the BMC are compared and found to be consistent. The BIOS enumeration order is adjusted. The default BIOS enumeration order and the adjusted enumeration order are shown in Table 3.
[0225] Table 3, Table 3 is a comparison table of the adjustment order of the front window PCI slot device enumeration
[0226]
[0227] Step 4: The BIOS writes the adjusted enumeration information in the above table into the storage module, sets the information valid bit and the lock status bit, and performs a restart operation.
[0228] Step 5: After the BIOS is powered on, it reads the storage module information and finds that the enumeration information is not empty and the valid information bit is set, that is, the enumeration information is loaded and the enumeration is run normally.
[0229] Step 6: BMC reads the storage module enumeration information and displays it on the web interface.
[0230] This application aims at the current PCIe device enumeration order and silk screen matching limitations, which lead to difficulties in system routing topology design and the defect of high-speed signal integrity failure leading to cost increase. At the same time, the shortcomings of the existing solutions are solved, and an adaptive PCIe device connection order enumeration method is provided. First, the configuration connection information is generated by designing a system menu module, and the current actual connection information is scanned by the BMC management module. When the BMC module scan information is compared with the configuration connection information generated by the menu module, the BIOS automatically adjusts the enumeration order to match the chassis silk screen, and refreshes the enumeration order memory and locks it.
[0231] If you need to change the configuration, it is equivalent to producing a new configuration. You only need to modify the configuration according to the new configuration requirements and re-select the menu to generate the connection information of the new configuration. After importing, perform the same operation.
[0232] This application can make up for the shortcomings of existing detection methods, and can achieve server system design without considering the influence of PCIe device enumeration order, and perform system topology design according to the optimal routing. It can also meet the requirements of consistent PCIe enumeration order and chassis silk screen printing in actual production, and meet the unified display requirements of different platforms. It has strong wide applicability and flexibility, enhances the flexibility of server system design, and improves the reuse rate of various modules and cables.
[0233] Corresponding to the above method embodiment, the embodiment of the present application further provides a device detection apparatus applicable to BIOS. The device detection apparatus described below and the device detection method described above can refer to each other.
[0234] See also Figure 7 As shown, the device includes the following modules:
[0235] The connection information acquisition module 101 is used to acquire the configuration connection information and the actual connection information corresponding to the optimized connection topology; wherein the actual connection information is obtained by scanning the slot devices using the baseboard management controller;
[0236] The silk screen information acquisition module 102 is used to acquire the chassis silk screen information by using the baseboard management controller when the configured connection information matches the actual connection information;
[0237] The sequence adjustment module 103 is used to adjust the default enumeration sequence with reference to the slot sequence in the chassis silk-screen information to obtain a valid enumeration sequence;
[0238] The enumeration detection module 104 is used to perform enumeration detection on the access devices using a valid enumeration sequence.
[0239] The device provided by the embodiment of the present application includes: a basic input and output system obtains configuration connection information and actual connection information corresponding to the optimized connection topology; wherein the actual connection information is obtained by scanning slot devices using a baseboard management controller; when the configuration connection information and the actual connection information match, the baseboard management controller is used to obtain the chassis silk screen information; the default enumeration order is adjusted with reference to the slot order in the chassis silk screen information to obtain a valid enumeration order; and the access device is enumerated and detected using the valid enumeration order.
[0240] In the present application, the basic input and output system can obtain the configuration connection information and actual connection information corresponding to the optimized connection topology; wherein, the actual connection information is obtained by scanning the slot devices using the baseboard management controller. By comparing the two, when it is clear that the configuration connection information and the actual connection information match, it indicates that the current actual connection is consistent with the configuration, that is, the actual connection at this time is the optimized connection topology, that is, there is no long-distance routing in the actual connection at this time. In this case, the chassis silk screen information can be obtained through the baseboard management controller, and then the default enumeration order can be adjusted with reference to the slot order therein to obtain a valid enumeration order. When enumerating devices, the valid enumeration order can be used to enumerate and detect the access devices.
[0241] The technical effect of the present application is as follows: Due to the optimized wiring topology, there is no long-distance routing. By adjusting the default enumeration order based on the slot order in the chassis silk-screen information, the confusion of the enumeration order caused by the optimized topology can be avoided. When performing device enumeration detection, the device enumeration that conforms to the slot order can be achieved. In other words, the present application can optimize the routing topology while ensuring that the enumeration order is consistent with the chassis silk-screen, thereby avoiding the occurrence of PCIe routing that is too long.
[0242] In a specific implementation of the present application, the sequence adjustment module is specifically used to adjust the sequence based on the default enumeration sequence with reference to the slot sequence in the chassis silk-screen information to obtain a target enumeration sequence whose sequence is consistent with the slot sequence;
[0243] Write the target enumeration sequence into the memory, and lock the target enumeration sequence as a valid enumeration sequence;
[0244] Restart the local device for the effective enumeration order to take effect.
[0245] In a specific implementation of the present application, the sequence adjustment module is specifically used to lock the status bit of the memory to read-only;
[0246] Set the memory information valid flag to true.
[0247] In a specific implementation of the present application, it also includes:
[0248] The default enumeration module is used to output connection error prompts when the configured connection information does not match the actual connection information;
[0249] Use the default enumeration order to enumerate and detect connected devices.
[0250] In a specific implementation of the present application, it also includes:
[0251] A readjustment module is used to obtain the actual connection information after reconnecting according to the process file corresponding to the optimized connection topology when the configured connection information and the actual connection information do not match;
[0252] Determine whether the configured connection information matches the newly acquired actual connection information;
[0253] If yes, get the chassis silkscreen information;
[0254] Adjust the default enumeration order according to the slot order in the chassis silkscreen information to obtain a valid enumeration order;
[0255] Use the valid enumeration sequence to enumerate and detect the access devices.
[0256] In a specific implementation of the present application, the connection information acquisition module is specifically used to read the enumeration order from a memory that stores the enumeration order; if the enumeration order is not read, or when the information validity flag is false, it is determined that the valid enumeration order does not exist, and the configuration connection information and the actual connection information are obtained.
[0257] In a specific implementation of the present application, the connection information acquisition module is specifically used to obtain a configuration binary file corresponding to the optimized connection topology;
[0258] Read configuration connection information from the configuration binary file;
[0259] The process of generating the configuration binary file includes:
[0260] During the system selection process of the production system, obtain the configuration information and connection information of the components corresponding to the optimized connection topology;
[0261] Convert configuration information and connection information into a configuration binary file.
[0262] In a specific implementation of the present application, the connection information acquisition module is specifically used to obtain the actual binary file corresponding to the optimized connection topology;
[0263] Read the actual connection information from the actual binary file;
[0264] The actual binary file generation process includes:
[0265] Use the baseboard management controller to scan the slots to obtain board device information, slot information, and port information connected to the slots;
[0266] Convert the board device information, slot information and the port information connected to the slot into actual binary files.
[0267] In a specific implementation of the present application, the silk screen information acquisition module is specifically used to scan the slot using the baseboard management controller to obtain the board device information, slot information and port information connected to the slot;
[0268] Use the board device information, slot information, and the port information connected to the slot to determine the slot physical silk screen and slot sequence;
[0269] The physical silk screen of the slot and the slot sequence are determined as the chassis silk screen information.
[0270] In a specific implementation of the present application, the information matching judgment module is used to judge whether the configuration connection information matches the actual connection information, specifically including: judging whether the configuration connection information is consistent with the actual connection information;
[0271] If so, determining that the configured connection information matches the actual connection information;
[0272] If not, it is determined that the configured connection information does not match the actual connection information.
[0273] In a specific implementation of the present application, the enumeration detection module is specifically used to detect access devices one by one according to a valid enumeration order;
[0274] The detection results are output on the display interface.
[0275] In a specific implementation of the present application, it also includes:
[0276] A reconfiguration module, used to obtain new configuration connection information corresponding to a new optimized connection topology;
[0277] Obtain new actual connection information after assembling cables according to the process file corresponding to the new optimized connection topology;
[0278] Determine whether the new configuration connection information matches the new actual connection information;
[0279] If yes, adjust the default enumeration order according to the slot order in the chassis silkscreen information to obtain a new valid enumeration order;
[0280] Use the new effective enumeration order to enumerate and detect the access devices.
[0281] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, and the electronic device described below and the device detection method described above can refer to each other.
[0282] See also Figure 8 As shown, the electronic device includes:
[0283] A memory 332, for storing computer programs;
[0284] The processor 322 is configured to implement the steps of the device detection method of the above method embodiment when executing a computer program.
[0285] For details, please refer to Fig. 9 , Fig. 9 A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0286] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0287] The steps in the device detection method described above can be implemented by the structure of the electronic device.
[0288] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the device detection method described above can refer to each other.
[0289] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device detection method of the above method embodiment are implemented.
[0290] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0291] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the device detection method described above can refer to each other.
[0292] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned device detection method are implemented.
[0293] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0294] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0295] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0296] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0297] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A device detection method, characterized in that: Applicable to basic input and output systems, including: Acquire configuration connection information and actual connection information corresponding to the optimized connection topology; wherein the actual connection information is obtained by scanning slot devices using a baseboard management controller; When the configured connection information matches the actual connection information, using the baseboard management controller to obtain chassis silk screen information; The default enumeration order is adjusted according to the slot order in the chassis silk-screen information to obtain a valid enumeration order; Use the effective enumeration sequence to enumerate and detect the access devices; The configuration connection information corresponding to the optimized connection topology is obtained, including: Get the configuration binary file corresponding to the optimized connection topology; Read the configuration connection information from the configuration binary file; The process of generating the configuration binary file includes: During the system selection process of the production system, obtain the configuration information and connection information of the components corresponding to the optimized connection topology; Convert the configuration information and connection information into a configuration binary file; Wherein, using the baseboard management controller to obtain chassis silk screen information includes: The baseboard management controller is used to scan the slots to obtain board device information, slot information, and port information connected to the slots; Determine the physical silk screen of the slot and the slot sequence by using the board device information, slot information and the port information connected to the slot; The slot physical silk screen and the slot sequence are determined as the chassis silk screen information.
2. The method according to claim 1, characterized in that Adjust the default enumeration order according to the slot order in the chassis silkscreen information to obtain a valid enumeration order, including: On the basis of the default enumeration order, the order is adjusted with reference to the slot order in the chassis silk-screen information to obtain a target enumeration order that is consistent with the slot order; Writing the target enumeration sequence into a memory, and locking the target enumeration sequence as a valid enumeration sequence; Restart the local device to make the effective enumeration order take effect.
3. The method according to claim 2, characterized in that Locking the target enumeration order to a valid enumeration order includes: Locking the status bit of the memory to read-only; The information valid flag of the memory is set to true.
4. The method according to claim 1, characterized in that: In the case where the configured connection information does not match the actual connection information, the method further includes: Output connection error prompt; The access devices are enumerated and detected using the default enumeration order.
5. The method according to claim 1, characterized in that In the case where the configured connection information does not match the actual connection information, the method further includes: After reconnecting according to the process file corresponding to the optimized connection topology, obtain the actual connection information; Determine whether the configured connection information matches the newly acquired actual connection information; If yes, get the chassis silkscreen information; The default enumeration order is adjusted according to the slot order in the chassis silk-screen information to obtain a valid enumeration order; Use the valid enumeration sequence to enumerate and detect the access devices.
6. The method according to claim 1, characterized in that Get the configuration connection information and actual connection information corresponding to the optimized connection topology, including: Reading the enumeration sequence from a memory storing the enumeration sequence; If the enumeration sequence is not read, or when the information validity flag is false, it is determined that the valid enumeration sequence does not exist, and the configured connection information and the actual connection information are obtained.
7. The method according to claim 1, characterized in that Get the actual connection information corresponding to the optimized connection topology, including: Get the actual binary file corresponding to the optimized wiring topology; Read the actual connection information from the actual binary file; The actual binary file generation process includes: The baseboard management controller is used to scan the slots to obtain board device information, slot information, and port information connected to the slots; The board device information, slot information and port information connected to the slot are converted into actual binary files.
8. The method according to claim 1, characterized in that Determining whether the configured connection information matches the actual connection information includes: Determine whether the configuration connection information is consistent with the actual connection information; If yes, determining that the configured connection information matches the actual connection information; If not, it is determined that the configured connection information does not match the actual connection information.
9. The method according to claim 1, characterized in that: Use the valid enumeration sequence to enumerate and detect the access devices, including: Detect access devices one by one in the valid enumeration order; The detection results are output on the display interface.
10. The method according to any one of claims 1 to 9, characterized in that: Also includes: Get the new configuration connection information corresponding to the new optimized connection topology; Acquire new actual connection information after assembling the cables according to the process file corresponding to the new optimized connection topology; Determining whether the newly configured connection information matches the new actual connection information; If yes, adjust the default enumeration order with reference to the slot order in the chassis silk-screen information to obtain a new valid enumeration order; Use the new effective enumeration order to enumerate and detect the access devices.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the device detection method according to any one of claims 1 to 10 when executing the computer program.
12. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device detection method according to any one of claims 1 to 10 are implemented.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the device detection method described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
PCIe enumeration method, system and device and storage medium
CN113721994A
Exception handling in processor using branch delay slot instruction set architecture
US20170277539A1