PCIe channel configuration method and device, mainboard, equipment and storage medium
By loading and initializing the PCIe channel mode with BIOS and allowing user configuration in the BIOS setting interface, the problem of complex PCIe channel configuration update in traditional methods is solved, and flexible configuration and efficient utilization of PCIe resources are achieved.
Patent Information
- Application Number
- CN202510225597.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-23
AI Technical Summary
After the traditional method configures the PCIe channel derived from PCH, once the firmware is burned, subsequent updates become complicated and difficult to operate.
The PCIe channel mode in the BIOS loads the PCIe channel in the memory, and the PCIe channel derived from the PCH is initialized and configured, and the BIOS setting interface allows users to flexibly configure the PCIe channel mode.
It realizes flexible configuration of PCIe channels derived from PCH, avoids the complexity of firmware updates in traditional methods, improves the utilization rate of PCIe resources, and has good compatibility and scalability.
Smart Images

Figure CN120029677A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a PCIe channel configuration method, device, mainboard, equipment and storage medium based on BIOS. Background Art
[0002] The PCIe (Peripheral Component Interconnect express, a high-speed serial computer expansion bus standard) channel on the motherboard is led out by the CPU (Central Processing Unit) or PCH (Platform Controller Hub). Here PCH is a series of chipsets launched by Intel, mainly used to replace the traditional south bridge chip function. The emergence of PCH is to solve the communication bottleneck problem between the processor and the south bridge chip. PCIe controllers are integrated in the CPU and PCH to control the working mode of the PCIe channels led out by each.
[0003] The PCIe channels derived from the CPU can be split into multiple combinations of channels, for example, 1x16, 2x8, 1x8+2x4, etc. The maximum supported mode is x16. The PCIe channels derived from the PCH are grouped into four channels, and their modes are controlled by a PCIe controller of the PCH. For example, PCIe controller 1 corresponds to PCIe channels 1-4, PCIe controller 2 corresponds to PCIe channels 5-8, and so on. Each group of PCIe channels derived from the PCH can be split into 1x4, 2x2, 4x1, or 1x2+2x1, and the maximum supported mode is x4.
[0004] For the PCIe channel derived from the PCH, the traditional configuration method is to configure the PCIe channel through the Flash Image Tool (FIT) tool, and then use the FIT tool to build a new firmware, and then burn the firmware into the Flash chip. From then on, the working mode of the PCIe channel derived from the PCH has been fixed. Once the firmware is burned into the motherboard, it will become more complicated and difficult to update the working mode of the PCIe channel later. Summary of the invention
[0005] In view of this, the present invention provides a BIOS-based PCIe channel configuration method, apparatus, device and storage medium, which can flexibly configure the PCIe channel derived from the PCH.
[0006] In a first aspect, the present invention provides a BIOS-based PCIe channel configuration method, comprising: After the motherboard is powered on, the PCIe channel mode saved in the memory is loaded, and the PCIe channel derived from the platform controller hub PCH of the motherboard is initialized and configured; Determine whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS. The PCIe channel mode configured in the BIOS is configured through the PCIe controller setting item in the BIOS setup interface. If they are different, write the PCIe channel mode configured in the BIOS into the memory and control the motherboard to power on again; If they are the same, determine whether a request to enter the BIOS setup interface is received. If a request to enter the BIOS setup interface is received, enter the BIOS setup interface so that the user can configure the PCIe channel mode in the BIOS setup interface. After the PCIe channel mode is configured, control the mainboard to power on again.
[0007] Optionally, the method further includes: if no request to enter the BIOS setup interface is received, entering the operating system.
[0008] Optionally, the BIOS setup interface displays multiple PCIe controller setup items, each PCIe controller setup item corresponds to a PCIe controller in the PCH, and each PCIe controller setup item has multiple selectable PCIe channel modes.
[0009] Optionally, the PCIe channel mode has a corresponding identification value, and the PCIe channel mode is stored in the memory in the form of the identification value.
[0010] In a second aspect, the present invention provides a BIOS-based PCIe channel configuration device, comprising: The loading module is used to load the PCIe channel mode saved in the memory after the mainboard is powered on, and initialize the configuration of the PCIe channel led out of the platform controller hub PCH of the mainboard; A first judgment module is used to judge whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS, and the PCIe channel mode configured in the BIOS is configured through the PCIe controller setting item of the BIOS setting interface; An update module, used for writing the PCIe channel mode configured in the BIOS into the memory and controlling the mainboard to power on again if the loaded PCIe channel mode is different from the PCIe channel mode configured in the BIOS; The second judgment module is used to judge whether a request to enter the BIOS setting interface is received if the loaded PCIe channel mode is the same as the PCIe channel mode configured in the BIOS; The interactive module is used to enter the BIOS setup interface if a request to enter the BIOS setup interface is received, so that the user can configure the PCIe channel mode in the BIOS setup interface, and after the PCIe channel mode is configured, control the mainboard to power on again.
[0011] Optionally, the interaction module is further configured to enter the operating system if no request to enter the BIOS setup interface is received.
[0012] Optionally, the BIOS setup interface displays multiple PCIe controller setup items, each PCIe controller setup item corresponds to a PCIe controller in the PCH, and each PCIe controller setup item has multiple selectable PCIe channel modes.
[0013] In a third aspect, the present invention provides a mainboard, comprising: The platform controller hub PCH has a PCIe controller integrated inside. The PCIe controller is used to control the working mode of the PCIe channel derived from the platform controller hub PCH; Also includes: Memory for storing computer programs; A processor is used to execute a computer program to implement the BIOS-based PCIe channel configuration method provided in the first aspect.
[0014] In a fourth aspect, the present invention provides an electronic device, comprising the mainboard provided in the third aspect.
[0015] In a fifth 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 BIOS-based PCIe channel configuration method provided in the first aspect is implemented.
[0016] The BIOS-based PCIe channel configuration method, device, equipment and storage medium provided by the present invention utilize BIOS to flexibly configure the PCIe channel derived from the motherboard PCH. When the PCIe channel mode needs to be modified, there is no need to use a given FIT tool to generate new firmware. The system resources can be more flexibly allocated in application scenarios with diverse requirements for PCIe devices to meet the needs of different applications. Furthermore, the utilization rate of PCIe resources can be improved, and it has good compatibility and scalability. If the hardware designs different PCIe slots, the PCIe channel mode can also be selected according to the speed supported by the PCIe slot or the connected PCIe device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a flow chart of a PCIe channel configuration method based on BIOS in one embodiment of the present invention; Figure 2 It is a structural schematic diagram of a PCIe channel configuration device based on BIOS in one embodiment of the present invention; Figure 3 Schematic diagram of the structure of a mainboard in one embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0021] First of all, it is explained that the present application realizes PCIe channel configuration by combining BIOS with BIOS Setup. BIOS (Basic Input Output System) is responsible for setting various parameters of system hardware. The BIOS program is the first program loaded during the computer startup process. It is responsible for initializing hardware devices, detecting and configuring system resources, and providing an operating environment for the operating system. BIOS Setup refers to the setup program of the computer's basic input and output system. It is a program used to configure and adjust various BIOS parameters and settings. It can provide a BIOS setup interface. The interface provides a wealth of setting items, allowing users to configure computer hardware as needed. Press a specific button during the computer startup process to enter the BIOS setup interface.
[0022] The embodiment of the present invention proposes a PCIe channel configuration method based on BIOS, such as Figure 1 As shown, the method includes: Step S101, after the mainboard is powered on, the PCIe channel mode saved in the memory is loaded, and the PCIe channel derived from the platform controller hub PCH of the mainboard is initialized and configured; Step S102, determining whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS, the PCIe channel mode configured in the BIOS is configured through the PCIe controller setting item of the BIOS setting interface, if they are different, executing step S103, if they are the same, executing step S104; Each time the motherboard is powered on, the PCIe channel mode saved in the memory will be loaded first. However, there are many power-on situations. It may be a normal power-on initiated by the user, or it may be a power-on initiated by the motherboard program after the BIOS has configured the PCIe channel mode. At this time, the PCIe channel mode just configured in the BIOS has not yet taken effect. Therefore, it cannot be guaranteed that the PCIe channel mode saved in the memory is the latest configuration.
[0023] Therefore, in order to verify whether the PCIe channel mode saved in the memory is the latest configured PCIe channel mode in the BIOS, it is necessary to determine whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the BIOS. If they are different, it means that the PCIe channel mode was just configured through the BIOS setup interface before powering on, and this power-on is initiated by the motherboard program after the PCIe channel mode is reconfigured. If they are the same, it means that the PCIe channel mode was not configured before powering on, the latest configured PCIe channel mode is saved in the memory, and this power-on is a normal power-on process.
[0024] Step S103, writing the PCIe channel mode configured in the BIOS into the memory, and controlling the mainboard to power on again; It should be noted here that the PCIe channel mode configured in the BIOS is written into the memory, so as to ensure that the memory stores the latest configured PCIe channel mode, and the latest configured PCIe channel mode can be loaded at the next power-on. As for how to control the motherboard to power on again, for example, it can be achieved by controlling the corresponding pins of the power chip, and this application does not limit this.
[0025] Step S104, determining whether a request to enter the BIOS setup interface is received, if a request to enter the BIOS setup interface is received, executing step S105; It should be noted here that the request to enter the BIOS setup interface is initiated by the user through the shortcut key. When the user needs to configure the current PCIe channel mode, he can actively initiate a request to enter the BIOS setup interface. If a request to enter the BIOS setup interface is received, the BIOS setup interface will be entered.
[0026] Step S105, entering the BIOS setup interface so that the user can configure the PCIe channel mode in the BIOS setup interface. After the PCIe channel mode is configured, the mainboard is controlled to be powered on again.
[0027] Further, refer to Figure 1 If no request to enter the BIOS setup interface is received, execute step S106 to enter the operating system.
[0028] In a specific implementation, the BIOS setup interface displays multiple PCIe controller setup items, each PCIe controller setup item corresponds to a PCIe controller in the PCH, and each PCIe controller setup item has multiple selectable PCIe channel modes. Taking 4 PCIe channels as an example, four channel modes can be supported: 1x4, 2x2, 1x2+2x1, and 4x1. The four channel modes correspond to different identification values, and the user selects the appropriate PCIe channel mode for the PCIe controller setup item in the BIOS setup interface according to the slot design of the 4 PCIe channels on the backplane of the hardware collocation and the actual application requirements.
[0029] In a specific implementation, the memory mentioned above adopts a non-volatile memory Flash, and the Flash stores the mode information of the PCIe channel derived from the platform controller hub PCH of the motherboard. In order to facilitate computer recognition, it can be understood that the Flash stores the identification value corresponding to the PCIe channel mode. For example, the identification value corresponding to 4x1 is 0x00, the identification value corresponding to the combination of 1x2 and 2x1 is 0x01, the identification value corresponding to 2x2 is 0x02, and the identification value corresponding to 1x4 is 0x03.
[0030] After the identification value of the PCIe channel mode configured in the BIOS is written to the Flash, the PCIe channel mode in the Flash will remain the mode selected for the PCIe controller setting item in the BIOS setup interface until the PCIe controller setting item is modified next time.
[0031] An example is given below to illustrate, in which the motherboard can be used with different baseboards. For example, the motherboard needs to be used with two different baseboards, where the PCIe slot on baseboard 1 is 4 x1 slots, and the corresponding PCIe controller setting item value needs to be modified to 4x1, and the PCIe slot on baseboard 2 is 1 x4 slot, and the corresponding PCIe controller setting item value needs to be modified to 1x4. If the traditional method is used, two different firmwares need to be compiled and generated, and used with two different baseboards respectively. Using the method of the embodiment of the present invention, the same firmware can be used on the same motherboard to match baseboards with different PCIe slot requirements.
[0032] The PCH on the motherboard leads to many PCIe channels, and every four PCIe channels are controlled by a PCIe controller. Each PCIe controller has its corresponding address in Flash. You can add multiple PCIe controller setting items in the BIOS setup interface according to actual needs to configure the channels corresponding to each PCIe controller. For example, for a PCH on a motherboard, assuming a total of 12 PCIe channels, there are three PCIe controllers 1 / 2 / 3 corresponding to three Flash addresses. Make the three PCIe controllers into three separate setting items, and the channel modes that can be selected for the three PCIe controller setting items are the same, as shown in the following table:
[0033] If you need to configure PCIe channels 1-8 to 8x1 and PCIe channels 9-12 to 1x4, set PCIe controller 1 and PCIe controller 2 to 4x1 and PCIe controller 3 to 1x4. You can set them as needed in actual application scenarios.
[0034] The BIOS-based PCIe channel configuration method provided in the embodiment of the present invention uses BIOS to flexibly configure the PCIe channel derived from the motherboard PCH. When the PCIe channel mode needs to be modified, there is no need to use a given FIT tool to generate new firmware. The system resources can be more flexibly allocated in application scenarios with diverse requirements for PCIe devices to meet the needs of different applications. Furthermore, the utilization rate of PCIe resources can be improved, and it has good compatibility and scalability. If the hardware designs different PCIe slots, the PCIe channel mode can also be selected according to the speed supported by the PCIe slot or the connected PCIe device.
[0035] On the other hand, another embodiment of the present invention provides a PCIe channel configuration device based on BIOS, such as Figure 2 As shown, the device comprises: The loading module 201 is used to load the PCIe channel mode saved in the memory after the mainboard is powered on, and initialize the configuration of the PCIe channel derived from the platform controller hub PCH of the mainboard; A first determination module 202 is used to determine whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS, where the PCIe channel mode configured in the BIOS is configured through a PCIe controller setting item in a BIOS setting interface; The updating module 203 is used to write the PCIe channel mode configured in the BIOS into the memory and control the mainboard to power on again if the loaded PCIe channel mode is different from the PCIe channel mode configured in the BIOS; The second determination module 204 is used to determine whether a request to enter the BIOS setup interface is received if the loaded PCIe channel mode is the same as the PCIe channel mode configured in the BIOS; The interaction module 205 is used to enter the BIOS setup interface if a request to enter the BIOS setup interface is received, so that the user can configure the PCIe channel mode in the BIOS setup interface, and after the PCIe channel mode is configured, control the mainboard to power on again.
[0036] Furthermore, the interaction module 205 is also used to enter the operating system if no request to enter the BIOS setup interface is received.
[0037] In a specific implementation, the BIOS setup interface displays multiple PCIe controller setup items, each PCIe controller setup item corresponds to a PCIe controller in the PCH, and each PCIe controller setup item has multiple selectable PCIe channel modes. The user selects a suitable channel mode for the PCIe controller setup item in the BIOS setup interface according to the actual design of the PCIe controller on the hardware backplane and actual application requirements.
[0038] In a specific implementation, Flash is used to store the mode information of the PCIe channel derived from the motherboard platform controller hub PCH. For the convenience of computer recognition, it can be understood that the identification value corresponding to the PCIe channel mode is stored in Flash. For example, the identification value corresponding to 4x1 is 0x00, the identification value corresponding to the combination of 1x2 and 2x1 is 0x01, the identification value corresponding to 2x2 is 0x02, and the identification value corresponding to 1x4 is 0x03.
[0039] The BIOS-based PCIe channel configuration device provided in the embodiment of the present invention implements the aforementioned method embodiment and can produce the same technical effect.
[0040] On the other hand, another embodiment of the present invention provides a mainboard, referring to Figure 3 The motherboard may include: a processor 301, a memory 302, a communication bus 303, and a platform controller hub 304, wherein the platform controller hub 304 is internally integrated with a PCIe controller, and the PCIe controller is used to control the working mode of the PCIe channel derived from the platform controller hub 304; the processor 301 and the memory 302 communicate with each other through the communication bus 303. The processor 301 may execute the computer program in the memory 302 to implement the PCIe channel configuration method based on BIOS provided in the above embodiments.
[0041] On the other hand, an embodiment of the present invention further provides an electronic device, comprising the mainboard of the above embodiment.
[0042] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the BIOS-based PCIe channel configuration method provided in the above embodiments is implemented.
[0043] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0044] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A PCIe channel configuration method based on BIOS, characterized in that: The method comprises: After the mainboard is powered on, the PCIe channel mode saved in the memory is loaded, and the PCIe channel derived from the platform controller hub PCH of the mainboard is initialized and configured; Determine whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS, wherein the PCIe channel mode configured in the BIOS is configured through the PCIe controller setting item of the BIOS setting interface; If they are different, writing the PCIe channel mode configured in the BIOS into the memory and controlling the mainboard to power on again; If they are the same, determine whether a request to enter the BIOS setup interface is received. If the request to enter the BIOS setup interface is received, enter the BIOS setup interface so that the user can configure the PCIe channel mode in the BIOS setup interface. After the PCIe channel mode is configured, control the mainboard to power on again.
2. The PCIe channel configuration method based on BIOS according to claim 1, characterized in that: The method further includes: if the request to enter the BIOS setup interface is not received, entering the operating system.
3. The PCIe channel configuration method based on BIOS according to claim 1, characterized in that: The BIOS setup interface displays a plurality of PCIe controller setup items, each of which corresponds to a PCIe controller in the PCH, and each of which has a plurality of selectable PCIe channel modes.
4. The PCIe channel configuration method based on BIOS according to claim 1, characterized in that: The PCIe channel mode has a corresponding identification value, and the PCIe channel mode is stored in the memory in the form of the identification value.
5. A PCIe channel configuration device based on BIOS, characterized in that: The device comprises: A loading module is used to load the PCIe channel mode saved in the memory after the mainboard is powered on, and initialize the configuration of the PCIe channel derived from the platform controller hub PCH of the mainboard; A first judgment module is used to judge whether the loaded PCIe channel mode is the same as the PCIe channel mode configured in the basic input and output system BIOS, wherein the PCIe channel mode configured in the BIOS is configured through the PCIe controller setting item of the BIOS setting interface; An update module, configured to write the PCIe channel mode configured in the BIOS into the memory and control the mainboard to power on again if the loaded PCIe channel mode is different from the PCIe channel mode configured in the BIOS; A second judgment module is used to judge whether a request to enter the BIOS setting interface is received if the loaded PCIe channel mode is the same as the PCIe channel mode configured in the BIOS; The interactive module is used to enter the BIOS setup interface if a request to enter the BIOS setup interface is received, so that the user can configure the PCIe channel mode in the BIOS setup interface, and after the PCIe channel mode is configured, control the mainboard to power on again.
6. The BIOS-based PCIe channel configuration device according to claim 5, characterized in that: The interaction module is further configured to enter the operating system if the request to enter the BIOS setup interface is not received.
7. The BIOS-based PCIe channel configuration device according to claim 5, characterized in that: The BIOS setup interface displays a plurality of PCIe controller setup items, each of which corresponds to a PCIe controller in the PCH, and each of which has a plurality of selectable PCIe channel modes.
8. A motherboard, characterized in that: include: The platform controller hub PCH has a PCIe controller integrated therein, and the PCIe controller is used to control the working mode of the PCIe channel derived from the platform controller hub PCH; Also includes: Memory for storing computer programs; A processor, configured to execute the computer program to implement the BIOS-based PCIe channel configuration method according to any one of claims 1 to 4.
9. An electronic device, characterized in that: The electronic device comprises the mainboard as claimed in claim 8.
10. 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 BIOS-based PCIe channel configuration method according to any one of claims 1 to 4 is implemented.