Data processing device, control method thereof, initialization method and initialization device

By introducing an aggregation controller and a virtual switch into the data processing device, the PCIe bus of multiple business modules can be managed in a unified manner, solving the problem of insufficient bus numbers during the initialization of the data processing device, and enabling normal device startup and improved expansion performance of computer equipment.

CN121029665BActive Publication Date: 2026-03-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511563204.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-03-03
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

The data processing device failed to initialize and the system could not start because the requested PCIe bus number exceeded the platform's reserved number.

Method used

By adding an aggregation controller and a virtual switch to the data processing device, multiple business modules can be managed in a unified manner, exposing only a single interface to external systems. The virtual switch can then forward business requests and data internally, thereby achieving unified management of the PCIe bus.

Benefits of technology

This allows the data processing device to be initialized normally with only one PCIe bus number, solving the problem of device initialization failure and improving the expansion performance of computer devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029665B_ABST
    Figure CN121029665B_ABST
Patent Text Reader

Abstract

The application discloses a data processing device and a control method, an initialization method and an initialization device thereof, relates to the technical field of electronic equipment, and comprises at least two service modules, an interface module, an aggregation controller and a virtual switch. The aggregation controller determines a target service function corresponding to a service request, determines a target service module in the at least two service modules according to the target service function, the virtual switch sends the service request to the target service module, and in the case that service data sent by the target service module is received, the service data is sent to a computer device. By increasing the aggregation controller and the virtual switch, the data processing device originally needing to be allocated multiple bus numbers can be normally initialized and started only by using one bus number, the problem that the PCIe bus number requested by the data processing device exceeds the reserved number of the platform and causes the system to be unable to start is solved, and the technical effect that the upstream computer device can support more expansion devices is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to a data processing device and its control method, initialization method and initialization device. Background Technology

[0002] In related technologies, data centers and high-end computer platforms can provide abundant PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) channels, which can support a large number of expansion devices, such as data processing units.

[0003] The data processing device integrates multiple independent PCIe service modules, including a multi-core processor (Central Processing Unit, CPU), network interface, memory controller, encryption / decryption engine, storage acceleration controller, acceleration engine, and SR-IOV (Single Root I / O Virtualization) module for virtualization. Each of these service modules requires independent bus numbers, memory space, and other resources during PCIe enumeration.

[0004] According to the PCIe specification, a PCIe device (including bridged devices) declares the number of downstream bus numbers it requires during enumeration. Traditional PCIe switches are allocated a contiguous range of bus numbers for their downstream devices. However, the complexity of data processing devices can lead to a situation where the number of downstream bus numbers they require may exceed the number reserved by the platform. This can cause device initialization failure and system boot failure. Summary of the Invention

[0005] This application provides a data processing device and its control method, initialization method and initialization device, to at least solve the problem in the related art where the PCIe bus number requested by the data processing device exceeds the platform's reserved number, resulting in device initialization failure and system startup failure.

[0006] This application provides a data processing apparatus, including:

[0007] At least two service modules, an interface module, an aggregation controller, and a virtual switch; the interface module connects to a high-speed serial computer expansion bus interface of the computer equipment; the aggregation controller communicates with the interface module and the virtual switch; the virtual switch communicates with each of the at least two service modules respectively.

[0008] The aggregation controller is used to determine the target business function corresponding to the business request when the interface module receives a business request sent by the computer device, and to determine the target business module from at least two business modules based on the target business function.

[0009] Virtual switches are used to send service requests to target service modules, and, upon receiving service data from the target service module, to send service data to computer devices via interface modules.

[0010] This application also provides a control method for a data processing device, including:

[0011] When the interface module receives a business request sent by the computer device, it determines the target business function corresponding to the business request, and determines the target business module from at least two business modules based on the target business function.

[0012] Send the business request to the target business module;

[0013] Upon receiving business data from the target business module, the business data is sent to the computer device through the interface module.

[0014] This application also provides a device initialization method, including:

[0015] Identify the device connection status of the high-speed serial computer expansion bus interface;

[0016] If a high-speed serial computer expansion bus interface is found to be connected to a data processing device, obtain the device identifier of the data processing device.

[0017] Identify the business functions of the data processing device based on the device identification and hardware configuration information table;

[0018] When the number of business functions is at least two and the data processing device requests a high-speed serial computer extension bus number, allocate a high-speed serial computer extension bus number to the data processing device.

[0019] When there are at least two business functions and the data processing device requests at least two high-speed serial computer extension bus numbers, at least one high-speed serial computer extension bus number shall be assigned to each of the at least two business functions of the data processing device.

[0020] This application also provides a device initialization apparatus, comprising:

[0021] The identification module is used to identify the device connection status of the high-speed serial computer expansion bus interface;

[0022] The acquisition module is used to obtain the device identifier of the data processing device when it is found that the high-speed serial computer expansion bus interface is connected to the data processing device.

[0023] The identification module is also used to identify the business functions of the data processing device based on the device identifier and hardware configuration information table;

