Patent ID: 12242377

DETAILED DESCRIPTION

Specific examples are described below in detail with reference to the accompanying figures. It is understood that these examples are not intended to be limiting, and unless otherwise noted, no feature is required for any particular example. Moreover, the formation of a first feature over or on a second feature in the description that follows may include examples in which the first and second features are formed in direct contact and examples in which additional features are formed between the first and second features, such that the first and second features are not in direct contact.

The processor in a computer may be coupled to one or more peripheral circuits such as network cards, network switches, storage adapters, and memory systems. The processor and each of the peripherals may have a distinct address space used to specify data, memory mapped functions, etc., such that communication between each component involves translating between the address spaces. A system may include multiple peripherals, where one or more of the peripherals includes multiple functions. This disclosure describes techniques for peripherals generating and sending input-output requests through a system including multiple peripherals and/or multiple functions. The input-output requests can be routed through the system using virtual identification values generated by the peripherals. Of course, these advantages are merely examples, and no advantage is required for any particular embodiment.

Examples of input-output requests in a system with multiple endpoints and multiple functions are described with reference to the figures below. In that regard,FIG.1is a conceptual block diagram of Peripheral Component Interconnect Express (PCIe) bus topology according to some aspects of the present disclosure. In the example shown inFIG.1, system100includes host110, PCI root complex112, switch120, and endpoints130and140. Although this disclosure describes systems within PCIe topology, other topologies may implement the techniques of this disclosure, such as ExpressCard, advanced technology attachment (ATA), and Thunderbolt topologies. Another example topology is the HyperLink communication protocol developed by Texas Instruments, Incorporated of Dallas, Texas.

System100may be part of an industrial facility, an automobile or other vehicle (e.g., aircraft or marine vessel), an electronic device, and/or any other system. For example, host110may be a remote processor within an automobile that supports a camera sensor and back-up video functionality of the automobile. Host110may include a radar processor and support radar sensing and ranging functionality of the automobile (e.g., to support proximity warnings and/or self-driving functionality).

Host110may be referred to as a remote system on chip (SOC) or as a remote host. In some examples, host110may be replaced by a processor that is not a system on a chip. Host110is the root of the tree depicted inFIG.1, and root complex112anchors the tree. Host110may be configured to detect and configure the connected devices of system100. Switch120may be configured to implement a PCIe bridge interconnecting the upstream and downstream ports on host110and endpoints130and140. Switch120acts as an intermediate node and provides connectivity between host110and endpoints130and140.

Endpoints130and140are the leaf nodes of the hierarchy shown inFIG.1and implement functionality such as storage, networking, and the like. One or both of endpoints130and140may be implemented as standalone hardware. For example, endpoints130and140may be part of a single SOC, or each of endpoints130and140may be part of separate SOCs. Endpoint140, for example, may include an SOC with multiple peripherals. One or more peripherals in an SOC context can be mapped as a single PCIe function for access from host110. Endpoint130is depicted inFIG.1as a single-function endpoint, and endpoint140is depicted inFIG.1as a multifunction endpoint (e.g., a compound or composite device).FIG.1shows two endpoints, but system100may include any number of endpoints, where each endpoint may support a single function or multiple functions.

In some examples, endpoint130is configured as an ethernet controller, physical function142of endpoint140is configured as a USB controller, and physical function142of endpoint140is configured as a serial ATA (SATA) controller. The functions of endpoints130and140shown inFIG.1are merely examples, and other functions are contemplated by this disclosure, including storage adapters, network cards, digital signal processors, and hardware accelerators. PCIe allows for system100to integrate multiple capabilities by mapping existing functionality over PCIe to host110. Each of endpoints130and140may have one or more fixed functions (e.g., ethernet, USB, SATA, etc.). Additionally or alternatively, endpoints130and/or140may be integrated in an SOC and configured to perform a desired function.

The connection between host110and endpoints130and140may include switch120, one or more input lines, and one or more output lines. These lines may include serial communication lines and/or parallel conductors. In the example shown inFIG.1, physical functions142and144share the same physical link with switch120.

Each of the functions in endpoints130and140is identified by a bus-device-function (BDF) value or tuple. Each BDF value indicates the source of an input-output request using three fields: a first field represents the bus, a second field represents the device, and a third field represents the respective function. The BDF value can be part of or appended to an input-output request. Each level within the tree has a unique bus number assignment, and each device has a unique device number assignment. A single device such as endpoint140having multiple functions142and144may have multiple assigned function numbers. The function number in a BDF value designates which of functions142and144originated the input-output request.

FIG.1shows two endpoints130and140, but more endpoints may be coupled to system100. PCIe allows for the attachment of multiple devices on the fly, with the potential for extending the capability with an external bus interconnect. Each endpoint may have a unique address space, such that communication between the components of system100may involve one or more translation steps for the address(es) in an input-output request.

FIG.2is a conceptual block diagram of multiple peripherals270and272mapped for access from a remote host210according to some aspects of the present disclosure. System200includes host210and subsystem240. Subsystem240includes endpoint250, memory252, interconnect254, and peripherals270and272. Subsystem240may be implemented as a dedicated PCIe function or realized as part of a larger SOC with other functionality. On an SOC, processors, memory, and peripherals can be connected through a local interconnect and share the same local internal address space of the SOC. A SOC can implement multiple peripherals270and272and the integrated PCIe endpoint functionality of subsystem240. Any of the available peripherals can be flexibly mapped in the SOC for access from remote host210.

In order for peripheral272to interact with remote host210via root complex212, peripheral272or an intermediary converts addresses in the remote host address space into the local address space of the subsystem240and vice-versa. Peripheral272can be enabled to work directly with the remote host address space using an address space value, which can allow peripheral272to generate input-output requests to host210using the address space of host210. Interconnect254may be configured to forward transactions within subsystem240based on the address select value in each request. Based on the address select value in a request, interconnect254may be configured to forward the request to endpoint250without decoding or translating the address in the request. Interconnect254uses the address select value to determine which endpoint instance should receive the request. Thus, peripheral270or272can issue input-output requests using the address space of the remote host, and the address can pass through subsystem240without being decoded or translated. Interconnect254may directly forward the request to endpoint250, which may forward the request to host210without translating the address in the request. Additional details on address space translation can be found in commonly assigned U.S. Pat. No. 10,402,355, entitled “Apparatus and Mechanism to Bypass Address Translation by Using Alternative Routing,” issued on Sep. 3, 2019, which is incorporated herein by reference.

