Device startup control method, computer program product, device and storage medium

By establishing a collection of scan sequence tables for each central processor and adjusting the scan sequence tables using network interface information in the target storage medium, the problem of inconvenient adjustment of PCIe equipment startup sequence is solved, and flexible and convenient device management is achieved.

CN119201257BActive Publication Date: 2025-05-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411733501.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-05-27
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve flexible and convenient adjustment of the startup sequence of PCIe devices, resulting in frequent adjustments from customers when demand changes, increasing time cost and error risk.

Method used

After the server is started, a collection of scan sequence tables is established for each central processor, and the network interface information of the central processor connected to the target device is read from the target storage medium, and the corresponding scan sequence table is selected as the target scan sequence table, and the device startup sequence is adjusted.

Benefits of technology

It realizes flexible and convenient adjustment of the startup sequence of PCIe equipment, reduces the operating steps and error risks of engineers, and improves the efficiency of equipment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201257B_ABST
    Figure CN119201257B_ABST
Patent Text Reader

Abstract

The present application discloses a device startup control method, a computer program product, a device, and a storage medium, which are applied to the technical field of servers. The method includes: after the server starts up, establishing a corresponding set of scanning sequence tables for each central processing unit; reading the network interface information of the central processing unit to which the target device is connected from the target storage medium; according to the read network interface information of the central processing unit to which the target device is connected, selecting, from the corresponding set of scanning sequence tables, the scanning sequence table whose first scanned network interface matches the network interface information as the target scanning sequence table corresponding to the central processing unit to which the target device is connected; sequentially scanning the network interfaces of each central processing unit, and when scanning each network interface of the central processing unit to which the target device is connected, using the target scanning sequence table as the scanning sequence table. Applying the solution of the present application enables the startup sequence to be adjusted flexibly and conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a device startup control method, a computer program product, a device and a storage medium. Background Art

[0002] BIOS (Basic Input Output System) is a set of programs fixed to the ROM (Read-Only Memory) chip on the motherboard, which stores important basic input and output programs, self-test programs after power-on, and system self-startup programs. During the startup process, BIOS will detect and initialize all connected PCIe (Peripheral Component Interconnect express) devices, and is responsible for setting the startup sequence of PCIe devices, which will affect the recognition sequence of PCIe devices in the operating system. Taking the network card as an example, its startup sequence determines its priority in the network configuration.

[0003] In actual use, customers may encounter the need to adjust the boot order of a specific PCIe device. In response to such customer needs, one solution is to modify the hardware connection method, so as to adjust the target PCIe device to be the first connected device in the hardware order. However, when the motherboard, backplane and wiring method have been determined, changing the connection method and redesigning the board will bring a series of impacts and require a high time cost.

[0004] Another solution is to adjust the boot sequence of PCIe devices through BIOS settings to meet specific customer needs. However, BIOS settings also require engineers to spend a certain amount of time and are prone to errors. In actual applications, after the adjustment is completed, due to business changes and other reasons, customers may still need to readjust the boot sequence of PCIe devices. Therefore, the current solution of adjusting through BIOS settings still cannot achieve flexible and convenient adjustment of the boot sequence of PCIe devices.

[0005] In summary, how to control device startup so that the startup sequence can be adjusted flexibly and conveniently is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] The object of the present invention is to provide a device startup control method, a computer program product, a device and a storage medium to perform device startup control so that the startup sequence can be adjusted flexibly and conveniently.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In a first aspect, the present invention provides a method for controlling device startup, including:

[0009] After the server starts up, establish a set of scan sequence tables corresponding to each central processing unit in the server;

[0010] Among them, the set of scan sequence tables of the central processing unit includes N scan sequence tables, where N is a positive integer representing the number of network interfaces of the central processing unit, and in the i-th scan sequence table, the i-th network interface is the first network interface to be scanned, and the scan sequence of the remaining network interfaces except the i-th network interface conforms to the default hardware scan sequence; i is a positive integer and takes values from 1 to N;

[0011] Read the network interface information of the central processing unit to which the target device is connected from the target storage medium;

[0012] According to the read network interface information of the central processing unit to which the target device is connected, select, from the corresponding set of scan sequence tables, the scan sequence table in which the first network interface to be scanned matches the network interface information as the target scan sequence table corresponding to the central processing unit to which the target device is connected;

[0013] Sequentially perform network interface scans on each central processing unit, and when performing network interface scans on each central processing unit to which the target device is connected, use the target scan sequence table as the scan sequence table.

[0014] In another aspect, it further includes:

[0015] Send the target scan sequence table to the operating system so that the operating system configures parameters for each hardware device connected to the central processing unit to which the target device is connected based on the target scan sequence table.

[0016] In another aspect, it further includes:

[0017] After establishing a set of scan sequence tables corresponding to each central processing unit in the server, establish a corresponding location information table for each scan sequence table in each set of scan sequence tables, which is used to reflect the location information of the hardware device;

[0018] After selecting the scan sequence table in which the first network interface to be scanned matches the network interface information as the target scan sequence table corresponding to the central processing unit to which the target device is connected, select, from the established location information tables, the location information table corresponding to the target scan sequence table as the target location information table;

[0019] Send the target location information table to the baseboard management controller so that the baseboard management controller records the target location information table.

[0020] On the other hand, it further includes:

[0021] Based on the target location information table, update the hardware device location information recorded in the system management basic input / output system table.

[0022] On the other hand, it further includes:

[0023] Control the display device through the baseboard management controller so that the display device displays the target location information table.

[0024] On the other hand, it further includes:

[0025] Read the target location information table from the baseboard management controller and verify whether the adjustment of the startup sequence for the target device is successful;

[0026] If not, output a prompt message.

[0027] On the other hand, reading the target location information table from the baseboard management controller and verifying whether the adjustment of the startup sequence for the target device is successful includes:

[0028] Pre-obtain the identifier of the target device;

[0029] Read the target location information table from the baseboard management controller, obtain the identifier of the first hardware device in the target location information table, and determine whether the identifier obtained from the target location information table is consistent with the identifier of the target device pre-obtained;

[0030] If they are consistent, determine that the adjustment of the startup sequence for the target device is successful;

[0031] If they are not consistent, determine that the adjustment of the startup sequence for the target device is unsuccessful.

[0032] On the other hand, it further includes:

[0033] When verifying that the adjustment of the startup sequence for the target device is unsuccessful, determine whether the automatic restart function is enabled;

[0034] If it is enabled, perform an automatic restart of the server.

[0035] On the other hand, it further includes:

[0036] Determine whether a scan sequence table of a specified central processing unit is stored in the target storage medium;

[0037] If so, use the scan order list stored in the target storage medium as the scan order list for the specified central processing unit, so that when scanning each network interface of the specified central processing unit, the scan order list used is the scan order list of the specified central processing unit stored in the target storage medium.

[0038] On the other hand, it further includes:

[0039] Determine whether the specified central processing unit is the same as the central processing unit connected to the target device;

[0040] If they are the same, ignore the network interface information of the central processing unit connected to the target device stored in the target storage medium.

[0041] On the other hand, it further includes:

[0042] Based on the scan order list of the specified central processing unit stored in the target storage medium, establish a corresponding location information table for reflecting the location information of the hardware device, and use it as the location information table of the specified central processing unit;

[0043] Send the location information table of the specified central processing unit to the baseboard management controller, so that the baseboard management controller records the location information table of the specified central processing unit.

[0044] On the other hand, after determining that the scan order list of the specified central processing unit is not stored in the target storage medium, it further includes:

[0045] Determine whether a scan order list generation instruction is received;

[0046] If so, based on the scan order list generation instruction, newly generate a scan order list, and use the newly generated scan order list as the scan order list of the central processing unit pointed to by the scan order list generation instruction, so that when scanning each network interface of the central processing unit pointed to by the scan order list generation instruction, the scan order list used is the newly generated scan order list.

[0047] In a second aspect, the present invention provides a computer program product, including computer programs / instructions, which when executed by a processor implement the steps of the device startup control method described above.

[0048] In a third aspect, the present invention provides a device startup control device, including:

[0049] A memory for storing computer programs;

[0050] A processor for executing the computer program to implement the steps of the device startup control method described above.

[0051] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the device startup control method described above are implemented.

[0052] By applying the technical solution provided by the embodiments of the present invention, it is only necessary to pre-write the network interface information of the central processing unit connected to the target device in the target storage medium, and the adjustment of the device startup sequence can be realized.

[0053] Specifically, the solution of the present application takes into account that currently, when a customer needs to adjust the startup sequence of a certain specific PCIe device, it is usually necessary to adjust the startup sequence of the PCIe device to the first startup of the CPU to which it is connected. In this regard, in the solution of the present application, after the server is started, a set of scan sequence tables corresponding to each CPU in the server will be automatically established. For any CPU, the set of scan sequence tables of the CPU includes N scan sequence tables, where N is a positive integer representing the number of network interfaces of the CPU, and in the i-th scan sequence table, the i-th network interface is the first network interface to be scanned, and the scan sequences of the remaining network interfaces except the i-th network interface conform to the default hardware scan sequence; i is a positive integer ranging from 1 to N. That is to say, for this CPU, no matter which network interface of the CPU the customer needs the device connected to to start first, a corresponding scan sequence table can be found in the set of scan sequence tables of the CPU. Then, the network interface information of the central processing unit connected to the target device can be read from the target storage medium. The network interface information of the central processing unit connected to the target device stored in the target storage medium can be written by the user according to actual needs. That is to say, which device the user hopes to adjust the startup sequence to the first place, that device is taken as the target device, and the network interface information of the central processing unit connected to the target device is written into the target storage medium. Therefore, after reading the network interface information of the central processing unit connected to the target device from the target storage medium, the scan sequence table in which the first network interface to be scanned matches the network interface information can be selected from the corresponding set of scan sequence tables as the target scan sequence table corresponding to the central processing unit connected to the target device. Furthermore, when scanning each network interface of the central processing unit connected to the target device, the scan sequence table used is the target scan sequence table, so that for the central processing unit connected to the target device, the target device is the first device to start.

[0054] It can be seen that if the user needs to re-adjust the startup sequence, they only need to adjust the content in the target storage medium, without the engineer having to re-configure the BIOS program, enabling the solution of the present application to control device startup and allowing the startup sequence to be adjusted flexibly and conveniently. In addition, it should be noted that in the solution of the present application, when establishing the set of scanning sequence tables, only the cases where each network interface under the CPU is the first network interface to be scanned need to be considered, and the scanning sequences of the remaining network interfaces conform to the default hardware scanning sequence, making the process of establishing the set of scanning sequence tables very simple and convenient. This operation can be achieved by simply adjusting the BIOS program, is not prone to errors, and is easy to implement the solution of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0056] Figure 1 is the flowchart of the implementation of the device startup control method provided by a specific embodiment of the present invention;

[0057] Figure 2 is an example diagram of the topology structure of the PCIe devices connected to the CPU in a specific embodiment of the present invention;