[0024] The resource allocation module is used to allocate a high-speed serial computer extension bus number to the data processing device when there are at least two business functions and the data processing device requests a high-speed serial computer extension bus number.

[0025] Furthermore, when the number of business functions is at least two and the data processing device requests at least two high-speed serial computer extension bus numbers, at least one high-speed serial computer extension bus number is assigned to each of the at least two business functions of the data processing device.

[0026] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the control method of any of the above-described data processing devices and / or the initialization method of the device.

[0027] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described XX methods.

[0028] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the control method of any of the above-described data processing devices and / or the initialization method of the device.

[0029] This application addresses a data processing device comprising at least two business modules by adding an aggregation controller and a virtual switch. The virtual switch unifies the management of all business modules on the PCIe bus, which would otherwise be directly exposed to the upstream platform. This allows the data processing device to expose only a single interface to the external system. When the upstream platform enumerates the PCIe bus, it will only discover the data processing device's unique interface module. The aggregation controller identifies the target business module corresponding to the business request received by this unique external interface module and uses the routing function of the virtual switch to internally forward the received business request to the target business module. Similarly, the business data returned by the target business module is sent to the upstream platform's computer device through the unique interface module. Therefore, this application enables a data processing device that previously required multiple bus numbers to initialize and start normally with only one bus number. This solves the technical problem in related technologies where the requested PCIe bus number exceeds the platform's reserved number, leading to device initialization failure and system startup failure. This achieves the technical effect of enabling the upstream platform's computer device to support more extended devices. Attached Figure Description

[0030] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is a schematic diagram of the mechanism of a data processing device provided in an embodiment of this application;

[0032] Figure 2 A flowchart illustrating a control method for a data processing apparatus provided in an embodiment of this application;

[0033] Figure 3 A flowchart illustrating a device initialization method provided in this application embodiment;

[0034] Figure 4 A structural block diagram of an initialization device for a device provided in an embodiment of this application;

[0035] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0036] Figure label:

[0037] 100 Data processing device, 102 Service module, 104 Interface module, 106 Aggregator controller, 108 Virtual switch, 1082 Upstream port, 1084 Downstream port. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0039] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0040] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] The specific application environment architecture or specific hardware architecture on which the execution of the control method of the data processing device depends is described herein.

[0042] For example, the data processing device in the embodiments of this application can be smart network card hardware, such as BF3 smart network card.

[0043] For example, the virtual switch in this application embodiment includes an upstream port and a downstream port, wherein the upstream port is a port exposed to the computer equipment of the upstream platform, and the downstream port is a port for communicating with the service module.

[0044] For example, the business modules in the embodiments of this application include, but are not limited to: multi-core processor, network interface, memory controller, encryption / decryption engine, storage acceleration controller, acceleration engine, and SR-IOV functional module for virtualization.

[0045] For example, the aggregation controller in this application embodiment is used to manage and control the virtual switch.

[0046] For example, the computer device in this application embodiment can be a server device or a terminal device. The server device can be a small server or a large server cluster, or it can be a cloud server. The terminal device can be a mobile electronic device or a small computer device.

[0047] For example, the data processing apparatus in this application embodiment includes a data processing unit (DPU), which is a processor used to process data center infrastructure tasks, such as network tasks, storage tasks and / or security management tasks.

[0048] Some of the nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0049] BF3: A data processing unit that integrates a multi-core CPU, network interface, and dedicated acceleration engine into a high-performance smart network card.

[0050] DPU: Data Processing Unit, is a processor specifically designed to handle tasks in data center infrastructure such as networking, storage, and security.

[0051] PCIe: Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard used to connect high-performance hardware devices.

[0052] BIOS: Basic Input / Output System, responsible for hardware initialization and booting the operating system firmware.

[0053] UEFI: Unified Extensible Firmware Interface, is a modern BIOS alternative standard that offers more powerful features and a modular design.

[0054] Root Port: The root port is the port provided by the PCIe controller inside the CPU, and it is the starting point of the PCIe topology tree.

[0055] Bus Number: A bus number is a number used to uniquely identify a bus segment in a PCIe topology. A root port can manage a continuous range of bus numbers.

[0056] MMIO: Memory-Mapped Input / Output, is an I / O (input / output) technology. This technology uses address mapping to allow the CPU to directly interact with hardware devices as if they were regular memory.

[0057] To address the problem in related technologies where the requested PCIe bus number by the data processing device exceeds the platform's reserved number, leading to device initialization failure and system boot failure, this application proposes a data processing device and its control method, initialization method, and initialization device. The following is a further detailed description of this application with reference to the accompanying drawings.

[0058] In some embodiments of this application, a data processing apparatus is provided. Figure 1 This is a schematic diagram of a data processing device provided in an embodiment of this application, as shown below. Figure 1 As shown, the data processing device 100 includes:

[0059] At least two service modules 102, an interface module 104, an aggregation controller 106, and a virtual switch 108; the interface module 104 is connected to the high-speed serial computer expansion bus interface of the computer device; the aggregation controller 106 is communicatively connected to the interface module 104 and the virtual switch 108; the virtual switch 108 is communicatively connected to each of the at least two service modules 102.

[0060] When the interface module 104 receives a service request sent by the computer device, the aggregation controller 106 is used to determine the target service function corresponding to the service request, and to determine the target service module 102 among at least two service modules 102 according to the target service function.

[0061] The virtual switch 108 is used to send service requests to the target service module 102, and, upon receiving service data sent by the target service module 102, to send the service data to the computer device through the interface module 104.

[0062] In this embodiment, the data processing device 100 includes at least two service modules 102 with different business functions. For example, the service module 102 includes, but is not limited to, a processor module, a network signal transceiver module, a memory control module, and a data encryption / decryption module.

[0063] Interface module 104 can be connected to the high-speed serial computer expansion bus interface, i.e., PCIe interface, of a computer device. For example, interface module 104 is a standard PCIe interface.

[0064] For a data processing device 100 that includes multiple service modules 102, after being connected to the PCIe bus slot of a computer device, the computer device needs to allocate at least one separate PCIe bus number to each individual service module 102 when enumerating the PCIe bus. This results in a data processing device 100 needing to occupy multiple PCIe bus numbers.

[0065] However, the number of PCIe bus numbers that a computer's processor platform can provide is limited. When multiple such data processing devices 100 are connected in a computer, it may lead to the exhaustion of all available PCIe bus numbers, causing problems such as device initialization failure and system inability to start normally.

[0066] To address the aforementioned issues, the data processing apparatus 100 in this embodiment adds an aggregation controller 106 and a virtual switch 108. The virtual switch 108 is communicatively connected to at least two service modules 102 within the data processing apparatus 100, and also communicates with a computer device via an interface module 104. Therefore, the virtual switch 108 and the at least two service modules 102 in the apparatus form a multi-functional topology.

[0067] When the interface module 104 of the data processing device 100 connects to the PCIe interface of the computer device, due to the presence of the virtual switch 108, the computer device will recognize the data processing device 100 as a single aggregated endpoint device when enumerating the PCIe bus, and therefore will only assign one bus number to the data processing device 100. The multi-functional topology in the data processing device 100 will be completely hidden and not visible to the outside, and the internal routing function will be handled by the virtual switch 108.

[0068] When a computer device needs to call or access a specific business function within the data processing device 100, such as when it needs to access the network card function, the PCIe business request issued by the CPU of the computer device is received through the interface module 104. When the aggregation controller 106 recognizes the business request, it determines the target business module 102 among at least two business modules 102 based on the target business function required by the business request and the business functions provided by each business module 102.

[0069] At this point, the virtual switch 108 uses its routing function to forward the received service request to the target service module 102 for execution. After the target service module 102 receives and executes the service request, it returns the corresponding service data. The virtual switch 108 then sends the service data to the CPU of the computer device through the interface module 104, following the same processing logic.

[0070] During this process, the CPU of the computer device only needs to communicate with the single interface module 104, and does not need to communicate with each service module 102 individually.

[0071] This embodiment of the application adds an aggregation controller 106 and a virtual switch 108 to a data processing device 100 with two or more service modules 102. The virtual switch 108 centrally manages the various service modules 102 that would otherwise be directly exposed to the upstream platform via the PCIe bus, allowing the data processing device 100 to expose only a single interface to the external system. When the upstream platform enumerates the PCIe bus, it will only discover the unique interface module 104 of the data processing device 100. The aggregation controller 106 identifies the target service module 102 corresponding to the service request received by the unique external interface module 104, and uses the routing function of the virtual switch 108 to internally forward the received service request to the target service module 102. Similarly, the service data returned by the target service module 102 is sent to the upstream platform's computer device through the unique interface module 104. Therefore, this application enables the data processing device 100, which originally required multiple bus numbers, to be initialized and started normally with only one bus number. This solves the technical problem in the related art where the data processing device 100 requests more PCIe bus numbers than the platform's reserved number, resulting in device initialization failure and system startup failure. This achieves the technical effect of enabling the upstream platform's computer equipment to support more extended devices.

[0072] In some embodiments of this application, the target address of the service request is the memory address of the data processing device 100; the virtual switch 108 is also used for:

[0073] Read the address offset table; the address offset table includes the address offset of each of the at least two service modules 102; determine the target offset of the target service module 102 according to the address offset table; determine the memory address of the target service module 102 according to the target offset and the memory address of the data processing device 100; send the service request to the target service module 102 based on the memory address of the target service module 102.

[0074] In this embodiment of the application, when the CPU of the computer device needs to access a certain business function inside the data processing device 100, the TLP (Transaction Layer Packet) issued by the CPU, that is, the target address of the business request, is the memory address allocated to the single aggregate device of the data processing device 100, rather than the memory address of the specific business module 102.