For many use-cases, such as input-output companions, gateway devices, or multi-chip systems, system200may support multiple peripherals270and272mapped over PCIe in a multi-function endpoint configuration. In some examples, a single peripheral will have multiple logical channels that system200can map as independent virtual functions. For example, peripheral272may have a single physical function and multiple virtual functions supported underneath that physical function. In the case of virtualization, the same peripheral can present as an interface for multiple virtual functions, allowing concurrent usage from multiple virtual machines running on host210.

Additionally or alternatively, peripheral270may support a function that is independent from the function supported by peripheral272. Thus, it may be desirable to map multiple peripherals270and272to work with the address space of host210, especially without having to translate the address in a request. Peripherals270and272may be independent PCIe functions mapped over PCIe to host210(e.g., in multi-function endpoint mode) and the mapping of multiple virtual functions (e.g., single root input-output virtualization functionality) for peripheral270or272.

In addition, it may be desirable to have backwards compatibility with existing peripherals with no or minimal changes. There may be endpoints and/or peripherals that have been used throughout multiple generations of system200. Other endpoints and peripherals are made by third parties that may continue to produce hardware without new functionality. For example, peripheral270or272may not be capable of generating an address space select value for an input-output request. The processing sub-system controller for each peripheral may have been developed by a third party or be mandated by a standard, such as the extensible host controller interface standard. Thus, it may be difficult to configure peripheral270and272to generate address space select values for input-output requests.

Moreover, when multiple functions are supported by a single endpoint, it may be important to ensure that a peripheral is uniquely bound to each particular function instance. Also, from the standpoint of safety and security, endpoint250may be configured to isolate between functions and the associated mappings of peripherals. Isolation between functions in system200promotes separation and freedom from interference. Thus, traffic that comes from peripheral270should be disjoined from the traffic that is mapped and allowed for peripheral272.

In accordance with the techniques of this disclosure, each of peripherals270and272includes a credential generator configured to include a virtual identification value in input-output requests outputted by the peripheral. Each credential generator may be configured to generate a unique virtual identification value, and multi-function peripherals may include two or more credential generators so that each function is associated with a unique virtual identification value. Thus, a system of this disclosure may have per-peripheral credential generation, per-function credential generation, and/or per-channel credential generation to promote separation between the traffic generated by each peripheral, function, and/or channel.

FIG.3is a conceptual block diagram of a system300configured for multi-peripheral export to a remote host according to some aspects of the present disclosure. System300includes endpoint340, system memory352, interconnect354, input-output memory management unit (IOMMU)360, and peripherals370and372. In the example shown inFIG.3, endpoint340includes transaction mapper342, firewall344, bypass path346, and outbound translation circuit348, and IOMMU360includes address space select table362. Peripheral370includes credential generators380and381and direct memory access (DMA) channels390and391, and peripheral372includes credential generator382. Additionally or alternatively, one or more of credential generators380-382and one or more of DMA channels390and391may be separate from and coupled to peripheral370and/or372.

In some examples, system300is part of an SOC that includes endpoint340, system memory352, interconnect354, IOMMU360, and peripherals370and372. Peripherals370and372may be instantiated within the SOC. Endpoint340may also be considered as a peripheral within the SOC. System300supports multi-peripheral export with address space select tunneling by assigning an address space select value to an input-output request and then routing the input-output request through bypass path346to bypass outbound translation circuit348. The address space select value is labeled inFIG.3as “asel”. Using transaction mapper342, address space select table362, and credential generators380-382, system300can authenticate an input-output request and generate transaction attributes for access from peripherals370and372to a remote host buffer.FIG.3shows input-output requests flowing in one direction (e.g., from peripherals370and372through endpoint340to a host), but signals may also travel in the opposite direction. For example, the host may be configured to initialize or configure one or both of peripherals370and372by sending control configuration messages through endpoint340.

An input-output request generated by peripheral370or372may include a read request, write request, and/or some other type of communication. As generated by peripheral370or372, the input-output request may include a virtual identification value and an address that specifies where to write data or from where to read data. The address is labeled inFIG.3as “addr” and stays with the input-output request through IOMMU360, interconnect354, and endpoint340. The address may refer to the address space of the remote host, so that the address is not translated as the request passes through IOMMU360and interconnect354. Peripherals370and372may send input-output requests through system300to destinations such as a remote host device over PCIe or other local destinations like system memory352. For example, interconnect354may treat a particular address select value (e.g., zero) as local transactions. In response to determining that the address select value in a request has the particular value, interconnect354may be configured to forward the request to system memory352.

Each of peripherals370and372includes or is coupled to at least one credential generator380-382. Each of credential generators380-382resides on the boundary of the respective peripheral370or372. Older peripherals lacking the ability to generate an address space select value may still be compatible with system300because these older peripherals have the hardware necessary to implement credential generators380-382. This hardware may have been originally added so that peripherals370and372support virtualization in system300.

Thus, the hardware within peripherals370and372can be reused or repurposed to generate virtual identification values for input-output requests. This repurposing may include updating the software for credential generators380-382to generate the virtual identification values. In the example of peripheral370, credential generators380and381may be configured to generate unique credentials for each of logical channels390and391, creating a granular mapping for peripheral370. Credential generators380and381can generate virtual identification values that indicate or identify a specific endpoint instance to which IOMMU360should send the input-output request. For example, each of credential generators380and381may be configured to generate a virtual identification value for each input-output request that peripheral370sends to the remote host. The virtual identification value may allow for IOMMU360to assign an address space select value to each input-output request, where the address space select value is associated with the specific endpoint instance to which the input-output request is directed.