[0058] Figure 3 is the schematic diagram of the principle architecture in a specific embodiment of the present invention;

[0059] Figure 4 is the flowchart of the implementation of the device startup control device provided by a specific embodiment of the present invention;

[0060] Figure 5 is the schematic diagram of the structure of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0061] The core of the present invention is to provide a device startup control method, a computer program product, a device, and a storage medium, enabling the startup sequence to be adjusted flexibly and conveniently.

[0062] To enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative work shall fall within the scope of protection of the present invention.

[0063] Please refer to Figure 1 , Figure 1 which is the flowchart of the implementation of the device startup control method provided by a specific embodiment of the present invention. The device startup control method may include the following steps:

[0064] Step S101: After the server starts up, establish a set of scan sequence tables corresponding to each central processing unit in the server.

[0065] Among them, the set of scan sequence tables of the central processing unit includes N scan sequence tables, where N is a positive integer representing the number of network interfaces of the central processing unit. And in the i-th scan sequence table, the i-th network interface is the first network interface to be scanned, and the scan sequence of the remaining network interfaces except the i-th network interface conforms to the default hardware scan sequence; i is a positive integer and takes values from 1 to N.

[0066] After the server starts up, the BIOS can establish a set of scan sequence tables corresponding to each CPU in the server. It can be understood that engineers need to perform program settings of the BIOS in advance so that the BIOS can execute the operation of step S101 of the present application.

[0067] In the solution of the present application, when establishing the set of scan sequence tables of the CPU, only the situation where each network interface under the CPU is the first network interface to be scanned needs to be considered, and the scan sequence of the remaining network interfaces conforms to the default hardware scan sequence. This makes the establishment process of the set of scan sequence tables very simple and convenient. That is, engineers only need to make simple adjustments to the BIOS program to implement the operation of step S101, which is not easy to make mistakes and is easy to implement the solution.

[0068] For example, in a certain scenario, there are two CPUs on the server motherboard, and it is necessary to establish respective sets of scan sequence tables for these two CPUs. For example, CPU-0 has 5 network interfaces (PE0 to PE4), and CPU-1 has 6 network interfaces (PE0 to PE5). Then the set of scan sequence tables corresponding to CPU-0 includes 5 scan sequence tables, and the set of scan sequence tables corresponding to CPU-1 includes 6 scan sequence tables.

[0069] In the set of scan sequence tables of CPU-0, the first scan sequence table takes the first network interface PE0 of CPU-0 as the network interface to be scanned first. The scan sequence of the remaining network interfaces except the first network interface PE0 conforms to the default hardware scan sequence. Since the default hardware scan sequence is usually in the order of PE0 - PEN, the network interface scan sequence reflected by the first scan sequence table can be expressed as: PE0—PE1—PE2—PE3—PE4. That is, in the first scan sequence table, it is required that the network interface PE0 be scanned first, the network interface PE1 be scanned second, the network interface PE2 be scanned third, the network interface PE3 be scanned fourth, and the network interface PE4 be scanned fifth.

[0070] Similarly, in the set of scan sequence tables of CPU-0, the second scan sequence table takes the second network interface PE1 of CPU-0 as the network interface to be scanned first. The scan sequence of the remaining network interfaces except the second network interface PE1 conforms to the default hardware scan sequence. Since the default hardware scan sequence is usually in the order of PE0 - PEN, the network interface scan sequence reflected by the second scan sequence table can be expressed as: PE1—PE0—PE2—PE3—PE4.

[0071] Similarly, in the set of scan sequence tables of CPU-0, the network interface scan sequence reflected by the third scan sequence table can be expressed as: PE2—PE0—PE1—PE3—PE4, the network interface scan sequence reflected by the fourth scan sequence table can be expressed as: PE3—PE0—PE1—PE2—PE4, and the network interface scan sequence reflected by the fifth scan sequence table can be expressed as: PE4—PE0—PE1—PE2—PE3.

[0072] The above gives examples of the five scan sequence tables included in the set of scan sequence tables corresponding to CPU-0. Similarly, a set of scan sequence tables corresponding to CPU-1 can also be established.

[0073] In addition, it should be noted that there is also a sequence of startup order among different CPUs. For example, usually CPU-0 starts first. After completing the scan startup of each hardware device connected to CPU-0, the scan startup of each hardware device connected to CPU-1 is then carried out, and the order between CPUs is usually not easy to adjust. Therefore, the startup order of the target device adjusted by the solution of this application refers to adjusting the startup order of the target device under the CPU to which it is connected.

[0074] Step S102: Read the network interface information of the central processing unit to which the target device is connected from the target storage medium.

[0075] The target storage medium can be, for example, a specified EEPROM (Electrically Erasable Programmable Read Only Memory) on the main board. The target storage medium stores the network interface information of the central processing unit to which the target device is connected. This content can be pre-written by the user into the target storage medium. That is, specifically which device's startup sequence the user needs to adjust to the first place can be set by the user according to their needs.

[0076] Take Figure 2 as an example, it is a topological structure example diagram of PCIe devices connected to the CPU in a specific implementation manner. For example, the target device is specifically Figure 2 the target network card in. From this topological structure, it can be seen that if the startup sequence is not modified, for Figure 2 the CPU, the first thing scanned is PE0, so that the network card, graphics processor, and PCIe devices connected to PE0 start first. Then the scanned is PE1, so that the target network card connected to PE1 starts. Then so on, scanning PE2 to PEN in turn.