[0075] Therefore, when a service request is received, the routing function of the virtual switch 108 is used to route the service request to the specific target service module 102.

[0076] For example, the virtual switch 108 has a built-in address offset table. The address offset table records the address offset corresponding to each service module 102. When a service request is received, the aggregation controller 106 determines the target service module 102 corresponding to the service request. The virtual switch 108 reads the target offset corresponding to the target service module 102 from the address offset table, and offsets the target address of the service request using the target offset to obtain the memory address of the target service module 102. Using the memory address of the target service module 102, the service request can be routed to the target service module 102 for execution.

[0077] This application embodiment incorporates an address offset table within the virtual switch 108. By using the address offset table, received service requests are routed to specific target service modules 102, enabling computer devices to communicate with multiple service modules 102 through a single interface module 104.

[0078] In some embodiments of this application, the aggregation controller 106 is further configured to send a device identifier of the data processing device 100 to the computer device when it detects that the interface module 104 is connected to the high-speed serial computer expansion bus interface of the computer device; wherein the computer device identifies at least two service functions of the data processing device 100 based on the device identifier and the hardware configuration information table.

[0079] In this embodiment, the data processing device 100 is identified by the computer device as a single aggregation endpoint device, but the data processing device 100 itself actually has multiple business functions, which are implemented through different business modules 102. Therefore, after the data processing device 100 is connected to the PCIe interface of the computer device, it sends a device identifier to the computer device through the aggregation controller 106.

[0080] For example, the device identifier may include the vendor ID, device ID, and a specific subsystem ID of the aggregation device. After identifying the device identifier, the computer device can look up the device description of the data processing device 100 in a hardware configuration information table, such as the ACPI (Advanced Configuration and Power Interface) table. For instance, the ACPI table can use the description "CompositeDevice" to describe that the data processing device 100 contains multiple sub-service functions, and explicitly state that these sub-service functions share the same PCIe bus location. At this point, the computer device can confirm that the data processing device 100 has at least two service functions.

[0081] This application embodiment enables the computer device to identify that a data processing device 100 can provide at least two service functions through a PCIe bus location by sending a device identifier to the computer device. This allows the computer device to allocate only one PCIe bus number to the data processing device 100, thereby saving PCIe bus numbers and preventing system startup failure due to PCIe bus number exhaustion.

[0082] In some embodiments of this application, such as Figure 1 As shown, the virtual switch 108 includes an upstream port 1082 and at least two downstream ports 1084; the upstream port 1082 is used to communicate with computer equipment through the interface module 104; the at least two downstream ports 1084 are respectively connected to at least two service modules 102.

[0083] In the embodiment of the application, the virtual switch 108 includes an upstream port 1082, and the number of upstream ports 1082 is unique. The virtual switch 108 communicates with an upstream platform, such as the CPU of a computer device, through the upstream ports 1082. This upstream port 1082 is the only port exposed to the upstream computer device. Therefore, when the computer device performs PCIe bus enumeration, it will identify the data processing device 100 as an aggregated endpoint device and assign a unique PCIe bus number to the data processing device 100.

[0084] For at least two service modules 102 in the data processing device 100, the virtual switch 108 communicates with each service module 102 through downstream ports 1084. Exemplarily, the number of downstream ports 1084 is equal to or greater than the number of service modules 102. For example, assuming the data processing device 100 includes N service modules 102, where N is a natural number greater than or equal to 2, then the number of downstream ports 1084 is N, and each of the N downstream ports 1084 corresponds one-to-one with one of the N service modules 102.

[0085] This application embodiment sets up a virtual switch 108 with one upstream port 1082 and at least two downstream ports 1084, so that the upstream platform only needs to allocate a unique PCIe bus number to the data processing device 100 to call at least two service modules 102 in the data processing device 100. This allows the data processing device 100, which originally required N PCIe bus numbers to work normally, to work normally with only 1 PCIe bus number. This enables more high-performance DPUs to be connected under a single root port of the computer device, and the computer device can also support more expansion devices.

[0086] In some embodiments of this application, the aggregation controller 106 is further configured to request a high-speed serial computer expansion bus number from the computer device when it detects that the interface module 104 is connected to the high-speed serial computer expansion bus interface of the computer device; wherein at least two service modules 102 share the high-speed serial computer expansion bus number.

[0087] In this embodiment of the application, when the data processing device 100 is connected to the high-speed serial computer expansion bus interface (PCIe interface) of the computer device through the interface module 104, the CPU of the computer device enumerates the PCIe bus through the BIOS / UEFI firmware. At this time, the CPU will recognize the data processing device 100 as a single aggregated endpoint device.

[0088] At this time, the aggregation controller 106 recognizes that the interface module 104 is connected to the high-speed serial computer expansion bus interface of the computer equipment. Through the interface module 104, it declares the data processing device 100 as a standard PCIe device in the configuration workpiece and requests a unique high-speed serial computer expansion bus number from the computer equipment. This unique high-speed serial computer expansion bus number is also the bus number where the data processing device 100 is located.