IOMMU360can perform address translation and input/output access policing on input-output requests generated by peripherals370and372. IOMMU360may be part of, or referred to as, a system MMU, a memory management circuit, or a peripheral virtual unit. In addition, IOMMU360may be configured to generate an address space select attribute based on the credentials associated with each transaction (e.g., each input-output request). In the example shown inFIG.3, IOMMU360includes address space select table362that associates virtual identification values with address space select values. Table362may be implemented as a look-up table that receives a virtual identification value as an input and outputs an address space select value. Table362may be software-programmable, such that the associations between virtual identification values and address space select values can be modified by an endpoint manager, by a user, or by a software update.

In response to receiving an input-output request from channel390of peripheral370, for example, IOMMU360may be configured to match the virtual identification value in the input-output request to an address space select value in table362. IOMMU360can add the address space select value to the input-output request and forward the modified input-output request to endpoint340or system memory352via interconnect354. In some examples, the address space select value may allow for an input-output request to bypass outbound translation circuit348in route to the remote host.

Endpoint340receives the input-output request from IOMMU360, via interconnect354, and can forward the input-output request to a remote host. Transaction mapper342may be configured to generate a BDF value based on the virtual identification value in the input-output request. Firewall344may be configured to block an input-output request from bypass path346in response to determining that the input-output request does not have the appropriate credentials. Transaction mapper342may drop the virtual identification value from the request before sending the request to bypass path346, such that the input-output request forwarded by transaction mapper342through bypass path346may not include the virtual identification value.

System300may be capable of supporting the mapping of multiple peripherals370and372and multiple channels390and391within a single peripheral370to a remote host. In particular, system300may be able to support multiple physical functions and/or a peripheral having multiple virtual functions. The centralized scheme for generating address space select values in IOMMU360and the repurposed usage of credential generators380-382reduces or eliminates the amount of hardware modifications for system300. For example, older peripherals that lack the ability to generate an address space select value can still operate within system300because IOMMU360has the ability to generate address space select values. In addition, system300may be configured to ensure isolation and separation between traffic from peripherals370and372and between traffic from channels390and391.

FIG.4is a conceptual block diagram of credential mapping according to some aspects of the present disclosure.FIG.4shows two channels for generating virtual identification values and address type values, where each channel is programmable to generate attributes or credentials that are unique to that channel. The arrangement shown inFIG.4is just one example of how to generate a virtual identification value; alternatively, an initiator-side security control (ISC) register can be used without a ring to generate a virtual identification value. Each channel within a peripheral may have a separate ring, ISC, and DMA channel, as shown inFIG.4. Rings420and422, ISCs430and432, descriptors450and452, and DMA channels490and492may be part of a single peripheral, in some examples. In the example shown inFIG.4, credential configuration includes two steps: configuration of a virtual identification value and configuration of an address type value. The address type value may be used to steer traffic to an IOMMU for generation of an address space select value.

Rings420and422may include a hardware queue manager for input-output requests. Each of rings420and422are configured to receive a respective one of input-output requests410and412. Ring420and ISC430can generate and append virtual identification value440to input-output request410before the peripheral sends input-output request410to a remote host. Similarly, ring422and ISC432can generate and append virtual identification value442to input-output request412before the peripheral sends input-output request412to a remote host. The virtual identification value may be based on the component that originated the input-output request, as well as based on the destination indicated in the request. In addition, the virtual identification value may indicate or identify a specific endpoint instance to which IOMMU360should send the input-output request.

Each of DMA channels490and492includes an ISC. ISCs430and432provide security control and allow for credential configuration. ISCs430and432may include programmable memory mapped registers for associating a virtual identification value with one or more input variables. Each of ISCs430and432may be software-programmable, such that the association between a virtual identification value and the one or more input variables can be modified by a user or by a software update. Each of virtual identification values440and442may be unique to a respective function within the peripheral. Each of ISCs430and432may be implemented as a central DMA resource inherited from rings420and422, as an independent circuit added as a wrapper to DMA channel490or492, and/or as a channelized circuit. ISCs430and432can append virtual identification values440and442to input-output requests410and412such that virtual identification values440and442are carried by input-output requests410and412. Thus, an input-output request that is submitted to ring420will inherit the credentials that have been programmed to a register in ISC430.

DMA channels490and492and descriptors450and452may be configured to generate address type values, also known as “A type” values460and462. Each of descriptors450and452may include a register that stores an address type value. The address type value may steer an input-output request to the IOMMU, where an address space select value is generated. For example, an address type value of zero may be used to bypass the IOMMU so that the input-output request can be decoded directly by the interconnect. When more than one IOMMU is present in the system, DMA channel490can set address type value460to steer the input-output request410to a specific IOMMU. If only one IOMMU is capable of generating address select values, DMA channel490may be configured to set address type value460to steer input-output request410to that IOMMU.

FIG.5is a conceptual block and circuit diagram of a transaction mapper542according to some aspects of the present disclosure. Transaction mapper542includes memory mapped registers510, multiplexers520and522, and controller530. Transaction mapper542may be implemented as circuitry inside of a PCIe endpoint. In the example shown inFIG.5, transaction mapper542is configured to receive a virtual identification value and an address space select value, and transaction mapper542is configured to output a BDF value, a traffic class value, and a bypass signal.

Transaction mapper542may be configured to bind a peripheral to a specific function, thereby ensuring isolation. For example, each of memory mapped registers510can store a BDF value and a traffic class value.FIG.5shows thirty-two registers for each type of operation (e.g., read or write), but any other number of registers may be used. Read multiplexer520receives the values stored in each of the read registers, and write multiplexer522receives the values stored in each of the read registers. Each of multiplexers520and522also receives at least a portion of the virtual identification value as a control input such that values stored in one of the registers is associated with each unique virtual identification value. Registers510and multiplexers520and522may together implement a table (e.g., a look-up table) that associates BDF values with virtual identification values. Registers510may be software-programmable, such that the associations between virtual identification values and BDF values can be modified by an endpoint manager, by a user, or by a software update.

