PCIe automatic branching method and system

By automatically detecting and setting the system, it solves the BIOS error problem when setting up PCIe branches, realizes automatic identification and setting of PCIe branch setting tables without maintaining the PCIe branch setting table, supports the PCIe branch design of new systems, and reduces the difficulty of maintenance.

CN113312287BActive Publication Date: 2024-08-30QUANTA COMPUTER INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011221638.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-05
Publication Date
2024-08-30
Estimated Expiration
2040-11-05

AI Technical Summary

Technical Problem

Existing BIOS is prone to errors when setting up PCIe branches, resulting in system failure to recognize or reduced performance. When the system design changes, the BIOS needs to be updated, making maintenance more difficult.

Method used

Adopting an automatic detection and setting system, automatic identification and setting are achieved by dividing the channels of the PCIe IO unit into initial ports with the smallest granularity and adjusting branch settings according to the status of the connected PCIe device, avoiding manual settings and predefined tables.

Benefits of technology

It realizes the automatic recognition and setting of the PCIe branch setting table without requiring BIOS maintenance, supports the PCIe branch design of the new system, reduces the need for new BIOS versions, and reduces the difficulty of maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113312287B_ABST
    Figure CN113312287B_ABST
Patent Text Reader

Abstract

A system and method for automatically generating a control branch signal to set a port of a PCIe IO unit on a computing device. The channels of the PCIe IO unit are divided into initial ports of the lowest granularity. It is determined whether a PCIe device is connected to each initial port. The branch port setting of the PCIe IO unit is determined based on the connected PCIe device. The port of the PCIe IO unit is set based on the branch port setting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to dynamic bifurcation control of peripheral component interconnect express (PCIe) devices in computing systems. More specifically, the present disclosure is directed to ensuring efficient and automatic bifurcation control of PCIe input / output units by a basic input output system (BIOS). Background Art

[0002] The Peripheral Component Interconnect Express (PCIe) standard has been adopted for connecting high-speed components in computing devices. The device has a PCIe input / output (IO) unit that has multiple lanes for communicating data. Such an IO unit may include 4, 8, or 16 lanes that can be split into different communication channels to connect to different PCIe devices. A branching control mechanism from the basic input-output system (BIOS) allows a bus IO unit (e.g., a PCIe bus IO unit) to be split into smaller buses for different PCIe devices. For example, by setting the branching of the device, a 16-lane PCIe Gen3 bus IO unit can be split into two x8 lane-wide PCIe Gen 3 interfaces. Processors in servers that support PCIe branching have a BIOS setting to enable branching for their respective PCIe IO units.

[0003] According to the PCIe specification, branching provides flexibility for devices with PCIe IO units to match the lane width of the connector to communicate with the components of the system in which they are installed. Wider lane widths require more actual hardware connection pins, but provide higher communication speeds. In a computer system with a supported capacity of PCIe devices, a PCIe root port is usually provided by the CPU or chipset to connect to the PCIe devices. CPU / chipset manufacturers usually provide flexible methods to allow computer system designers to dynamically configure PCIe lane branching because the CPU / chipset has a fixed number of pins for PCIe communication. For example, a 16-PCIe channel group supported by the CPU can be configured as one x16 lane width PCIe port to support one PCIe device, two x8 width PCIe ports to support two PCIe devices, one x8 and two x4 width PCIe ports to support three PCIe devices, or four x4 width PCIe ports to support four devices.

[0004] A wider width (e.g., a x16-width port) provides higher communication speeds with PCIe devices, but reduces the total number of supported PCIe devices in the system. Conversely, a narrower width (e.g., four x4-width ports) provides lower speeds, but provides more ports for PCIe devices to connect. This flexibility in the number of lanes per port allows computer system designers to provide different systems that support different numbers and types of PCIe devices with the same CPU / chipset. It is common for computer system manufacturers to use a single BIOS firmware image to support these different computer systems. The single BIOS image must store the PCIe branch settings used by each system to accommodate the hardware devices associated with each system. The common approach is to provide a mapping table in the BIOS to associate the PCIe branch settings with the different systems supported by the CPU / chipset.

[0005] When the BIOS is booted, the system type is detected and the BIOS can set the correct PCIe branch in the CPU / chipset based on the mapping table. However, if the BIOS sets the wrong branch, the system may not be able to use some PCIe devices installed on the system, or some PCIe devices may run at a degraded speed.

[0006] System design in server systems is often complex. A CPU / chipset can have many PCIe channel groups, and each group can have a different branching setting. Identifying different systems that require different branching settings is a challenge. For example, two systems may have the same motherboard, but different PCIe riser cards. A riser card is an extension board that can be installed on the motherboard to route PCIe signals from the motherboard to the PCIe card installed on the riser card. Therefore, different PCIe riser cards may require different PCIe branching settings. For example, a first riser card may route all 16 PCIe lanes to a single x16-wide PCIe slot, while a second riser card may route 16 PCIe lanes to two x8-wide PCIe slots. The BIOS must know which PCIe riser card is installed to provide the correct PCIe branching settings. To make it more complicated, a third system may have a completely different motherboard. In this example, the BIOS may need different methods to identify the three systems to correctly set the PCIe branching.