[0089] For at least two service modules 102 in the data processing device 100, the computer device is informed by describing them as “Composite Device” in the ACPI table, etc., that the data processing device 100 contains multiple service modules 102 with sub-service functions, and that these service modules 102 share the same PCIe bus location, that is, they share the same high-speed serial computer extension bus number.

[0090] When the data processing device 100 of this application embodiment is connected to a computer device, it only needs to request a unique PCIe bus number from the CPU of the computer device. Therefore, the data processing device 100, which originally required N PCIe bus numbers to work normally, only needs 1 PCIe bus number to work normally. This allows the computer device to reserve more PCIe bus numbers for other expansion devices, thereby improving the expansion performance of the computer device.

[0091] In some embodiments of this application, a control method for a data processing apparatus is also provided, which is applied to the data processing apparatus provided in any of the above embodiments.

[0092] Figure 2 A flowchart illustrating a control method for a data processing apparatus provided in this application embodiment is shown below. Figure 2 As shown, the method includes:

[0093] S202, when the interface module receives a service request sent by the computer device, it determines the target service function corresponding to the service request, and determines the target service module from at least two service modules based on the target service function.

[0094] The data processing device includes at least two business modules with different business functions. When a computer device needs to call or access a specific business function within the data processing device, such as accessing a network interface card (NIC) function, the interface module receives a PCIe service request. At this time, the aggregation controller determines the target business module from at least two business modules based on the target business function required by the service request and the business functions provided by each business module.

[0095] S204, send the business request to the target business module.

[0096] The virtual switch, through its routing function, forwards the received service requests to the target service module for execution.

[0097] S206: Upon receiving business data from the target business module, the business data is sent to the computer device through the interface module.

[0098] In this process, after the virtual switch sends a service request to the target service module, the target service module executes the corresponding service operation and returns the corresponding service data. At this point, the virtual switch, following the same processing logic, sends the service data to the CPU of the computer device through the interface module. During this process, the CPU of the computer device only needs to communicate with a single interface module, and does not need to communicate with each individual service module.

[0099] This application, through the addition of an aggregation controller and a virtual switch to a data processing device with two or more service modules, unifies the management of the various service modules on the PCIe bus that would otherwise be directly exposed to the upstream platform. This allows the data processing device to expose only a single interface to the external system. When the upstream platform enumerates the PCIe bus, it will only discover the data processing device's unique interface module. The aggregation controller identifies the target service module corresponding to the service request received by this unique external interface module and uses the routing function of the virtual switch to internally forward the received service request to the target service module. Similarly, the service data returned by the target service module is sent to the upstream platform's computer device through the unique interface module. Therefore, this application enables a data processing device that would otherwise require multiple bus numbers to initialize and start normally with only one bus number. This solves the technical problem in related technologies where the requested PCIe bus number exceeds the platform's reserved number, leading to device initialization failure and system startup failure. This achieves the technical effect of enabling the upstream platform's computer device to support more extended devices.

[0100] In some embodiments of this application, the target address of the service request is the memory address of the data processing device; sending the service request to the target service module includes:

[0101] Read the address offset table; the address offset table includes the address offset of each of the at least two business modules;

[0102] Determine the target offset of the target business module based on the address offset table;

[0103] The memory address of the target service module is determined based on the target offset and the memory address of the data processing device.

[0104] Based on the memory address of the target business module, the business request is sent to the target business module.

[0105] In this embodiment of the application, when the CPU of the computer device needs to access a certain business function inside the data processing device, the target address of the TLP packet sent by the CPU is the memory address allocated to the single aggregate device of the data processing device, rather than the memory address of a specific business module.

[0106] Therefore, when a service request is received, the routing function of the virtual switch is used to route the service request to the specific target service module.

[0107] For example, the virtual switch has a built-in address offset table. This table records the address offset corresponding to each service module. Upon receiving a service request, the aggregation controller determines the target service module corresponding to the request. The virtual switch reads the target offset corresponding to the target service module from the address offset table and offsets the target address of the service request using this offset to obtain the memory address of the target service module. Using the memory address of the target service module, the service request can then be routed to that module for execution.

[0108] This application embodiment incorporates an address offset table within a virtual switch, which routes received service requests to specific target service modules, enabling computer devices to communicate with multiple service modules through a single interface module.

[0109] In some embodiments of this application, before determining the target business module among at least two business modules based on the business function indicated by the business request, the method further includes:

[0110] When it is detected that the interface module is connected to the high-speed serial computer expansion bus interface of the computer device, the device identifier of the data processing device is sent to the computer device; wherein, the computer device identifies at least two business functions of the data processing device based on the device identifier and the hardware configuration information table.

[0111] In this embodiment, the data processing device is identified by the computer as a single aggregation endpoint device, but the data processing device itself actually has multiple business functions, implemented through different business modules. Therefore, after the data processing device is connected to the PCIe interface of the computer, it sends a device identifier to the computer through the aggregation controller.