[0077] For example, if the user hopes to use the target network card to configure the initial network connection, this requires that the eth name of the target network card recognized by all machines on the operating system side must be unified as eth0. Under the operating system, the default configuration usually takes eth0 as the main network interface. If the main network interface recognized by the operating system is not eth0, it may cause network configuration failure or network interruption. If the target network card ranks first at the hardware level, then the operating system will recognize the target network card as eth0; otherwise, it may be recognized as eth2 or a later order.

[0078] In this regard, after adopting the solution of the present application, the user can write the network interface information of the central processing unit to which the target device is connected into the target storage medium, that is, write the network interface information of the central processing unit to which the Figure 2 target network card in the example of is connected into the target storage medium. For example, in the example of Figure 2 , if the central processing unit to which the target network card is connected is specifically CPU-1 and is connected to PE1, then it is necessary to pre-write the network interface information of the central processing unit of the target network card "CPU-1, PE1" into the target storage medium.

[0079] Step S103: According to the read network interface information of the central processing unit to which the target device is connected, select, from the corresponding set of scan sequence tables, the scan sequence table whose first scanned network interface matches the network interface information as the target scan sequence table corresponding to the central processing unit to which the target device is connected.

[0080] After the BIOS reads the network interface information of the central processing unit (CPU) to which the target device is connected, it can select, from the corresponding set of scanning sequence tables, the first scanning sequence table whose first scanned network interface matches the network interface information. For example, in the above example, if the network interface information of the CPU to which the target network card is connected is "CPU-1, PE1", then the corresponding set of scanning sequence tables is the set of scanning sequence tables for CPU-1. Then, for the set of scanning sequence tables for CPU-1, which includes multiple scanning sequence tables, the scanning sequence table to be selected is the one whose first scanned network interface matches the network interface information. That is to say, in the set of scanning sequence tables for CPU-1, it is necessary to find the scanning sequence table whose first scanned network interface is PE1 as the target scanning sequence table corresponding to CPU-1.

[0081] Step S104: Sequentially scan the network interfaces of each central processing unit, and when scanning each network interface of the central processing unit to which the target device is connected, the scanning sequence table used is the target scanning sequence table.

[0082] The BIOS will sequentially scan the network interfaces of each central processing unit. For example, in the above example, it will successively scan the network interfaces of CPU-0 and CPU-1. And when scanning each network interface of the central processing unit to which the target device is connected, the scanning sequence table used is the target scanning sequence table. For example, in the above example, if the central processing unit to which the target device is connected is specifically CPU-1, then when scanning each network interface of CPU-1, the scanning sequence table used is the target scanning sequence table corresponding to CPU-1, so that the target network card connected to PE1 can be started first.

[0083] In addition, it can be understood that when sequentially scanning the network interfaces of each central processing unit, if there is no corresponding target scanning sequence table for a certain central processing unit, it means that the scanning sequence of this central processing unit has not been adjusted, and then directly scan each network interface of this central processing unit according to the default hardware scanning sequence.

[0084] In a specific embodiment of the present invention, it may further include:

[0085] Send the target scanning sequence table to the operating system so that the operating system can perform parameter configuration on each hardware device connected to the central processing unit to which the target device is connected based on the target scanning sequence table.

[0086] This implementation takes into account that since the startup sequence of the present application solution has been adjusted, that is, for the central processing unit (CPU) connected to the target device, the default hardware scanning sequence is not used, but the target scanning sequence table is used. Therefore, in order to ensure that the operating system can configure each hardware device connected to this CPU according to the recognition sequence in the target scanning sequence table as expected and avoid errors, in this implementation, the target scanning sequence table will be sent to the OS. When the OS configures each hardware device connected to this CPU, it can configure according to the scanning sequence in the target scanning sequence table, so that in the operating system, the configuration sequence of the PCIe device is consistent with the actual scanning sequence. For example, in the above example, after the OS configures the target network card, the BDF address of the target network card can be ranked at the forefront of all devices connected to this CPU, and the corresponding network interface is eth0. Ensure that the operating system can recognize and configure the target network card in the expected order.

[0087] In addition, it should be noted that for any CPU, if there is no corresponding target scanning sequence table, that is, when the scanning sequence of this CPU is not adjusted, the OS can configure the parameters of each hardware device connected to this central processing unit according to the default hardware scanning sequence.

[0088] See Figure 3 , which is a schematic diagram of the principle architecture in an implementation. Figure 3 In the example of , the BIOS will send the scanning sequence tables of each CPU to the operating system, which can include the target scanning sequence table and also the scanning sequence tables used by each CPU whose scanning sequence has not been adjusted.

[0089] In a specific implementation of the present invention, it may further include:

[0090] After establishing a set of scanning sequence tables corresponding to the central processing units for each central processing unit in the server, for each scanning sequence table in each set of scanning sequence tables, establish a corresponding location information table for reflecting the location information of the hardware devices;

[0091] After selecting the scanning sequence table whose first scanned network interface matches the network interface information as the target scanning sequence table corresponding to the central processing unit connected to the target device, select the location information table corresponding to the target scanning sequence table from the established location information tables as the target location information table;

[0092] Send the target location information table to the baseboard management controller so that the baseboard management controller records the target location information table.

[0093] This implementation takes into account that the startup sequence of the present application solution has been adjusted. Since the location information table is related to both the PEPort sequence and the physical slot sequence of the PCIe device, when the scanning sequence of the CPU changes, the location information used to reflect the hardware devices connected to the CPU should also be adjusted accordingly to ensure the accuracy of the recorded location information table.