[0007] This complexity sometimes causes BIOS designers to write incorrect PCIe branch settings for certain systems. Moreover, when the system's PCIe design changes, or a new system supported by the same BIOS is added, a new BIOS version will need to be released to support the PCIe branch design change. These potential changes increase the difficulty of maintaining the system and the BIOS itself.

[0008] Figure 11 is a block diagram of a prior art vendor's CPU design 10 having a group of configurable PCIe IO units. The CPU design 10 includes a first IO unit 12 (port 0, Direct Media Interface (DMI)), a second IO unit 14 (port 1, IOU2), a third IO unit 16 (port 2, IOU0), and a fourth IO unit 18 (port 3, IOU1). Each IO unit 12, 14, 16, and 18 has a different potential configuration of IO unit pins for a respective PCIe lane. Each group of IO units, such as IO unit 14, has a transaction layer 20, a link layer 22, and a physical layer with a group of physical lanes 24. Physical lanes are pins that mate with corresponding PCIe connectors, which are used to install PCIe cards. Depending on the system design, these pins can also be connected to PCIe devices without a PCIe connector, rather than mating with a connector. In this example, IO unit 14 has physical channels 0-7 and can be assigned to one or two ports (port 1a and port 1b). IO unit 16 and IO unit 18 have multiple corresponding sets of physical channels 34 and 44 (channels 0-15) and can be assigned to up to four ports. Each port can be connected to a PCIe device, either via a PCIe connector or directly.

[0009] For example, IO unit (port 2, IOU0) 16 has several different possible branch settings and corresponding combinations of up to four ports (port 2a, port 2b, port 2c, and port 2d). PCIe branches can therefore be configured as four ports, each with x4-wide lanes—for example, port 2a (x4), port 2b (x4), port 2c (x4), and port 2d (x4); three ports—two ports with x4-wide lanes and one port with x8-wide lanes (port 2a (x4), port 2b (x4), and port 2c (x8)); three ports—one port with x8-wide lanes and two ports with x4-wide lanes (port 2a (x8), port 2c (x4), port 2d (x4)); two ports, each with x8-wide lanes (port 2a (x8), port 2c (x8)); and one port with x16-wide lanes (port 2a (x16)).

[0010] The example of the vendor CPU design 10 provides flexibility to system designers to support different PCIe devices on different systems when using the CPU design 10. However, the PCIe branch must be correctly configured for the CPU design 10. Otherwise, the connected PCIe device may not be detected. For example, if a x4 link width PCIe device is connected to physical links 4-7 of the IO unit 16, but the PCIe branch control sets port 2a as a x16 link width port without port 2b, port 2c, and port 2d, the PCIe device cannot be detected. This is because for a PCIe port, the first physical link or the last physical link (in this case, link 0 or link 15 of port 2a because port 2a is configured as a x16 width port) must be connected to the PCIe device for detection. In order to detect the first physical link of the PCIe device in this case, the PCIe branch must be configured to have port 2b as a x4 width port or port 2a as a x8 width port.

[0011] Another problem may be that the PCIe device may be detected by the PCIe root port, but may be running at a reduced speed, causing a possible performance drop in the PCIe device. For example, if a x8 link width PCIe device is connected to physical links 0-7 of IO unit 16, but the PCIe branch control sets links 0-7 to port 2a with a x4 link width, and port 2b with a x4 link width, the x8 width PCIe device can communicate through port 2a, but can only run at a x4 link width. In order to allow the PCIe device to run at the full link width (x8), the PCIe branch control must set lanes 0-7 to port 2a (x8), or lanes 0-15 to port 2a (x16).

[0012] Currently, the BIOS detects the system during boot to set the correct PCIe branch. The PCIe branch is set according to a predefined table in the BIOS, which describes the mapping from each system to its correct PCIe branch setting. As explained above, due to the complexity of system design, the BIOS designer may write incorrect PCIe branch settings for each system. Moreover, when the PCIe design of the system changes, or a new system using the same BIOS is added, a new BIOS version will need to be released to support this PCIe branch design change. This increases the difficulty of maintaining the system and the BIOS itself.

[0013] Therefore, there is a need for a computing device that uses system firmware such as BIOS to automatically identify the correct PCIe branch settings on IO units. There is also a need to eliminate the need to maintain a PCIe branch table in the BIOS to check each system configuration. There is also a need for a process that allows PCIe branch settings to be changed while being supported by the same BIOS, thereby eliminating the need to release a new BIOS for new PCIe branch requirements. Summary of the invention

[0014] A disclosed example is a system for automatic branch detection and setting of a PCIe IO unit. The system has a computing device, the computing device including a PCIe IO unit, and the PCIe IO unit has configurable channels. PCIe devices are connected to at least some of the channels of the PCIe IO unit. The system includes a branch setting device, which is operable to divide the channels of the PCIe IO unit into multiple initial ports. Each initial port has a channel with the lowest granularity. The branch setting device detects whether a PCIe device is connected to each initial port. The branch setting device determines the branch port setting of the PCIe IO unit based on the detection of the PCIe device connected to the initial port. The branch setting device stores the branch port setting of the PCIe IO unit.