[0112] After identifying the device identifier, the computer can look up the device description of the data processing unit in a hardware configuration information table, such as the ACPI table. For example, the ACPI table can use the description "Composite Device" to describe that the data processing unit contains multiple sub-service functions and that these sub-service functions share the same PCIe bus location. At this point, the computer can confirm that the data processing unit has at least two service functions.

[0113] This application embodiment enables the computer device to clearly identify that a data processing device can provide at least two service functions through a PCIe bus location by sending a device identifier to the computer device. This allows the computer device to allocate only one PCIe bus number to the data processing device, thereby saving PCIe bus numbers and preventing system startup failure due to PCIe bus number exhaustion.

[0114] In some embodiments of this application, before determining the target business module among at least two business modules based on the business function indicated by the business request, the method further includes:

[0115] If an interface module is detected to be connected to a high-speed serial computer expansion bus interface of a computer device, a high-speed serial computer expansion bus number is requested from the computer device; wherein at least two service modules share the high-speed serial computer expansion bus number.

[0116] In this embodiment of the application, when the data processing device is connected to the high-speed serial computer expansion bus interface of the computer device through the interface module, the CPU of the computer device enumerates the PCIe bus through the BIOS / UEFI firmware. At this time, the CPU will recognize the data processing device as a single aggregated endpoint device.

[0117] At this time, the aggregation controller recognizes that the interface module is connected to the high-speed serial computer expansion bus interface of the computer equipment. Through the interface module, it declares the data processing device as a standard PCIe device in the configuration workpiece and requests a unique high-speed serial computer expansion bus number from the computer equipment. This unique high-speed serial computer expansion bus number is also the bus number where the data processing device is located.

[0118] For at least two service modules in a data processing device, the computer device is informed by describing them using "CompositeDevice" in the ACPI table, indicating that the data processing device contains multiple service modules with sub-service functions, and that these service modules share the same PCIe bus location, that is, they share the same high-speed serial computer extension bus number.

[0119] When the data processing device of this application embodiment is connected to a computer device, it only needs to request a unique PCIe bus number from the CPU of the computer device. Therefore, the data processing device that originally required N PCIe bus numbers to work normally only needs 1 PCIe bus number to work normally. This allows the computer device to reserve more PCIe bus numbers for other expansion devices, thereby improving the expansion performance of the computer device.

[0120] In some embodiments of this application, a device initialization method is also provided, applied in a computer device, the computer device including a high-speed serial computer expansion bus interface.

[0121] Figure 3 A flowchart of a device initialization method provided in an embodiment of this application is shown below. Figure 3 As shown, the method includes:

[0122] S302 identifies the device connection status of the high-speed serial computer expansion bus interface.

[0123] The computer device uses BIOS / UEFI firmware to enumerate the high-speed serial computer expansion bus interfaces, thereby identifying the device connection status of each high-speed serial computer expansion bus interface.

[0124] For example, the device connection status includes connected device and unconnected device. In the case of a connected device, the device status also includes device information for the connected device.

[0125] S304: If a high-speed serial computer expansion bus interface is found to be connected to a data processing device, the device identifier of the data processing device is obtained.

[0126] After the data processing device connects to the high-speed serial computer expansion bus interface of the computer device, the data processing device sends a device identifier to the computer device through the aggregation controller. For example, the device identifier may include the aggregation device's vendor ID, device ID, and a specific subsystem ID.

[0127] S306, Identify the business functions of the data processing device based on the device identifier and hardware configuration information table.

[0128] For example, the hardware configuration information table can be an ACPI table. After receiving the device identifier sent by the data processing device, the computer device looks up the device description of the data processing device in the ACPI table and identifies the business functions of the data processing device based on the device description.

[0129] In the ACPI table, the equipment description of the data processing device can indicate that the data processing device includes one business function or at least two business functions.

[0130] S308A assigns a high-speed serial computer extension bus number to the data processing device when the number of service functions is at least two and the data processing device requests a high-speed serial computer extension bus number.

[0131] Specifically, if the hardware configuration information table identifies that the currently connected data processing device includes at least two service functions, then a PCIe bus number request from the data processing device is received. If the data processing device requests a PCIe bus number, it indicates that the data processing device includes a virtual switch and an aggregation controller, and only one PCIe bus number is needed to call multiple service modules through the virtual switch and aggregation controller. In this case, assigning only one PCIe bus number to the data processing device is sufficient, thus reducing the consumption of PCIe bus numbers.

[0132] S308B, when the number of service functions is at least two and the data processing device requests at least two high-speed serial computer extension bus numbers, assigns at least one high-speed serial computer extension bus number to each of the at least two service functions of the data processing device.

[0133] If the hardware configuration information table identifies that the currently connected data processing device includes at least two service functions and the data processing device requests at least two PCIe bus numbers, it indicates that the data processing device is a general one and does not have a pseudo-switch or aggregation controller. In this case, the corresponding PCIe bus number is allocated to the data processing device according to the number of PCIe bus numbers requested by the data processing device, thereby ensuring support for general data processing devices.