In the example shown inFIG.5, the table also associates traffic class values with virtual identification values. Traffic class values may indicate a priority level of an input-output request. In examples in which multiple peripherals are sending input-output requests over the same PCIe link, the interconnect or the endpoint may prioritize one type of input-output request over another type of input-output request, for example, based on traffic class values.

For a valid virtual identification value and a nonzero address space select value, controller530may be configured to bypass the address translation unit, which includes address code logic. The bypass path may be a faster path than the path through the translation unit, thereby allowing the use of an untranslated remote host address along the entire transaction handling path. For an invalid virtual identification value, controller530may be configured to flush the input-output request to avoid any interference between the traffic generated neighboring peripherals.

Pseudocode550shows an example implementation of a firewall to prevent illegitimate access to a bypass path. For example, controller530may be configured to execute pseudocode550to set the bypass signal (e.g., rd_aut_bypass or wr_aut_bypass) to one when the address space select value is nonzero and when the virtual identification value satisfies an acceptable range. Controller530can use a mask variable to define the acceptable range for virtual identification values. Controller530may be configured to control the acceptable range of virtual identification values to allow or deny each peripheral access over the PCIe link.

To initialize or configure a system that includes transaction mapper542, an endpoint manager may be configured to first configure a credential generator with a unique value. The endpoint manager can configure the credential generator to assign the same credentials to all channels belonging to the same endpoint function, whether physical or virtual. The endpoint manager can also program registers510and controller530to associate a BDF value and a traffic class value with each virtual identification value. The endpoint manager can program the acceptable range of virtual identification values and the acceptable address space select values for bypassing translation.

Transaction mapper542may be configured to validate the credentials in the input-output request for freedom from interference by checking the address space select value and the incoming virtual identification value satisfies a threshold (e.g., falls within an acceptable range). Then transaction mapper542assigns a BDF value and a traffic class value to the input-output request based on the virtual identification value in the input-output request. Controller530may be configured to append the BDF value and the traffic class value as advanced extensible interface sideband signals. Transaction mapper542can also output a bypass signal causing the input-output request to bypass the address translation unit.

In response to determining that the credentials are invalid, transaction mapper542may be configured to not forward the input-output request to controller530. For an invalid write command, the data is discarded and transaction mapper542returns a write status of “protection error.” For an invalid read command, transaction mapper542returns the correct number of data phases with read data of zero and a read status of “protection error.” Transaction mapper542may be configured to output the error to the initiator of the input-output request (e.g., the peripheral that generated the request).

FIG.6is a conceptual block diagram of a system600configured for multi-peripheral export to a remote host according to some aspects of the present disclosure. System600includes an SOC with an integrated PCIe endpoint instance (e.g., endpoint640), but topologies other than PCIe may also implement system600. System600includes endpoint manager610, credential allocator612, address space select configurator614, endpoint640, IOMMU660, and peripherals670and672. In the example shown inFIG.6, endpoint640includes functions620-623, transaction mapper642, and firewall644, and IOMMU660includes address space select table662. Peripheral670includes credential generators680and681and DMA channels690and691, and peripheral672includes credential generator682.

Endpoint manager610, credential allocator612, and/or address space select configurator614may be implemented as hardware separate from any of the components shown inFIG.6. Additionally or alternatively, endpoint manager610, credential allocator612, and/or address space select configurator614may be embodied in instructions executed by endpoint640, by IOMMU660, or by separate hardware. For example, system600may include a computational core (not shown inFIG.6) configured to execute software instructions that implement endpoint manager610, credential allocator612, and/or address space select configurator614.

In some examples, endpoint manager610is responsible for initializing transaction mapper642, firewall644, IOMMU660, and peripherals670and672. Endpoint manager610may be configured to map each of peripherals670and672and channels690-692to functions620-623. In the example shown inFIG.6, physical functions620and623and virtual functions621and622reside in endpoint640. Functions620-623correspond to the physical and virtual functions seen by the remote host. Endpoint manager610can map peripheral670to physical function620and map peripheral672to physical function623. In addition, endpoint manager610can map channel690to virtual function621and map channel691to virtual function622.

Endpoint manager610can also configure a table in transaction mapper642to map from virtual identification values to BDF values. In the example shown inFIG.6, endpoint manager610uses the bus number captured by the hardware for the first field in each of the BDF values in the table. As just one example, the device number for each of the BDF values shown inFIG.6is equal to zero. In the example shown inFIG.6, the table in transaction mapper642may associate the virtual identification value generated by credential generator680with a BDF value of B:0:0, associate the virtual identification value generated by credential generator681to a BDF value of B:0:1, and associate the virtual identification value generated by credential generator682to a BDF value of B:0:2. Alternatively, endpoint manager610can configure the lookup entries in transaction mapper642to have BDF values different from those shown inFIG.6(e.g., nonzero base values for the device).

Credential allocator612can generate virtual identification values for each of peripherals670and672and each of channels690-692. Credential allocator612can provide the virtual identification values to endpoint manager610to be programmed to credential generators680-682by endpoint manager610. Address space select configurator614may be configured to initialize table662in IOMMU660to associate address space select values with virtual identification values. In the example shown inFIG.6, the virtual identification values generated by credential generators680-682are associated with an address space select value of one.

After transaction mapper642, firewall644, IOMMU660, and peripherals670and672have been initialized, endpoint manager610can start operation of system600by causing system600to establish a link with a host device. For example, endpoint manager610may be configured to start a link training and status state machine to cause system600to establish a link with the host device. Once the link is established, the host device may start an enumeration sequence.

FIG.7is a flow diagram of a method for routing an input-output request from a peripheral to a host according to some aspects of the present disclosure. Some processes of the method700may be performed in orders other than described, and many processes may be performed concurrently in parallel. Furthermore, processes of the method700may be omitted or substituted in some examples of the present disclosure. The method700is described with reference to system300shown inFIG.3, although other entities or components may exemplify similar techniques.