[0015] In another embodiment of the disclosed example system, the branch setting device is operable to merge an initial port without a detected PCIe device with another initial port. In another embodiment, the branch setting device includes a basic input output system (BIOS). In another embodiment, the PCIe device is selected from the group consisting of a network interface card (NIC), a non-volatile memory express (NVMe) device, a redundant array of independent disks (RAID) card, a host bus adapter (HBA) card, a video card, a sound card, a graphics processing unit (GPU) card, a field programmable gate array (FPGA) card, and a PCIe switch. In another embodiment, the branch setting device includes a channel reversal rule for a channel connection between a PCIe IO unit and a PCIe device. The branch setting device adjusts the branch port setting for channel reversal. In another embodiment, the PCIe IO unit has sixteen configurable channels and four initial ports with the lowest granularity. In another embodiment, the computing device is a CPU. In another embodiment, the computing device includes multiple PCIe IO units. Each PCIe IO unit is set by the branch setting device. In another embodiment, the branch setting device restarts the system after setting the PCIe IO unit. The branch setting device then determines whether any previously detected PCIe device is not detected. If any previously detected PCIe device is not detected, the branch setting device then resets the port of the PCIe IO unit. In another embodiment, the PCIe device is one of multiple PCIe devices connected to the channel of the PCIe IO unit.

[0016] Another disclosed example is a method for automatically providing a branch control signal to set a PCIe IO unit on a computing device. The channels of the PCIe IO unit are divided into a plurality of initial ports of the lowest granularity. A branch setting device determines whether a PCIe device is connected to each initial port. The branch port setting of the PCIe IO unit is based on the initial port with the connected PCIe device, as determined by the branch setting device. The port of the PCIe IO unit is set based on the branch port setting.

[0017] In another embodiment of the disclosed exemplary method, an initial port of a PCIe device that has not been detected is merged with another initial port. In another embodiment, the branch setting device includes a basic input output system (BIOS). In another embodiment, the PCIe device is selected from the group consisting of a network interface card (NIC), a non-volatile memory express (NVMe) device, a redundant array of independent disks (RAID) card, a host bus adapter (HBA) card, a video card, a sound card, a graphics processing unit (GPU) card, a field programmable gate array (FPGA) card, and a PCIe switch. In another embodiment, the method includes determining a channel inversion of a channel connection between a PCIe IO unit and a PCIe device. The method also includes adjusting the branch port setting for the channel inversion. In another embodiment, the PCIe IO unit has sixteen configurable channels and has four initial ports with the lowest granularity. In another embodiment, the computing device is a CPU. In another embodiment, the computing device includes multiple PCIe IO units, and the ports of each PCIe IO unit are automatically set by the branch setting device. In another embodiment of the disclosed example method, after setting the PCIe IO unit, the system is restarted. It is determined whether any previously detected PCIe device is not detected. If any previously detected PCIe device is not detected, the port of the PCIe IO unit is reset.

[0018] Another disclosed example is basic input / output system firmware executable on a controller. The firmware includes instructions for dividing a channel of a PCIe IO unit into multiple initial ports of the lowest granularity. The firmware also includes instructions for detecting whether a PCIe device is connected to each initial port. The firmware also includes instructions for determining a branch port setting of the PCIe IO unit based on an initial port with a connected PCIe device. The firmware includes instructions for setting a port of the PCIe IO unit based on the branch port setting.

[0019] The above summary of the invention is not intended to represent every embodiment or every aspect of the present disclosure. On the contrary, the foregoing summary of the invention only provides examples of certain novel concepts and features listed here. The above features and advantages, as well as other features and advantages of the present disclosure, when associated with the accompanying drawings and claims, will be easily apparent from the following detailed description of representative embodiments and modes for practicing the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present disclosure will be better understood from the following description of exemplary embodiments with reference to the accompanying drawings, in which:

[0021] Figure 1 is a block diagram of a prior art processor design with a configurable PCIe IO unit.

[0022] Figure 2 is a block diagram of an example system that uses BIOS to automatically detect branch settings of a PCIe IO unit according to certain aspects of the present disclosure.

[0023] Figure 3A According to certain aspects of the present disclosure, Figure 2 An example table of rules for detecting and merging unconnected ports of a PCIe device in an example system.

[0024] Figure 3B According to certain aspects of the present disclosure, Figure 2 An example table of PCIe lane reversal rules for detecting and merging unconnected ports in a PCIe device of an example system.

[0025] Figure 4 According to certain aspects of the present disclosure, the BIOS is executed to automatically detect and set Figure 2 Flowchart of the branch confirmation routine of the PCIe IO unit in.

[0026] Figure 5 A flowchart of a routine for providing an alternative branch control method to account for PCIe lane inversion states unknown to the BIOS according to certain aspects of the present disclosure.

[0027] Figure 6 is a table of different rules for normal automatic settings of the PCIe IO unit and settings based on detected lane inversion.