[0134] This application embodiment identifies the number of service functions of a PCIe device based on its device identifier during initialization. When the number of service functions is not unique, a corresponding PCIe bus number is assigned to the device based on the number of PCIe bus numbers requested. Therefore, for the data processing device with virtual switches and aggregation controllers in this application, only one PCIe bus number needs to be assigned to it to normally request multiple service functions within the data processing device, achieving a "one-to-many" relationship between PCIe bus numbers and service functions. This allows the computer device to connect to more expansion devices simultaneously.

[0135] In some embodiments of this application, after identifying the service functions of the data processing device based on the device identifier and hardware configuration information table, the method further includes:

[0136] When the number of business functions is at least two and the data processing device requests a high-speed serial computer extended bus number, allocate a first memory-mapped input / output space resource to the data processing device;

[0137] When the number of business functions is at least two and the data processing device requests at least two high-speed serial computer extended bus numbers, allocate a second memory-mapped input / output space resource to the data processing device.

[0138] The first memory-mapped input / output space resource is smaller than the second memory-mapped input / output space resource.

[0139] In the embodiments of this application, for a data processing device, the more PCIe bus numbers it requests, the more memory-mapped input / output (MMIO) space resources need to be allocated to it.

[0140] Computer equipment uses BIOS / UEFI firmware to enumerate the high-speed serial computer expansion bus interface to determine the number of service functions of the connected data processing device. If the hardware configuration information table identifies that the currently connected data processing device includes at least two service functions, and the data processing device requests a PCIe bus number, then a PCIe bus number can be allocated to the data processing device, along with standard MMIO space resources.

[0141] If a data processing device requests at least two PCIe bus numbers, it indicates that the data processing device is a general-purpose device without a pseudo-switch or aggregation controller. In this case, the corresponding PCIe bus numbers are allocated to the data processing device according to the number of PCIe bus numbers requested by the data processing device, and more MMIO space resources are allocated to the data processing device at the same time to ensure the operational stability of the general-purpose data processing device.

[0142] The embodiments of this application can allocate less MMIO space resources to the data processing device when the data processing device includes a virtual switch and an aggregation controller, thereby reducing the MMIO space resource overhead of the computer device and enabling the computer device to support more extended devices at the same time.

[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0144] Embodiments of this application also provide a device initialization apparatus for use in a computer device, the computer device including a high-speed serial computer expansion bus interface.

[0145] Figure 4 A structural block diagram of an initialization device for a device provided in an embodiment of this application is shown below. Figure 4 As shown, the device initialization device 400 includes:

[0146] The module includes an identification module 402, an acquisition module 404, and a resource allocation module 406.

[0147] The identification module 402 is used to identify the device connection status of the high-speed serial computer expansion bus interface;

[0148] The acquisition module 404 is used to obtain the device identifier of the data processing device when it is found that the high-speed serial computer expansion bus interface is connected to the data processing device.

[0149] The identification module 402 is also used to identify the business functions of the data processing device based on the device identifier and hardware configuration information table;

[0150] The resource allocation module 406 is configured to allocate a high-speed serial computer extension bus number to the data processing device when the number of service functions is at least two and the data processing device requests a high-speed serial computer extension bus number; and to allocate at least one high-speed serial computer extension bus number to each of the at least two service functions of the data processing device when the number of service functions is at least two and the data processing device requests at least two high-speed serial computer extension bus numbers.

[0151] This application embodiment identifies the number of service functions of a PCIe device based on its device identifier during initialization. When the number of service functions is not unique, a corresponding PCIe bus number is assigned to the device based on the number of PCIe bus numbers requested. Therefore, for the data processing device with virtual switches and aggregation controllers in this application, only one PCIe bus number needs to be assigned to it to normally request multiple service functions within the data processing device, achieving a "one-to-many" relationship between PCIe bus numbers and service functions. This allows the computer device to connect to more expansion devices simultaneously.

[0152] In some embodiments of this application, the resource allocation module 406 is further configured to:

[0153] When the number of business functions is at least two and the data processing device requests a high-speed serial computer extended bus number, allocate a first memory-mapped input / output space resource to the data processing device;

[0154] When the number of business functions is at least two and the data processing device requests at least two high-speed serial computer extended bus numbers, allocate a second memory-mapped input / output space resource to the data processing device.

[0155] The first memory-mapped input / output space resource is smaller than the second memory-mapped input / output space resource.

[0156] The embodiments of this application can allocate less MMIO space resources to the data processing device when the data processing device includes a virtual switch and an aggregation controller, thereby reducing the MMIO space resource overhead of the computer device and enabling the computer device to support more extended devices at the same time.

[0157] For a description of the features in the embodiment corresponding to the device initialization apparatus, please refer to the relevant description in the embodiment corresponding to the device initialization method; they will not be repeated here.