[0094] In this regard, in this implementation, after establishing a set of scanning sequence tables corresponding to each central processing unit in the server, for each scanning sequence table in each set of scanning sequence tables, a corresponding location information table for reflecting the location information of the hardware devices can be established.

[0095] Subsequently, when a certain scanning sequence table is selected as the target scanning sequence table, the location information table corresponding to the target scanning sequence table can be selected from the previously established location information tables as the target location information table of the CPU to which the target device is connected. The location information table can usually be stored in the BMC (Board Management Controller). Therefore, the target location information table can be sent to the board management controller so that the board management controller records the target location information table, which is the target location information table of the CPU to which the target device is connected and reflects the location information of the hardware devices connected to the CPU and the PE Port information.

[0096] In addition, it should also be noted that for any CPU, if there is no corresponding target scanning sequence table, that is, when the scanning sequence of the CPU is not adjusted, the location information table of the CPU can be generated according to the default hardware scanning sequence and sent to the BMC for storage. For example Figure 3 in the example, the BIOS will send each location information table to the BMC, which can include the target location information table and the scanning sequence tables of each CPU whose scanning sequence has not been adjusted.

[0097] Furthermore, in a specific implementation of the present invention, it may further include:

[0098] Based on the target location information table, update the location information of the hardware devices recorded in the system management basic input / output system table.

[0099] This implementation mode takes into account that in some cases, the location information of hardware devices is also recorded in the SMBIOS table, that is, the System Management BIOS table. Since in the solution of this application, the target location information table of the CPU to which the target device is connected is obtained, therefore, based on the target location information table, the location information of the hardware devices recorded in the SMBIOS table can be updated to ensure the accuracy of the relevant hardware device location information in the SMBIOS table regarding the CPU to which the target device is connected, that is, to keep the information in the SMBIOS table consistent with the actual hardware connection, which is convenient for management and maintenance.

[0100] In addition, it can be understood that for any CPU, if there is no corresponding target scanning sequence table, that is, when the scanning sequence of the CPU is not adjusted, the location information table of the CPU can be generated according to the default hardware scanning sequence and sent to the SMBIOS table for storage. Figure 3 In the example of, the BIOS sends each location information table to the SMBIOS table, which can include the target location information table and the scanning sequence tables of each CPU whose scanning sequence has not been adjusted.

[0101] In a specific implementation mode of the present invention, it further includes:

[0102] Controlling the display device through the baseboard management controller so that the display device displays the target location information table.

[0103] This implementation mode takes into account that in some cases, there may be a need to view device information. Therefore, the BMC can be used to control the display device so that the display device displays the content in the target location information table. In addition, in some cases, the BMC can also send the target location information table to the Web side so that users can view the target location information table on the Web side.

[0104] In a specific implementation mode of the present invention, it can further include:

[0105] Reading the target location information table from the baseboard management controller and verifying whether the adjustment of the startup sequence for the target device is successful;

[0106] If not, output a prompt message.

[0107] This implementation mode takes into account that the startup sequence is adjusted in the solution of this application. To ensure that the adjustment is successful, verification can be carried out. Specifically, the target location information table can be read from the baseboard management controller, and then it can be verified whether the adjustment of the startup sequence for the target device is successful.

[0108] The target location information table stored in the baseboard management controller reflects the location information of each hardware device connected to the CPU where the target device is located and the PE Port information. When different target scan sequence tables are selected from the set of scan sequence tables, the target location information table will be correspondingly different. Therefore, through the target scan sequence table, it can be effectively verified whether the startup sequence has been correctly adjusted, that is, to verify whether the target device is the first device to be started under the CPU to which the target device is connected.

[0109] If the verification is successful, no additional operation is required. When the verification fails, a prompt message can be output to remind the user of this situation.

[0110] In a specific embodiment of the present invention, reading the target location information table from the baseboard management controller and verifying whether the startup sequence adjustment for the target device is successful includes:

[0111] Pre-obtain the identifier of the target device;

[0112] Read the target location information table from the baseboard management controller, obtain the identifier of the first hardware device in the target location information table, and determine whether the identifier obtained from the target location information table is consistent with the pre-obtained identifier of the target device;

[0113] If they are consistent, it is determined that the startup sequence adjustment for the target device is successful;

[0114] If they are not consistent, it is determined that the startup sequence adjustment for the target device is unsuccessful.

[0115] This embodiment takes into account that based on the target location information table, verifying whether the startup sequence adjustment for the target device is successful can generally be achieved based on the identifier of the target device.

[0116] Specifically, in this embodiment, it is necessary to pre-obtain the identifier of the target device. For example, if the target device is Figure 2 the target network card in the embodiment, the MAC Address (Media Access Control) address of the target network card can be used as its identifier, and the identifier of the target device will not change due to the change of the startup sequence.

[0117] After reading the target location information table from the baseboard management controller, if the process is error-free, the identifier of the first hardware device in the target location information table should be the same as the identifier of the target device obtained in advance. In the above example, it is the MAC address of the first hardware device in the target location information table that should be the same as the MAC address of the target network card obtained in advance. At this time, it can be determined that the adjustment of the startup order for the target device is successful, that is, it can be determined that the target network card is the first hardware device to be started among the CPUs to which it is connected.

[0118] In a specific embodiment of the present invention, it may further include:

[0119] When it is verified that the adjustment of the startup order for the target device is unsuccessful, determine whether the automatic restart function is enabled;

[0120] If it is enabled, perform an automatic restart of the server.