[0028] The present disclosure allows for a wide variety of modifications and alternative forms. Certain representative embodiments have been shown by way of example in the accompanying drawings and will be described in detail herein. However, it should be understood that the present invention is not intended to be limited to the particular form disclosed. On the contrary, the present disclosure is intended to cover all modifications, equivalents, and alternatives that fall within the spirit and scope of the present invention as defined in the claims.

[0029] Explanation of symbols

[0030] 10: CPU Design

[0031] 12,14,16,18:IO Unit (IOU)

[0032] 20: Transaction Layer

[0033] 22: Connection layer

[0034] 24,34,44: Entity Channel

[0035] 200: System

[0036] 210:CPU

[0037] 220,230:PCIe IO unit (IOU)

[0038] 240:BIOS

[0039] 242: Platform Path Controller (PCH)

[0040] 250,252,260:PCIe devices

[0041] 300: Table

[0042] 310,320: Column

[0043] 332,334,336,338,340: Line

[0044] 350: Table

[0045] 360,370: Column

[0046] 380,382,384,386: Line

[0047] 400: Routine

[0048] 410,412,414,416,418: Steps

[0049] 500: Routine

[0050] 510,512,514,516,518,520,522: Steps

[0051] 600: Table

[0052] 610,620,630,640: Column DETAILED DESCRIPTION

[0053] The present invention can be implemented in many different forms. Representative embodiments are shown in the accompanying drawings and will be described in detail herein. The present disclosure is an example or illustration of the principles of the present invention and is not intended to limit the broad aspects of the present disclosure to the illustrated embodiments. On this basis, elements and limitations disclosed in the abstract, content of the invention, and embodiments, but not explicitly listed in the claims, should not be incorporated into the claims individually, collectively, implicitly, inferentially or otherwise. For the purpose of this detailed description, unless specifically denied, the singular includes the plural and vice versa; and the word "include" means "include without limitation". In addition, words that represent approximation, such as "about", "almost", "substantially", "approximately" and similar words, may be used herein to mean "in", "near", "close to", "within the range of 3-5%" or "within acceptable manufacturing tolerances", or any logical combination thereof.

[0054] The present disclosure provides a method that allows system firmware, such as a BIOS, to automatically identify the correct PCIe branch settings for PCIe input / output (IO) units, instead of relying on manual, pre-programmed PCIe branch settings tables. With automatic setting identification, the BIOS does not need to maintain a PCIe branch setting table per entry for each system type. In addition, when new systems are introduced where PCIe branching has changed, the same BIOS can directly support the new system and the new branch settings. This eliminates the need to release a new BIOS for new PCIe branch requirements.

[0055] The disclosed method sets PCIe branches to the smallest granularity ports for a given PCIe IO unit by default. For example, a 16-lane PCIe IO unit pipeline is set to four x4 width initial ports. For each of the smallest granularity ports, any connected PCIe devices are detected. When set to the smallest granularity, the PCIe branches are correctly set based on the PCIe device detection status. A routine merges any PCIe initial ports of the lowest granularity that do not detect a PCIe device to their adjacent initial ports to ensure correct channel utilization.

[0056] Figure 2is a block diagram of an example system 200 that allows automatic detection of PCIe IO unit settings. The example system 200 includes a computing device, such as a CPU 210, with a PCIe IO unit 220 and a PCIe IO unit 230. It should be understood that the CPU 210 may include more PCIe IO units than the example two PCIe IO units (PCIe IO unit 220 and PCIe IO unit 230). The PCIe IO unit 220 or the PCIe IO unit 230 may be connected to a riser card that provides a connector to different types of PCIe devices.

[0057] Each PCIe IO unit 220 and PCIe IO unit 230 can be set to different channel settings through branch control from BIOS 240. Figure 1 In the example port 16 in FIG. 1 , each PCIe IO unit 220 and PCIe IO unit 230 has a transaction layer, a link layer, and a physical layer with 16 physical channels (0-15). The PCIe IO unit 220 and PCIe IO unit 230 can each be configured with up to four separate ports. In this example, the PCIe IO unit 220 is connected to two PCIe devices (PCIe device 250 and PCIe device 252). The PCIe device 250 and the PCIe device 252 may be a network interface controller (NIC) card, a non-volatile memory express (NVMe) device, a redundant array of independent disks (RAID) card, a host bus adapter (HBA) card, a video card, a sound card, a graphics processing unit (GPU) card, a field programmable gate array (FPGA) card, or a PCIe switch. The PCIe IO unit 220 must therefore be configured with appropriate branch control signals to assign the correct channels to the two PCIe devices (PCIe device 250 and PCIe device 252). For example, physical channels 0-7 of the PCIe IO unit 220 may be connected to the PCIe device 250, while physical channels 8-15 may be connected to the PCIe device 252. In order for the PCIe device 250 and the PCIe device 252 to operate at maximum transfer, the PCIe IO unit 220 must be configured with two ports with a width of x8.