[0158] Embodiments of this application also provide an electronic device. Figure 5A structural block diagram of an electronic device provided in an embodiment of this application, such as... Figure 5 As shown, the electronic device 500 includes a memory 502 and a processor 504. The memory 502 stores a computer program, and the processor 504 is configured to run the computer program to execute the steps in the control method and / or initialization method embodiments of any of the data processing devices described above.

[0159] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the embodiments of the control method of any of the data processing devices and / or the initialization method of the device described above when running.

[0160] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0161] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the control method of any of the data processing devices and / or the initialization method of the device described above.

[0162] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the control method of any of the data processing devices and / or the initialization method of the device described above.

[0163] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0164] The data processing apparatus and its control method, initialization method, and initialization apparatus provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the methods and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A data processing apparatus, characterized by, The method comprises the following steps: at least two service modules, an interface module, an aggregation controller and a virtual switch; the interface module is connected with a high-speed serial computer expansion bus interface of a computer device; the aggregation controller is in communication connection with the interface module and the virtual switch; the virtual switch is in communication connection with each of the at least two service modules respectively; the aggregation controller is used for determining a target service function corresponding to a service request in the case that the service request is received by the interface module and sent by the computer device, and determining a target service module in the at least two service modules according to the target service function; the virtual switch is used for sending the service request to the target service module through the routing function of the virtual switch, and sending service data sent by the target service module to the computer device through the interface module in the case that the service data is received; a target address of the service request is a memory address of the data processing apparatus; the virtual switch is further used for: reading an address offset table; the address offset table comprises an address offset of each of the at least two service modules; determining a target offset of the target service module according to the address offset table; determining a memory address of the target service module according to the target offset and the memory address of the data processing apparatus; sending the service request to the target service module based on the memory address of the target service module; the aggregation controller is further used for sending a device identifier of the data processing apparatus to the computer device in the case that the interface module is connected with the high-speed serial computer expansion bus interface of the computer device is detected; wherein the computer device identifies at least two service functions of the data processing apparatus according to the device identifier and hardware configuration information table; the aggregation controller is further used for requesting a high-speed serial computer expansion bus number from the computer device in the case that the interface module is connected with the high-speed serial computer expansion bus interface of the computer device is detected; wherein the at least two service modules share the high-speed serial computer expansion bus number.

2. The data processing apparatus according to claim 1, characterized in that, the virtual switch comprises an upstream port and at least two downstream ports; the upstream port is used for being in communication connection with the computer device through the interface module; the at least two downstream ports are in communication connection with the at least two service modules respectively.

3. A control method of a data processing apparatus, applied to the data processing apparatus according to claim 1 or 2, characterized in that, The method comprises the following steps: in the case that a service request sent by the computer device is received by the interface module, a target service function corresponding to the service request is determined, and a target service module in the at least two service modules is determined according to the target service function; the service request is sent to the target service module through the routing function of the virtual switch; in the case that service data sent by the target service module is received, the service data is sent to the computer device through the interface module; a target address of the service request is a memory address of the data processing apparatus; The sending of the service request to the target service module comprises: reading an address offset table, wherein the address offset table comprises an address offset of each of the at least two service modules; determining a target offset of the target service module according to the address offset table; determining a memory address of the target service module according to the target offset and a memory address of the data processing device; sending the service request to the target service module based on the memory address of the target service module.

4. A method of initializing a computer device, the method comprising: The computer device comprises a high-speed serial computer expansion bus interface, and the method comprises: identifying a device connection state of the high-speed serial computer expansion bus interface; in a case where the high-speed serial computer expansion bus interface is found to be connected to the data processing device as claimed in claim 1 or 2, obtaining a device identifier of the data processing device; identifying a service function of the data processing device according to the device identifier and a hardware configuration information table; in a case where the number of service functions is at least two and the data processing device requests one high-speed serial computer expansion bus number, assigning one high-speed serial computer expansion bus number to the data processing device; in a case where the number of service functions is at least two and the data processing device requests at least two high-speed serial computer expansion bus numbers, assigning at least one high-speed serial computer expansion bus number to each of the at least two service functions of the data processing device.

5. The method of claim 4, wherein, After the identifying of the service function of the data processing device according to the device identifier and the hardware configuration information table, the method further comprises: in a case where the number of service functions is at least two and the data processing device requests one high-speed serial computer expansion bus number, assigning a first memory-mapped input / output space resource to the data processing device; in a case where the number of service functions is at least two and the data processing device requests at least two high-speed serial computer expansion bus numbers, assigning a second memory-mapped input / output space resource to the data processing device; wherein the first memory-mapped input / output space resource is smaller than the second memory-mapped input / output space resource.

6. An electronic device, comprising: comprise: a memory for storing a computer program; a processor for implementing the steps of the method as claimed in any one of claims 3 to 5 when executing the computer program.

Citation Information

Patent Citations

  • Method and device for expanding PCIe bus region

    CN104285218A

  • PCIe extension exchange system and method, electronic equipment and storage medium

    CN112527709A