[0121] This embodiment takes into account that if it is verified that the adjustment of the startup order for the target device is unsuccessful, it can be attempted to be solved by restarting. Therefore, when the automatic restart function is enabled, an automatic restart of the server can be performed. In some cases, after restarting, the startup order of the target device can be adjusted successfully. Of course, in practical applications, a restart count limit threshold can be set, and when the number of restarts exceeds this restart count limit threshold, no further restart will be performed to avoid continuous restart situations.

[0122] In addition, this embodiment determines whether the automatic restart function is enabled, considering that in order to ensure flexibility, it can be selected whether to use this function as needed. When the automatic restart function is enabled, it is only allowed to attempt to re-adjust the startup order of the target device through automatic restart. If the automatic restart function is turned off, no automatic restart will be performed when it is verified that the adjustment of the startup order for the target device is unsuccessful.

[0123] In a specific embodiment of the present invention, it may further include:

[0124] Determine whether a scan order table of a specified central processing unit is stored in the target storage medium;

[0125] If so, use the scan order table stored in the target storage medium as the scan order table of the specified central processing unit, so that when scanning each network interface of the specified central processing unit, the scan order table used is the scan order table of the specified central processing unit stored in the target storage medium.

[0126] As described above, in the solution of this application, when establishing the set of scanning sequence tables, only the cases where each network interface under the CPU is the first network interface to be scanned need to be considered. The scanning sequences of the remaining network interfaces conform to the default hardware scanning sequence. The advantage of this is that the process of establishing the set of scanning sequence tables can be very simple and convenient. This operation can be achieved by simply adjusting the BIOS program, and it is not easy to make mistakes, which is conducive to the implementation of the solution. And in practical applications, for the requirement of adjusting the device startup sequence, usually, it is only required to adjust the startup sequence of the specified device to the first position of the connected CPU. For other PCIe devices connected to this CPU, the default hardware scanning sequence is adopted, that is, the above solution, which can meet the user needs in normal cases.

[0127] However, this implementation mode takes into account that in a small number of cases, the user not only requires adjusting the startup sequence of a certain specified device to the first position of the corresponding CPU, but also needs to start the other PCIe devices under this CPU according to the user's needs, rather than starting these PCIe devices according to the default hardware scanning sequence.

[0128] In response to this, in this implementation mode, the user is allowed to directly store the scanning sequence table of the specified central processor in the target storage medium. In this way, when subsequently scanning each network interface of the specified central processor, the scanning sequence table of the specified central processor stored in the target storage medium is directly used, thereby realizing the control of the startup sequence of each hardware device connected to the specified central processor and meeting the user's needs in some special cases.

[0129] In a specific implementation mode of the present invention, it may further include:

[0130] Determine whether the specified central processor is the same as the central processor connected to the target device;

[0131] If they are the same, ignore the network interface information of the central processor connected to the target device stored in the target storage medium.

[0132] This implementation mode takes into account that in most cases, only the network interface information of the central processing unit (CPU) connected to the target device is stored in the target storage medium. In some cases, when the user needs to adjust the startup order of multiple PCIe devices under a CPU, the target storage medium will store a scan order table for the specified CPU, and the network interface information of the CPU connected to the target device stored in the target storage medium will be deleted. Of course, if they are for different CPUs, the target storage medium can store both the network interface information of the CPU connected to the target device and the scan order table of the specified CPU. The above are all normal situations that may occur, and it can be understood that for the last situation, the CPU connected to the target device and the CPU specified by the scan order table stored in the target storage medium should be different CPUs. If they are the same CPU, it may be caused by the user forgetting to delete the network interface information of the CPU connected to the target device stored in the target storage medium. For example, the user originally stored the network interface information of the CPU connected to the target device in the target storage medium. Subsequently, due to business adjustments, the user needs to further adjust the startup order of each PCIe under this CPU. Therefore, the user stores the scan order table of the specified CPU in the target storage medium, but forgets to delete the previously stored network interface information of the CPU connected to the target device.

[0133] In this implementation mode, for such a situation, the network interface information of the CPU connected to the target device stored in the target storage medium can be directly ignored. That is, when the target storage medium stores a scan order table for the specified CPU, this scan order table has the highest priority and will be directly regarded as the scan order table required by the specified CPU.

[0134] In a specific implementation mode of the present invention, it may further include:

[0135] Based on the scan order table of the specified CPU stored in the target storage medium, establish a corresponding location information table for reflecting the location information of the hardware device, and use it as the location information table of the specified CPU;

[0136] Send the location information table of the specified CPU to the baseboard management controller so that the baseboard management controller records the location information table of the specified CPU.

[0137] This implementation mode takes into account that since the scan sequence table of the specified central processing unit is directly stored in the target storage medium, in order to avoid errors in the location information table of the specified central processing unit, a corresponding location information table for reflecting the location information of the hardware device will be established based on the scan sequence table and used as the location information table of the specified central processing unit. Subsequently, it can also be sent to the BMC and SMBIOS so that the BMC records the location information table of the specified central processing unit and updates the location information in the SMBIOS.

[0138] In a specific implementation mode of the present invention, after it is determined that the scan sequence table of the specified central processing unit is not stored in the target storage medium, it may further include:

[0139] Determine whether a scan sequence table generation instruction is received;

[0140] If so, based on the scan sequence table generation instruction, a new scan sequence table is generated, and the newly generated scan sequence table is used as the scan sequence table of the central processing unit pointed to by the scan sequence table generation instruction, so that when scanning each network interface of the central processing unit pointed to by the scan sequence table generation instruction, the scan sequence table used is the newly generated scan sequence table.