[0058] The appropriate branch control settings for assigning lanes to PCIe device 250 and PCIe device 252 are automatically determined by BIOS 240. As explained herein, different numbers of PCIe devices requiring different branch control signals can be used with the example system 200 because such settings are automatically detected by BIOS 240. For example, a single PCIe device 260 is connected to a physical lane of PCIe IO unit 230, and therefore the settings of PCIe IO unit 230 are different from the settings of PCIe IO unit 220.

[0059] Thus, the example branch control configuration routine of the BIOS 240 allows the lanes of a PCIe IO unit to be configured as multiple ports of different sizes. In this example, the branch configuration of the CPU 210 as the PCIe IO unit configuration may be configured by the BIOS 240 via a CPU configuration register during boot-up of the example system 200. Alternatively, the configuration may be configured via the platform controller hub (PCH) 242.

[0060] In this example, the PCIe unit 220 can be configured by the BIOS 240 to properly communicate with the PCIe device 250 and the PCIe device 252 according to the principles described herein. After the system is booted, the BIOS 240 is configured to set the branches of the PCIe IO unit 220 to the initial ports of the smallest granularity. In this example, the IO unit has 16 lanes, and the minimum granularity is therefore four initial ports of four lanes - for example, port 2a (x4), port 2b (x4), port 2c (x4) and port 2d (x4). The routine detects whether any PCIe device is connected to any of the initial ports. Since the port is the smallest granularity of the branch, all PCIe devices connected to the PCIe IO unit 220 that can be detected by the correct PCIe branch are also expected to be detected under this condition. In this example, the first port (port 2a, lanes 0-3) and the third port (port 2c, lanes 8-11) are connected to the PCIe device 250 and the PCIe device 252, respectively. The routine then merges the original port to the adjacent original port to utilize the additional idle lanes if no PCIe device is detected. In this example, two unconnected ports (Port 2b and Port 2d) are merged with the other two ports (Port 2a and Port 2c) that are connected to the PCIe device. The BIOS 240 then restarts the system and correctly sets the PCIe branch based on the detection status from the previous detection routine. In this example, the BIOS 240 correctly sets the PCIe IO unit 220 to two x8 wide links for the detected PCIe devices 250 and 252.

[0061] The BIOS routine for branch detection and control is automatically executed based on rules that provide branch settings based on detected PCIe devices. An example rule for the example BIOS 240 described above may be, if there is a detected PCIe device on port 2a, and no PCIe devices are detected on port 2b, port 2c, and port 2d, then the branch control of port 2a is set to x16 width without port 2b, port 2c, and port 2d. If there is no detected PCIe device on port 2b, but a device is detected on port 2c or port 2d, then the branch control of port 2a is set to x8 width without port 2b.

[0062] If a device is detected on port 2c, and if there is no device detected on port 2d, then the branch for port 2c is set to x8, and there is no port 2d. Other examples of this rule may include, if a device is detected on port 2a and port 2d, then the branch is set to port 2a (x8 width), port 2c (x4 width), and port 2d (x4 width). In this example, if the PCIe device on port 2a is a x8 link width device, then the device can now run at the full link width (x8). Based on this rule, the device on port 2a is not a x16 link width device because there is another device detected on port 2d (lanes 12-15). The rule can also determine that the device detected on port 2d is also not a x8 link width device. In this case, such a device should be detected on port 2c, not on port 2d.

[0063] Another example is, if the detected device is connected to port 2a, port 2c, and port 2d, then the branch is set to port 2a (x8), port 2c (x4), and port 2d (x4). This example is similar to the previous example because the devices are both on port 2a and port 2d. The device on port 2c cannot be a x8 link width device because there is another device connected to port 2d (lanes 12-15).

[0064] If a device is detected on port 2a and port 2c, the branch is set to port 2a (x8) and port 2c (x8). If the PCIe device on port 2a is a x8 link width device, it can now run at the full link width (x8). The device on port 2a is not a x16 link width device because there is another device on port 2c (lanes 8-11). Therefore, if the PCIe device on port 2c is a x8 link width device, it can now run at the full link width (x8).

[0065] If only one device is detected on port 2a, the branch is set to a single port 2a (x16). Regardless of whether the PCIe device on port 2a is a x8 link width device or a x16 link width device, the device can now operate at the full link width.

[0066] Figure 3A 3 is a table 300 showing different arrangements of rules for detecting and merging ports. The first set of columns 310 shows each minimum granularity port of the PCIe IO unit 220. In this example, there are four columns 310 representing each minimum granularity port. The shaded item under each port in the columns 310 represents a device that is detected connected to the port. The second set of columns 320 represents the settings of each minimum granularity port based on the corresponding detected device. In the example explained above, if only the first port has a device detected (e.g., row 332), the ports are merged into a single x16 width port. As explained above, when no device is detected on port 2b, but a device is detected separately on port 2c, the ports are set as two x8 width ports, as shown in row 334. When a device is detected on port 2a and port 2d, port 2a is set to x8 width, and port 2c and port 2d are each set to x4 width, as shown in row 336. When a device is detected on ports 2a, 2b, and 2c, the ports are configured as two x4-wide ports and one x8 port, as shown in row 338. When a device is detected on ports 2a, 2b, and 2d, the ports are configured as four x4-wide ports, as shown in row 340.