Referring to block710, peripheral370generates an input-output request. The input-output request may include a read request or a write request with an address for the read or write operation. Referring to block720, credential generator380generates a virtual identification value for the input-output request. Credential generator380may include an ISC register that stores the virtual identification value. Credential generator380can add or append the virtual identification value to the input-output request before sending the input-output request to IOMMU360.

Referring to block730, peripheral370send the input-output request including the virtual identification value to IOMMU360. Channel390can initiate an outbound input-output request with the appropriate virtual identification value and a destination address for the PCIe host buffer. Referring to block740, IOMMU360generates an address space select value based on the virtual identification value in the input-output request. IOMMU360can apply the virtual identification value to a look-up table that associates virtual identification values with address space select values. IOMMU360can add or append the address space select value to the input-output request before sending the input-output request to transaction mapper342. Referring to block750, IOMMU360sends the input-output request to interconnect354, where the input-output request, as sent by the IOMMU360, includes the address space select value and the virtual identification value.

Referring to block760, interconnect354forwards the input-output request to a specific endpoint instance (e.g., endpoint340) based on the address select value. Interconnect354can steer transactions to specific endpoint instances based on the address select value in each request. Interconnect354may be configured to forward a first request having a first address select value to endpoint340, forward a second request having a second address select value to an endpoint instance other than endpoint340, and forward a third request having a third address select value to system memory352.

Referring to block770, transaction mapper342generates a BDF value based on the virtual identification value in the input-output request. Transaction mapper342may be configured to generate the BDF value by applying the virtual identification value to a look-up table that associates BDF values with virtual identification values. Firewall344may be configured to verify that the virtual identification value satisfies a threshold range of values before transaction mapper342passes the input-output request to bypass path346. In response to determining that the virtual identification value does not satisfy the threshold range, firewall344can cause transaction mapper342to discard the input-output request, refrain from sending the input-output request to its destination, and/or output an error signal (e.g., to peripheral370).

Referring to block780, transaction mapper342sends the input-output request to a host, where the input-output request, as sent by transaction mapper342, includes the BDF value. The input-output request sent by transaction mapper342may not include the address space select value or the virtual identification value. In response to determining that the address space select value in the input-output request satisfies a threshold, transaction mapper342can send the input-output request to the host via bypass path346. In response to determining that the address space select value in the input-output request does not satisfy the threshold, transaction mapper342can send the input-output request to the host via outbound translation circuit348.

FIG.8is a flow diagram of a method for mapping a transaction to a destination according to some aspects of the present disclosure. Some processes of the method800may be performed in orders other than described, and many processes may be performed concurrently in parallel. Furthermore, processes of the method800may be omitted or substituted in some examples of the present disclosure. The method800is described with reference to transaction mapper542shown inFIG.5, although other entities or components may exemplify similar techniques.

Referring to block810, transaction mapper542determines whether a virtual identification value satisfies a threshold range. Pseudocode550includes an operation that can be executed by controller530to mask a portion of the virtual identification value and compare the masked portion to another variable. Referring to block820, responsive to determining that the virtual identification value does not satisfy a threshold range, transaction mapper542refrains from sending the input-output request to the destination indicated in the input-output request and/or outputs an error to the circuit that generated the input-output request. If the virtual identification value does not satisfy the threshold range, transaction mapper542can discard the input-output request as invalid.

Referring to block830, responsive to determining that the virtual identification value satisfies a threshold range, transaction mapper542generates a BDF value and a traffic class value based on the virtual identification value. Transaction mapper542can apply the virtual identification value to the control input of multiplexer520and/or522to cause multiplexer520and/or522to output a BDF value and a traffic class value.

Referring to block840, transaction mapper542determines whether the address space select value in the input-output request satisfies a threshold. In some examples, the threshold range includes all nonzero values. Referring to block850, responsive to determining that the address space select value in the input-output request does not satisfy the threshold, transaction mapper542sends the input-output request to an outbound translation circuit on the way to a destination. Referring to block860, responsive to determining that the address space select value in the input-output request satisfies the threshold, transaction mapper542sends the input-output request to the destination via a bypass path. As sent by transaction mapper542, the input-output request may include the BDF value and the traffic class value but not the virtual identification value or the address space select value. Methods700and800can be repeated for each input-output request that is generated by a peripheral within a system of this disclosure.

FIG.9is a flow diagram of a method for initializing a system for input-output requests according to some aspects of the present disclosure. Some processes of the method900may be performed in orders other than described, and many processes may be performed concurrently in parallel. Furthermore, processes of the method900may be omitted or substituted in some examples of the present disclosure. The method900is described with reference to system600shown inFIG.6, although other entities or components may exemplify similar techniques.

Referring to block910, endpoint manager610maps peripherals670and672to physical functions620and623. Endpoint manager610may also map one or more of channels690-692to functions621and622. The mapping between peripherals670and672, channels680-682, and functions620-623may be flexible in that endpoint manager610can change the mapping during operation of system600or during the next initialization sequence.

Referring to block920, credential allocator612generates a unique virtual identification value for each of peripherals670and672and each of channels690-692. Referring to block930, endpoint manager610programs each of credential generators680-682with the unique virtual identification value generated by credential allocator612. Endpoint manager610can store the virtual identification values to registers within credential generators680-682.

Referring to block940, endpoint manager610configures transaction mapper642to map each virtual identification value to a BDF value and to a traffic class value. Endpoint manager610can store the BDF values and the traffic class values to registers within transaction mapper642. Referring to block950, endpoint manager610programs firewall644with acceptable virtual identification values. Endpoint manager610may be configured to create a mask variable that aligns with bits in the virtual identification values to define a threshold range.

