Operating system startup device, electronic device, and operating system startup method
By pre-checking the firmware on the fast interconnect module of the peripheral components by the controller before the operating system is started and self-checking by the basic input and output system, the problems of operating system failure and unstable operation are solved, and a higher startup success rate and stability are achieved.
Patent Information
- Application Number
- CN202510526311.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-25
AI Technical Summary
The operating system is prone to failure or not stable enough after startup, especially in the server, which causes startup failure and unstable operation caused by firmware exceptions on the fast interconnect module of peripheral components.
Before the operating system is started, the firmware on the fast interconnect module of the peripheral component is pre-checked through the controller. If the pre-check is passed, the basic input and output system will then be self-checked to ensure that the firmware status is normal before starting the operating system.
It reduces the risk of operating system failure, improves operating stability after startup, and enhances fault tolerance and reliability of startup process.
Smart Images

Figure CN120066595B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technologies, and in particular, to an operating system startup device, an electronic device, and a method for starting an operating system. Background Art
[0002] As the core software for an electronic device to run, the stability, efficiency, and security of the startup process of the operating system directly affect the overall performance and user experience of the electronic device.
[0003] In related technologies, for the startup of an operating system in an electronic device such as a server, usually, after the basic input output system (BIOS) detects that the server is powered on, the operating system is directly started. However, this method is likely to cause the failure of starting the operating system or the unstable operation of the operating system after startup. Summary of the Invention
[0004] The present application provides an operating system startup device, an electronic device, and a method for starting an operating system, so as to at least solve the problem that the startup of the operating system in related technologies is likely to fail or the operation after startup is unstable.
[0005] The present application provides an operating system startup device, including:
[0006] a controller, a basic input output system, a peripheral component interconnect express (PCIe) switch management module, and a PCIe module, which are respectively connected to the controller;
[0007] The PCIe switch management module is further connected to the basic input output system, and the PCIe module is respectively connected to the basic input output system and multiple PCIe firmware;
[0008] The PCIe switch management module is configured to, when the controller starts up, allocate the control authority of the PCIe module to the controller;
[0009] The controller is configured to, after obtaining the control authority, obtain the status information of multiple PCIe firmware, and if the status information meets the control instruction generation condition, generate a control instruction, and control the PCIe switch management module to allocate the control authority to the basic input output system;
[0010] The basic input output system is configured to, after obtaining the control authority, according to the control instruction, obtain the status information of multiple PCIe firmware again, and determine whether to start the operating system according to the status information obtained again.
[0011] The present application further provides an electronic device, including the above-mentioned operating system startup device.
[0012] The present application also provides a method for starting an operating system, including:
[0013] Obtaining status information of multiple Peripheral Component Interconnect Express (PCIe) firmwares through a controller;
[0014] Determining whether a control instruction generation condition is satisfied according to the status information of the multiple PCIe firmwares;
[0015] If the status information satisfies the control instruction generation condition, generating a control instruction;
[0016] According to the control instruction, obtaining the status information of the multiple PCIe firmwares connected to the PCIe module again through the Basic Input / Output System (BIOS);
[0017] Determining whether to start the operating system according to the status information obtained again.
[0018] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods for starting an operating system are implemented.
[0019] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above methods for starting an operating system are implemented.
[0020] Through the present application, the operating system startup device provided by the present application includes: a controller, a basic input / output system, a Peripheral Component Interconnect Express (PCIe) switch management module, and a PCIe module, which are respectively connected to the controller. The PCIe switch management module is further connected to the basic input / output system, and the PCIe module is respectively connected to the basic input / output system and multiple PCIe firmware. Among them, the PCIe switch management module is used to allocate the control authority of the PCIe module to the controller when the controller starts up. The controller is used to obtain the status information of multiple PCIe firmware after obtaining the control authority. If the status information meets the control instruction generation condition, it generates a control instruction and controls the PCIe switch management module to allocate the control authority to the basic input / output system. The basic input / output system is used to obtain the status information of multiple PCIe firmware again according to the control instruction after obtaining the control authority, and determine whether to start the operating system according to the status information obtained again. In the present application, through the PCIe switch management module, when the controller is powered on, the control authority of the PCIe module is first allocated to the controller. The controller performs self-check on multiple PCIe firmware connected to the PCIe module. If the self-check passes, it generates a control instruction and allocates the control authority of the PCIe module to the basic input / output system. The basic input / output system performs self-check on multiple PCIe firmware connected to the PCIe module. If the self-check passes, it starts the operating system. By performing self-check on the PCIe firmware through the controller and the basic input / output system and then starting the operating system after the self-check passes, the situation of easy startup failure caused by directly starting the operating system in the related art is reduced, and the stability of the operating system during operation after startup is improved. Description of the Drawings
[0021] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0022] Figure 1 Schematic structural diagram of an operating system startup device provided by an embodiment of the present application;
[0023] Figure 2 Schematic flowchart of a method for a controller to determine whether the control instruction generation condition is met according to the status information provided by an embodiment of the present application;
[0024] Figure 3A flowchart showing a method for a controller to determine whether a control instruction generation condition is met according to type information preset in a target Peripheral Component Interconnect Express (PCIe) firmware;
[0025] Figure 4 A flowchart showing a method for a controller to determine whether a control instruction generation condition is met according to weight data preset in a target Peripheral Component Interconnect Express (PCIe) firmware;
[0026] Figure 5 An architecture diagram of a system including a BMC provided by an embodiment of the present application;
[0027] Figure 6 A flowchart showing a method for booting an operating system provided by an embodiment of the present application;
[0028] Figure 7 An interaction diagram provided by an embodiment of the present application;
[0029] Figure 8 A structural diagram of a device for booting an operating system provided by an embodiment of the present application. Detailed implementation manners
[0030] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0031] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and not to describe a specific order or sequence.
[0032] In the present application, taking a server as an example of an electronic device, the server is the core of the entire network system and computing platform, and many important data are stored on the server. And a controller, such as a Baseboard Management Controller (BMC), is the steward in the server and can control the power-on of the server.
[0033] In the related art, the BMC sends a power-on instruction to a Complex Programmable Logic Device (CPLD), and the CPLD powers on the server motherboard. After the BIOS detects the power-on, it directly starts the operating system (OS) of the server. During the startup process of the operating system, if the firmware connected to the peripheral component interconnect express (PCIe) module is abnormal, such as firmware damage, power supply failure, or connection failure, etc., resulting in incomplete initialization, it is likely to cause the operating system startup to fail or the operating system to experience unstable operation such as a blue screen or system crash after startup.
[0034] Therefore, in view of the above technical problems in the related art, it is found in the research process that if a pre-check of the firmware connected to the PCIe is added before the operating system starts, and if the pre-check of the firmware connected to the PCIe by the controller passes, then the BIOS is coordinated to perform a self-check on the firmware connected to the PCIe. If the self-check passes, it indicates that the firmware does not affect the startup of the operating system, and thus starting the operating system can reduce the risk of the operating system startup failure, thereby improving the operating stability of the operating system after startup. Therefore, the present application proposes an operating system startup device, an electronic device, and a method for starting an operating system. The operating system startup device in the present application includes a controller, a basic input / output system, a peripheral component interconnect switch management module, and a peripheral component interconnect module. Among them, when the controller starts, the peripheral component interconnect switch management module assigns the control authority of the peripheral component interconnect module to the controller. After the controller obtains the control authority, it obtains the status information of multiple peripheral component interconnect firmwares. If the status information meets the control instruction generation condition, it generates a control instruction and controls the peripheral component interconnect switch management module to assign the control authority to the basic input / output system. After obtaining the control authority, the basic input / output system obtains the status information of multiple peripheral component interconnect firmwares again according to the control instruction, and determines whether to start the operating system according to the status information obtained again.
[0035] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the following further details the present application in conjunction with the accompanying drawings and specific embodiments.
[0036] Please refer to Figure 1 , Figure 1 which is a schematic structural diagram of an operating system startup device provided by an embodiment of the present application. The structure includes: a controller 01, a basic input / output system 02, a peripheral component interconnect switch management module 03, and a peripheral component interconnect module 04.
[0037] The connection relationship can be as follows:
[0038] The controller 01 is respectively connected to the basic input / output system 02, the Peripheral Component Interconnect Express (PCIe) switch management module 03, and the PCIe module 04. The PCIe switch management module 03 is also connected to the basic input / output system 02. The PCIe module 04 is also respectively connected to the basic input / output system 02 and multiple PCIe firmware 05. The PCIe switch management module 03 is also connected to the PCIe module 04.
[0039] The function is as follows:
[0040] The PCIe switch management module 03 is used to allocate the control authority of the PCIe module 04 to the controller 01 when the controller 01 starts up.
[0041] Optionally, when the controller starts up, the PCIe switch management module receives a high-level signal and transmits the high-level signal to the PCIe module, so that the control authority of the PCIe module is allocated to the controller.
[0042] In this embodiment, the controller 01 takes the BMC as an example, and the operating system startup device takes the application to the server as an example. After the server is powered on, the BMC and the BIOS are powered on at the same time. The BIOS enters the idle mode. The BMC sends a wait-start instruction to the BIOS through the serial port. After the BIOS receives the sent wait-start instruction, it enters the loop waiting state.
[0043] During the startup process, the BMC loads the PCIe host controller driver so that the BMC can recognize various firmware connected to the PCIe.
[0044] Optionally, the firmware connected to the PCIe includes but is not limited to: network cards, Graphics Processing Units (GPUs), and storage control devices, etc.
[0045] After the control authority of the PCIe module 04 is allocated to the BMC, the BMC can act as the Root Complex (RC) of the PCIe and scan the PCIe bus to obtain the firmware connected to the PCIe.
[0046] The controller 01 is used to obtain the status information of multiple PCIe firmware after obtaining the control authority. If the status information meets the control instruction generation condition, it generates a control instruction and controls the PCIe switch management module 03 to allocate the control authority to the basic input / output system 02.
[0047] After the BMC obtains the control authority over the PCIe, it acquires the status information of the firmware connected to the PCIe. Optionally, the status information includes, but is not limited to, key parameters or warning information such as firmware loading completion parameters, link connection success parameters, power stability parameters, firmware error information, etc. Among them, the error information can be captured by the Advanced Error Reporting (AER) module in the PCIe.
[0048] After the BMC obtains the status information of the firmware connected to the PCIe, it can analyze it. If the status information meets the control instruction generation conditions, a control instruction is generated. Among them, the control instruction is used to represent the startup of the operating system, and the control instruction is sent to the BIOS through the serial port or other physical channels.
[0049] If the status information does not meet the control instruction generation conditions, a warning prompt message is generated according to the status information to prompt the user to replace, repair, or adjust the corresponding firmware connected to the PCIe according to the warning prompt message.
[0050] After the BMC generates the control instruction, it is also used to control the Peripheral Component Interconnect Express Switch Management Module 03 to allocate the control authority to the Basic Input / Output System 02, and the BMC releases the occupied PCIe resources.
[0051] Optionally, the BMC sends a low-level signal to the Peripheral Component Interconnect Express Switch Management Module 03, so that the Peripheral Component Interconnect Express Switch Management Module 03 transmits the low-level signal to the Peripheral Component Interconnect Express Module 04, and the low-level signal is used to allocate the control authority of the Peripheral Component Interconnect Express Module 04 to the Basic Input / Output System 02.
[0052] The Basic Input / Output System 02 is used to, after obtaining the control authority, according to the control instruction, acquire the status information of multiple Peripheral Component Interconnect Express firmwares again, and determine whether to start the operating system according to the status information obtained again.
[0053] After the BIOS obtains the control authority over the PCIe, it acquires the status information of the firmware connected to the PCIe again. Optionally, the status information includes, but is not limited to, key parameters or warning information such as firmware loading completion parameters, link connection success parameters, power stability parameters, firmware error information, etc.
[0054] After the BIOS obtains the status information of the firmware connected to the PCIe, it can analyze it. If the status information obtained again meets the startup conditions, the operating system is started. If the status information obtained again does not meet the startup conditions, the operating system is not started.
[0055] In the above embodiments of the present application, the operating system startup device includes: a controller 01, a basic input / output system 02, a peripheral component interconnect express switch management module 03, and a peripheral component interconnect express module 04, which are respectively connected to the controller 01. The peripheral component interconnect express switch management module 03 is further connected to the basic input / output system 02, and the peripheral component interconnect express module 04 is further respectively connected to the basic input / output system 02 and multiple peripheral component interconnect express firmwares. Among them, the peripheral component interconnect express switch management module 03 is used to allocate the control authority of the peripheral component interconnect express module 04 to the controller 01 when the controller 01 starts up. The controller 01 is used to obtain the status information of multiple peripheral component interconnect express firmwares after obtaining the control authority. If the status information meets the control instruction generation condition, it generates a control instruction and controls the peripheral component interconnect express switch management module 03 to allocate the control authority to the basic input / output system 02. The basic input / output system 02 is used to obtain the status information of multiple peripheral component interconnect express firmwares again according to the control instruction after obtaining the control authority, and determine whether to start the operating system according to the status information obtained again. In the embodiments of the present application, through the peripheral component interconnect express switch management module 03, when the controller 01 is powered on, the control authority of the peripheral component interconnect express module 04 is first allocated to the controller 01. The controller 01 performs self-check on multiple peripheral component interconnect express firmwares connected to the peripheral component interconnect express module 04. If the self-check passes, it generates a control instruction and allocates the control authority of the peripheral component interconnect express module 04 to the basic input / output system 02. The basic input / output system 02 performs self-check on multiple peripheral component interconnect express firmwares connected to the peripheral component interconnect express module 04. If the self-check passes, it starts the operating system. By performing self-check on the peripheral component interconnect express firmware through the controller 01 and the basic input / output system 02, passing the self-check indicates that the firmware connected to the peripheral component interconnect express module 04 does not affect the startup of the operating system, and then starts the operating system, thereby reducing the situation of easy startup failure caused by directly starting the operating system in the related art, and improving the stability of the operating system during operation after startup.
[0056] Further, on the basis of the above embodiments, the following embodiments illustrate the process of the controller 01 determining whether the control instruction generation condition is met according to the status information. Among them, the controller 01 is described by taking BMC as an example.
[0057] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for a controller to determine whether a control instruction generation condition is met according to status information provided by an embodiment of the present application. The controller 01 is configured to execute the following steps:
[0058] S201. Determine the target Peripheral Component Interconnect Express (PCIe) firmware with an exception based on the status information of each PCIe firmware.
[0059] Based on the status information of each PCIe firmware, if the status information includes an error message or a warning message with error parameters, it indicates that the corresponding firmware connected to the PCIe has an exception. Thus, the target PCIe firmware with an exception connected to the PCIe is determined.
[0060] S202. Obtain the attribute information of the target PCIe firmware.
[0061] Optionally, the attribute information may include the preset type information of the PCIe firmware, the preset weight data of the PCIe firmware, etc.
[0062] Among them, the type information may be information that can characterize the importance of the firmware during the operating system startup process. The weight data may be the weight value of the importance of the firmware during the operating system startup process, and the higher the weight value, the more important it is during the operating system startup process.
[0063] S203. Determine whether the control instruction generation condition is satisfied based on the attribute information.
[0064] Furthermore, the BMC determines whether the control instruction generation condition is satisfied based on the attribute information of each target PCIe firmware.
[0065] In the above embodiments of the present application, the controller 01 determines the target PCIe firmware with an exception based on the status information of each PCIe firmware, obtains the attribute information of the target PCIe firmware, and then determines whether the control instruction generation condition is satisfied based on the attribute information. In the method of this embodiment, the result of whether the control instruction generation condition is satisfied determined by the controller 01 based on the attribute information of the target PCIe firmware with an exception is more accurate.
[0066] Next, the process of the controller 01 determining whether the control instruction generation condition is satisfied based on the attribute information is described in detail through the following embodiments.
[0067] A possible implementation manner is:
[0068] If the attribute information includes the preset type information of the target PCIe firmware, please refer to Figure 3 , Figure 3 is a schematic flowchart of a method for a controller to determine whether the control instruction generation condition is satisfied according to the preset type information of the target PCIe firmware provided by an embodiment of the present application. The controller 01 is configured to perform the following steps:
[0069] S301. If the type information preset for each target Peripheral Component Interconnect Express (PCIe) firmware indicates that the corresponding target PCIe firmware does not belong to the preset firmware, it is determined that the control instruction generation condition is satisfied.
[0070] Among them, the preset firmware is the firmware that presets to affect the startup of the operating system.
[0071] In this embodiment, a list is preconfigured, and multiple firmwares that have an important impact on the startup of the operating system are preset in the list.
[0072] If the type information preset for each target PCIe firmware indicates that the corresponding target PCIe firmware is not in the above list, it means that the impact of each target PCIe firmware on the startup of the operating system is not significant. Therefore, the control instruction generation condition is satisfied, and a control instruction can be generated.
[0073] S302. If there is at least one type information preset for the target PCIe firmware indicating that the target PCIe firmware belongs to the preset firmware, it is determined that the control instruction generation condition is not satisfied.
[0074] If there is at least one type information preset for the target PCIe firmware indicating that the target PCIe firmware is in the above list, it means that the impact of the target PCIe firmware on the startup of the operating system is very significant. Therefore, the control instruction generation condition is not satisfied, and a control instruction cannot be generated.
[0075] Another possible implementation is:
[0076] If the attribute information includes the weight data preset for the target PCIe firmware, please refer to Figure 4 , Figure 4 is a schematic flowchart of a method for a controller to determine whether the control instruction generation condition is satisfied according to the weight data preset for the target PCIe firmware provided in an embodiment of the present application. The controller is configured to execute the following steps:
[0077] S401. Add up the weight data preset for each target PCIe firmware, and determine the total weight data of the target PCIe firmware with an exception as the result of the addition.
[0078] Exemplarily, assume that the weight data preset for target PCIe firmware A is 1, the weight data preset for target PCIe firmware B is 2, and the weight data preset for target PCIe firmware C is 1. Add up the weight data preset for the above target PCIe firmware, that is, 1 + 2 + 1 = 4. Then, "4" is the total weight data of the target PCIe firmware with an exception.
[0079] Exemplarily, assume that the preset weight data of the target peripheral component express card firmware A is 1, the preset weight data of the target peripheral component express card firmware B is 2, and the preset weight data of the target peripheral component express card firmware C is 3. Add the preset weight data of the above target peripheral component express card firmware, that is, 1 + 2 + 3 = 6. Then, "6" is the total weight data of the target peripheral component express card firmware with an exception.
[0080] S402. If the total weight data is less than the preset total weight data threshold, it is determined that the control instruction generation condition is satisfied.
[0081] Taking the above example, assume that the preset total weight data threshold is "5". Then, the total weight data "4" is less than "5", indicating that the combined influence of the target peripheral component express card firmware A, the target peripheral component express card firmware B, and the target peripheral component express card firmware C does not cause too much interference to the startup of the operating system. Therefore, it is determined that the control instruction generation condition is satisfied.
[0082] S403. If the total weight data is greater than or equal to the preset total weight data threshold, it is determined that the control instruction generation condition is not satisfied.
[0083] Taking the above example, assume that the preset total weight data threshold is "5". Then, the total weight data "6" is greater than "5", indicating that the combined influence of the target peripheral component express card firmware A, the target peripheral component express card firmware B, and the target peripheral component express card firmware C causes too much interference to the startup of the operating system. Therefore, it is determined that the non-control instruction generation condition is satisfied.
[0084] In the above embodiments of the present application, the controller 01 can determine whether the control instruction generation condition is satisfied according to the preset type information of the target peripheral component express card firmware or according to the preset weight data of the target peripheral component express card firmware. The controller 01 can determine whether to generate a control instruction according to the influence degree of the abnormal peripheral component express card firmware on the startup of the operating system, so as to make the judgment on whether to generate a control instruction more accurate.
[0085] After the controller 01 generates a control instruction and controls the peripheral component express card switch management module 03 to allocate the control authority to the basic input / output system 02, the basic input / output system 02 starts to self-check the firmware connected to the PCIe to determine whether to start the operating system.
[0086] One possible implementation is that the BIOS determines the target Peripheral Component Interconnect Express (PCIe) firmware where an exception occurs based on the status information of each PCIe firmware, obtains the attribute information of the target PCIe firmware, and then determines whether to start the operating system based on the attribute information.
[0087] Optionally, if the attribute information includes the preset type information of the target PCIe firmware, and if the BIOS determines, based on the type information, that the preset type information of each target PCIe firmware indicates that the corresponding target PCIe firmware does not belong to the preset firmware, then it is determined to start the operating system. Here, the preset firmware is the firmware that is preset to affect the startup of the operating system. If the BIOS determines that there is at least one target PCIe firmware whose preset type information indicates that the target PCIe firmware belongs to the preset firmware, then it is determined not to start the operating system.
[0088] Optionally, if the attribute information includes the preset weight data of the target PCIe firmware, the BIOS adds up the preset weight data of each target PCIe firmware according to the weight data, and determines the total weight data of the target PCIe firmware where the exception occurs as the result of the addition. If the total weight data is less than the preset total weight data threshold, then it is determined to start the operating system. If the total weight data is greater than or equal to the preset total weight data threshold, then it is determined not to start the operating system.
[0089] If the BIOS determines to start the operating system, then it starts the operating system.
[0090] It should be noted that if the BIOS determines that the target PCIe firmware where the exception occurs does not belong to the preset firmware, the operating system can skip the target PCIe firmware where the exception occurs during startup, allowing the operating system to start limitedly, thereby achieving degraded startup and increasing the fault tolerance during the startup process of the operating system.
[0091] In the above embodiments of the present application, after the Basic Input / Output System (BIOS) 02 receives the control instruction sent by the controller 01, it starts self-checking, that is, detecting the status information of the firmware connected to the PCIe, and determines whether to start the operating system based on the status information. If the BIOS 02 passes the self-check, it means that the firmware connected to the PCIe does not affect the startup of the operating system, thus starting the operating system, and further reducing the risk of operating system startup failure and improving the stable operation after the operating system starts.
[0092] In the present application, after the controller 01 detects the startup of the operating system, it can also perform out-of-band detection of the Peripheral Component Interconnect (PCI) Express module 04. Taking the BMC as an example for the controller 01, see Figure 5 , Figure 5This is an architecture diagram provided by an embodiment of the present application. The function of the BMC can be as shown in the architecture diagram in Figure 5 :
[0093] After the BMC detects that the operating system has started, it can act as an endpoint (EP) of the PCIe, that is, as a firmware connected to the PCIe, and communicate with the central processing unit 11 (CPU). Among them, when the BMC acts as the EP of the PCIe, it can be connected to the peripheral component interconnect switch management module 03 through the Management Component Transport Protocol (MCTP) to monitor other firmware connected to the PCIe to obtain the operating information of other firmware, such as temperature, voltage, and fan operation data. Among them, other firmware includes but is not limited to network card 21, redundant array of independent disks (RAID) card 22, and graphics processing unit 23, etc.
[0094] Alternatively, the BMC is directly connected to the firmware connected to the PCIe through the I2C bus, and obtains the operating information of the monitored firmware connected to the PCIe based on the I2C protocol or the MCTP over I2C protocol.
[0095] In addition, before the operating system starts, as shown in any of the above embodiments, the BMC can act as the RC of the PCIe and can be connected to the peripheral component interconnect switch management module 03 through the MCTP to monitor the firmware connected to the PCIe to obtain the status information of the firmware.
[0096] The present application also provides an electronic device, which includes the operating system startup device of any of the above embodiments. It can be understood that the type of the electronic device in the present application is not limited, and it includes but is not limited to intelligent devices such as servers, laptops, and desktop computers.
[0097] In the present application, there is also provided a method for starting an operating system. The execution subject of this method can be an electronic device including an operating system startup device. Please refer to Figure 6 , Figure 6 This is a schematic flowchart of a method for starting an operating system provided by an embodiment of the present application. This method can include the following steps:
[0098] S601. Obtain the status information of multiple peripheral component interconnect firmwares through a controller.
[0099] In this embodiment, the controller can be a BMC.
[0100] S602. Determine whether the control instruction generation condition is satisfied according to the status information of multiple Peripheral Component Interconnect Express (PCIe) firmwares.
[0101] A possible implementation is as follows:
[0102] The controller determines the target PCIe firmware with an exception according to the status information of each PCIe firmware, obtains the attribute information of the target PCIe firmware, and then determines whether the control instruction generation condition is satisfied according to the attribute information.
[0103] Optionally, if the attribute information includes the preset type information of the target PCIe firmware, and if the controller determines that the preset type information of each target PCIe firmware indicates that the corresponding target PCIe firmware does not belong to the preset firmware, it is determined that the control instruction generation condition is satisfied, and the preset firmware is the firmware that is preset to affect the startup of the operating system. If the controller determines that there is at least one target PCIe firmware whose preset type information indicates that the target PCIe firmware belongs to the preset firmware, it is determined that the control instruction generation condition is not satisfied.
[0104] Optionally, if the attribute information includes the preset weight data of the target PCIe firmware, the controller adds up the preset weight data of each target PCIe firmware, and determines the total weight data of the target PCIe firmware with an exception as the result of the addition. If the total weight data is less than the preset total weight data threshold, it is determined that the control instruction generation condition is satisfied. If the total weight data is greater than or equal to the preset total weight data threshold, it is determined that the control instruction generation condition is not satisfied.
[0105] S603. If the status information satisfies the control instruction generation condition, generate a control instruction.
[0106] S604. According to the control instruction, obtain the status information of multiple PCIe firmwares connected to the PCIe module again through the Basic Input / Output System (BIOS).
[0107] S605. Determine whether to start the operating system according to the status information obtained again.
[0108] It can be understood that the specific implementation process in the steps of this embodiment has been described in detail in the above-mentioned multiple embodiments. To avoid redundancy, it will not be repeated here. Please refer to the content in the above-mentioned multiple embodiments.
[0109] In the above embodiments of the present application, the controller obtains the status information of multiple Peripheral Component Interconnect Express (PCIe) firmwares, and determines whether the control instruction generation condition is met according to the status information of the multiple PCIe firmwares. If the status information meets the control instruction generation condition, a control instruction is generated, and according to the control instruction, the status information of the multiple PCIe firmwares connected to the PCIe module is obtained again through the Basic Input / Output System (BIOS), and then it is determined whether to start the operating system according to the status information obtained again. In the method of this embodiment, the controller performs self-check on the multiple PCIe firmwares connected to the PCIe module. If the self-check passes, a control instruction is generated, and the BIOS performs self-check on the multiple PCIe firmwares connected to the PCIe module. If the self-check passes, the operating system is started. By performing self-check on the PCIe firmware through the controller and the BIOS, if the self-check passes, it indicates that the firmware connected to the PCIe module does not affect the startup of the operating system, and then the operating system is started again, thereby reducing the situation of easy startup failure caused by directly starting the operating system in the related art, and improving the stability of the operating system during operation after startup.
[0110] To facilitate a better understanding of the present application, through the following Figure 7 , taking the electronic device as a server as an example and the controller as a Baseboard Management Controller (BMC) as an example, the interaction process between the BMC and the BIOS is described. Please refer to Figure 7 , Figure 7 which is an interaction schematic diagram provided by an embodiment of the present application.
[0111] After the server is powered on, the BMC and the BIOS are powered on simultaneously. The BMC enters the working mode, and the BIOS enters the idle mode.
[0112] S701. The BMC sends a wait-for-start instruction to the BIOS.
[0113] After receiving the wait-for-start instruction sent by the BMC, the BIOS enters a loop waiting state to wait for the BMC to send a control instruction to the BIOS.
[0114] S702. The BIOS sends a feedback instruction to the BMC.
[0115] After receiving the wait-for-start instruction sent by the BMC, the BIOS sends a feedback instruction to the BMC to enable the BMC to confirm that the BIOS has received the wait-for-start instruction.
[0116] S703. The control authority of the PCIe module is assigned to the BMC. The BMC scans the PCIe bus as the Root Complex (RC) of the PCIe to identify the firmware connected to the PCIe.
[0117] S704. The BMC scans the PCIe bus to identify the status information of the firmware connected to the PCIe.
[0118] S705. The BMC analyzes the status information of the firmware connected to the PCIe obtained. If the status information does not meet the control instruction generation condition, it generates a warning prompt message according to the status information. If the status information meets the control instruction generation condition, it generates a control instruction and controls the Peripheral Component Interconnect Express switch management module to allocate the control authority to the Basic Input / Output System.
[0119] S706. The BMC sends the control instruction to the BIOS.
[0120] S707. The control authority of the Peripheral Component Interconnect Express module is allocated to the BIOS. The BIOS, as the RC of the PCIe, scans the PCIe bus to identify the firmware connected to the PCIe.
[0121] S708. The BIOS scans the PCIe bus to identify the status information of the firmware connected to the PCIe.
[0122] S709. The BIOS analyzes the status information of the firmware connected to the PCIe obtained. If the status information does not meet the startup condition, it does not start the operating system. If the status information meets the startup condition, it starts the operating system.
[0123] S710. After the BIOS starts the operating system, it sends an instruction that the operating system has been started to the BMC.
[0124] S711. After the BMC receives the started instruction, it performs out-of-band monitoring.
[0125] In this embodiment, for the specific implementation processes of each step and the corresponding technical effects, please refer to the above-mentioned multiple embodiments. To avoid redundancy, no further description will be repeated.
[0126] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0127] Figure 8 It is a schematic structural diagram of a startup device for an operating system provided by an embodiment of the present application. As Figure 8 shown, the startup device for the operating system includes:
[0128] An acquisition module 801, configured to obtain the status information of multiple Peripheral Component Interconnect Express firmwares through a controller.
[0129] A determination module 802, configured to determine whether a control instruction generation condition is satisfied according to status information of multiple Peripheral Component Interconnect Express (PCIe) firmwares.
[0130] A generation module 803, configured to generate a control instruction if the status information satisfies the control instruction generation condition.
[0131] An acquisition module 801 is further configured to, according to the control instruction, acquire again the status information of the multiple Peripheral Component Interconnect Express (PCIe) firmwares connected to the Peripheral Component Interconnect Express (PCIe) module through the Basic Input / Output System (BIOS).
[0132] The determination module 802 is further configured to determine whether to start an operating system according to the status information acquired again.
[0133] In a possible implementation manner, the determination module 802 is specifically configured to:
[0134] According to the status information of each Peripheral Component Interconnect Express (PCIe) firmware, determine the target Peripheral Component Interconnect Express (PCIe) firmware with an exception.
[0135] Acquire the attribute information of the target Peripheral Component Interconnect Express (PCIe) firmware.
[0136] According to the attribute information, determine whether the control instruction generation condition is satisfied.
[0137] In a possible implementation manner, the determination module 802 is specifically configured to:
[0138] If the preset type information of each target Peripheral Component Interconnect Express (PCIe) firmware indicates that the corresponding target Peripheral Component Interconnect Express (PCIe) firmware does not belong to the preset firmware, it is determined that the control instruction generation condition is satisfied, and the preset firmware is the preset firmware that affects the start of the operating system.
[0139] If the preset type information of at least one target Peripheral Component Interconnect Express (PCIe) firmware indicates that the target Peripheral Component Interconnect Express (PCIe) firmware belongs to the preset firmware, it is determined that the control instruction generation condition is not satisfied.
[0140] In a possible implementation manner, the determination module 802 is specifically configured to:
[0141] According to the attribute information, determine whether the control instruction generation condition is satisfied, including:
[0142] Add up the preset weight data of each target Peripheral Component Interconnect Express (PCIe) firmware, and determine the total weight data of the target Peripheral Component Interconnect Express (PCIe) firmware with an exception as the result of the addition.
[0143] If the total weight data is less than the preset total weight data threshold, it is determined that the control instruction generation condition is satisfied.
[0144] If the total weight data is greater than or equal to the preset total weight data threshold, it is determined that the control instruction generation condition is not satisfied.
[0145] For the description of the features in the corresponding embodiments of the startup device of the operating system, reference can be made to the relevant descriptions in the corresponding embodiments of the startup method of the operating system, which will not be elaborated here one by one.
[0146] The electronic device provided by this application may further include at least one processor, a memory, and a communication component. Among them, the processor, the memory, and the communication component are connected through a bus.
[0147] In the specific implementation process, at least one processor executes the computer execution instructions stored in the memory, so that at least one processor executes the above-mentioned embodiments of the startup method of the operating system.
[0148] For the specific implementation process of the processor, reference can be made to the above-mentioned method embodiments. Their implementation principles and technical effects are similar, and will not be elaborated here in this embodiment.
[0149] In the above embodiments, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by the execution of the hardware processor, or implemented by the combination of hardware and software modules in the processor.
[0150] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0151] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0152] Embodiments of the present application also provide a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any of the above-described method embodiments for starting an operating system when running.
[0153] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs.
[0154] Embodiments of the present application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for starting an operating system.
[0155] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for starting an operating system.
[0156] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their 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. Skilled professionals 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 application.
[0157] The above has introduced in detail an operating system startup device, an electronic device, and a method for starting an operating system provided by the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. An operating system startup device, characterized in that, Including: A controller, a basic input / output system, a Peripheral Component Interconnect Express (PCIe) switch management module, and a PCIe module, which are respectively connected to the controller; The PCIe switch management module is further connected to the basic input / output system, and the PCIe module is respectively connected to the basic input / output system and multiple PCIe firmware; The PCIe switch management module is configured to, when the controller starts, allocate the control authority of the PCIe module to the controller; The controller is configured to, after obtaining the control authority, obtain the status information of multiple PCIe firmware, determine the target PCIe firmware with an exception according to the status information of each PCIe firmware, obtain the attribute information of the target PCIe firmware, determine whether the control instruction generation condition is satisfied according to the attribute information, and if the attribute information satisfies the control instruction generation condition, generate a control instruction and control the PCIe switch management module to allocate the control authority to the basic input / output system; The basic input / output system is configured to, after obtaining the control authority, according to the control instruction, obtain the status information of multiple PCIe firmware again, and if the status information obtained again satisfies the start condition, start the operating system; If the status information obtained again does not satisfy the start condition, the operating system is not started.
2. The operating system startup device according to claim 1, wherein The PCIe switch management module is further connected to the PCIe module; When the PCIe switch management module allocates the control authority of the PCIe module to the controller, it specifically is configured to: When the controller starts, the PCIe switch management module receives a high-level signal and transmits the high-level signal to the PCIe module, so that the control authority of the PCIe module is allocated to the controller.
3. The operating system startup device according to claim 1, characterized in that, The attribute information includes the preset type information of the target PCIe firmware; When the controller determines whether the control instruction generation condition is satisfied according to the attribute information, it specifically is configured to: If the preset type information of each target PCIe firmware indicates that the corresponding target PCIe firmware does not belong to the preset firmware, it is determined that the control instruction generation condition is satisfied, and the preset firmware is the firmware that is preset to affect the start of the operating system; If there is at least one target PCIe firmware whose preset type information indicates that the target PCIe firmware belongs to the preset firmware, it is determined that the control instruction generation condition is not satisfied.
4. The operating system startup device according to claim 1, wherein The attribute information includes the preset weight data of the target PCIe firmware; When the controller determines whether the control instruction generation condition is satisfied according to the attribute information, it specifically is configured to: Add up the preset weight data of each target PCIe firmware, and determine the total weight data of the target PCIe firmware with an exception as the result of the addition. If the total weight data is less than a preset total weight data threshold, it is determined that the control instruction generation condition is satisfied; If the total weight data is greater than or equal to the preset total weight data threshold, it is determined that the control instruction generation condition is not satisfied.
5. The operating system startup device according to claim 1, characterized in that If the controller determines that the attribute information does not satisfy the control instruction generation condition, a warning prompt message is generated according to the status information.
6. The operating system startup device according to claim 1, wherein When the controller controls the Peripheral Component Interconnect Express (PCIe) switch management module to allocate the control authority to the Basic Input / Output System (BIOS), it specifically is used for: Sending a low-level signal to the PCIe switch management module, so that the PCIe switch management module transmits the low-level signal to the PCIe module, and the low-level signal is used to allocate the control authority of the PCIe module to the BIOS.
7. An electronic device, characterized in that, Including the operating system startup device according to any one of claims 1-6.
8. A method for booting an operating system, characterized in that, Including: Obtaining the status information of multiple PCIe firmwares through a controller; Determining the target PCIe firmware with an exception according to the status information of each PCIe firmware; Obtaining the attribute information of the target PCIe firmware; Determining whether the control instruction generation condition is satisfied according to the attribute information; If the attribute information satisfies the control instruction generation condition, a control instruction is generated; According to the control instruction, the status information of multiple PCIe firmwares connected to the PCIe module is obtained again through the BIOS; If the status information obtained again satisfies the startup condition, the operating system is started; If the status information obtained again does not satisfy the startup condition, the operating system is not started.
9. The method according to claim 8, wherein The attribute information includes the preset type information of the target PCIe firmware; The determining whether the control instruction generation condition is satisfied according to the attribute information includes: If the preset type information of each target PCIe firmware indicates that the corresponding target PCIe firmware does not belong to the preset firmware, it is determined that the control instruction generation condition is satisfied, and the preset firmware is the firmware that is preset to affect the startup of the operating system; If there is at least one target PCIe firmware whose preset type information indicates that the target PCIe firmware belongs to the preset firmware, it is determined that the control instruction generation condition is not satisfied.
10. The method according to claim 8, wherein The attribute information includes the preset weight data of the target PCIe firmware; The determining whether the control instruction generation condition is satisfied according to the attribute information includes: Adding up the preset weight data of each target PCIe firmware, and determining the added result as the total weight data of the target PCIe firmware with an exception; If the total weight data is less than a preset total weight data threshold, it is determined that the control instruction generation condition is satisfied; If the total weight data is greater than or equal to the preset total weight data threshold, it is determined that the control instruction generation condition is not satisfied.
11. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein when the computer program is executed by a processor, the steps of the operating system startup method according to any one of claims 8 to 10 are implemented.
12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the operating system startup method according to any one of claims 8 to 10 are implemented.
Citation Information
Patent Citations
PCI peripheral equipment repairing method and device, electronic equipment and storage medium
CN117093414A