[0067] An alternative case that requires a different rule than the above may be PCIe lane reversal. PCIe lane reversal is a condition where the connections between the lanes of a PCIe IO unit and a PCIe device are in a reversed order. Thus, under normal circumstances, PCIe IO unit lanes 0-15 are conventionally connected to PCIe device lanes 0-15. In the case of lane reversal, PCIe IO unit lanes 0-15 are connected to PCIe device 15-0, respectively.

[0068] If the above case is in the case of PCIe lane inversion, the branch settings are different. In the case of PCIe lane inversion rules, if a device is detected on port 2b, but no device is detected on port 2a, the branch control of port 2a is set to x8 width without port 2b. If a device is detected on port 2d, and no device is detected on port 2a, port 2b, and port 2c, the branch control is set to port 2a enjoy x16 width without port 2b, port 2c, and port 2d. If no device is detected on port 2c, but there is a device detected on port 2a or port 2b, the branch control of port 2c is set to x8 width without port 2d.

[0069] If the device is detected on port 2a and port 2d, the branch is set to port 2a (x4), port 2b (x4), and port 2c (x8). The PCIe device on port 2a is only x4 link width, or lower. In the case of lane inversion, the first PCIe lane of the device must be connected to lane 3 in order to be detected by port 2a. Therefore, the PCIe device can only be x4 width (connected to port 2a lane 3-0), x2 width (connected to port 2a lane 3-2), or x1 width (connected to port 2a lane 3). Therefore, it is acceptable for this device to set port 2a to a x4 width port.

[0070] The maximum possible connection width of the device detected on port 2d is x8 width, because there is no device detected on port 2c. However, there is a device detected on port 2a (channel 3-0). Therefore, the detected device can be x8 width (connected to channel 15-8), x4 width (connected to channel 15-12), x2 width (connected to channel 15-14), or x1 width (connected to channel 15). Therefore, port 2c is set to a x8 width port to cover all these possibilities.

[0071] If the device is detected on port 2a, port 2c, and port 2d, the branches are set to port 2a (x4), port 2b (x4), port 2c (x4), and port 2d (x4). In the case of channel reversal, channel 7-0 cannot be set to a single port 2a (x8) because a device is detected connected to port 2a. This indicates that channel 0 of the PCIe device is connected to channel 3 of the PCIe IO unit. Setting channel 7-0 to a single port will cause the PCIe device to not be detected because channel 0 of the device is not connected to IO unit channel 7 or channel 0. The maximum physical link connected to the IO unit is a x4 link width. Therefore, setting port 2a to a x4 link width will not limit the physical link connected.

[0072] If a device is detected on port 2a and port 2c, the branch is set to port 2a (x4), port 2b (x4), port 2c (x4), and port 2d (x4). In the case of lane inversion, port 2a and port 2c are maintained as x4 wide links because these ports can only be x4 link wide. If only one device is detected on port 2a, the branch will still be set to port 2a (x4), port 2b (x4), port 2c (x4), and port 2d (x4) for the same reason.