Referring to block960, address space select configurator614maps each virtual identification value to an address space select value. Endpoint manager610may be configured to program the associations between virtual identification values and address space select values to table662in IOMMU660. The address space select values may be used by transaction mapper642to route each input-output request to a respective PCIe instance, in some examples. Referring to block970, endpoint manager610establishes a link with a host device. The host device may initiate a standard enumeration sequence after the link is established.

By initializing the components in system600, endpoint manager610may allow for new peripherals to be added to system600on the fly. When a new peripheral is connected to system600, endpoint manager610may perform some or all of the steps of method900to initialize the new peripheral. For example, endpoint manager610may be configured to create a unique virtual identification value for the credential generator in the new peripheral, associate the virtual identification value with a BDF value and a traffic class value in transaction mapper642, and associate the virtual identification value with an address space select value in table662.

The techniques of this disclosure may be used with little or no hardware modifications for the peripherals in a PCIe system. Instead, the credential generators in legacy peripherals can be repurposed to generate virtual identification values without any hardware modifications, in some examples. The generation of address space select values can be centralized within a memory management circuit. Consequently, the peripherals are not responsible for generating address space select values, and the system may support all peripherals, including legacy peripherals that lack the capabilities of newer peripherals.

The systems described in this disclosure can support multiple peripherals and multiple functions within a single peripheral. The systems can also support multiple virtual functions within a single peripheral because each channel within the peripheral can generate a unique virtual identification value. The virtual identification value in an input-output request can be used by the memory management circuit and the transaction mapper to assign additional values to the input-output request.

The generation of address space select values, BDF values, and traffic class values within the system may be software configurable. Thus, a control circuit can create the associations between the virtual identification values and the address space select values, BDF values, and traffic class values. The control circuit may be configured to initialize tables inside of the memory management circuit and the transaction mapper circuit at startup. In addition, the control circuit may be configured to update or reprogram the table(s) when a peripheral is added to or removed from the system.

The following numbered aspects demonstrate one or more aspects of the disclosure.

Aspect 1. A system includes a first peripheral circuit and a memory management circuit coupled to the first peripheral circuit. The memory management circuit comprises a first table that associates virtual identification values with address space select values. The system also includes a transaction mapper circuit coupled to the memory management circuit. The transaction mapper circuit comprises a second table that associates virtual identification values with bus-device-function (BDF) values.

Aspect 2. The system of the preceding aspect, further including a second peripheral circuit coupled to the memory management circuit.

Aspect 3. The system of the preceding aspect, wherein the second peripheral circuit comprises a second credential generator.

Aspect 4. The system of the preceding aspect, wherein the second credential generator is configured to generate a second virtual identification value different from a first virtual identification value generated by a first credential generator of the first peripheral circuit.

Aspect 5. The system of the preceding aspect, wherein the first table associates the second virtual identification value with a first address space select value.

Aspect 6. The system of the preceding aspects or any combination thereof, wherein the first peripheral circuit comprises a first credential generator.

Aspect 7. The system of the preceding aspect, wherein the first credential generator is configured to generate a first virtual identification value.

Aspect 8. The system of the preceding aspect, wherein the first table associates the first virtual identification value with a first address space select value.

Aspect 9. The system of the preceding aspect, wherein the first table associates the first and second virtual identification values with the same address space select value.

Aspect 10. The system of the preceding aspects or any combination thereof, wherein the transaction mapper is configured to receive, from the memory management circuit, an input-output request comprising a first virtual identification value.

Aspect 11. The system of aspects 4 and 7-10 or any combination thereof, wherein the transaction mapper is configured to generate a first BDF value and a traffic class value based on the second table and the first virtual identification value.

Aspect 12. The system of the preceding aspect, wherein the transaction mapper is configured to send, to a host, the input-output request including the first BDF value and the traffic class value.

Aspect 13. The system of the preceding aspects or any combination thereof, wherein the transaction mapper includes a firewall.

Aspect 14. The system of the preceding aspect, wherein the firewall is configured to receive an input-output request from the memory management circuit.

Aspect 15. The system of the two preceding aspects or any combination thereof, wherein the firewall is configured to determine that a first virtual identification value in the input-output request does not satisfy a threshold range.

Aspect 16. The system of the preceding aspect, wherein the firewall is configured to refrain from forwarding the input-output request to a host device in response to determining that the first virtual identification value does not satisfy the threshold range.

Aspect 17. The system of the preceding aspects or any combination thereof, wherein the second table includes an array of programmable registers.

Aspect 18. The system of the preceding aspect, wherein each programmable register of the second table is configured to store a respective BDF value and with a respective traffic class value.

Aspect 19. The system of the two preceding aspects or any combination thereof, wherein the second table includes a multiplexer coupled to the array of programmable registers.

Aspect 20. The system of the preceding aspect, wherein the multiplexer is configured to output one of the BDF values and a traffic class based on a virtual identification value received by the transaction mapper as part of an input-output request from the memory management circuit.

Aspect 21. The system of aspects 1 and 6-20 or any combination thereof, wherein the first peripheral circuit comprises a first credential generator and a second credential generator.

Aspect 22. The system of the preceding aspect, wherein the first credential generator is configured to generate a first virtual identification value.

Aspect 23. The system of the preceding aspect, wherein the first table associates the first virtual identification value with a first address space select value.

Aspect 24. The system of the three preceding aspects or any combination thereof, wherein the second peripheral circuit comprises a second credential generator.

Aspect 25. The system of the preceding aspect, wherein the second credential generator is configured to generate a second virtual identification value different from a first virtual identification value generated by a first credential generator of the first peripheral circuit.

Aspect 26. The system of the preceding aspect, wherein the first table associates the second virtual identification value with a first address space select value.

Aspect 27. The system of the preceding aspects or any combination thereof, wherein the first peripheral circuit comprises a first credential generator configured to generate a first virtual identification value, and wherein the first peripheral circuit configured to generate an input-output request including the first virtual identification value.

Aspect 28. The system of the preceding aspects or any combination thereof, wherein the memory management circuit is configured to receive, from the first peripheral circuit, an input-output request comprising a first virtual identification value.