[0141] This implementation mode takes into account that in addition to pre-storing the scan sequence table of the specified central processing unit in the target storage medium, it also allows generating a specific scan sequence table required by the user through other means to meet the user's requirements for the startup sequence of each PCIe device under the corresponding CPU. Specifically, in this implementation mode, if a scan sequence table generation instruction is received, a new scan sequence table can be generated based on the content in the scan sequence table generation instruction, and then this newly generated scan sequence table can be used as the scan sequence table of the central processing unit pointed to by the scan sequence table generation instruction.

[0142] Generate instructions based on the scan sequence table. There can be multiple specific implementation methods for generating a new scan sequence table. For example, in one implementation, it is considered that instructions can be generated based on the scan sequence table first, the central processing unit pointed to by the scan sequence table generation instruction is determined, and then based on the scan sequence table generation instruction, the scan sequence of each network interface under this central processing unit is determined. Furthermore, based on the scan sequence of each network interface, a new scan sequence table is generated, so that the newly generated scan sequence table meets the requirements of the scan sequence table generation instruction. In addition, in practical applications, the scan sequence table generation instruction can carry the scan sequence requirements for all network interfaces under the central processing unit it points to, or only carry the scan sequence requirements for some network interfaces under the central processing unit it points to. For the scan sequence of other network interfaces under this central processing unit not mentioned in the scan sequence table generation instruction, the default hardware scan sequence can be used to ensure the flexibility of the solution implementation. Especially for the latter implementation method, the convenience of the scan sequence table generation instruction is improved.

[0143] Applying the technical solution provided by the embodiments of the present invention, only by pre-writing the network interface information of the central processing unit connected to the target device in the target storage medium, the adjustment of the device startup sequence can be achieved.

[0144] Specifically, the solution of this application takes into account that currently, when a customer needs to adjust the boot order of a specific PCIe device, it is usually necessary to adjust the boot order of the PCIe device to the first boot position of the CPU to which it is connected. In this regard, in the solution of this application, after the server starts up, a set of scan order tables corresponding to each CPU in the server will be automatically established. For any CPU, the set of scan order tables of this CPU includes N scan order tables, where N is a positive integer representing the number of network interfaces of this CPU, and in the i-th scan order table, the i-th network interface is the first network interface to be scanned, and the scan order of the remaining network interfaces except the i-th network interface conforms to the default hardware scan order; i is a positive integer ranging from 1 to N. That is to say, for this CPU, no matter which network interface of this CPU the customer needs the device connected to be the first to boot, a corresponding scan order table can be found in the set of scan order tables of this CPU. Then, the network interface information of the central processing unit to which the target device is connected can be read from the target storage medium. The network interface information of the central processing unit to which the target device is connected stored in the target storage medium can be written by the user according to actual needs. That is to say, if the user hopes to adjust the boot order of a certain device to the first position, the device is taken as the target device, and the network interface information of the central processing unit to which the target device is connected is written into the target storage medium. Therefore, after reading the network interface information of the central processing unit to which the target device is connected from the target storage medium, the scan order table in which the first network interface to be scanned matches the network interface information can be selected from the corresponding set of scan order tables as the target scan order table corresponding to the central processing unit to which the target device is connected. Furthermore, when scanning each network interface of the central processing unit to which the target device is connected, the scan order table used is the target scan order table, so that for the central processing unit to which the target device is connected, the target device is the first device to boot.

[0145] It can be seen that if the user needs to re-adjust the boot order, only the content in the target storage medium needs to be adjusted, without the engineer re-setting the BIOS program, so that the solution of this application can control device startup, and the boot order can be adjusted flexibly and conveniently. In addition, it should be noted that in the solution of this application, when establishing the set of scan order tables, only the situation where each network interface under the CPU is the first network interface to be scanned needs to be considered, and the scan order of the remaining network interfaces conforms to the default hardware scan order, so that the establishment process of the set of scan order tables is very simple and convenient. The operation can be achieved by simply adjusting the BIOS program, and it is not easy to make mistakes, which is easy to implement the solution of this application.

[0146] Corresponding to the above method embodiments, the embodiments of the present invention further provide a device startup control system, which can be correspondingly referred to the above. The device startup control system may include:

[0147] A scan sequence table set establishment module, configured to establish a scan sequence table set corresponding to each central processing unit in the server after the server starts;

[0148] Wherein, the scan sequence table set of the central processing unit includes N scan sequence tables, N is a positive integer and represents the number of network interfaces of the central processing unit, and in the i-th scan sequence table, the i-th network interface is the first network interface to be scanned, and the scan sequence of the remaining network interfaces except the i-th network interface conforms to the default hardware scan sequence; i is a positive integer ranging from 1 to N;

[0149] A target storage medium reading module, configured to read the network interface information of the central processing unit to which the target device is connected from the target storage medium;

[0150] A target scan sequence table determination module, configured to select, from the corresponding scan sequence table set, the scan sequence table in which the first network interface to be scanned matches the network interface information as the target scan sequence table corresponding to the central processing unit to which the target device is connected according to the read network interface information of the central processing unit to which the target device is connected;

[0151] A scan execution module, configured to sequentially perform scans on the network interfaces of each central processing unit, and when performing scans on the network interfaces of the central processing unit to which the target device is connected, the scan sequence table used is the target scan sequence table.

[0152] Corresponding to the above method embodiments, the embodiments of the present invention further provide a device startup control device, a computer-readable storage medium, and a computer program product, which can be correspondingly referred to the above.

[0153] See Figure 4 As shown, the device may include:

[0154] A memory 401, configured to store a computer program;

[0155] A processor 402, configured to execute the computer program to implement the steps of the device startup control method in any of the above embodiments.

[0156] The computer program product includes computer programs / instructions, and when the computer programs / instructions are executed by the processor, the steps of the device startup control method in any of the above embodiments are implemented.

[0157] For reference, see Figure 5, a computer program 51 is stored on the computer-readable storage medium 50. When the computer program 51 is executed by a processor, the steps of the device startup control method in any of the above embodiments are implemented. The computer-readable storage medium 50 mentioned here includes RAM (Random Access Memory), memory, ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), registers, hard disks, removable disks, or any other form of storage medium well-known in the technical field.

[0158] It should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0159] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A device startup control method, characterized in that: include: After the server is started, a set of scan sequence tables corresponding to the central processors is established for each central processor in the server; The scanning sequence table set of the central processing unit includes N scanning sequence tables, N is a positive integer and represents the number of network interfaces of the central processing unit, and in the i-th scanning sequence table, the i-th network interface is the first network interface to be scanned, and the scanning order of the remaining network interfaces except the i-th network interface conforms to the default hardware scanning order; i is a positive integer and ranges from 1 to N; Reading network interface information of a central processor to which the target device is connected from the target storage medium; According to the read network interface information of the central processor connected to the target device, a scanning sequence table whose first scanned network interface matches the network interface information is selected from the corresponding scanning sequence table set as a target scanning sequence table corresponding to the central processor connected to the target device; Scanning the network interfaces of each central processing unit in sequence, and when scanning the network interfaces of each central processing unit connected to the target device, the scanning sequence table used is the target scanning sequence table; Wherein, the network interface information of the central processor to which the target device is connected stored in the target storage medium is pre-written into the target storage medium by the user; Also includes: Determining whether a scan sequence table of a designated central processor is stored in the target storage medium; If yes, the scan sequence table stored in the target storage medium is used as the scan sequence table of the designated central processing unit, so that when scanning each network interface of the designated central processing unit, the scan sequence table used is the scan sequence table of the designated central processing unit stored in the target storage medium; Also includes: Determining whether the designated CPU is the same as the CPU connected to the target device; If they are the same, the network interface information of the central processor to which the target device is connected stored in the target storage medium is ignored.

2. The device startup control method according to claim 1, characterized in that: Also includes: The target scanning sequence table is sent to an operating system, so that the operating system performs parameter configuration on each hardware device connected to a central processing unit connected to the target device based on the target scanning sequence table.

3. The device startup control method according to claim 1, characterized in that: Also includes: After establishing a set of scan sequence tables corresponding to the central processors in the server, establishing a corresponding position information table for reflecting the position information of the hardware device for each scan sequence table in the set of scan sequence tables; After selecting the first scanned network interface that matches the network interface information as the target scan sequence table corresponding to the central processor to which the target device is connected, selecting the location information table corresponding to the target scan sequence table from the established location information table as the target location information table; The target position information table is sent to a baseboard management controller, so that the baseboard management controller records the target position information table.

4. The device startup control method according to claim 3, characterized in that: Also includes: Based on the target location information table, the hardware device location information recorded in the system management basic input and output system table is updated.

5. The device startup control method according to claim 3, characterized in that: Also includes: The display device is controlled by the baseboard management controller so that the display device displays the target position information table.

6. The device startup control method according to claim 3, characterized in that: Also includes: Reading the target location information table from the baseboard management controller, and verifying whether the startup sequence adjustment for the target device is successful; If not, a prompt message is output.

7. The device startup control method according to claim 6, characterized in that: Reading the target location information table from the baseboard management controller and verifying whether the startup sequence adjustment for the target device is successful includes: Pre-acquire an identifier of the target device; Reading the target location information table from the baseboard management controller, obtaining an identifier of a first hardware device in the target location information table, and determining whether the identifier obtained from the target location information table is consistent with an identifier of the target device obtained in advance; If they are consistent, it is determined that the startup sequence adjustment for the target device is successful; If they are inconsistent, it is determined that the boot sequence adjustment for the target device is unsuccessful.

8. The device startup control method according to claim 6, characterized in that: Also includes: When verifying that the startup sequence adjustment for the target device is unsuccessful, determining whether an automatic restart function is enabled; If enabled, the server will be automatically restarted.

9. The device startup control method according to claim 1, characterized in that: Also includes: Based on the scan sequence table of the designated central processor stored in the target storage medium, a corresponding location information table for reflecting the location information of the hardware device is established and used as the location information table of the designated central processor; The location information table of the designated central processing unit is sent to a baseboard management controller, so that the baseboard management controller records the location information table of the designated central processing unit.

10. The device startup control method according to claim 1, characterized in that: After determining that the target storage medium does not store a scan sequence table of the designated central processor, the method further includes: Determining whether a scan sequence table generation instruction is received; If so, a new scan sequence table is generated based on the scan sequence table generation instruction, and the newly generated scan sequence table is used as the scan sequence table of the central processing unit pointed to by the scan sequence table generation instruction, so that when scanning each network interface of the central processing unit pointed to by the scan sequence table generation instruction, the scan sequence table used is the newly generated scan sequence table.

11. 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 startup control method according to any one of claims 1 to 10 are implemented.

12. A device startup control device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the device startup control method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device startup control method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Equipment numbering method and device and computer readable storage medium

    CN111625285A

  • Method and device for identifying PCI (Peripheral Component Interconnect) equipment, electronic equipment and readable storage medium

    CN117348947A