Device startup control method, computer program product, device and storage medium
By establishing a collection of scan sequence tables for the central processor and reading network interface information in the target storage medium, flexible adjustment of PCIe equipment startup sequence is achieved, solving the problems of difficulty in adjusting the startup sequence and complex BIOS settings in the existing technology, improving the efficiency and accuracy.
Patent Information
- Application Number
- CN202411733501.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The prior art is difficult to flexibly and conveniently adjust the startup sequence of PCIe devices, which makes it difficult to meet customer needs, and there are problems such as high time cost and error-prone adjustment through BIOS settings.
After the server is started, a collection of scan sequence tables are established for each central processor, and the central processor network interface information 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 to perform the device Adjust the startup sequence to avoid resetting the BIOS.
It realizes flexible and convenient adjustment of the device startup sequence, reduces the time cost and error risk for engineers, and simplifies the process of establishing a scan sequence table collection.
Smart Images

Figure CN119201257A_ABST
Abstract
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 device startup control method, comprising:
[0009] 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;
[0010] 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;
[0011] Reading network interface information of a central processor to which the target device is connected from the target storage medium;
[0012] 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;
[0013] The network interface scans of each central processing unit are performed in sequence, and when the network interfaces of the central processing unit connected to the target device are scanned, the scan sequence table used is the target scan sequence table.
[0014] On the other hand, it also includes:
[0015] 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.
[0016] On the other hand, it also includes:
[0017] 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;
[0018] 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;
[0019] The target position information table is sent to a baseboard management controller, so that the baseboard management controller records the target position information table.
[0020] On the other hand, it also includes:
[0021] 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.
[0022] On the other hand, it also includes:
[0023] The display device is controlled by the baseboard management controller so that the display device displays the target position information table.
[0024] On the other hand, it also includes:
[0025] Reading the target location information table from the baseboard management controller, and verifying whether the startup sequence adjustment for the target device is successful;
[0026] If not, a prompt message is output.
[0027] On the other hand, 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:
[0028] Pre-acquire an identifier of the target device;
[0029] 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;
[0030] If they are consistent, it is determined that the startup sequence adjustment for the target device is successful;
[0031] If they are inconsistent, it is determined that the boot sequence adjustment for the target device is unsuccessful.
[0032] On the other hand, it also includes:
[0033] When verifying that the startup sequence adjustment for the target device is unsuccessful, determining whether an automatic restart function is enabled;
[0034] If enabled, the server will be automatically restarted.
[0035] On the other hand, it also includes:
[0036] Determining whether a scan sequence table of a designated central processor is stored in the target storage medium;
[0037] If so, the scan sequence table stored in the target storage medium is used as the scan sequence table of the designated central processor, so that when scanning each network interface of the designated central processor, the scan sequence table used is the scan sequence table of the designated central processor stored in the target storage medium.
[0038] On the other hand, it also includes:
[0039] Determining whether the designated CPU is the same as the CPU connected to the target device;
[0040] 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.
[0041] On the other hand, it also includes:
[0042] 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;
[0043] 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.
[0044] On the other hand, after determining that the target storage medium does not store the scan sequence table of the designated central processor, the method further includes:
[0045] Determining whether a scan sequence table generation instruction is received;
[0046] 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.
[0047] In a second aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned device startup control method when executed by a processor.
[0048] In a third aspect, the present invention provides a device startup control device, comprising:
[0049] Memory for storing computer programs;
[0050] The processor is used to execute 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 having a computer program stored thereon, and 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 embodiment of the present invention, the device startup sequence can be adjusted by only writing the network interface information of the central processor to which the target device is connected in advance into the target storage medium.
[0053] Specifically, the present application scheme takes into account that, currently, when a customer needs to adjust the startup sequence of a 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 present application scheme, after the server is started, a set of scan sequence tables corresponding to the CPU will be automatically established for each CPU in the server. For any CPU, the scan sequence table set of the CPU includes N scan sequence tables, N is a positive integer and represents 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 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. In other words, for the CPU, no matter which network interface of the CPU the customer needs to connect to the device to start first, the corresponding scan sequence table can be found in the scan sequence table set of the CPU. After that, the network interface information of the central processor connected to the target device can be read from the target storage medium. The network interface information of the central processor 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, if the user wants to adjust the startup order of a certain device to the first place, the device is used as the target device, and the network interface information of the central processor connected to the target device is written into the target storage medium. Therefore, after reading the network interface information of the central processor connected to the target device from the target storage medium, the first scanned network interface that matches the network interface information can be selected from the corresponding scan sequence table set as the target scan sequence table corresponding to the central processor connected to the target device. Then, when scanning each network interface of the central processor connected to the target device, the scan sequence table used is the target scan sequence table, so that for the central processor connected to the target device, the target device is the first device to be started.
[0054] It can be seen that if the user needs to readjust the boot sequence, it is only necessary to adjust the content in the target storage medium, without the need for engineers to re-set the BIOS program, so that the present application can perform device startup control, and the boot sequence can be adjusted flexibly and conveniently. In addition, it should be noted that in the present application, the established scan sequence table set only needs to consider the situation where each network interface under the CPU is the first network interface to be scanned, and the scanning order of the remaining network interfaces conforms to the default hardware scanning order, so that the process of establishing the scan sequence table set is very simple and convenient, and the operation can be achieved by simply adjusting the BIOS program, which is not easy to make mistakes and is easy to implement the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A flowchart of an implementation method of a device startup control method provided by a specific embodiment of the present invention;
[0057] Figure 2 This is an example diagram of a topological structure of a PCIe device connected to a CPU in a specific implementation manner of the present invention;
[0058] Figure 3 It is a schematic diagram of the principle structure in a specific implementation mode of the present invention;
[0059] Figure 4 An implementation flow chart of a device startup control device provided by a specific implementation mode of the present invention;
[0060] Figure 5 The present invention is a schematic diagram of the structure of a computer-readable storage medium. DETAILED DESCRIPTION
[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, so that the startup sequence can be adjusted flexibly and conveniently.
[0062] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention 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 invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0063] Please refer to Figure 1 , Figure 1 The present invention provides a flow chart of a device startup control method according to a specific embodiment of the present invention. The device startup control method may include the following steps:
[0064] Step S101: after the server is started, a set of scanning sequence tables corresponding to the central processors is established for each central processor in the server.
[0065] Among them, 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 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.
[0066] After the server is started, the BIOS can establish a set of scan sequence tables corresponding to each CPU in the server. It is understandable that an engineer needs to perform BIOS program settings in advance so that the BIOS can perform the operation of step S101 of the present application.
[0067] In the present application, the established scan sequence table set of the CPU only needs to consider the situation that each network interface under the CPU is the first network interface to be scanned, and the scanning order of the remaining network interfaces only needs to conform to the default hardware scanning order, which makes the establishment process of the scan sequence table set very simple and convenient, that is, the engineer only needs to make simple adjustments to the BIOS program to implement the operation of step S101, which is not prone to errors and easy to implement the solution.
[0068] For example, in one scenario, there are two CPUs on the server motherboard, and you need to create separate scan sequence table sets 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 scan sequence table set corresponding to CPU-0 includes 5 scan sequence tables, and the scan sequence table set corresponding to CPU-1 includes 6 scan sequence tables.
[0069] In the scan sequence table set of CPU-0, the first scan sequence table takes the first network interface PE0 of CPU-0 as the first network interface to be scanned, and 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 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 scan sequence table set of CPU-0, the second scan sequence table takes the second network interface PE1 of CPU-0 as the first network interface to be scanned, and 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 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 scan sequence table set of CPU-0, the network interface scanning order reflected by the third scan sequence table can be expressed as: PE2—PE0—PE1—PE3—PE4, the network interface scanning order reflected by the fourth scan sequence table can be expressed as: PE3—PE0—PE1—PE2—PE4, and the network interface scanning order reflected by the fifth scan sequence table can be expressed as: PE4—PE0—PE1—PE2—PE3.
[0072] The above text illustrates the five scan sequence tables included in the scan sequence table set corresponding to CPU-0. Similarly, a scan sequence table set corresponding to CPU-1 can also be established.
[0073] In addition, it should be noted that there is also a startup sequence between different CPUs. For example, CPU-0 is usually started first. After completing the scanning and startup of each hardware device connected to CPU-0, the scanning and startup of each hardware device connected to CPU-1 is performed. In addition, the sequence between CPUs is usually inconvenient to adjust. Therefore, the present application scheme adjusts the startup sequence of the target device, which refers to adjusting the startup sequence of the target device under the CPU to which it is connected.
[0074] Step S102: Reading 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 may be, for example, an EEPROM (Electrically ErasableProgrammable Read Only Memory) designated on the motherboard. The target storage medium stores the network interface information of the central processor to which the target device is connected. The content may be pre-written to the target storage medium by the user, that is, the user may set which device to be adjusted to the first position in the boot sequence according to the user's needs.
[0076] by Figure 2 For example, the topological structure diagram of the PCIe device connected to the CPU in a specific implementation is shown in FIG. Figure 2 From the topology, we can see that if the startup sequence is not modified, then for Figure 2 For the CPU, PE0 is scanned first, so that the network card, graphics processor and PCIe device connected to PE0 are started first. Then PE1 is scanned, so that the target network card connected to PE1 is started. Then PE2 to PEN are scanned in turn.
[0077] For example, if the user wants to use the target network card to configure the initial network connection, this requires that the eth name of the target network card identified by all machines on the operating system side must be unified as eth0. Under the operating system, the default configuration usually uses eth0 as the primary network interface. If the primary network interface identified by the operating system is not eth0, it may cause network configuration failure or network interruption. If the target network card is ranked first at the hardware level, the operating system will identify the target network card as eth0; otherwise, it may be identified 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 processor connected to the target device to the target storage medium, that is, Figure 2 In the example of , the network interface information of the central processor connected to the target network card is written to the target storage medium, for example Figure 2 In the example, the central processor connected to the target network card is, for example, CPU-1, and is connected to PE1, then the network interface information of the central processor connected to the target network card, "CPU-1, PE1", needs to be written into the target storage medium in advance.
[0079] Step S103: According to the read network interface information of the CPU connected to the target device, the first scanned network interface is selected from the corresponding scan sequence table set, and the scan sequence table whose network interface matches the network interface information is used as the target scan sequence table corresponding to the CPU connected to the target device.
[0080] After the BIOS reads the network interface information of the central processor connected to the target device, it can select the scan sequence table whose first scanned network interface matches the network interface information from the corresponding scan sequence table set. For example, in the above example, the network interface information of the central processor connected to the target network card is "CPU-1, PE1", then the corresponding scan sequence table set is the scan sequence table set of CPU-1. Then, for the scan sequence table set of CPU-1, which includes multiple scan sequence tables, the scan sequence table whose first scanned network interface matches the network interface information needs to be selected. That is to say, in the scan sequence table set of CPU-1, it is necessary to find the scan sequence table whose first scanned network interface is PE1 as the target scan sequence table corresponding to CPU-1.
[0081] Step S104: Scanning the network interfaces of each CPU in sequence, and when scanning the network interfaces of each CPU to which the target device is connected, the scanning sequence table used is the target scanning sequence table.
[0082] BIOS will scan the network interfaces of each CPU in sequence. For example, in the above example, the network interfaces of CPU-0 and CPU-1 will be scanned in sequence. When scanning the network interfaces of the CPU to which the target device is connected, the scan sequence table used is the target scan sequence table. For example, in the above example, the CPU to which the target device is connected is specifically CPU-1. When scanning the network interfaces of CPU-1, the scan sequence table used is the target scan sequence table corresponding to CPU-1, so that the target network card connected to PE1 can be started first.
[0083] In addition, it is understandable that when scanning the network interfaces of each CPU in turn, if there is no corresponding target scan sequence table for a certain CPU, it means that the scan sequence of the CPU has not been adjusted, then the network interfaces of the CPU can be scanned directly according to the default hardware scan sequence.
[0084] In a specific embodiment of the present invention, it may also include:
[0085] The target scanning sequence table is sent to the operating system, so that the operating system performs parameter configuration on each hardware device connected to the central processing unit connected to the target device based on the target scanning sequence table.
[0086] This implementation method takes into account that, since the present application scheme adjusts the startup sequence, that is, for the central processing unit connected to the target device, the target scan sequence table is used instead of the default hardware scan sequence. Therefore, in order to ensure that the operating system can configure the various hardware devices connected to the CPU according to the expected recognition order in the target scan sequence table to avoid errors, in this implementation method, the target scan sequence table will be sent to the OS. When the OS configures the various hardware devices connected to the CPU, it can configure them according to the scan sequence in the target scan sequence table, so that in the operating system, the configuration order of the PCIe device is consistent with the actual scan order. For example, in the above example, after the OS configures the target network card, the BDF address of the target network card can be placed at the front of all devices connected to the CPU, and the corresponding network interface is eth0. Ensure that the operating system can identify 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 scan sequence table, that is, the scan sequence of the CPU is not adjusted, the OS can configure parameters for each hardware device connected to the central processor according to the default hardware scan sequence.
[0088] See also Figure 3 , is a schematic diagram of a principle architecture in an implementation mode, Figure 3 In the example, the BIOS will send the scan order table of each CPU to the operating system, which may include the target scan order table and the scan order table used by each CPU that has not undergone scan order adjustment.
[0089] In a specific embodiment of the present invention, it may also include:
[0090] After establishing a scan sequence table set corresponding to each central processor in the server, establishing a corresponding location information table for reflecting the location information of the hardware device for each scan sequence table in each scan sequence table set;
[0091] 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;
[0092] The target position information table is sent to a baseboard management controller, so that the baseboard management controller records the target position information table.
[0093] This implementation method takes into account that the present application scheme adjusts the startup sequence, and the location information table is related to the PEPort sequence and the physical slot sequence of the PCIe device. When the CPU scanning sequence changes, the location information used to reflect the hardware device 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 scan sequence table set corresponding to each central processor in the server, a corresponding location information table for reflecting the location information of the hardware device can be established for each scan sequence table in each scan sequence table set.
[0095] Later, when a scan sequence table is selected as the target scan sequence table, the location information table corresponding to the target scan sequence table can be selected from the previously established location information table as the target location information table of the CPU connected to the target device. The location information table can usually be stored in the BMC (Board Management Controller), so the target location information table can be sent to the BMC so that the BMC records the target location information table, which is also the target location information table of the CPU connected to the target device, reflecting the location information of the hardware device connected to the CPU and the PE Port information.
[0096] In addition, it should be noted that for any CPU, if there is no corresponding target scan order table, that is, the scan order of the CPU has not been adjusted, the location information table of the CPU can be generated according to the default hardware scan order and sent to the BMC for storage. Figure 3 In the example, the BIOS sends various location information tables to the BMC, which may include the target location information table and the scan order table of each CPU that has not been adjusted in the scan order.
[0097] Furthermore, in a specific embodiment of the present invention, it may also include:
[0098] 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.
[0099] This implementation takes into account that in some cases, the location information of hardware devices will also be recorded in the SMBIOS table, which is also the system management basic input and output system table. Since the target location information table of the CPU to which the target device is connected is obtained in the present application scheme, the hardware device location information recorded in the SMBIOS table can be updated based on the target location information table to ensure the accuracy of the relevant hardware device location information about the CPU to which the target device is connected in the SMBIOS table, that is, to keep the information in the SMBIOS table consistent with the actual hardware connection, so as to facilitate management and maintenance.
[0100] In addition, it can be understood that for any CPU, if there is no corresponding target scan order table, that is, the scan order of the CPU has not been adjusted, the location information table of the CPU can be generated according to the default hardware scan order and can be sent to the SMBIOS table for storage. Figure 3 In the example, the BIOS will send each location information table to the SMBIOS table, which may include the target location information table and the scan order table of each CPU that has not been adjusted in the scan order.
[0101] In a specific embodiment of the present invention, it also includes:
[0102] The display device is controlled by the baseboard management controller so that the display device displays the target position information table.
[0103] This implementation takes into account that in some cases, there may be a need to view device information, so the display device can be controlled by the BMC 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 end so that the user can view the target location information table on the Web end.
[0104] In a specific embodiment of the present invention, it may also include:
[0105] Reading the target location information table from the baseboard management controller and verifying whether the startup sequence adjustment for the target device is successful;
[0106] If not, a prompt message is output.
[0107] This implementation takes into account that the present application scheme adjusts the startup sequence, and in order to ensure that the adjustment is successful, verification can be performed. Specifically, the target location information table can be read from the baseboard management controller to verify whether the startup sequence adjustment for the target device is successful.
[0108] The target location information table stored in the baseboard management controller reflects the location information and PE Port information of each hardware device connected to the CPU where the target device is located. When the target scan sequence table selected from the scan sequence table set is different, the target location information table will be correspondingly different. Therefore, the target scan sequence table can effectively verify whether the startup sequence is adjusted correctly, that is, 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, and when the verification fails, a prompt message may be output to remind the user to pay attention to the situation.
[0110] In a specific implementation 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-acquire the target device's identifier;
[0112] Reading a target location information table from a 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 a target device obtained in advance;
[0113] If they are consistent, it is determined that the startup sequence adjustment for the target device is successful;
[0114] If they are inconsistent, it is determined that the boot order adjustment for the target device is unsuccessful.
[0115] This implementation takes into account that, based on the target location information table, verifying whether the startup sequence adjustment for the target device is successful can usually be implemented based on an identifier of the target device.
[0116] Specifically, in this implementation, it is necessary to obtain the identifier of the target device in advance, for example, the target device is Figure 2 In the implementation method of the target network card, 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 correct, the identifier of the first hardware device in the target location information table should be consistent with the identifier of the pre-acquired target device. In the above example, the MAC address of the first hardware device in the target location information table should be consistent with the MAC address of the pre-acquired target network card. At this time, it can be determined that the startup sequence adjustment 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 in the CPU to which it is connected.
[0118] In a specific embodiment of the present invention, it may also include:
[0119] When the verification of the startup sequence adjustment for the target device fails, determining whether the automatic restart function is enabled;
[0120] If enabled, the server will be automatically restarted.
[0121] This implementation method takes into account that if it is verified that the startup sequence adjustment for the target device is unsuccessful, it can be solved by restarting. Therefore, when the automatic restart function is turned on, the server can be automatically restarted. In some cases, after the restart, the startup sequence of the target device can be successfully adjusted. Of course, in actual applications, a restart limit threshold can be set. When the restart number exceeds the restart limit threshold, the restart will not continue to be restarted to avoid continuous restarts.
[0122] In addition, this implementation method will determine whether the automatic restart function is turned on. This is to ensure flexibility, so that you can choose whether to use this function as needed. Only when the automatic restart function is enabled will it be allowed to try to re-adjust the startup sequence of the target device through automatic restart. If the automatic restart function is turned off, it will not automatically restart when the verification of the startup sequence adjustment for the target device is unsuccessful.
[0123] In a specific embodiment of the present invention, it may also include:
[0124] Determine whether the target storage medium stores a scan sequence table of the designated central processor;
[0125] If so, the scan sequence table stored in the target storage medium is used as the scan sequence table of the designated central processor, so that when scanning each network interface of the designated central processor, the scan sequence table used is the scan sequence table of the designated central processor stored in the target storage medium.
[0126] As can be seen from the above description, the scan sequence table set established in the present application solution only needs to consider the situation that each network interface under the CPU is the first network interface to be scanned, and the scanning order of the remaining network interfaces conforms to the default hardware scanning order. This has the advantage of making the process of establishing the scan sequence table set very simple and convenient. The operation can be achieved by simply adjusting the BIOS program, which is not prone to errors and easy to implement. In actual applications, for the need to adjust the device startup sequence, it is usually required to adjust the startup sequence of the specified device to the first position of the connected CPU. For other PCIe devices connected to the CPU, the default hardware scanning order is adopted, that is, the above solution, which can meet the user needs under normal circumstances.
[0127] However, this implementation method takes into account that in a small number of cases, the user not only requires adjusting the boot order of a specified device to the first place of the corresponding CPU, but also requires that the boot order of other PCIe devices under the CPU be started according to user needs, and these PCIe devices cannot be started according to the default hardware scanning order.
[0128] In this regard, in this implementation, the user is allowed to directly store the scan sequence table of the designated CPU in the target storage medium. In this way, when the network interfaces of the designated CPU are subsequently scanned, the scan sequence table of the designated CPU stored in the target storage medium is directly used, thereby realizing the startup sequence control of each hardware device connected to the designated CPU, and meeting the needs of users in some special cases.
[0129] In a specific embodiment of the present invention, it may also include:
[0130] Determine whether the specified CPU is the same as the CPU connected to the target device;
[0131] 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.
[0132] This implementation takes into account that, in most cases, the target storage medium will only store the network interface information of the central processor to which the target device is connected. In some cases, if the user needs to adjust the startup order of multiple PCIe devices under one CPU, the target storage medium will store the scan sequence table of the specified CPU, and the network interface information of the central processor to which the target device is connected stored in the target storage medium will be deleted. Of course, if the two are for different CPUs, the target storage medium may store both the network interface information of the central processor to which the target device is connected and the scan sequence table of the specified central processor. The above are all normal situations that may occur, and it can be understood that for the last case, the CPU to which the target device is connected and the CPU specified by the scan sequence table stored in the target storage medium should be different CPUs. If the two are the same CPU, it may be caused by the user forgetting to delete the network interface information of the central processor to which the target device is connected stored in the target storage medium. For example, the user originally stored the network interface information of the central processing unit connected to the target device in the target storage medium. Later, due to business adjustments, the user needed to further adjust the startup sequence of each PCIe under the CPU. Therefore, the user stored the scan sequence table of the specified CPU in the target storage medium, but forgot to delete the previously stored network interface information of the central processing unit connected to the target device.
[0133] In this implementation, for such a situation, the network interface information of the central processing unit connected to the target device stored in the target storage medium can be directly ignored. That is, when the scan sequence table of the specified CPU is stored in the target storage medium, the scan sequence table has the highest priority and will be directly regarded as the scan sequence table required to be used by the specified CPU.
[0134] In a specific embodiment of the present invention, it may also include:
[0135] 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;
[0136] 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.
[0137] This implementation takes into account that since the scan sequence table of the designated CPU is directly stored in the target storage medium, in order to avoid errors in the location information table of the designated CPU, a corresponding location information table for reflecting the location information of the hardware device is established based on the scan sequence table, and is used as the location information table of the designated CPU. It can also be sent to the BMC and SMBIOS later, so that the BMC records the location information table of the designated CPU and updates the location information in the SMBIOS.
[0138] In a specific implementation of the present invention, after determining that the target storage medium does not store the scan sequence table of the designated central processor, the method may further include:
[0139] Determining whether a scan sequence table generation instruction is received;
[0140] 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.
[0141] This implementation method takes into account that, in addition to pre-storing the scan sequence table of the designated central processing unit in the target storage medium, it is also allowed to generate the specific scan sequence table required by the user in other ways to meet the user's requirements for the startup sequence of each PCIe device under the corresponding CPU. Specifically, in this implementation method, 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 the 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] There are many specific implementation methods for newly generating a scan sequence table based on the scan sequence table generation instruction. For example, one implementation method takes into account that the central processor pointed to by the scan sequence table generation instruction can be determined based on the scan sequence table generation instruction, and then the scan sequence of each network interface under the central processor can be determined based on the scan sequence table generation instruction. Then, 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 actual applications, the scan sequence table generation instruction can carry the scan sequence requirements for all network interfaces under the central processor it points to, or it can only carry the scan sequence requirements for some network interfaces under the central processor it points to. For the scan sequence of other network interfaces under the central processor that are not mentioned in the scan sequence table generation instruction, the default hardware scan sequence can be used to ensure the flexibility of the implementation of the solution. In particular, the latter implementation method improves the convenience of the scan sequence table generation instruction.
[0143] By applying the technical solution provided by the embodiment of the present invention, the device startup sequence can be adjusted by only writing the network interface information of the central processor to which the target device is connected in advance into the target storage medium.
[0144] Specifically, the present application scheme takes into account that, currently, when a customer needs to adjust the startup sequence of a 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 present application scheme, after the server is started, a set of scan sequence tables corresponding to the CPU will be automatically established for each CPU in the server. For any CPU, the scan sequence table set of the CPU includes N scan sequence tables, N is a positive integer and represents 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 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. In other words, for the CPU, no matter which network interface of the CPU the customer needs to connect to the device to start first, the corresponding scan sequence table can be found in the scan sequence table set of the CPU. After that, the network interface information of the central processor connected to the target device can be read from the target storage medium. The network interface information of the central processor 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, if the user wants to adjust the startup order of a certain device to the first place, the device is used as the target device, and the network interface information of the central processor connected to the target device is written into the target storage medium. Therefore, after reading the network interface information of the central processor connected to the target device from the target storage medium, the first scanned network interface that matches the network interface information can be selected from the corresponding scan sequence table set as the target scan sequence table corresponding to the central processor connected to the target device. Then, when scanning each network interface of the central processor connected to the target device, the scan sequence table used is the target scan sequence table, so that for the central processor connected to the target device, the target device is the first device to be started.
[0145] It can be seen that if the user needs to readjust the boot sequence, it is only necessary to adjust the content in the target storage medium, without the need for engineers to re-set the BIOS program, so that the present application can perform device startup control, and the boot sequence can be adjusted flexibly and conveniently. In addition, it should be noted that in the present application, the established scan sequence table set only needs to consider the situation where each network interface under the CPU is the first network interface to be scanned, and the scanning order of the remaining network interfaces conforms to the default hardware scanning order, so that the process of establishing the scan sequence table set is very simple and convenient, and the operation can be achieved by simply adjusting the BIOS program, which is not easy to make mistakes and is easy to implement the present application.
[0146] Corresponding to the above method embodiment, the embodiment of the present invention further provides a device startup control system, which can be referred to in correspondence with the above. The device startup control system may include:
[0147] A scan sequence table set establishment module is used to establish a scan sequence table set corresponding to each central processor in the server after the server is started;
[0148] 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 sequence of the remaining network interfaces except the i-th network interface conforms to the default hardware scanning sequence; i is a positive integer ranging from 1 to N;
[0149] A target storage medium reading module is used 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 scanning sequence table determination module is used to select, from the corresponding scanning sequence table set, a scanning sequence table whose first scanned network interface matches the network interface information of the central processor connected to the target device according to the read network interface information of the central processor connected to the target device, as a target scanning sequence table corresponding to the central processor connected to the target device;
[0151] The scanning execution module is used to scan the network interfaces of each central processing unit in sequence, and when scanning the network interfaces of the central processing unit connected to the target device, the scanning sequence table used is the target scanning 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 referred to in correspondence with the above.
[0153] See also Figure 4 As shown, the device may include:
[0154] Memory 401, used for storing computer programs;
[0155] The processor 402 is configured to execute a computer program to implement the steps of the device startup control method in any of the above embodiments.
[0156] The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the device startup control method in any of the above embodiments are implemented.
[0157] See also Figure 5The computer readable storage medium 50 stores a computer program 51, and when the computer program 51 is executed by the 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), register, hard disk, removable disk, or any other form of storage medium known in the technical field.
[0158] It should also be noted that, in this article, relational terms such as first and second, etc. are only used 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", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0159] Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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 the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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 the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention, and 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 ordinary technicians in the technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection 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; The network interface scans of each central processing unit are performed in sequence, and when the network interfaces of the central processing unit connected to the target device are scanned, the scan sequence table used is the target scan sequence table.
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 any one of claims 1 to 8, characterized in that: Also includes: Determining whether a scan sequence table of a designated central processor is stored in the target storage medium; If so, the scan sequence table stored in the target storage medium is used as the scan sequence table of the designated central processor, so that when scanning each network interface of the designated central processor, the scan sequence table used is the scan sequence table of the designated central processor stored in the target storage medium.
10. The device startup control method according to claim 9, characterized in that: 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.
11. The device startup control method according to claim 9, 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.
12. The device startup control method according to claim 9, 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.
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 startup control method according to any one of claims 1 to 12 are implemented.
14. A device startup control device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the device startup control method according to any one of claims 1 to 12.
15. 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 12 are implemented.
Citation Information
Patent Citations
Computer automatic tour inspection system and method thereof
CN101131662A
Equipment numbering method and device and computer readable storage medium
CN111625285A
Starting sequence deployment method for multiple operating systems and related device
CN114546537A
Method and device for identifying PCI (Peripheral Component Interconnect) equipment, electronic equipment and readable storage medium
CN117348947A