Aspect 29. The system of the preceding aspects or any combination thereof, wherein the memory management circuit is configured to generate a first address space select value based on the first table and a first virtual identification value in an input-output request received from the first peripheral circuit.

Aspect 30. The system of the preceding aspect, send, to the memory management circuit, the input-output request including the first address space select value.

Aspect 31. The system of the preceding aspects or any combination thereof, further including a system on chip, wherein the first peripheral circuit, the memory management circuit, and the transaction mapper circuit are part of the system on chip.

Aspect 32. A method includes generating, by a peripheral, a first input-output request and generating, by the peripheral, a first virtual identification value for the first input-output request. In addition, the method includes sending the first input-output request including the first virtual identification value from the peripheral to a memory management circuit. The method also includes generating, by the memory management circuit, a first address space select value based on the first virtual identification value. The method further includes sending the first input-output request including the first virtual identification value and the first address space select value from the memory management circuit to a transaction mapper circuit. The method includes generating, by the transaction mapper circuit, a first BDF value based on the first virtual identification value. The method also includes sending the first input-output request including the first BDF value from the transaction mapper circuit to a host.

Aspect 33. The method of the preceding aspect, wherein sending the first input-output request from the memory management circuit to the transaction mapper circuit includes sending the first input-output request from the memory management circuit to an interconnect circuit.

Aspect 34. The method of the two preceding aspects or any combination thereof, wherein sending the first input-output request from the memory management circuit to the transaction mapper circuit includes determining, by an interconnect circuit, that the first address select value is associated with an endpoint, wherein the endpoint comprises the transaction mapper circuit.

Aspect 35. The method of the preceding aspect, wherein sending the first input-output request from the memory management circuit to the transaction mapper circuit includes sending the first input-output request from an interconnect circuit to the transaction mapper circuit in response to determining that the first address select value is associated with the endpoint.

Aspect 36. The method of aspects 32-35 or any combination thereof, further including determining that the first address space select value satisfies a threshold.

Aspect 37. The method of the preceding aspect, further including sending the first input-output request to the host through a bypass path in response to determining that the first address space select value satisfies the threshold.

Aspect 38. The method of aspects 32-37 or any combination thereof, wherein the first input-output request is generated by a first peripheral.

Aspect 39. The method of aspects 32-38 or any combination thereof, further including receiving, by the transaction mapper circuit from a second peripheral, a second input-output request including a second virtual identification value, wherein the second virtual identification value is different from the virtual identification value generated for the first input-output request.

Aspect 40. The method of aspects 32-39 or any combination thereof, further including determining, by the transaction mapper circuit, that a second virtual identification value does not satisfy a threshold range.

Aspect 41. The method of the preceding aspect, further including outputting, by the transaction mapper circuit, an error to the second peripheral in response to determining that the second virtual identification value does not satisfy the threshold range.

Aspect 42. The method of aspects 32-38 or any combination thereof, wherein the first input-output request is generated by a first channel in the peripheral, and wherein the first virtual identification value is generated by a first credential generator in the first channel.

Aspect 43. The method of the preceding aspect, further including generating, by a second channel in the peripheral, a second input-output request.

Aspect 44. The method of the preceding aspect, further including generating, by a second credential generator in the second channel, a second virtual identification value for the second input-output request, wherein the second virtual identification value is different from the first virtual identification value.

Aspect 45. The method of the preceding aspect, further including sending the second input-output request including the second virtual identification value from the peripheral to the memory management circuit.

Aspect 46. The method of the preceding aspect, further including generating, by the memory management circuit, a second address space select value based on the second virtual identification value, wherein the second address space select value is identical to the first address space select value.

Aspect 47. The method of the preceding aspect, further including sending the second input-output request including the second virtual identification value and the second address space select value from the memory management circuit to the transaction mapper circuit.

Aspect 48. The method of the four preceding aspects or any combination thereof, further including generating, by the transaction mapper circuit, a second bus-device-function (BDF) value based on the second virtual identification value, wherein the second BDF value is different from the first BDF value.

Aspect 49. The method of the preceding aspect, further including sending the second input-output request including the second BDF value from the transaction mapper circuit to a host.

Aspect 50. The method of aspects 32-42 or any combination thereof, wherein the first input-output request is generated by a first peripheral, and wherein the first virtual identification value is generated by a first credential generator in the first peripheral, the method further including generating, by a second peripheral, a second input-output request and generating, by a second credential generator in the second peripheral, a second virtual identification value for the second input-output request, wherein the second virtual identification value is different from the first virtual identification value.

Aspect 51. The method of the preceding aspect, further including sending the second input-output request including the second virtual identification value from the second peripheral to the memory management circuit.

Aspect 52. The method of the two preceding aspects or any combination thereof, further including generating, by the memory management circuit, a second address space select value based on the second virtual identification value, wherein the second address space select value is identical to the first address space select value.

Aspect 53. The method of the preceding aspect, further including sending the second input-output request including the second virtual identification value and the second address space select value from the memory management circuit to a transaction mapper circuit.

Aspect 54. The method of the four preceding aspects or any combination thereof, further including generating, by the transaction mapper circuit, a second bus-device-function (BDF) value based on the second virtual identification value, wherein the second BDF value is different from the first BDF value.

Aspect 55. The method of the preceding aspect, further including sending the second input-output request including the second BDF value from the transaction mapper circuit to a host.

Aspect 56. A system or a device configured to perform the method of aspects 32-55 or any combination thereof.

Aspect 57. A system including means for performing the method of aspects 32-55 or any combination thereof.

Aspect 58. A non-transitory computer-readable medium having executable instructions stored thereon, configured to be executable by processing circuitry for causing the processing circuitry to perform the method of aspects 32-55 or any combination thereof.

Aspect 59. A method includes mapping a plurality of channels in one or more peripherals to one or more physical functions and one or more virtual functions. In addition, the method includes generating a respective virtual identification value for each channel of the plurality of channels. The method also includes programming a respective credential generator in each channel of the plurality of channels with the respective virtual identification value. The method further includes programming a transaction mapper circuit to map each virtual identification value to a respective bus device function value and to a respective traffic class value. The method includes programming a memory management circuit to map each virtual identification value to a respective address space select value.