[0073] Figure 3B 3 is a table 350 showing the channel reversal rules for setting the branch of the port depending on the device detected. The first set of columns 360 shows that in the case of channel reversal, the PCIe IO unit 220 ( Figure 2 In this example, there are four columns 360 representing each port of the smallest granularity. The shaded item under each port in the columns 360 represents a device detected on the port. The second set of columns 320 represents the final settings of each port based on the corresponding detected device.

[0074] As explained above, the case of channel reversal leads to a different Figure 3A The port settings for normal settings are shown. In table 350, row 380 represents a single port setting of x16 (2a) if a device is detected only on port 2d. Row 382 represents a two x8 wide port setting if a device is detected only on port 2b and port 2d. Row 384 represents four x4 wide ports when devices are detected on port 2a, port 2c, and port 2d. Similarly, row 386 represents one x8 wide port and two x4 wide ports when devices are detected on port 2b, port 2c, and port 2d.

[0075] Figure 4 and Figure 5The flowchart of FIG. 1 represents an example machine readable instructions for a dynamic branch setup procedure of a PCIe IO unit on a device such as a CPU. In this example, the machine readable instructions include an algorithm for execution by (a) a processor; (b) a controller; and / or (c) one or more other suitable processing devices. The algorithm may be implemented in software stored on a tangible medium (e.g., a flash memory, a CD-ROM, a floppy disk, a hard disk, a digital versatile video disc (DVD), or other memory device). However, a person skilled in the art will readily appreciate that the entire algorithm and / or portions thereof may be executed by a device other than a processor, and / or implemented in firmware or dedicated hardware in a well-known manner (e.g., may be implemented by an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable logic device (FPLD), a field programmable gate array (FPGA), discrete logic, etc.). For example, any or all elements of the interface may be implemented by software, hardware, and / or firmware. Also, some or all of the machine readable instructions represented by the flowchart may be implemented manually. Figure 4 and Figure 5 As described in the flowcharts shown in the drawings, those skilled in the art will readily appreciate that many other methods of implementing the exemplary machine-readable instructions may be used alternatively. For example, the execution order of the blocks may be changed, and / or some of the described blocks may be changed, deleted or combined.

[0076] Figure 4 It is assumed that the channel reversal design is predefined. Figure 24. Flowchart 400 of an automatic setup procedure for one of the example PCIe IO units 220 or PCIe IO units 230 in FIG. 4. At step 410, the system is booted. At step 412, the routine sets the branching of the PCIe lanes to the initial ports at the minimum granularity. At step 414, the system firmware then detects and records any PCIe devices connected to any initial port at the minimum granularity. In this example, the PCIe IO unit 220 has four ports (port 2a, port 2b, port 2c, and port 2d) in the branching at the minimum granularity. Since these ports are the branches at the minimum granularity, all PCIe devices connected to the PCIe IO unit 220 that are detectable with the correct PCIe branching are also expected to be detected under this condition. Under the branching at the minimum granularity, the connected devices may not be able to operate at their full connection width. For example, a PCIe device with eight lanes can only be operated at four lanes each by the routine at this stage due to the minimum granularity of four ports of four lanes.

[0077] In order to provide full link width to the larger width devices, the routine then merges the primary ports where no PCIe devices are detected into adjacent primary ports where PCIe devices are connected. This routine thus utilizes additional idle PCIe lanes when needed. At step 416, the routine then restarts the system and configures the PCIe branches of the ports of the PCIe IO unit 220 based on the status determined during the detection. At step 418, the system then operates with the modified PCIe branch settings, which identify all connected PCIe devices and assign the correct lane width to each device based on the detected status.

[0078] In the above routine 400, the PCIe lane reversal design needs to be predefined so that the correct rules can be used to merge the correct ports. Figure 5 Another routine 500 in allows the PCIe branch to be automatically configured correctly by the BIOS firmware without the need for information about the PCIe lane reversal settings in the system.

[0079] In routine 500, at step 510, the system is started. At step 512, the routine sets the IO unit (e.g. Figure 2The system firmware then detects and records any PCIe devices connected to any of the initial ports at the minimum granularity in step 514. In this example, the PCIe IO unit 220 has four initial ports (Port 2a, Port 2b, Port 2c, and Port 2d) in the branching with the minimum granularity. Since these ports are the branches with the minimum granularity, all PCIe devices connected to the PCIe IO unit 220 that are detectable with the correct PCIe branching are also expected to be detected under this condition. With the branching with the minimum granularity, the connected devices may not be able to operate at their full connection width, and the detection does not take lane inversion into account.

[0080] In order to provide full link width to the larger width devices, the routine then merges the initial ports where no PCIe devices are detected into adjacent initial ports where PCIe devices are connected. This process utilizes additional idle PCIe lanes when needed. In step 516, the routine then restarts the system and sets the PCIe branches of the ports of the PCIe IO unit 220 based on the status determined during the detection. In step 518, the routine then checks whether the previously detected devices are still detected under the new settings. If all previously detected devices are still detected, the system then operates with the revised PCIe branch settings, which identify all connected PCIe devices and allocate the correct lane width to each device based on the detected status.

[0081] At step 518, if no previously detected device is detected, this indicates a case where lane inversion is not assumed but a lane inversion condition actually exists, otherwise it is a case where lane inversion is assumed but a lane inversion condition actually does not exist. In this case, at step 520, the system firmware restarts the system again and splits the merged PCIe port of the undetected PCIe device. At step 522, the system then operates with the modified PCIe branch configuration, which identifies all connected PCIe devices and assigns the correct lane width to each device based on the detected status.

[0082] Possibility of channel reversal design differences between assumed and actual conditions, resulting in the initial branch settings being applied to Figure 5, some of the connected PCIe devices may not be detected after the routine in . For example, if only one device is detected on port 2a, and no device is detected on port 2b, port 2c, and port 2d, the rule based on the assumption that there is no lane inversion will set the branch to a single x16 link width port (2a). However, if the system includes lane inversion, after the branch setting sets port 2a to a x16 link width, the PCIe device will not be detected because channel 0 of the PCIe device is actually connected to IO unit channel 3, not channel 0 or channel 15. In this case, the routine will return to restart the system and change the branch setting to set the branch setting back to port 2a (x4), port 2b (x4), port 2c (x4), and port 2d (x4) based on the rule of lane inversion, such as Figure 3B Thus, if any device detected on the corresponding port is not detected with the settings under the normal rules, the modified routine 500 for channel reversal will restore the changes made by the normal rules.

[0083] Figure 6 is a table 600 showing all possibilities of device detection and device failure after a new setup. Table 600 thus contains comprehensive rules covering Figure 5 6 shows the normal case and the lane reversal case in routine 500 in . Table 600 includes a first set of columns 610 showing different possibilities for initial detection of PCIe devices on the lowest granularity ports represented by shaded items. A second column 620 shows, for each detected port, the corresponding initial branch setting settings for each corresponding port. A third column 630 shows, for each detected port in column 610, devices connected to the port that may not be detected after the initial branch setting is set according to column 620. A fourth column 640 shows modified branch setting settings based on the failure to detect a device previously detected on one or more ports. The crossed items in column 640 represent situations where the initially detected device matches the later detected device.

[0084] The advantage of the above method is that it allows the BIOS to automatically identify the correct PCIe branch settings for the device's PCIe IO unit. This eliminates the need for the BIOS to rely on a PCIe branch setting table for each system. This process allows the PCIe branch settings to be changed while the BIOS is in use, thus eliminating the need to release a new BIOS for new PCIe branch requirements.

[0085] As used in this application, "component", "module", "system" or similar terms generally refer to a computer-related entity, which can be hardware (such as a circuit), a combination of hardware and software, software, or an entity related to an operating machine and having one or more specific functions. For example, a component can be, but is not limited to, a program executed on a processor (such as a digital signal processor), a processor, an object, an executable file, a thread of execution, a program, and / or a computer. As an example, an application executed on a controller, as well as the controller itself, can be a component. One or more components can reside within a program and / or thread, and a component can be confined to one computer and / or distributed between two or more computers. In addition, a "device" can be in the form of specially designed hardware; general-purpose hardware specially made by executing software on it that enables the hardware to perform specific functions; software stored on a computer-readable medium; or a combination thereof.

[0086] The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. In addition, if the words "including," "having," or variations thereof, are used in the detailed description and / or claims, such words are intended to be included in a manner similar to the word "comprising."

[0087] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. In addition, terms such as those defined in commonly used dictionaries should be interpreted as having the same meaning as they do in the context of the relevant art, and unless explicitly defined as such herein, such terms will not be interpreted as idealized or overly formal concepts.

[0088] Although various embodiments of the present invention have been described above, it should be understood that the embodiments are presented only as examples and not limitations. Even though the present invention has been illustrated and described with reference to one or more embodiments, equivalent substitutions and modifications will be thought of or known by others skilled in the art when reading and understanding this specification and the accompanying drawings. In addition, although a specific feature of the present invention may be disclosed by only one of several embodiments, such feature may be combined with one or more other features of other embodiments, and such other features may be desirable or advantageous for any given or specific application. Therefore, the breadth and scope of the present invention should not be limited to any of the embodiments described above. Instead, the scope of the present invention should be defined according to the claims and their equivalents.

Claims

1. A system for providing automatic branch detection and setting of a peripheral component interconnect express (PCIe) input / output unit, the system comprising: A computing device includes a PCIe input / output unit having a plurality of configurable channels; a PCIe device connected to at least some of the lanes of the PCIe input / output unit; and A branch setting device is operable to perform the following steps: dividing the channel of the PCIe input / output unit into a plurality of initial ports, each of the initial ports having the channel of the lowest granularity; Detecting whether the PCIe device is connected to each of the initial ports; Determining a branch port setting of the PCIe input / output unit based on detection of a PCIe device connected to the initial port; and storing the branch port setting of the PCIe input / output unit, The branch setting device includes a plurality of channel inversion rules for a plurality of channel connections between the PCIe input / output unit and the PCIe device, and the branch setting device adjusts the branch port settings for channel inversion.

2. The system of claim 1, wherein the branch setting device is operable to merge the initial port without a detected PCIe device with another initial port.

3. The system as claimed in claim 1, wherein the computing device is a CPU and comprises a plurality of PCIe input / output units, and a port of each of the PCIe input / output units is set by the branch setting device.

4. The system of claim 1, wherein the branch setting device is further operable to perform the following steps: After setting the PCIe input / output unit, restarting the system; determining whether any previously detected PCIe device is not detected; and If any previously detected PCIe device is not detected, the ports of the PCIe input / output unit are reset.

5. A method for automatically providing branch control signals to a peripheral component interconnect express (PCIe) input / output unit disposed on a computing device, comprising: Divide multiple channels of a PCIe input / output unit into multiple initial ports of the lowest granularity; detecting whether a PCIe device is connected to each of the initial ports via a branch setting device; Based on the initial port having a connected PCIe device, determining a branch port setting of the PCIe input / output unit via the branch setting device; and Based on the branch port setting, multiple ports of the PCIe input / output unit are set, The method further includes: Determine channel reversal of a plurality of channel connections between the PCIe input / output unit and the PCIe device; and Adjust the branch port settings for channel inversion. 6 . The method of claim 5 , further comprising merging the initial port without a detected PCIe device with another initial port.

7. The method of claim 5, wherein the computing device is a CPU and comprises a plurality of PCIe input / output units, and a port of each of the PCIe input / output units is configured by the branch configuration device.

8. The method of claim 5, further comprising: After setting the PCIe input / output unit, restarting a system; determining whether any previously detected PCIe device is not detected; and If any previously detected PCIe device is not detected, resetting the port of the PCIe input / output unit.

Citation Information

Patent Citations

  • System and Method to Configure Communication Lanes of a Central Processing Unit

    US20180341497A1