Aspect 60. The method of the preceding aspect, further including establishing a link with a host device after programming the credential generators, after programming the transaction mapper circuit, and after programming the memory management circuit.

Aspect 61. The method of the two preceding aspects or any combination thereof, further including programming a firewall with acceptable virtual identification values.

Aspect 62. The method of the three preceding aspects or any combination thereof, wherein mapping the plurality of channels includes mapping each channel of a plurality of channels in a single peripheral to respective virtual function of a plurality of virtual functions.

Aspect 63. The method of the four preceding aspects or any combination thereof, wherein mapping the plurality of channels includes mapping each peripheral of a plurality of peripherals to a respective physical function of a plurality of physical functions.

Aspect 64. A system or a device configured to perform the method of aspects 59-63 or any combination thereof.

Aspect 65. A system including means for performing the method of aspects 59-63 or any combination thereof.

Aspect 66. A non-transitory computer-readable medium having executable instructions stored thereon, configured to be executable by processing circuitry for causing the processing circuitry to perform the method of aspects 59-63 or any combination thereof.

Aspect 67. A method includes determining that a first virtual identification value in a first input-output request satisfies a threshold range and generating a bus device function (BDF) value and a traffic class value based on the first virtual identification value in response to determining that the first virtual identification value satisfies the threshold range. The method also includes determining that a first address select value in the first input-output request satisfies a second threshold and sending the input-output request to a destination via a bypass path in response to determining that the first address select value satisfies the second threshold.

Aspect 68. The method of the preceding aspect, further including determining that a second virtual identification value in a second input-output request does not satisfy the threshold range.

Aspect 69. The method of the preceding aspect, further including refraining from sending the second input-output request to a destination in response to determining that the second virtual identification value does not satisfy the threshold range.

Aspect 70. The method of the two preceding aspects or any combination thereof, further including outputting an error to a circuit that generated the second input-output request in response to determining that the second virtual identification value does not satisfy the threshold range.

Aspect 71. The method of aspects 67-70 or any combination thereof, further including determining that a third address select value in a third input-output request does not satisfy the second threshold

Aspect 72. The method of the preceding aspect, further including sending the third input-output request to a destination via an outbound translation circuit in response to determining that the first address select value does not satisfy the second threshold.

Aspect 73. A system or a device configured to perform the method of aspects 67-72 or any combination thereof.

Aspect 74. A system including means for performing the method of aspects 67-72 or any combination thereof.

Aspect 75. A non-transitory computer-readable medium having executable instructions stored thereon, configured to be executable by processing circuitry for causing the processing circuitry to perform the method of aspects 67-72 or any combination thereof.

This disclosure has attributed functionality to hosts110and210, root complexes112and212, switch120, endpoints130,140,250,340, and640, interconnects254and354, peripherals272,274,370,372,670, and672, transaction mappers342,542, and642, firewalls344and644, IOMMUs360and660, credential generators380-382and680-682, channels390,391,490,492, and690-692, controller530, endpoint manager610, credential allocator612, and address space select configurator614. Hosts110and210, root complexes112and212, switch120, endpoints130,140,250,340, and640, interconnects254and354, peripherals272,274,370,372,670, and672, transaction mappers342,542, and642, firewalls344and644, IOMMUs360and660, credential generators380-382and680-682, channels390,391,490,492, and690-692, controller530, endpoint manager610, credential allocator612, and address space select configurator614may include one or more processors. Hosts110and210, root complexes112and212, switch120, endpoints130,140,250,340, and640, interconnects254and354, peripherals272,274,370,372,670, and672, transaction mappers342,542, and642, firewalls344and644, IOMMUs360and660, credential generators380-382and680-682, channels390,391,490,492, and690-692, controller530, endpoint manager610, credential allocator612, and address space select configurator614may include any combination of integrated circuitry, discrete logic circuitry, analog circuitry, such as one or more microprocessors, microcontrollers, DSPs, application specific integrated circuits (ASICs), central processing units (CPUs), graphics processing units (GPUs), FPGAs, and/or any other processing resources.

In some examples, hosts110and210, root complexes112and212, switch120, endpoints130,140,250,340, and640, interconnects254and354, peripherals272,274,370,372,670, and672, transaction mappers342,542, and642, firewalls344and644, IOMMUs360and660, credential generators380-382and680-682, channels390,391,490,492, and690-692, controller530, endpoint manager610, credential allocator612, and address space select configurator614may include multiple components, such as any combination of the processing resources listed above, as well as other discrete or integrated logic circuitry, and/or analog circuitry.

The techniques described in this disclosure may also be embodied or encoded in an article of manufacture including a non-transitory computer-readable storage medium, such as memory252. Example non-transitory computer-readable storage media may include random access memory (RAM), read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electronically erasable programmable ROM (EEPROM), flash memory, a solid-state drive, a hard disk, magnetic media, optical media, or any other computer readable storage devices or tangible computer readable media. The term “non-transitory” may indicate that the storage medium is not embodied in a carrier wave or a propagated signal. In certain examples, a non-transitory storage medium may store data that can, over time, change (e.g., in RAM or cache).

In this description, the term “couple” may cover connections, communications, or signal paths that enable a functional relationship consistent with this description. For example, if device A generates a signal to control device B to perform an action: (a) in a first example, device A is coupled to device B by direct connection; or (b) in a second example, device A is coupled to device B through intervening component C if intervening component C does not alter the functional relationship between device A and device B, such that device B is controlled by device A via the control signal generated by device A.

It is understood that the present disclosure provides a number of exemplary embodiments and that modification are possible to these embodiments. Such modifications are expressly within the scope of this disclosure. Furthermore, application of these teachings to other environments, applications, and/or purposes is consistent with and contemplated by the present disclosure.